0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
bool Item::IsBoundByEnchant() const
{
// Check all enchants for soulbound
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
{
if (enchant_slot > PRISMATIC_ENCHANTMENT_SLOT || enchant_slot < PROP_ENCHANTMENT_SLOT_0) // not holding enchantment id
continue;
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
if (enchantEntry->slot & ENCHANTMENT_CAN_SOULBOUND)
return true;
}
return false;
}
Взял из эмулятора World of WarCraft Trinity 4.3.4 ветка.
Все говно в 6 строчке
PERM_ENCHANTMENT_SLOT = 0
MAX_ENCHANTMENT_SLOT = 15
PRISMATIC_ENCHANTMENT_SLOT = 6
PROP_ENCHANTMENT_SLOT_0 = 10
Запостил:
Heisenberg ,
03.01.2013 (Updated 26.03.2018 )
Fixed?
Да и потом, это же C++. Вдруг здесь что-нибудь перегружено с побочными эффектами?