diff --git a/src/game/Player.cpp b/src/game/Player.cpp index fb2f4d94e..7fbca9f93 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7439,9 +7439,20 @@ void Player::ApplyItemEquipSpell(Item *item, bool apply, bool form_change) if(!spellData.SpellId ) continue; - // wrong triggering type - if(apply && spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_EQUIP) - continue; + if (apply) + { + // apply only at-equip spells + if (spellData.SpellTrigger != ITEM_SPELLTRIGGER_ON_EQUIP) + continue; + } + else + { + // at un-apply remove all spells (not only at-apply, so any at-use active affects from item and etc) + // except with at-use with negative charges, so allow consuming item spells (including with extra flag that prevent consume really) + // applied to player after item remove from equip slot + if (spellData.SpellTrigger == ITEM_SPELLTRIGGER_ON_EQUIP && spellData.SpellCharges < 0) + continue; + } // check if it is valid spell SpellEntry const* spellproto = sSpellStore.LookupEntry(spellData.SpellId); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index af21304dc..fe70ad6ac 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11577" + #define REVISION_NR "11578" #endif // __REVISION_NR_H__