mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 22:37:04 +00:00
[10122] Avoid use EquippedItemInventoryTypeMask mask for not item targeted spells check.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
4024a1c50c
commit
15390df4d9
4 changed files with 31 additions and 27 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue