Core/Items: Corrected all spellid checks from item_template to also check -1
Closes #15797
This commit is contained in:
1 parent
570e6baa09
commit
965d29484b
3 files changed
+7
-7
No files matched your search
@@ -8101,7 +8101,7 @@ void Player::ApplyItemEquipSpell(Item* item, bool apply, bool form_change)
|
||||
_Spell const& spellData = proto->Spells[i];
|
||||
|
||||
// no spell
|
||||
if (!spellData.SpellId)
|
||||
if (spellData.SpellId <= 0)
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
@@ -8229,7 +8229,7 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
|
||||
_Spell const& spellData = proto->Spells[i];
|
||||
|
||||
// no spell
|
||||
if (!spellData.SpellId)
|
||||
if (spellData.SpellId <= 0)
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
@@ -8358,7 +8358,7 @@ void Player::CastItemUseSpell(Item* item, SpellCastTargets const& targets, uint8
|
||||
_Spell const& spellData = proto->Spells[i];
|
||||
|
||||
// no spell
|
||||
if (!spellData.SpellId)
|
||||
if (spellData.SpellId <= 0)
|
||||
continue;
|
||||
|
||||
// wrong triggering type
|
||||
@@ -22713,7 +22713,7 @@ void Player::ApplyEquipCooldown(Item* pItem)
|
||||
_Spell const& spellData = pItem->GetTemplate()->Spells[i];
|
||||
|
||||
// no spell
|
||||
if (!spellData.SpellId)
|
||||
if (spellData.SpellId <= 0)
|
||||
continue;
|
||||
|
||||
// wrong triggering type (note: ITEM_SPELLTRIGGER_ON_NO_DELAY_USE not have cooldown)
|
||||
|
||||
Reference in new issue
Block a user