mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[7362] Use IN_MILISECONDS where appropriate, other cleanups.
This commit is contained in:
parent
cea44af521
commit
2b9eeb782e
22 changed files with 120 additions and 111 deletions
|
|
@ -46,7 +46,7 @@
|
|||
#include "BattleGround.h"
|
||||
#include "Util.h"
|
||||
|
||||
#define SPELL_CHANNEL_UPDATE_INTERVAL 1000
|
||||
#define SPELL_CHANNEL_UPDATE_INTERVAL (1*IN_MILISECONDS)
|
||||
|
||||
extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
|
||||
|
||||
|
|
@ -2585,8 +2585,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)
|
||||
|
|
@ -3819,7 +3819,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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue