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:
parent
cb1aaec4af
commit
69c214bec5
1 changed files with 15 additions and 2 deletions
|
|
@ -8618,8 +8618,21 @@ void Player::ApplyItemEquipSpell(Item* item, bool apply, bool form_change)
|
|||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
if ((apply || form_change) && spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_EQUIP)
|
||||
continue;
|
||||
if (apply)
|
||||
{
|
||||
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
|
||||
SpellInfo const* spellproto = sSpellMgr->GetSpellInfo(spellData.SpellId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue