diff options
| author | Shauren <shauren.trinity@gmail.com> | 2015-11-01 16:29:29 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2015-11-01 16:29:29 +0100 |
| commit | 965d29484b0dd399f7aac4ceb4b765dcaac3dbdb (patch) | |
| tree | 3b6f104c76ef386821840559a76a2d3ec65f01a6 /src/server/game/Spells/Spell.cpp | |
| parent | 570e6baa090793bb5be33a4dbc417fb7b11d0b51 (diff) | |
Core/Items: Corrected all spellid checks from item_template to also check -1
Closes #15797
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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)) { |
