Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
This commit is contained in:
commit
0d3daf1120
66 files changed
+1111
-552
No files matched your search
@@ -24463,22 +24463,32 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons
|
||||
}
|
||||
case ITEM_CLASS_ARMOR:
|
||||
{
|
||||
// most used check: shield only
|
||||
if (spellInfo->EquippedItemSubClassMask & ((1 << ITEM_SUBCLASS_ARMOR_BUCKLER) | (1 << ITEM_SUBCLASS_ARMOR_SHIELD)))
|
||||
{
|
||||
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
|
||||
return true;
|
||||
|
||||
// special check to filter things like Shield Wall, the aura is not permanent and must stay even without required item
|
||||
if (!spellInfo->IsPassive())
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (spellInfo->Effects[i].IsAura())
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// tabard not have dependent spells
|
||||
for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_MAINHAND; ++i)
|
||||
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i))
|
||||
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
|
||||
return true;
|
||||
|
||||
// shields can be equipped to offhand slot
|
||||
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
|
||||
return true;
|
||||
|
||||
// ranged slot can have some armor subclasses
|
||||
if (Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_RANGED))
|
||||
if (item != ignoreItem && item->IsFitToSpellRequirements(spellInfo))
|
||||
return true;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
Reference in new issue
Block a user