fix(Core/Spells): Spells and auras activated by item use should not be removed on unequip. (#6255)
- Closes #5124 - Closes chromiecraft/chromiecraft#327
This commit is contained in:
@@ -8618,8 +8618,21 @@ void Player::ApplyItemEquipSpell(Item* item, bool apply, bool form_change)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// wrong triggering type
|
// wrong triggering type
|
||||||
if ((apply || form_change) && spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_EQUIP)
|
if (apply)
|
||||||
continue;
|
{
|
||||||
|
if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_EQUIP)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Auras activated by use should not be removed on unequip
|
||||||
|
if (spellData.SpellTrigger == ITEM_SPELLTRIGGER_ON_USE)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// check if it is valid spell
|
// check if it is valid spell
|
||||||
SpellInfo const* spellproto = sSpellMgr->GetSpellInfo(spellData.SpellId);
|
SpellInfo const* spellproto = sSpellMgr->GetSpellInfo(spellData.SpellId);
|
||||||
|
|||||||
Reference in New Issue
Block a user