diff options
author | megamage <none@none> | 2009-03-20 14:23:25 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-20 14:23:25 -0600 |
commit | d7e05e8003a095db6e10c470d96a80f431046099 (patch) | |
tree | c4df7751b99bdc58350cda37b08579dbf2b23b32 /src/game/Unit.cpp | |
parent | 7f130ba9717902a56439d660d17f31b00dded470 (diff) |
*Fix some out-of-range array indices of totem slot and charm spell slot.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index c57528e87a9..77f0a0eb4c3 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8157,7 +8157,7 @@ bool Unit::isAttackingPlayer() const if(charmed && charmed->isAttackingPlayer()) return true; - for (int8 i = 0; i < MAX_TOTEM; i++) + for (int8 i = 0; i < MAX_SUMMON_SLOT; ++i) { if(m_TotemSlot[i]) { @@ -11561,7 +11561,7 @@ void CharmInfo::InitCharmCreateSpells() InitPetActionBar(); - for(uint32 x = 0; x < 4; ++x) + for(uint32 x = 0; x < MAX_SPELL_CHARM; ++x) { uint32 spellId = ((Creature*)m_unit)->m_spells[x]; m_charmspells[x].spellId = spellId; @@ -11623,7 +11623,7 @@ void CharmInfo::ToggleCreatureAutocast(uint32 spellid, bool apply) if(IsPassiveSpell(spellid)) return; - for(uint32 x = 0; x < CREATURE_MAX_SPELLS; ++x) + for(uint32 x = 0; x < MAX_SPELL_CHARM; ++x) { if(spellid == m_charmspells[x].spellId) { |