aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-24 17:48:52 +0200
committerSpp <none@none>2010-04-24 17:48:52 +0200
commita12c0aef85897d1a8af2c03ff3e888c7c2e62848 (patch)
tree197d214a27d968a310e7977b21b57ca25f29adfe /src
parent9aa3fea85793a8fe44ea3619e11812af4841eaaa (diff)
Fix compile ¬¬
+ Code Style (for, if, while) --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/BattleGroundHandler.cpp6
-rw-r--r--src/game/GroupHandler.cpp2
-rw-r--r--src/game/Guild.cpp2
-rw-r--r--src/game/Mail.cpp2
-rw-r--r--src/game/ObjectMgr.cpp2
-rw-r--r--src/game/Player.cpp4
-rw-r--r--src/game/SpellAuraEffects.h2
-rw-r--r--src/game/Unit.cpp2
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp2
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp2
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.cpp20
11 files changed, 23 insertions, 23 deletions
diff --git a/src/game/BattleGroundHandler.cpp b/src/game/BattleGroundHandler.cpp
index aecfbace2a2..1bd653c2d1c 100644
--- a/src/game/BattleGroundHandler.cpp
+++ b/src/game/BattleGroundHandler.cpp
@@ -164,7 +164,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
GroupQueueInfo * ginfo;
uint32 avgTime;
- if(err > 0)
+ if (err > 0)
{
sLog.outDebug("Battleground: the following players are joining as group:");
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0);
@@ -178,7 +178,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
WorldPacket data;
- if(err <= 0)
+ if (err <= 0)
{
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
@@ -706,7 +706,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
{
uint32 avgTime;
- if(err > 0)
+ if (err > 0)
{
sLog.outDebug("Battleground: arena join as group start");
if (isRated)
diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp
index 99ff56d097a..bdec51ed65d 100644
--- a/src/game/GroupHandler.cpp
+++ b/src/game/GroupHandler.cpp
@@ -171,7 +171,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
data << GetPlayer()->GetName(); // max len 48
data << uint32(0); // unk
data << uint8(0); // count
- //for(int i = 0; i < count; ++i)
+ //for (int i = 0; i < count; ++i)
// data << uint32(0);
data << uint32(0); // unk
player->GetSession()->SendPacket(&data);
diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp
index 8bd4d806ab8..418e409998f 100644
--- a/src/game/Guild.cpp
+++ b/src/game/Guild.cpp
@@ -2305,7 +2305,7 @@ void Guild::BroadcastEvent(GuildEvents event, uint64 guid, uint8 strCount, std::
break;
}
- if(guid)
+ if (guid)
data << uint64(guid);
BroadcastPacket(&data);
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp
index cb4c464af6a..7ccb2b2c074 100644
--- a/src/game/Mail.cpp
+++ b/src/game/Mail.cpp
@@ -672,7 +672,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
}
// in mail template case we need create new item text
- if(m->mailTemplateId)
+ if (m->mailTemplateId)
{
MailTemplateEntry const* mailTemplateEntry = sMailTemplateStore.LookupEntry(m->mailTemplateId);
if (!mailTemplateEntry)
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index cffb81253a3..feea3b79c4c 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -3687,7 +3687,7 @@ void ObjectMgr::LoadQuests()
if (qinfo->QuestFlags & QUEST_FLAGS_AUTO_REWARDED)
{
// at auto-reward can be rewarded only RewChoiceItemId[0]
- for(int j = 1; j < QUEST_REWARD_CHOICES_COUNT; ++j )
+ for (int j = 1; j < QUEST_REWARD_CHOICES_COUNT; ++j )
{
if (uint32 id = qinfo->RewChoiceItemId[j])
{
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index e441f274847..79464e1459e 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -9023,7 +9023,7 @@ uint8 Player::FindEquipSlot(ItemPrototype const* proto, uint32 slot, bool swap)
if (ItemPrototype const *mhWeaponProto = mhWeapon->GetProto())
if (mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || mhWeaponProto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF)
{
- AutoUnequipOffhandIfNeed(true);
+ const_cast<Player *>(this)->AutoUnequipOffhandIfNeed(true);
break;
}
if (CanDualWield() && CanTitanGrip() && proto->SubClass != ITEM_SUBCLASS_WEAPON_POLEARM && proto->SubClass != ITEM_SUBCLASS_WEAPON_STAFF)
@@ -16826,7 +16826,7 @@ void Player::_LoadWeeklyQuestStatus(QueryResult_AutoPtr result)
sLog.outDebug("Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
- while(result->NextRow());
+ while (result->NextRow());
}
m_WeeklyQuestChanged = false;
diff --git a/src/game/SpellAuraEffects.h b/src/game/SpellAuraEffects.h
index 72311c71032..c2c99b167e0 100644
--- a/src/game/SpellAuraEffects.h
+++ b/src/game/SpellAuraEffects.h
@@ -62,7 +62,7 @@ class AuraEffect
uint32 GetTickNumber() const { return m_tickNumber; }
int32 GetTotalTicks() const { return m_amplitude ? (GetBase()->GetMaxDuration() / m_amplitude) : 1;}
- void ResetPeriodic(bool resetPeriodicTimer = false) { if(resetPeriodicTimer) m_periodicTimer = m_amplitude; m_tickNumber = 0;}
+ void ResetPeriodic(bool resetPeriodicTimer = false) { if (resetPeriodicTimer) m_periodicTimer = m_amplitude; m_tickNumber = 0;}
bool IsPeriodic() const { return m_isPeriodic; }
bool IsAffectedOnSpell(SpellEntry const *spell) const;
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index db1a5c4fcbb..aa84fe3ed8b 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -8214,7 +8214,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
if (this->GetTypeId() != TYPEID_PLAYER || !plr || plr->getClass() != CLASS_DEATH_KNIGHT)
return false;
- if(!plr->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
+ if (!plr->IsBaseRuneSlotsOnCooldown(RUNE_BLOOD))
return false;
}
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
index 8133a0dfea7..e63c3757d94 100644
--- a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
@@ -151,7 +151,7 @@ struct boss_bronjahmAI : public ScriptedAI
return;
}
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp
index 94f29fecb23..6811ba953e2 100644
--- a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp
@@ -241,7 +241,7 @@ struct boss_devourer_of_soulsAI : public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.cpp
index 66ca42e1ed5..5c85da69898 100644
--- a/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.cpp
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.cpp
@@ -231,7 +231,7 @@ struct npc_sylvanas_fosAI: public ScriptedAI
//if (me->hasUnitState(UNIT_STAT_CASTING))
// return;
- //while(uint32 eventId = events.ExecuteEvent())
+ //while (uint32 eventId = events.ExecuteEvent())
//{
// switch(eventId)
// {
@@ -337,7 +337,7 @@ struct npc_jaina_fosAI: public ScriptedAI
//if (me->hasUnitState(UNIT_STAT_CASTING))
// return;
- //while(uint32 eventId = events.ExecuteEvent())
+ //while (uint32 eventId = events.ExecuteEvent())
//{
// switch(eventId)
// {
@@ -406,7 +406,7 @@ struct mob_spiteful_apparitionAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -451,7 +451,7 @@ struct mob_spectral_wardenAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -500,7 +500,7 @@ struct mob_soulguard_watchmanAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -548,7 +548,7 @@ struct mob_soulguard_reaperAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -599,7 +599,7 @@ struct mob_soulguard_bonecasterAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -654,7 +654,7 @@ struct mob_soulguard_animatorAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -716,7 +716,7 @@ struct mob_soulguard_adeptAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{
@@ -774,7 +774,7 @@ struct mob_soul_horrorAI: public ScriptedAI
if (me->hasUnitState(UNIT_STAT_CASTING))
return;
- while(uint32 eventId = events.ExecuteEvent())
+ while (uint32 eventId = events.ExecuteEvent())
{
switch(eventId)
{