Core/Items: Corrected all spellid checks from item_template to also check -1

Closes #15797
This commit is contained in:
Shauren committed 2015-11-01 16:29:29 +01:00
1 parent 570e6baa09
commit 965d29484b
3 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -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))
{