mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9641] Fix typo; IN_MILISECONDS -> IN_MILLISECONDS.
This commit is contained in:
parent
e499150b59
commit
34e56c9978
25 changed files with 96 additions and 96 deletions
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
#include <cmath>
|
||||
|
||||
#define ZONE_UPDATE_INTERVAL (1*IN_MILISECONDS)
|
||||
#define ZONE_UPDATE_INTERVAL (1*IN_MILLISECONDS)
|
||||
|
||||
#define PLAYER_SKILL_INDEX(x) (PLAYER_SKILL_INFO_1_1 + ((x)*3))
|
||||
#define PLAYER_SKILL_VALUE_INDEX(x) (PLAYER_SKILL_INDEX(x)+1)
|
||||
|
|
@ -406,7 +406,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
|
|||
|
||||
m_swingErrorMsg = 0;
|
||||
|
||||
m_DetectInvTimer = 1*IN_MILISECONDS;
|
||||
m_DetectInvTimer = 1*IN_MILLISECONDS;
|
||||
|
||||
for (int j=0; j < PLAYER_MAX_BATTLEGROUND_QUEUES; ++j)
|
||||
{
|
||||
|
|
@ -898,13 +898,13 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
|
|||
case FATIGUE_TIMER:
|
||||
if (GetSession()->GetSecurity() >= (AccountTypes)sWorld.getConfig(CONFIG_UINT32_TIMERBAR_FATIGUE_GMLEVEL))
|
||||
return DISABLED_MIRROR_TIMER;
|
||||
return sWorld.getConfig(CONFIG_UINT32_TIMERBAR_FATIGUE_MAX)*IN_MILISECONDS;
|
||||
return sWorld.getConfig(CONFIG_UINT32_TIMERBAR_FATIGUE_MAX)*IN_MILLISECONDS;
|
||||
case BREATH_TIMER:
|
||||
{
|
||||
if (!isAlive() || HasAuraType(SPELL_AURA_WATER_BREATHING) ||
|
||||
GetSession()->GetSecurity() >= (AccountTypes)sWorld.getConfig(CONFIG_UINT32_TIMERBAR_BREATH_GMLEVEL))
|
||||
return DISABLED_MIRROR_TIMER;
|
||||
int32 UnderWaterTime = sWorld.getConfig(CONFIG_UINT32_TIMERBAR_BREATH_MAX)*IN_MILISECONDS;
|
||||
int32 UnderWaterTime = sWorld.getConfig(CONFIG_UINT32_TIMERBAR_BREATH_MAX)*IN_MILLISECONDS;
|
||||
AuraList const& mModWaterBreathing = GetAurasByType(SPELL_AURA_MOD_WATER_BREATHING);
|
||||
for(AuraList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
|
||||
UnderWaterTime = uint32(UnderWaterTime * (100.0f + (*i)->GetModifier()->m_amount) / 100.0f);
|
||||
|
|
@ -914,7 +914,7 @@ int32 Player::getMaxTimer(MirrorTimerType timer)
|
|||
{
|
||||
if (!isAlive() || GetSession()->GetSecurity() >= (AccountTypes)sWorld.getConfig(CONFIG_UINT32_TIMERBAR_FIRE_GMLEVEL))
|
||||
return DISABLED_MIRROR_TIMER;
|
||||
return sWorld.getConfig(CONFIG_UINT32_TIMERBAR_FIRE_MAX)*IN_MILISECONDS;
|
||||
return sWorld.getConfig(CONFIG_UINT32_TIMERBAR_FIRE_MAX)*IN_MILLISECONDS;
|
||||
}
|
||||
default:
|
||||
return 0;
|
||||
|
|
@ -949,7 +949,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
// Timer limit - need deal damage
|
||||
if (m_MirrorTimer[BREATH_TIMER] < 0)
|
||||
{
|
||||
m_MirrorTimer[BREATH_TIMER]+= 1*IN_MILISECONDS;
|
||||
m_MirrorTimer[BREATH_TIMER]+= 1*IN_MILLISECONDS;
|
||||
// Calculate and deal damage
|
||||
// TODO: Check this formula
|
||||
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
|
||||
|
|
@ -985,7 +985,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
// Timer limit - need deal damage or teleport ghost to graveyard
|
||||
if (m_MirrorTimer[FATIGUE_TIMER] < 0)
|
||||
{
|
||||
m_MirrorTimer[FATIGUE_TIMER]+= 1*IN_MILISECONDS;
|
||||
m_MirrorTimer[FATIGUE_TIMER]+= 1*IN_MILLISECONDS;
|
||||
if (isAlive()) // Calculate and deal damage
|
||||
{
|
||||
uint32 damage = GetMaxHealth() / 5 + urand(0, getLevel()-1);
|
||||
|
|
@ -1018,7 +1018,7 @@ void Player::HandleDrowning(uint32 time_diff)
|
|||
m_MirrorTimer[FIRE_TIMER]-=time_diff;
|
||||
if (m_MirrorTimer[FIRE_TIMER] < 0)
|
||||
{
|
||||
m_MirrorTimer[FIRE_TIMER]+= 1*IN_MILISECONDS;
|
||||
m_MirrorTimer[FIRE_TIMER]+= 1*IN_MILLISECONDS;
|
||||
// Calculate and deal damage
|
||||
// TODO: Check this formula
|
||||
uint32 damage = urand(600, 700);
|
||||
|
|
@ -1347,7 +1347,7 @@ void Player::Update( uint32 p_time )
|
|||
{
|
||||
m_drunkTimer += p_time;
|
||||
|
||||
if (m_drunkTimer > 10*IN_MILISECONDS)
|
||||
if (m_drunkTimer > 10*IN_MILLISECONDS)
|
||||
HandleSobering();
|
||||
}
|
||||
|
||||
|
|
@ -2763,7 +2763,7 @@ void Player::SendInitialSpells()
|
|||
continue;
|
||||
}
|
||||
|
||||
time_t cooldown = itr->second.end > curTime ? (itr->second.end-curTime)*IN_MILISECONDS : 0;
|
||||
time_t cooldown = itr->second.end > curTime ? (itr->second.end-curTime)*IN_MILLISECONDS : 0;
|
||||
|
||||
if(sEntry->Category) // may be wrong, but anyway better than nothing...
|
||||
{
|
||||
|
|
@ -3462,8 +3462,8 @@ void Player::RemoveArenaSpellCooldowns()
|
|||
SpellEntry const * entry = sSpellStore.LookupEntry(itr->first);
|
||||
// check if spellentry is present and if the cooldown is less than 15 mins
|
||||
if( entry &&
|
||||
entry->RecoveryTime <= 15 * MINUTE * IN_MILISECONDS &&
|
||||
entry->CategoryRecoveryTime <= 15 * MINUTE * IN_MILISECONDS )
|
||||
entry->RecoveryTime <= 15 * MINUTE * IN_MILLISECONDS &&
|
||||
entry->CategoryRecoveryTime <= 15 * MINUTE * IN_MILLISECONDS )
|
||||
{
|
||||
// remove & notify
|
||||
RemoveSpellCooldown(itr->first, true);
|
||||
|
|
@ -4262,7 +4262,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
|||
{
|
||||
if(Aura* Aur = GetAura(SPELL_ID_PASSIVE_RESURRECTION_SICKNESS,SpellEffectIndex(i)))
|
||||
{
|
||||
Aur->SetAuraDuration(delta*IN_MILISECONDS);
|
||||
Aur->SetAuraDuration(delta*IN_MILLISECONDS);
|
||||
Aur->SendAuraUpdate(false);
|
||||
}
|
||||
}
|
||||
|
|
@ -4283,7 +4283,7 @@ void Player::KillPlayer()
|
|||
ApplyModFlag(PLAYER_FIELD_BYTES, PLAYER_FIELD_BYTE_RELEASE_TIMER, !sMapStore.LookupEntry(GetMapId())->Instanceable());
|
||||
|
||||
// 6 minutes until repop at graveyard
|
||||
m_deathTimer = 6*MINUTE*IN_MILISECONDS;
|
||||
m_deathTimer = 6*MINUTE*IN_MILLISECONDS;
|
||||
|
||||
UpdateCorpseReclaimDelay(); // dependent at use SetDeathPvP() call before kill
|
||||
|
||||
|
|
@ -13183,10 +13183,10 @@ void Player::AddQuest( Quest const *pQuest, Object *questGiver )
|
|||
|
||||
// shared timed quest
|
||||
if(questGiver && questGiver->GetTypeId()==TYPEID_PLAYER)
|
||||
limittime = ((Player*)questGiver)->getQuestStatusMap()[quest_id].m_timer / IN_MILISECONDS;
|
||||
limittime = ((Player*)questGiver)->getQuestStatusMap()[quest_id].m_timer / IN_MILLISECONDS;
|
||||
|
||||
AddTimedQuest( quest_id );
|
||||
questStatusData.m_timer = limittime * IN_MILISECONDS;
|
||||
questStatusData.m_timer = limittime * IN_MILLISECONDS;
|
||||
qtime = static_cast<uint32>(time(NULL)) + limittime;
|
||||
}
|
||||
else
|
||||
|
|
@ -15343,10 +15343,10 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
|
|||
// negative effects should continue counting down after logout
|
||||
if (remaintime != -1 && !IsPositiveEffect(spellid, effindex))
|
||||
{
|
||||
if (remaintime/IN_MILISECONDS <= int32(timediff))
|
||||
if (remaintime/IN_MILLISECONDS <= int32(timediff))
|
||||
continue;
|
||||
|
||||
remaintime -= timediff*IN_MILISECONDS;
|
||||
remaintime -= timediff*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
// prevent wrong values of remaincharges
|
||||
|
|
@ -15756,7 +15756,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
|
|||
if (quest_time <= sWorld.GetGameTime())
|
||||
questStatusData.m_timer = 1;
|
||||
else
|
||||
questStatusData.m_timer = uint32(quest_time - sWorld.GetGameTime()) * IN_MILISECONDS;
|
||||
questStatusData.m_timer = uint32(quest_time - sWorld.GetGameTime()) * IN_MILLISECONDS;
|
||||
}
|
||||
else
|
||||
quest_time = 0;
|
||||
|
|
@ -16647,11 +16647,11 @@ void Player::_SaveQuestStatus()
|
|||
case QUEST_NEW :
|
||||
CharacterDatabase.PExecute("INSERT INTO character_queststatus (guid,quest,status,rewarded,explored,timer,mobcount1,mobcount2,mobcount3,mobcount4,itemcount1,itemcount2,itemcount3,itemcount4) "
|
||||
"VALUES ('%u', '%u', '%u', '%u', '%u', '" UI64FMTD "', '%u', '%u', '%u', '%u', '%u', '%u', '%u', '%u')",
|
||||
GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILISECONDS+ sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
|
||||
GetGUIDLow(), i->first, i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS+ sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3]);
|
||||
break;
|
||||
case QUEST_CHANGED :
|
||||
CharacterDatabase.PExecute("UPDATE character_queststatus SET status = '%u',rewarded = '%u',explored = '%u',timer = '" UI64FMTD "',mobcount1 = '%u',mobcount2 = '%u',mobcount3 = '%u',mobcount4 = '%u',itemcount1 = '%u',itemcount2 = '%u',itemcount3 = '%u',itemcount4 = '%u' WHERE guid = '%u' AND quest = '%u' ",
|
||||
i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILISECONDS + sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first );
|
||||
i->second.m_status, i->second.m_rewarded, i->second.m_explored, uint64(i->second.m_timer / IN_MILLISECONDS + sWorld.GetGameTime()), i->second.m_creatureOrGOcount[0], i->second.m_creatureOrGOcount[1], i->second.m_creatureOrGOcount[2], i->second.m_creatureOrGOcount[3], i->second.m_itemcount[0], i->second.m_itemcount[1], i->second.m_itemcount[2], i->second.m_itemcount[3], GetGUIDLow(), i->first );
|
||||
break;
|
||||
case QUEST_UNCHANGED:
|
||||
break;
|
||||
|
|
@ -17232,7 +17232,7 @@ void Player::PetSpellInitialize()
|
|||
|
||||
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureSpellCooldowns.begin(); itr != pet->m_CreatureSpellCooldowns.end(); ++itr)
|
||||
{
|
||||
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
|
||||
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0;
|
||||
|
||||
data << uint32(itr->first); // spellid
|
||||
data << uint16(0); // spell category?
|
||||
|
|
@ -17242,7 +17242,7 @@ void Player::PetSpellInitialize()
|
|||
|
||||
for(CreatureSpellCooldowns::const_iterator itr = pet->m_CreatureCategoryCooldowns.begin(); itr != pet->m_CreatureCategoryCooldowns.end(); ++itr)
|
||||
{
|
||||
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILISECONDS : 0;
|
||||
time_t cooldown = (itr->second > curTime) ? (itr->second - curTime) * IN_MILLISECONDS : 0;
|
||||
|
||||
data << uint32(itr->first); // spellid
|
||||
data << uint16(0); // spell category?
|
||||
|
|
@ -17889,7 +17889,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs )
|
|||
{
|
||||
data << uint32(unSpellId);
|
||||
data << uint32(unTimeMs); // in m.secs
|
||||
AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/IN_MILISECONDS);
|
||||
AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
GetSession()->SendPacket(&data);
|
||||
|
|
@ -18315,8 +18315,8 @@ void Player::AddSpellAndCategoryCooldowns(SpellEntry const* spellInfo, uint32 it
|
|||
if( rec == 0 && catrec == 0)
|
||||
return;
|
||||
|
||||
catrecTime = catrec ? curTime+catrec/IN_MILISECONDS : 0;
|
||||
recTime = rec ? curTime+rec/IN_MILISECONDS : catrecTime;
|
||||
catrecTime = catrec ? curTime+catrec/IN_MILLISECONDS : 0;
|
||||
recTime = rec ? curTime+rec/IN_MILLISECONDS : catrecTime;
|
||||
}
|
||||
|
||||
// self spell cooldown
|
||||
|
|
@ -20009,7 +20009,7 @@ void Player::SendCorpseReclaimDelay(bool load)
|
|||
|
||||
//! corpse reclaim delay 30 * 1000ms or longer at often deaths
|
||||
WorldPacket data(SMSG_CORPSE_RECLAIM_DELAY, 4);
|
||||
data << uint32(delay*IN_MILISECONDS);
|
||||
data << uint32(delay*IN_MILLISECONDS);
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue