mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
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;
|
||||
|
||||
// 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);
|
||||
|
||||
Reference in New Issue
Block a user