fix(Core/Items): items with charges should not remove on item unequip its … (#7064)

- Closes #5716
This commit is contained in:
UltraNix
2021-07-25 03:36:40 +02:00
committed by GitHub
parent 592b9b069a
commit 270f7bf506
5 changed files with 43 additions and 38 deletions

View File

@@ -6904,8 +6904,8 @@ void Player::ApplyItemEquipSpell(Item* item, bool apply, bool form_change)
}
else
{
// Auras activated by use should not be removed on unequip
if (spellData.SpellTrigger == ITEM_SPELLTRIGGER_ON_USE)
// Auras activated by use should not be removed on unequip (with no charges)
if (spellData.SpellTrigger == ITEM_SPELLTRIGGER_ON_USE && spellData.SpellCharges <= 0)
{
continue;
}