[7362] Use IN_MILISECONDS where appropriate, other cleanups. Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
1 parent
61b999fd3a
commit
b1677c901d
21 files changed
+97
-87
No files matched your search
+6
-6
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user