diff options
| author | megamage <none@none> | 2009-03-02 16:47:20 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-02 16:47:20 -0600 |
| commit | 61b999fd3a70eff6ccf3d460534c21ba3a3f9408 (patch) | |
| tree | c1f52ca7a48d33995ef01e83fd35481bf0f81f6b /src/game/Spell.cpp | |
| parent | f503f320ad6db899cb966fadd5757c71d0c005b1 (diff) | |
[7360] Use defines instead harcoded item prototype array sizes. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
| -rw-r--r-- | src/game/Spell.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index e4d57801161..1f77d5df611 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -337,7 +337,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi if((m_caster->getClassMask() & CLASSMASK_WAND_USERS) != 0 && m_caster->GetTypeId()==TYPEID_PLAYER) { if(Item* pItem = ((Player*)m_caster)->GetWeaponForAttack(RANGED_ATTACK)) - m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage->DamageType); + m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage[0].DamageType); } } // Set health leech amount to zero @@ -2454,7 +2454,7 @@ void Spell::SendSpellCooldown() ItemPrototype const* proto = m_CastItem->GetProto(); if(proto) { - for(int idx = 0; idx < 5; ++idx) + for(int idx = 0; idx < MAX_ITEM_PROTO_SPELLS; ++idx) { if(proto->Spells[idx].SpellId == m_spellInfo->Id) { @@ -3201,7 +3201,7 @@ void Spell::TakeCastItem() bool expendable = false; bool withoutCharges = false; - for (int i = 0; i<5; i++) + for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) { if (proto->Spells[i].SpellId) { |
