diff options
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r-- | src/game/Spell.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 1f77d5df611..0672b759548 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -49,7 +49,7 @@ #include "Util.h" #include "TemporarySummon.h" -#define SPELL_CHANNEL_UPDATE_INTERVAL 1000 +#define SPELL_CHANNEL_UPDATE_INTERVAL (1*IN_MILISECONDS) extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS]; @@ -2497,8 +2497,8 @@ void Spell::SendSpellCooldown() time_t curTime = time(NULL); - time_t catrecTime = catrec ? curTime+catrec/1000 : 0; // in secs - time_t recTime = rec ? curTime+rec/1000 : catrecTime;// in secs + time_t catrecTime = catrec ? curTime+catrec/IN_MILISECONDS : 0; + time_t recTime = rec ? curTime+rec/IN_MILISECONDS : catrecTime; // self spell cooldown if(recTime > 0) @@ -3464,7 +3464,7 @@ void Spell::TakeReagents() ItemPrototype const *proto = m_CastItem->GetProto(); if( proto && proto->ItemId == itemid ) { - for(int s=0;s<5;s++) + for(int s=0;s < MAX_ITEM_PROTO_SPELLS; ++s) { // CastItem will be used up and does not count as reagent int32 charges = m_CastItem->GetSpellCharges(s); @@ -3774,7 +3774,7 @@ uint8 Spell::CanCast(bool strict) // - with greater than 15 min CD without SPELL_ATTR_EX4_USABLE_IN_ARENA flag // - with SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA flag if( (m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_NOT_USABLE_IN_ARENA) || - GetSpellRecoveryTime(m_spellInfo) > 15 * MINUTE * 1000 && !(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_USABLE_IN_ARENA) ) + GetSpellRecoveryTime(m_spellInfo) > 15 * MINUTE * IN_MILISECONDS && !(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_USABLE_IN_ARENA) ) if(MapEntry const* mapEntry = sMapStore.LookupEntry(m_caster->GetMapId())) if(mapEntry->IsBattleArena()) return SPELL_FAILED_NOT_IN_ARENA; @@ -4963,7 +4963,7 @@ uint8 Spell::CheckItems() ItemPrototype const *proto = m_CastItem->GetProto(); if(!proto) return SPELL_FAILED_ITEM_NOT_READY; - for(int s=0;s<5;s++) + for(int s=0;s < MAX_ITEM_PROTO_SPELLS; ++s) { // CastItem will be used up and does not count as reagent int32 charges = m_CastItem->GetSpellCharges(s); |