[10122] Avoid use EquippedItemInventoryTypeMask mask for not item targeted spells check.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Lynx3d 2010-06-29 22:11:10 +04:00 committed by VladimirMangos
parent 4024a1c50c
commit 15390df4d9
4 changed files with 31 additions and 27 deletions

View file

@ -770,7 +770,10 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const
}
}
if(spellInfo->EquippedItemInventoryTypeMask != 0) // 0 == any inventory type
// Only check for item enchantments (TARGET_FLAG_ITEM), all other spells are either NPC spells
// or spells where slot requirements are already handled with AttributesEx3 fields
// and special code (Titan's Grip, Windfury Attack). Check clearly not applicable for Lava Lash.
if(spellInfo->EquippedItemInventoryTypeMask != 0 && (spellInfo->Targets & TARGET_FLAG_ITEM)) // 0 == any inventory type
{
if((spellInfo->EquippedItemInventoryTypeMask & (1 << proto->InventoryType)) == 0)
return false; // inventory type not present in mask