From 965d29484b0dd399f7aac4ceb4b765dcaac3dbdb Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 1 Nov 2015 16:29:29 +0100 Subject: Core/Items: Corrected all spellid checks from item_template to also check -1 Closes #15797 --- src/server/game/Spells/Spell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/Spells/Spell.cpp') diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c026d10241e..76eefa0bb0e 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4253,7 +4253,7 @@ void Spell::TakeCastItem() for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) { - if (proto->Spells[i].SpellId) + if (proto->Spells[i].SpellId > 0) { // item has limited charges if (proto->Spells[i].SpellCharges) @@ -6044,7 +6044,7 @@ SpellCastResult Spell::CheckItems() for (uint8 e = 0; e < MAX_ITEM_PROTO_SPELLS; ++e) { ItemTemplate const* proto = targetItem->GetTemplate(); - if (proto->Spells[e].SpellId && ( + if (proto->Spells[e].SpellId > 0 && ( proto->Spells[e].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE || proto->Spells[e].SpellTrigger == ITEM_SPELLTRIGGER_ON_NO_DELAY_USE)) { -- cgit v1.2.3