aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-07 17:24:07 +0200
committerSpp <none@none>2010-04-07 17:24:07 +0200
commitf490ad5ac259712e323f0a52e608ff1383b2fc41 (patch)
tree1bbe00973a622672eccf3450f302f7cb3bc33882 /src
parent502fc82fb822e4245aff0530d22c013daa5d3de9 (diff)
Code Style: tab to spaces
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ArenaTeam.cpp10
-rw-r--r--src/game/BattleGround.h4
-rw-r--r--src/game/BattleGroundIC.h4
-rw-r--r--src/game/BattleGroundMgr.cpp8
-rw-r--r--src/game/BattleGroundSA.cpp108
-rw-r--r--src/game/BattleGroundSA.h52
-rw-r--r--src/game/GameObject.cpp20
-rw-r--r--src/game/Group.cpp2
-rw-r--r--src/game/Guild.cpp6
-rw-r--r--src/game/Item.cpp8
-rw-r--r--src/game/Level3.cpp2
-rw-r--r--src/game/Object.cpp4
-rw-r--r--src/game/Object.h8
-rw-r--r--src/game/ObjectMgr.cpp4
-rw-r--r--src/game/PetAI.cpp4
-rw-r--r--src/game/PetHandler.cpp2
-rw-r--r--src/game/Player.cpp6
-rw-r--r--src/game/Player.h2
-rw-r--r--src/game/QuestDef.cpp8
-rw-r--r--src/game/Spell.cpp16
-rw-r--r--src/game/SpellAuraEffects.cpp4
-rw-r--r--src/game/SpellAuras.cpp8
-rw-r--r--src/game/SpellEffects.cpp6
-rw-r--r--src/game/SpellMgr.cpp6
-rw-r--r--src/game/SpellMgr.h28
-rw-r--r--src/game/Unit.cpp26
-rw-r--r--src/game/Unit.h4
-rw-r--r--src/game/WorldSession.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp16
-rw-r--r--src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp10
-rw-r--r--src/scripts/eastern_kingdoms/western_plaguelands.cpp2
-rw-r--r--src/scripts/examples/example_misc.cpp2
-rw-r--r--src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h2
-rw-r--r--src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp2
-rw-r--r--src/scripts/kalimdor/razorfen_downs/razorfen_downs.h2
-rw-r--r--src/scripts/northrend/borean_tundra.cpp8
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp4
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h6
-rw-r--r--src/scripts/northrend/crystalsong_forest.cpp4
-rw-r--r--src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp54
-rw-r--r--src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp32
-rw-r--r--src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp48
-rw-r--r--src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp4
-rw-r--r--src/scripts/northrend/grizzly_hills.cpp26
-rw-r--r--src/scripts/northrend/gundrak/instance_gundrak.cpp2
-rw-r--r--src/scripts/northrend/icecrown.cpp4
-rw-r--r--src/scripts/northrend/naxxramas/boss_gothik.cpp2
-rw-r--r--src/scripts/northrend/nexus/oculus/boss_drakos.cpp10
-rw-r--r--src/scripts/northrend/violet_hold/boss_ichoron.cpp2
-rw-r--r--src/scripts/northrend/violet_hold/boss_lavanthor.cpp2
-rw-r--r--src/scripts/northrend/violet_hold/boss_moragg.cpp2
-rw-r--r--src/scripts/northrend/violet_hold/boss_xevozz.cpp2
-rw-r--r--src/scripts/northrend/zuldrak.cpp14
-rw-r--r--src/shared/Database/SqlOperations.h42
54 files changed, 333 insertions, 333 deletions
diff --git a/src/game/ArenaTeam.cpp b/src/game/ArenaTeam.cpp
index 2512d20115b..1e910521457 100644
--- a/src/game/ArenaTeam.cpp
+++ b/src/game/ArenaTeam.cpp
@@ -47,7 +47,7 @@ ArenaTeam::ArenaTeam()
m_stats.games_season = 0;
m_stats.rank = 0;
if (sWorld.getConfig(CONFIG_ARENA_START_RATING)>=0)
- m_stats.rating = sWorld.getConfig(CONFIG_ARENA_START_RATING);
+ m_stats.rating = sWorld.getConfig(CONFIG_ARENA_START_RATING);
else if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6)
m_stats.rating = 0;
else
@@ -146,7 +146,7 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid)
newmember.wins_season = 0;
newmember.wins_week = 0;
if (sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING) >= 0)
- newmember.personal_rating = sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING);
+ newmember.personal_rating = sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING);
else if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6)
{
if (m_stats.rating < 1000)
@@ -199,7 +199,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult_AutoPtr arenaTeamDataResult)
m_stats.games_season = fields[12].GetUInt32();
m_stats.wins_season = fields[13].GetUInt32();
m_stats.rank = fields[14].GetUInt32();
-
+
return true;
}
@@ -216,7 +216,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult_AutoPtr arenaTeamMembersResult)
//prevent crash if db records are broken, when all members in result are already processed and current team hasn't got any members
if (!fields)
break;
- uint32 arenaTeamId = fields[0].GetUInt32();
+ uint32 arenaTeamId = fields[0].GetUInt32();
if (arenaTeamId < m_TeamId)
{
//there is in table arena_team_member record which doesn't have arenateamid in arena_team table, report error
@@ -322,7 +322,7 @@ void ArenaTeam::Disband(WorldSession *session)
// Removing from members is done in DelMember.
DelMember(m_members.front().guid);
}
-
+
if (session)
{
if(Player *player = session->GetPlayer())
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h
index 43b724fe1c2..3d0b5025712 100644
--- a/src/game/BattleGround.h
+++ b/src/game/BattleGround.h
@@ -495,8 +495,8 @@ class BattleGround
virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
void EventPlayerLoggedIn(Player* player, uint64 plr_guid);
void EventPlayerLoggedOut(Player* player);
- virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*target_obj*/, uint32 /*eventId*/) {}
- virtual void EventPlayerUsedGO(Player* player, GameObject* go){}
+ virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*target_obj*/, uint32 /*eventId*/) {}
+ virtual void EventPlayerUsedGO(Player* player, GameObject* go){}
/* Death related */
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
diff --git a/src/game/BattleGroundIC.h b/src/game/BattleGroundIC.h
index 987350fc9f3..7038be0feb8 100644
--- a/src/game/BattleGroundIC.h
+++ b/src/game/BattleGroundIC.h
@@ -23,8 +23,8 @@ class BattleGround;
enum Buffs
{
- OIL_REFINERY = 68719,
- QUARRY = 68720
+ OIL_REFINERY = 68719,
+ QUARRY = 68720
};
class BattleGroundICScore : public BattleGroundScore
diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
index 81ef8846075..0b75155e1d0 100644
--- a/src/game/BattleGroundMgr.cpp
+++ b/src/game/BattleGroundMgr.cpp
@@ -1393,10 +1393,10 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
case BATTLEGROUND_AA:
case BATTLEGROUND_RL:
case BATTLEGROUND_SA:
- *data << uint32(2);
- *data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed);
- *data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed);
- break;
+ *data << uint32(2);
+ *data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed);
+ *data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed);
+ break;
case BATTLEGROUND_DS: // wotlk
case BATTLEGROUND_RV: // wotlk
case BATTLEGROUND_IC: // wotlk
diff --git a/src/game/BattleGroundSA.cpp b/src/game/BattleGroundSA.cpp
index 33e05ece62f..ec39710a2c6 100644
--- a/src/game/BattleGroundSA.cpp
+++ b/src/game/BattleGroundSA.cpp
@@ -76,9 +76,9 @@ bool BattleGroundSA::ResetObjs()
for(uint8 i = 0; i < BG_SA_CENTRAL_FLAG; i++)
{
if(!AddObject(i,BG_SA_ObjEntries[i],
- BG_SA_ObjSpawnlocs[i][0],BG_SA_ObjSpawnlocs[i][1],
- BG_SA_ObjSpawnlocs[i][2],BG_SA_ObjSpawnlocs[i][3],
- 0,0,0,0,RESPAWN_ONE_DAY))
+ BG_SA_ObjSpawnlocs[i][0],BG_SA_ObjSpawnlocs[i][1],
+ BG_SA_ObjSpawnlocs[i][2],BG_SA_ObjSpawnlocs[i][3],
+ 0,0,0,0,RESPAWN_ONE_DAY))
return false;
}
@@ -87,8 +87,8 @@ bool BattleGroundSA::ResetObjs()
for(uint8 i = 0; i < BG_SA_NPC_SPARKLIGHT; i++)
{
if(!AddCreature(BG_SA_NpcEntries[i], i, (attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE),
- BG_SA_NpcSpawnlocs[i][0],BG_SA_NpcSpawnlocs[i][1],
- BG_SA_NpcSpawnlocs[i][2],BG_SA_NpcSpawnlocs[i][3]))
+ BG_SA_NpcSpawnlocs[i][0],BG_SA_NpcSpawnlocs[i][1],
+ BG_SA_NpcSpawnlocs[i][2],BG_SA_NpcSpawnlocs[i][3]))
return false;
}
@@ -122,22 +122,22 @@ bool BattleGroundSA::ResetObjs()
sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
if(!sg)
- {
+ {
sLog.outError("SOTA: Can't find GY entry %u",BG_SA_GYEntries[i]);
return false;
- }
+ }
if(i == BG_SA_BEACH_GY)
- {
+ {
GraveyardStatus[i] = attackers;
AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((attackers == TEAM_HORDE )? HORDE : ALLIANCE));
- }
+ }
else
- {
+ {
GraveyardStatus[i] = ((attackers == TEAM_HORDE )? TEAM_ALLIANCE : TEAM_HORDE);
if(!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((attackers == TEAM_HORDE )? ALLIANCE : HORDE) ))
sLog.outError("SOTA: couldn't spawn GY: %u",i);
- }
+ }
}
//GY capture points
@@ -214,11 +214,11 @@ void BattleGroundSA::StartShips()
if(p->GetTeamId() != attackers)
continue;
- UpdateData data;
- WorldPacket pkt;
- GetBGObject(i)->BuildValuesUpdateBlockForPlayer(&data, p);
- data.BuildPacket(&pkt);
- p->GetSession()->SendPacket(&pkt);
+ UpdateData data;
+ WorldPacket pkt;
+ GetBGObject(i)->BuildValuesUpdateBlockForPlayer(&data, p);
+ data.BuildPacket(&pkt);
+ p->GetSession()->SendPacket(&pkt);
}
}
}
@@ -234,11 +234,11 @@ void BattleGroundSA::Update(uint32 diff)
{
if(TotalTime >= BG_SA_WARMUPLENGTH)
{
- TotalTime = 0;
- ToggleTimer();
- status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
+ TotalTime = 0;
+ ToggleTimer();
+ status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
}
- if(TotalTime >= BG_SA_BOAT_START)
+ if(TotalTime >= BG_SA_BOAT_START)
StartShips();
return;
}
@@ -263,9 +263,9 @@ void BattleGroundSA::Update(uint32 diff)
{
if(TotalTime >= BG_SA_ROUNDLENGTH)
{
- RoundScores[1].time = TotalTime;
- RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
-
+ RoundScores[1].time = TotalTime;
+ RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
+
if (RoundScores[0].time == RoundScores[1].time)
EndBattleGround(NULL);
else if(RoundScores[0].time < RoundScores[1].time)
@@ -339,12 +339,12 @@ void BattleGroundSA::AddPlayer(Player *plr)
if(plr->GetTeamId() == attackers)
{
plr->CastSpell(plr,12438,true);//Without this player falls before boat loads...
-
+
if(urand(0,1))
plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
else
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
-
+
}
else
plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
@@ -408,11 +408,11 @@ void BattleGroundSA::TeleportPlayers()
if(plr->GetTeamId() == attackers)
{
plr->CastSpell(plr,12438,true); //Without this player falls before boat loads...
-
+
if(urand(0,1))
plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
else
- plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
+ plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
}
else
plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
@@ -468,14 +468,14 @@ void BattleGroundSA::OverrideGunFaction()
for(uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10;i++)
{
if(Creature* gun = GetBGCreature(i))
- gun->setFaction(BG_SA_Factions[attackers? TEAM_ALLIANCE : TEAM_HORDE]);
- }
+ gun->setFaction(BG_SA_Factions[attackers? TEAM_ALLIANCE : TEAM_HORDE]);
+ }
for(uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4;i++)
- {
+ {
if(Creature* dem = GetBGCreature(i))
dem->setFaction(BG_SA_Factions[attackers]);
- }
+ }
}
void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
@@ -496,24 +496,24 @@ void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
break;
case 1:
uws = BG_SA_YELLOW_GATEWS;
- break;
- case 2:
+ break;
+ case 2:
uws = BG_SA_BLUE_GATEWS;
- break;
- case 3:
- uws = BG_SA_RED_GATEWS;
- break;
- case 4:
- uws = BG_SA_PURPLE_GATEWS;
- break;
- case 5:
- uws = BG_SA_ANCIENT_GATEWS;
- break;
- default:
- ASSERT(false);
- break;
- }
-
+ break;
+ case 3:
+ uws = BG_SA_RED_GATEWS;
+ break;
+ case 4:
+ uws = BG_SA_PURPLE_GATEWS;
+ break;
+ case 5:
+ uws = BG_SA_ANCIENT_GATEWS;
+ break;
+ default:
+ ASSERT(false);
+ break;
+ }
+
if(i < 5)
DelObject(i+9);
UpdateWorldState(uws, GateStatus[i]);
@@ -599,8 +599,8 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i)
SpawnBGObject(BG_SA_LEFT_FLAG,RESPAWN_ONE_DAY);
npc = BG_SA_NPC_RIGSPARK;
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
- BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
- BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
+ BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
+ BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
UpdateWorldState(BG_SA_LEFT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
break;
@@ -608,8 +608,8 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i)
SpawnBGObject(BG_SA_RIGHT_FLAG, RESPAWN_ONE_DAY);
npc = BG_SA_NPC_SPARKLIGHT;
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
- BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
- BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
+ BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
+ BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
UpdateWorldState(BG_SA_RIGHT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
break;
@@ -650,8 +650,8 @@ void BattleGroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
EndBattleGround(RoundScores[0].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
else
EndBattleGround(RoundScores[1].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
- }
- }
+ }
+ }
}
}
diff --git a/src/game/BattleGroundSA.h b/src/game/BattleGroundSA.h
index 4d1df418b9f..e695b75dab5 100644
--- a/src/game/BattleGroundSA.h
+++ b/src/game/BattleGroundSA.h
@@ -26,8 +26,8 @@ class BattleGroundSAScore : public BattleGroundScore
public:
BattleGroundSAScore(): demolishers_destroyed(0), gates_destroyed(0) {};
virtual ~BattleGroundSAScore() {};
- uint8 demolishers_destroyed;
- uint8 gates_destroyed;
+ uint8 demolishers_destroyed;
+ uint8 gates_destroyed;
};
enum BG_SA_Status
@@ -300,14 +300,14 @@ class BattleGroundSA : public BattleGround
virtual void AddPlayer(Player *plr);
virtual void StartingEventCloseDoors();
virtual void StartingEventOpenDoors();
- virtual bool SetupBattleGround();
- virtual void Reset();
- virtual void FillInitialWorldStates(WorldPacket& data);
- virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint32 event);
- virtual void HandleKillUnit(Creature* unit, Player* killer);
- virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
- virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
- virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
+ virtual bool SetupBattleGround();
+ virtual void Reset();
+ virtual void FillInitialWorldStates(WorldPacket& data);
+ virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint32 event);
+ virtual void HandleKillUnit(Creature* unit, Player* killer);
+ virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
+ virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
+ virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
void EndBattleGround(uint32 winner);
@@ -319,21 +319,21 @@ class BattleGroundSA : public BattleGround
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value);
private:
- bool ResetObjs();
- void StartShips();
- void TeleportPlayers();
- void OverrideGunFaction();
- void DestroyGate(uint32 i, Player* pl);
- void SendTime();
- void CaptureGraveyard(BG_SA_Graveyards i);
- void ToggleTimer();
- TeamId attackers;
- uint32 TotalTime;
- bool ShipsStarted;
- BG_SA_GateState GateStatus[6];
- BG_SA_Status status;
- TeamId GraveyardStatus[BG_SA_MAX_GY];
- BG_SA_RoundScore RoundScores[2];
- bool TimerEnabled;
+ bool ResetObjs();
+ void StartShips();
+ void TeleportPlayers();
+ void OverrideGunFaction();
+ void DestroyGate(uint32 i, Player* pl);
+ void SendTime();
+ void CaptureGraveyard(BG_SA_Graveyards i);
+ void ToggleTimer();
+ TeamId attackers;
+ uint32 TotalTime;
+ bool ShipsStarted;
+ BG_SA_GateState GateStatus[6];
+ BG_SA_Status status;
+ TeamId GraveyardStatus[BG_SA_MAX_GY];
+ BG_SA_RoundScore RoundScores[2];
+ bool TimerEnabled;
};
#endif
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 4daa17fa0be..47036aa38c5 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -1147,10 +1147,10 @@ void GameObject::Use(Unit* user)
break;
}
- if (BattleGround* bg = player->GetBattleGround())
- {
- bg->EventPlayerUsedGO(player, this);
- }
+ if (BattleGround* bg = player->GetBattleGround())
+ {
+ bg->EventPlayerUsedGO(player, this);
+ }
player->CastedCreatureOrGO(info->id, GetGUID(), 0);
}
@@ -1593,12 +1593,12 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.destroyedDisplayId);
EventInform(m_goInfo->building.destroyedEvent);
- if(pwho)
- {
- if(BattleGround* bg = pwho->GetBattleGround())
- bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
- }
- }
+ if(pwho)
+ {
+ if(BattleGround* bg = pwho->GetBattleGround())
+ bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
+ }
+ }
}
else // from intact to damaged
{
diff --git a/src/game/Group.cpp b/src/game/Group.cpp
index e25e098d06b..e53e65ee6d0 100644
--- a/src/game/Group.cpp
+++ b/src/game/Group.cpp
@@ -1585,7 +1585,7 @@ bool Group::InCombatToInstance(uint32 instanceId)
Player *pPlayer = itr->getSource();
if(pPlayer && pPlayer->getAttackers().size() && pPlayer->GetInstanceId() == instanceId && (pPlayer->GetMap()->IsRaidOrHeroicDungeon()))
for (std::set<Unit*>::const_iterator i = pPlayer->getAttackers().begin(); i!=pPlayer->getAttackers().end(); ++i)
- if((*i) && (*i)->GetTypeId() == TYPEID_UNIT && (*i)->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
+ if((*i) && (*i)->GetTypeId() == TYPEID_UNIT && (*i)->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
return true;
}
return false;
diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp
index bbc5d703afd..3cf0b99906e 100644
--- a/src/game/Guild.cpp
+++ b/src/game/Guild.cpp
@@ -234,7 +234,7 @@ bool Guild::LoadGuildFromDB(QueryResult_AutoPtr guildDataResult)
}
bool Guild::CheckGuildStructure()
-{
+{
// Repair the structure of guild
// If the guildmaster doesn't exist or isn't the member of guild
// attempt to promote another member
@@ -359,7 +359,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult)
if (guildId > m_Id)
//we loaded all members for this guild already, break cycle
break;
-
+
MemberSlot newmember;
uint64 guid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_PLAYER);
newmember.RankId = fields[2].GetUInt32();
@@ -371,7 +371,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult)
newmember.OFFnote = fields[4].GetCppString();
newmember.BankResetTimeMoney = fields[5].GetUInt32();
newmember.BankRemMoney = fields[6].GetUInt32();
- for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; ++i)
+ for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; ++i)
{
newmember.BankResetTimeTab[i] = fields[7+(2*i)].GetUInt32();
newmember.BankRemSlotsTab[i] = fields[8+(2*i)].GetUInt32();
diff --git a/src/game/Item.cpp b/src/game/Item.cpp
index 025a0a629aa..4a70e9340ce 100644
--- a/src/game/Item.cpp
+++ b/src/game/Item.cpp
@@ -730,8 +730,8 @@ bool Item::HasEnchantRequiredSkill(const Player *pPlayer) const
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
- if (enchantEntry->requiredSkill && pPlayer->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue)
- return false;
+ if (enchantEntry->requiredSkill && pPlayer->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue)
+ return false;
return true;
}
@@ -746,8 +746,8 @@ uint32 Item::GetEnchantRequiredLevel() const
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
- if (enchantEntry->requiredLevel > level)
- level = enchantEntry->requiredLevel;
+ if (enchantEntry->requiredLevel > level)
+ level = enchantEntry->requiredLevel;
return level;
}
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 82350b1f2b9..5a86f6082d6 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -5291,7 +5291,7 @@ bool ChatHandler::HandleResetTalentsCommand(const char * args)
ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS);
if(!m_session || m_session->GetPlayer()!=owner->ToPlayer())
- PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE,GetNameLink(owner->ToPlayer()).c_str());
+ PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE,GetNameLink(owner->ToPlayer()).c_str());
}
return true;
}
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 61f56cb0b81..ec49a3d8604 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -297,9 +297,9 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
// 0x08000000
if(GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->isInFlight())
{
- //WPAssert(this->ToPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
+ //WPAssert(this->ToPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
- FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(const_cast<Player*>(this->ToPlayer())->GetMotionMaster()->top());
+ FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(const_cast<Player*>(this->ToPlayer())->GetMotionMaster()->top());
uint32 flags3 = MOVEFLAG_GLIDE;
diff --git a/src/game/Object.h b/src/game/Object.h
index 6029a756620..a780898b499 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -318,10 +318,10 @@ class Object
// FG: some hacky helpers
void ForceValuesUpdateAtIndex(uint32);
- Player* ToPlayer(){ if(GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
- const Player* ToPlayer() const { if(GetTypeId() == TYPEID_PLAYER) return (const Player*)((Player*)this); else return NULL; }
- Creature* ToCreature(){ if(GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
- const Creature* ToCreature() const {if(GetTypeId() == TYPEID_UNIT) return (const Creature*)((Creature*)this); else return NULL; }
+ Player* ToPlayer(){ if(GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
+ const Player* ToPlayer() const { if(GetTypeId() == TYPEID_PLAYER) return (const Player*)((Player*)this); else return NULL; }
+ Creature* ToCreature(){ if(GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
+ const Creature* ToCreature() const {if(GetTypeId() == TYPEID_UNIT) return (const Creature*)((Creature*)this); else return NULL; }
protected:
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index c449267e5f5..b0429804f44 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -3285,7 +3285,7 @@ void ObjectMgr::LoadGuilds()
{
Guild *newGuild;
uint32 count = 0;
-
+
// 0 1 2 3 4 5 6
QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT guild.guildid,guild.name,leaderguid,EmblemStyle,EmblemColor,BorderStyle,BorderColor,"
// 7 8 9 10 11 12
@@ -3339,7 +3339,7 @@ void ObjectMgr::LoadGuilds()
!newGuild->LoadBankRightsFromDB(guildBankTabRightsResult) ||
!newGuild->CheckGuildStructure()
)
- {
+ {
newGuild->Disband();
delete newGuild;
continue;
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index 557ff5ee66c..65c95e97ed2 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -209,10 +209,10 @@ void PetAI::UpdateAI(const uint32 diff)
{
m_creature->SetInFront(target);
if(target && target->GetTypeId() == TYPEID_PLAYER)
- m_creature->SendUpdateToPlayer(target->ToPlayer());
+ m_creature->SendUpdateToPlayer(target->ToPlayer());
if(owner && owner->GetTypeId() == TYPEID_PLAYER)
- m_creature->SendUpdateToPlayer(owner->ToPlayer());
+ m_creature->SendUpdateToPlayer(owner->ToPlayer());
}
m_creature->AddCreatureSpellCooldown(spell->m_spellInfo->Id);
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index be3aeab355e..38cfd65fa83 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -284,7 +284,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
}
if (Unit* powner = pet->GetCharmerOrOwner())
if(powner->GetTypeId() == TYPEID_PLAYER)
- pet->SendUpdateToPlayer(powner->ToPlayer());
+ pet->SendUpdateToPlayer(powner->ToPlayer());
result = SPELL_CAST_OK;
}
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 1a1bffa4b0a..1e629a9fb1a 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -8762,7 +8762,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
break;
case 3703: // Shattrath City
case 4384: // Strand of the Ancients
- if (bg && bg->GetTypeID() == BATTLEGROUND_SA)
+ if (bg && bg->GetTypeID() == BATTLEGROUND_SA)
bg->FillInitialWorldStates(data);
else
{
@@ -20107,7 +20107,7 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
// player see other player with stealth/invisibility only if he in same group or raid or same team (raid/team case dependent from conf setting)
if(!m_mover->canDetectInvisibilityOf(u))
- if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer() ))))
+ if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer() ))))
return false;
}
@@ -20120,7 +20120,7 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
if(!isAlive())
detect = false;
if(m_DetectInvTimer < 300 || !HaveAtClient(u))
- if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer()))))
+ if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer()))))
if(!detect || !m_mover->canDetectStealthOf(u, GetDistance(u)))
return false;
}
diff --git a/src/game/Player.h b/src/game/Player.h
index 0578553b83b..29e279ec7bd 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1344,7 +1344,7 @@ class Player : public Unit, public GridObject<Player>
{
uint64 val = GetUInt64Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_COUNTS_OFFSET);
val &= ~((uint64)0xFFFF << (counter * 16));
- val |= ((uint64)count << (counter * 16));
+ val |= ((uint64)count << (counter * 16));
SetUInt64Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_COUNTS_OFFSET, val);
}
void SetQuestSlotState(uint16 slot, uint32 state) { SetFlag(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_STATE_OFFSET, state); }
diff --git a/src/game/QuestDef.cpp b/src/game/QuestDef.cpp
index 3c95ef27a31..95e54e18ec8 100644
--- a/src/game/QuestDef.cpp
+++ b/src/game/QuestDef.cpp
@@ -183,19 +183,19 @@ uint32 Quest::XPValue( Player *pPlayer ) const
int32 quest_level = (QuestLevel == -1 ? pPlayer->getLevel() : QuestLevel);
xpentry = sQuestXPStore.LookupEntry(quest_level);
if(!xpentry)
- return 0;
+ return 0;
int diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
if (diffFactor < 1)
- diffFactor = 1;
+ diffFactor = 1;
else if (diffFactor > 10)
- diffFactor = 10;
+ diffFactor = 10;
uint32 xp = diffFactor * xpentry->Exp[XPId] / 10;
if (xp <= 100)
- xp = 5 * ((xp + 2) / 5);
+ xp = 5 * ((xp + 2) / 5);
else if (xp <= 500)
xp = 10 * ((xp + 5) / 10);
else if (xp <= 1000)
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index c582de8463a..5b170092cd2 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1585,7 +1585,7 @@ struct ChainHealingOrder : public std::binary_function<const Unit*, const Unit*,
/*if (Target == MainTarget)
return 0;
else*/ if (Target->GetTypeId() == TYPEID_PLAYER && MainTarget->GetTypeId() == TYPEID_PLAYER &&
- Target->ToPlayer()->IsInSameRaidWith(MainTarget->ToPlayer()))
+ Target->ToPlayer()->IsInSameRaidWith(MainTarget->ToPlayer()))
{
if (Target->GetHealth() == Target->GetMaxHealth())
return 40000;
@@ -2915,13 +2915,13 @@ void Spell::cast(bool skipCheck)
m_preCastSpell = 11196; // Recently Bandaged
break;
}
- case SPELLFAMILY_MAGE:
- {
- // Permafrost
- if (m_spellInfo->SpellFamilyFlags[1] & 0x00001000 || m_spellInfo->SpellFamilyFlags[0] & 0x00100220)
- m_preCastSpell = 68391;
- break;
- }
+ case SPELLFAMILY_MAGE:
+ {
+ // Permafrost
+ if (m_spellInfo->SpellFamilyFlags[1] & 0x00001000 || m_spellInfo->SpellFamilyFlags[0] & 0x00100220)
+ m_preCastSpell = 68391;
+ break;
+ }
}
// traded items have trade slot instead of guid in m_itemTargetGUID
// set to real guid to be sent later to the client
diff --git a/src/game/SpellAuraEffects.cpp b/src/game/SpellAuraEffects.cpp
index b5940a94889..7d107203c94 100644
--- a/src/game/SpellAuraEffects.cpp
+++ b/src/game/SpellAuraEffects.cpp
@@ -2440,7 +2440,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
switch(GetMiscValue())
{
case FORM_CAT:
- // Savage Roar
+ // Savage Roar
if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0))
target->CastSpell(target, 62071, true);
// Nurturing Instinct
@@ -2697,7 +2697,7 @@ void AuraEffect::HandlePhase(AuraApplication const * aurApp, uint8 mode, bool ap
// drop flag at invisible in bg
if(target->ToPlayer()->InBattleGround())
if(BattleGround *bg = target->ToPlayer()->GetBattleGround())
- bg->EventPlayerDroppedFlag(target->ToPlayer());
+ bg->EventPlayerDroppedFlag(target->ToPlayer());
// GM-mode have mask 0xFFFFFFFF
if(!target->ToPlayer()->isGameMaster())
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 3a91bcffe58..e98a904bd3b 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -915,10 +915,10 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
case 48020: // Demonic Circle
if(target->GetTypeId() == TYPEID_PLAYER)
if(GameObject* obj = target->GetGameObject(48018))
- {
- target->ToPlayer()->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
- target->ToPlayer()->RemoveMovementImpairingAuras();
- }
+ {
+ target->ToPlayer()->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
+ target->ToPlayer()->RemoveMovementImpairingAuras();
+ }
break;
}
break;
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 7c95149880d..f0f24b9a2e6 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1350,7 +1350,7 @@ void Spell::EffectDummy(uint32 i)
return;
if(BattleGround* bg = m_caster->ToPlayer()->GetBattleGround())
- bg->EventPlayerDroppedFlag(m_caster->ToPlayer());
+ bg->EventPlayerDroppedFlag(m_caster->ToPlayer());
m_caster->CastSpell(m_caster, 30452, true, NULL);
return;
@@ -7133,8 +7133,8 @@ void Spell::EffectTransmitted(uint32 effIndex)
{
if(m_caster->GetTypeId() == TYPEID_PLAYER)
{
- pGameObj->AddUniqueUse(m_caster->ToPlayer());
- m_caster->AddGameObject(pGameObj); // will removed at spell cancel
+ pGameObj->AddUniqueUse(m_caster->ToPlayer());
+ m_caster->AddGameObject(pGameObj); // will removed at spell cancel
}
break;
}
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 402bf4408d5..db20d057e20 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -2846,9 +2846,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Frostbite
if (spellproto->SpellFamilyFlags[1] & 0x80000000)
return DIMINISHING_TRIGGER_ROOT;
- // Frost Nova, Shatterd Barrier
- if (spellproto->SpellFamilyFlags[0] & 0x00080040)
- return DIMINISHING_CONTROL_ROOT;
+ // Frost Nova, Shatterd Barrier
+ if (spellproto->SpellFamilyFlags[0] & 0x00080040)
+ return DIMINISHING_CONTROL_ROOT;
break;
}
case SPELLFAMILY_ROGUE:
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index 4f155b37ed1..08234a3547c 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -1272,20 +1272,20 @@ class SpellMgr
return true;
}
- const SpellsRequiringSpellMap GetSpellsRequiringSpell()
- {
- return this->mSpellsReqSpell;
- }
-
- uint32 GetSpellRequired(uint32 spell_id) const
- {
- SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
-
- if(itr == mSpellReq.end())
- return NULL;
-
- return itr->second;
- }
+ const SpellsRequiringSpellMap GetSpellsRequiringSpell()
+ {
+ return this->mSpellsReqSpell;
+ }
+
+ uint32 GetSpellRequired(uint32 spell_id) const
+ {
+ SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
+
+ if(itr == mSpellReq.end())
+ return NULL;
+
+ return itr->second;
+ }
// Modifiers
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 1b85d0e566c..e01776a58f0 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3091,9 +3091,9 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit *pVict
if (attackType != RANGED_ATTACK)
{
crit -= pVictim->GetMeleeCritChanceReduction();
- // Glyph of barkskin
- if (pVictim->HasAura(63057) && pVictim->HasAura(22812))
- crit-=25.0f;
+ // Glyph of barkskin
+ if (pVictim->HasAura(63057) && pVictim->HasAura(22812))
+ crit-=25.0f;
}
else
crit -= pVictim->GetRangedCritChanceReduction();
@@ -9254,7 +9254,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
else if (minion->isTotem())
{
// All summoned by totem minions must disappear when it is removed.
- if (const SpellEntry* spInfo = sSpellStore.LookupEntry(minion->ToTotem()->GetSpell()))
+ if (const SpellEntry* spInfo = sSpellStore.LookupEntry(minion->ToTotem()->GetSpell()))
for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
if (spInfo->Effect[i] != SPELL_EFFECT_SUMMON)
@@ -11369,7 +11369,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
if (enemy)
{
if (IsAIEnabled)
- {
+ {
this->ToCreature()->AI()->EnterCombat(enemy);
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);//always remove Out of Combat Non Attackable flag if we enter combat and AI is enabled
}
@@ -12173,7 +12173,7 @@ Unit* Creature::SelectVictim()
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
{
if ((*itr) && !canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
- && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
+ && !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
return NULL;
}
@@ -14761,17 +14761,17 @@ void Unit::SetControlled(bool apply, UnitState state)
break;
case UNIT_STAT_CONFUSED:
if (!hasUnitState(UNIT_STAT_STUNNED))
- {
+ {
SetConfused(true);
- CastStop();
- }
+ CastStop();
+ }
break;
case UNIT_STAT_FLEEING:
if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
- {
+ {
SetFeared(true);
- CastStop();
- }
+ CastStop();
+ }
break;
default:
break;
@@ -15843,7 +15843,7 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId)
// drop flag at invisible in bg
if(this->ToPlayer()->InBattleGround())
if(BattleGround *bg = this->ToPlayer()->GetBattleGround())
- bg->EventPlayerDroppedFlag(this->ToPlayer());
+ bg->EventPlayerDroppedFlag(this->ToPlayer());
}
assert(!m_vehicle);
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 88db4527727..a827f1681c8 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1852,7 +1852,7 @@ class Unit : public WorldObject
static Creature* GetCreature(WorldObject& object, uint64 guid);
MotionMaster* GetMotionMaster(){ return &i_motionMaster; }
-
+
bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); }
void StopMoving();
@@ -1958,7 +1958,7 @@ class Unit : public WorldObject
virtual bool isBeingLoaded() const { return false;}
Pet* ToPet(){ if(isPet()) return reinterpret_cast<Pet*>(this); else return NULL; }
- Totem* ToTotem(){ if(isTotem()) return reinterpret_cast<Totem*>(this); else return NULL; }
+ Totem* ToTotem(){ if(isTotem()) return reinterpret_cast<Totem*>(this); else return NULL; }
TempSummon* ToTempSummon() { if(isSummon()) return reinterpret_cast<TempSummon*>(this); else return NULL; }
const TempSummon* ToTempSummon() const { if(isSummon()) return reinterpret_cast<const TempSummon*>(this); else return NULL; }
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index 9a50a606b2b..52ea4929ef1 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -329,7 +329,7 @@ void WorldSession::LogoutPlayer(bool Save)
if(owner)
{
if(owner->GetTypeId() == TYPEID_PLAYER)
- aset.insert(owner->ToPlayer());
+ aset.insert(owner->ToPlayer());
}
else
if((*itr)->GetTypeId() == TYPEID_PLAYER)
diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp
index 7f90ab15273..2226fec339c 100644
--- a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp
+++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp
@@ -88,8 +88,8 @@ struct boss_balindaAI : public ScriptedAI
uint32 uiFrostboltTimer;
uint32 uiResetTimer;
uint32 uiWaterElementalTimer;
-
- SummonList Summons;
+
+ SummonList Summons;
void Reset()
{
@@ -100,7 +100,7 @@ struct boss_balindaAI : public ScriptedAI
uiResetTimer = 5*IN_MILISECONDS;
uiWaterElementalTimer = 0;
- Summons.DespawnAll();
+ Summons.DespawnAll();
}
void EnterCombat(Unit *who)
@@ -113,7 +113,7 @@ struct boss_balindaAI : public ScriptedAI
Reset();
}
- void JustSummoned(Creature* summoned)
+ void JustSummoned(Creature* summoned)
{
((mob_water_elementalAI*)summoned->AI())->uiBalindaGUID = m_creature->GetGUID();
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM,0, 50, true));
@@ -122,9 +122,9 @@ struct boss_balindaAI : public ScriptedAI
}
void JustDied(Unit* Killer)
- {
- Summons.DespawnAll();
- }
+ {
+ Summons.DespawnAll();
+ }
void UpdateAI(const uint32 diff)
{
@@ -133,7 +133,7 @@ struct boss_balindaAI : public ScriptedAI
if (uiWaterElementalTimer < diff)
{
- if(Summons.empty())
+ if(Summons.empty())
m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS);
uiWaterElementalTimer = 50*IN_MILISECONDS;
} else uiWaterElementalTimer -= diff;
diff --git a/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
index 5ecc380019d..9d255893927 100644
--- a/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
+++ b/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
@@ -52,11 +52,11 @@ bool GOHello_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo)
pInstance->SetData(TYPE_LYCEUM, DONE);
else
pInstance->SetData(TYPE_LYCEUM, IN_PROGRESS);
- // If used brazier open linked doors (North or South)
- if(pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_N))
- pInstance->HandleGameObject(pInstance->GetData64(DATA_GOLEM_DOOR_N), true);
- else if(pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_S))
- pInstance->HandleGameObject(pInstance->GetData64(DATA_GOLEM_DOOR_S), true);
+ // If used brazier open linked doors (North or South)
+ if(pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_N))
+ pInstance->HandleGameObject(pInstance->GetData64(DATA_GOLEM_DOOR_N), true);
+ else if(pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_S))
+ pInstance->HandleGameObject(pInstance->GetData64(DATA_GOLEM_DOOR_S), true);
}
return false;
}
diff --git a/src/scripts/eastern_kingdoms/western_plaguelands.cpp b/src/scripts/eastern_kingdoms/western_plaguelands.cpp
index 14f65bd9c80..90b21f98283 100644
--- a/src/scripts/eastern_kingdoms/western_plaguelands.cpp
+++ b/src/scripts/eastern_kingdoms/western_plaguelands.cpp
@@ -206,7 +206,7 @@ CreatureAI* GetAI_npc_the_scourge_cauldron(Creature* pCreature)
}
/*######
-## npcs_andorhal_tower
+## npcs_andorhal_tower
######*/
enum eAndorhalTower
diff --git a/src/scripts/examples/example_misc.cpp b/src/scripts/examples/example_misc.cpp
index 00465b996d5..e26220bfbb3 100644
--- a/src/scripts/examples/example_misc.cpp
+++ b/src/scripts/examples/example_misc.cpp
@@ -38,7 +38,7 @@ bool AT_example_areatrigger(Player* pPlayer, const AreaTriggerEntry *pAt)
extern void LoadDatabase();
bool ItemUse_example_item(Player* pPlayer, Item* pItem, SpellCastTargets const& scTargets)
{
- sScriptMgr.LoadDatabase();
+ sScriptMgr.LoadDatabase();
return true;
}
diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h
index d020770bb77..2fc8135762b 100644
--- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h
+++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h
@@ -63,6 +63,6 @@ enum GameObjects
GO_MALGANIS_GATE_2 = 187723,
GO_EXIT_GATE = 191788,
GO_MALGANIS_CHEST_N = 190663,
- GO_MALGANIS_CHEST_H = 193597
+ GO_MALGANIS_CHEST_H = 193597
};
#endif
diff --git a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp
index b034c7e5c28..d3d5da802d6 100644
--- a/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp
+++ b/src/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp
@@ -101,7 +101,7 @@ struct instance_culling_of_stratholme : public ScriptedInstance
HandleGameObject(uiExitGate,true);
break;
case GO_MALGANIS_CHEST_N:
- case GO_MALGANIS_CHEST_H:
+ case GO_MALGANIS_CHEST_H:
uiMalGanisChest = pGo->GetGUID();
if (m_auiEncounter[3] == DONE)
pGo->RemoveFlag(GAMEOBJECT_FLAGS,GO_FLAG_INTERACT_COND);
diff --git a/src/scripts/kalimdor/razorfen_downs/razorfen_downs.h b/src/scripts/kalimdor/razorfen_downs/razorfen_downs.h
index d1c95d3f305..a67b4223c4a 100644
--- a/src/scripts/kalimdor/razorfen_downs/razorfen_downs.h
+++ b/src/scripts/kalimdor/razorfen_downs/razorfen_downs.h
@@ -32,7 +32,7 @@ enum eData64
enum eGameObject
{
- GO_GONG = 148917
+ GO_GONG = 148917
};
enum eCreature
diff --git a/src/scripts/northrend/borean_tundra.cpp b/src/scripts/northrend/borean_tundra.cpp
index e4230217a9f..b33d8cfc27a 100644
--- a/src/scripts/northrend/borean_tundra.cpp
+++ b/src/scripts/northrend/borean_tundra.cpp
@@ -2226,7 +2226,7 @@ struct npc_valiance_keep_cannoneerAI : public ScriptedAI
void Reset()
{
- uiTimer = urand(13000,18000);
+ uiTimer = urand(13000,18000);
}
void UpdateAI(const uint32 diff)
@@ -2307,7 +2307,7 @@ struct npc_warmage_coldarraAI : public Scripted_NoMovementAI
m_uiTimer = urand(90000,120000);
}
break;
- case NPC_WARMAGE_CALANDRA:
+ case NPC_WARMAGE_CALANDRA:
{
if (!orbList.empty())
{
@@ -2336,7 +2336,7 @@ struct npc_warmage_coldarraAI : public Scripted_NoMovementAI
}
break;
}
- }
+ }
else m_uiTimer -= uiDiff;
ScriptedAI::UpdateAI(uiDiff);
@@ -2506,7 +2506,7 @@ void AddSC_borean_tundra()
newscript->Name = "npc_valiance_keep_cannoneer";
newscript->GetAI = &GetAI_npc_valiance_keep_cannoneer;
newscript->RegisterSelf();
-
+
newscript = new Script;
newscript->Name = "npc_warmage_coldarra";
newscript->GetAI = &GetAI_npc_warmage_coldarra;
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
index 4f19d85ca01..3ed4a81d6a3 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp
@@ -55,8 +55,8 @@ enum eSpells
SPELL_BLACK_KNIGHT_RES = 67693,
- SPELL_LEAP = 67749,
- SPELL_LEAP_H = 67880
+ SPELL_LEAP = 67749,
+ SPELL_LEAP_H = 67880
};
enum eModels
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
index 2ac62bd5b01..221c7c0412f 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h
@@ -70,13 +70,13 @@ enum eGameObjects
GO_MAIN_GATE = 195647,
GO_CHAMPIONS_LOOT = 195709,
- GO_CHAMPIONS_LOOT_H = 195710,
+ GO_CHAMPIONS_LOOT_H = 195710,
GO_EADRIC_LOOT = 195374,
- GO_EADRIC_LOOT_H = 195375,
+ GO_EADRIC_LOOT_H = 195375,
GO_PALETRESS_LOOT = 195323,
- GO_PALETRESS_LOOT_H = 195324
+ GO_PALETRESS_LOOT_H = 195324
};
enum eVehicles
diff --git a/src/scripts/northrend/crystalsong_forest.cpp b/src/scripts/northrend/crystalsong_forest.cpp
index 0400f1714ef..d60490d39b5 100644
--- a/src/scripts/northrend/crystalsong_forest.cpp
+++ b/src/scripts/northrend/crystalsong_forest.cpp
@@ -83,14 +83,14 @@ struct npc_warmage_violetstandAI : public Scripted_NoMovementAI
m_uiTimer = 90000;
}
break;
- case NPC_WARMAGE_HALISTER:
+ case NPC_WARMAGE_HALISTER:
case NPC_WARMAGE_ILSUDRIA:
if (pTarget)
DoCast(pTarget,SPELL_TRANSITUS_SHIELD_BEAM);
m_uiTimer = 90000;
break;
}
- }
+ }
else m_uiTimer -= uiDiff;
ScriptedAI::UpdateAI(uiDiff);
diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp
index 2e30f4375d7..dd7a7b4c41d 100644
--- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp
+++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp
@@ -68,8 +68,8 @@ struct boss_garfrostAI : public ScriptedAI
pInstance = c->GetInstanceData();
}
- bool phase2;
- bool phase3;
+ bool phase2;
+ bool phase3;
bool bAchievement;
ScriptedInstance* pInstance;
@@ -77,10 +77,10 @@ struct boss_garfrostAI : public ScriptedAI
void Reset()
{
- events.Reset();
+ events.Reset();
- phase2 = false;
- phase3 = false;
+ phase2 = false;
+ phase3 = false;
bAchievement = true;
if (pInstance)
@@ -89,8 +89,8 @@ struct boss_garfrostAI : public ScriptedAI
void EnterCombat(Unit* who)
{
- DoScriptText(SAY_AGGRO, m_creature);
- DoCast(m_creature, SPELL_PERMAFROST);
+ DoScriptText(SAY_AGGRO, m_creature);
+ DoCast(m_creature, SPELL_PERMAFROST);
if (pInstance)
pInstance->SetData(DATA_GARFROST_EVENT, IN_PROGRESS);
@@ -98,32 +98,32 @@ struct boss_garfrostAI : public ScriptedAI
events.ScheduleEvent(EVENT_THROW_SARONITE, 45000);
}
- void DamageTaken(Unit* pDoneBy, uint32& uiDamage)
+ void DamageTaken(Unit* pDoneBy, uint32& uiDamage)
{
- if (HealthBelowPct(66) && !phase2)
- {
- phase2 = true;
+ if (HealthBelowPct(66) && !phase2)
+ {
+ phase2 = true;
DoCast(m_creature, SPELL_THUNDERING_STOMP);
// TODO: should go to a forge
- DoCast(m_creature, DUNGEON_MODE(SPELL_FORGE_BLADE, H_SPELL_FORGE_BLADE));
+ DoCast(m_creature, DUNGEON_MODE(SPELL_FORGE_BLADE, H_SPELL_FORGE_BLADE));
// TODO: should equip when spell completes
SetEquipmentSlots(false, EQUIP_ID_SWORD, -1, -1);
m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
- events.ScheduleEvent(EVENT_CHILLINGWAVE, 10000);
- }
+ events.ScheduleEvent(EVENT_CHILLINGWAVE, 10000);
+ }
- if (HealthBelowPct(33) && !phase3)
- {
- phase3 = true;
+ if (HealthBelowPct(33) && !phase3)
+ {
+ phase3 = true;
DoCast(m_creature, SPELL_THUNDERING_STOMP);
// TODO: should go to a forge
- DoCast(m_creature, DUNGEON_MODE(SPELL_FORGE_MACE, H_SPELL_FORGE_MACE));
+ DoCast(m_creature, DUNGEON_MODE(SPELL_FORGE_MACE, H_SPELL_FORGE_MACE));
// TODO: should equip when spell completes
SetEquipmentSlots(false, EQUIP_ID_MACE, -1, -1);
m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
events.CancelEvent(EVENT_CHILLINGWAVE); // cast only in phase 2.
- events.ScheduleEvent(EVENT_DEEPFREEZE, 10000);
- }
+ events.ScheduleEvent(EVENT_DEEPFREEZE, 10000);
+ }
}
void KilledUnit(Unit *victim)
@@ -136,8 +136,8 @@ struct boss_garfrostAI : public ScriptedAI
void JustDied(Unit* killer)
{
- DoScriptText(SAY_DEATH, m_creature);
- if (pInstance)
+ DoScriptText(SAY_DEATH, m_creature);
+ if (pInstance)
{
if (Creature *pTyrannus = m_creature->GetCreature(*m_creature, pInstance->GetData64(DATA_TYRANNUS)))
DoScriptText(SAY_TYRANNUS_DEATH, pTyrannus);
@@ -179,16 +179,16 @@ struct boss_garfrostAI : public ScriptedAI
events.RescheduleEvent(EVENT_THROW_SARONITE, 35000);
return;
case EVENT_DEEPFREEZE:
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- DoCast(pTarget, DUNGEON_MODE(SPELL_DEEP_FREEZE, H_SPELL_DEEP_FREEZE));
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, DUNGEON_MODE(SPELL_DEEP_FREEZE, H_SPELL_DEEP_FREEZE));
events.RescheduleEvent(EVENT_DEEPFREEZE, 35000);
return;
case EVENT_CHILLINGWAVE:
- DoCastAOE(DUNGEON_MODE(SPELL_CHILLING_WAVE, H_SPELL_CHILLING_WAVE));
+ DoCastAOE(DUNGEON_MODE(SPELL_CHILLING_WAVE, H_SPELL_CHILLING_WAVE));
events.RescheduleEvent(EVENT_CHILLINGWAVE, 40000);
return;
- }
- }
+ }
+ }
DoMeleeAttackIfReady();
}
diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp
index d07930449a2..2ec10f7df11 100644
--- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp
+++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_krickandick.cpp
@@ -68,16 +68,16 @@ enum Yells
enum Events
{
- EVENT_NONE,
+ EVENT_NONE,
EVENT_PURSUE,
- EVENT_MIGHTY_KICK,
- EVENT_POISON_NOVA,
- EVENT_EXPLOSIVE_BARRAGE,
- EVENT_END_EXPLOSIVE_BARRAGE,
+ EVENT_MIGHTY_KICK,
+ EVENT_POISON_NOVA,
+ EVENT_EXPLOSIVE_BARRAGE,
+ EVENT_END_EXPLOSIVE_BARRAGE,
// Krick
- EVENT_SHADOW_BOLT,
- EVENT_TOXIC_WASTE,
+ EVENT_SHADOW_BOLT,
+ EVENT_TOXIC_WASTE,
// Krick OUTRO
EVENT_OUTRO_1,
@@ -145,7 +145,7 @@ struct boss_ickAI : public ScriptedAI
void EnterCombat(Unit *pWho)
{
if (pInstance)
- pInstance->SetData(DATA_KRICKANDICK_EVENT, IN_PROGRESS);
+ pInstance->SetData(DATA_KRICKANDICK_EVENT, IN_PROGRESS);
Creature* pKrick = GetKrick();
if (!pKrick)
@@ -154,12 +154,12 @@ struct boss_ickAI : public ScriptedAI
if (pKrick)
DoScriptText(SAY_KRICK_AGGRO, pKrick);
- events.ScheduleEvent(EVENT_MIGHTY_KICK, 20000, GCD_1);
+ events.ScheduleEvent(EVENT_MIGHTY_KICK, 20000, GCD_1);
events.ScheduleEvent(EVENT_PURSUE, 30000, GCD_1);
events.ScheduleEvent(EVENT_POISON_NOVA, 30000, GCD_1);
- events.ScheduleEvent(EVENT_EXPLOSIVE_BARRAGE, 35000);
+ events.ScheduleEvent(EVENT_EXPLOSIVE_BARRAGE, 35000);
events.ScheduleEvent(EVENT_TOXIC_WASTE, 5000);
- events.ScheduleEvent(EVENT_SHADOW_BOLT, 15000);
+ events.ScheduleEvent(EVENT_SHADOW_BOLT, 15000);
}
void EnterEvadeMode()
@@ -241,7 +241,7 @@ struct boss_ickAI : public ScriptedAI
if (Creature *pKrick = GetKrick())
{
DoScriptText(SAY_KRICK_BARRAGE_1, pKrick);
- DoScriptText(SAY_KRICK_BARRAGE_2, pKrick);
+ DoScriptText(SAY_KRICK_BARRAGE_2, pKrick);
}
DoCastAOE(SPELL_EXPLOSIVE_BARRAGE);
@@ -268,7 +268,7 @@ struct boss_krickAI : public ScriptedAI
pInstance = c->GetInstanceData();
}
- ScriptedInstance* pInstance;
+ ScriptedInstance* pInstance;
EventMap events;
KrickPhase phase;
@@ -353,8 +353,8 @@ struct boss_krickAI : public ScriptedAI
{
if (phase == PHASE_OUTRO)
{
- if (!pInstance)
- return;
+ if (!pInstance)
+ return;
events.Update(diff);
switch(events.ExecuteEvent())
@@ -454,7 +454,7 @@ struct boss_krickAI : public ScriptedAI
}
return;
}
- }
+ }
};
CreatureAI* GetAI_boss_ick(Creature* pCreature)
diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp
index 86aceb57ea2..b45a059df98 100644
--- a/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp
+++ b/src/scripts/northrend/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp
@@ -96,7 +96,7 @@ struct boss_tyrannusAI : public ScriptedAI
void Reset()
{
- events.Reset();
+ events.Reset();
if (pInstance)
pInstance->SetData(DATA_TYRANNUS_EVENT, NOT_STARTED);
@@ -110,7 +110,7 @@ struct boss_tyrannusAI : public ScriptedAI
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, m_creature);
- m_creature->ExitVehicle();
+ m_creature->ExitVehicle();
// restore health if any damage done during intro
m_creature->SetHealth(m_creature->GetMaxHealth());
@@ -118,7 +118,7 @@ struct boss_tyrannusAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_TYRANNUS_EVENT, IN_PROGRESS);
- events.ScheduleEvent(EVENT_FORCEFUL_SMASH, 10000);
+ events.ScheduleEvent(EVENT_FORCEFUL_SMASH, 10000);
events.ScheduleEvent(EVENT_OVERLORDS_BRAND, 35000);
events.ScheduleEvent(EVENT_DARK_MIGHT, 40000);
}
@@ -130,13 +130,13 @@ struct boss_tyrannusAI : public ScriptedAI
void JustDied(Unit* killer)
{
- DoScriptText(SAY_DEATH, m_creature);
+ DoScriptText(SAY_DEATH, m_creature);
- if (pInstance)
+ if (pInstance)
{
pInstance->SetData(DATA_TYRANNUS_EVENT, DONE);
if (Creature* pRimefang = GetRimefang())
- pRimefang->ForcedDespawn();
+ pRimefang->ForcedDespawn();
}
}
@@ -160,18 +160,18 @@ struct boss_tyrannusAI : public ScriptedAI
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, 10000);
return;
case EVENT_OVERLORDS_BRAND:
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- DoCast(pTarget, SPELL_OVERLORDS_BRAND);
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, SPELL_OVERLORDS_BRAND);
events.ScheduleEvent(EVENT_OVERLORDS_BRAND, 45000);
return;
case EVENT_DARK_MIGHT:
- DoScriptText(SAY_DARK_MIGHT_1, m_creature);
- DoScriptText(SAY_DARK_MIGHT_2, m_creature);
+ DoScriptText(SAY_DARK_MIGHT_1, m_creature);
+ DoScriptText(SAY_DARK_MIGHT_2, m_creature);
DoCast(m_creature, DUNGEON_MODE(SPELL_DARK_MIGHT, H_SPELL_DARK_MIGHT));
events.ScheduleEvent(EVENT_DARK_MIGHT, 60000);
return;
- }
- }
+ }
+ }
DoMeleeAttackIfReady();
}
@@ -193,7 +193,7 @@ struct boss_rimefangAI : public ScriptedAI
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- events.Reset();
+ events.Reset();
}
void EnterCombat(Unit* who)
@@ -201,7 +201,7 @@ struct boss_rimefangAI : public ScriptedAI
m_creature->InterruptSpell(CURRENT_GENERIC_SPELL);
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
- events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, 25000);
+ events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, 25000);
events.ScheduleEvent(EVENT_ICY_BLAST, 35000);
}
@@ -220,13 +220,13 @@ struct boss_rimefangAI : public ScriptedAI
{
switch(eventId)
{
- case EVENT_MARK_OF_RIMEFANG:
- DoScriptText(SAY_MARK_RIMEFANG_1, m_creature);
+ case EVENT_MARK_OF_RIMEFANG:
+ DoScriptText(SAY_MARK_RIMEFANG_1, m_creature);
DoScriptText(SAY_MARK_RIMEFANG_2, m_creature);
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_MARK_OF_RIMEFANG);
- events.ScheduleEvent(EVENT_HOARFROST, 5000);
+ events.ScheduleEvent(EVENT_HOARFROST, 5000);
return;
case EVENT_HOARFROST:
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
@@ -234,18 +234,18 @@ struct boss_rimefangAI : public ScriptedAI
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, 20000);
return;
case EVENT_ICY_BLAST:
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
- DoCast(pTarget, DUNGEON_MODE(SPELL_ICY_BLAST, H_SPELL_ICY_BLAST));
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ DoCast(pTarget, DUNGEON_MODE(SPELL_ICY_BLAST, H_SPELL_ICY_BLAST));
events.ScheduleEvent(EVENT_ICY_BLAST_2, 5000);
return;
case EVENT_ICY_BLAST_2:
- if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
+ if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget->getVictim(), DUNGEON_MODE(SPELL_ICY_BLAST_2, H_SPELL_ICY_BLAST_2));
events.ScheduleEvent(EVENT_ICY_BLAST, 30000);
return;
- }
- }
- }
+ }
+ }
+ }
};
CreatureAI* GetAI_boss_tyrannus(Creature* pCreature)
diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp
index 63f1ff7e264..f6af85b1c89 100644
--- a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp
+++ b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.cpp
@@ -904,7 +904,7 @@ struct mob_geist_ambusherAI: public ScriptedAI
void EnterCombat(Unit* who)
{
- //Only here so when I figure out how to make it cast on an NPC i can do that.
+ //Only here so when I figure out how to make it cast on an NPC i can do that.
events.ScheduleEvent(EVENT_LEAPING_FACE_MAUL, 99999);
}
@@ -923,7 +923,7 @@ struct mob_geist_ambusherAI: public ScriptedAI
{
switch(eventId)
{
- //Should only be used on NPCs
+ //Should only be used on NPCs
case EVENT_LEAPING_FACE_MAUL:
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
DoCast(pTarget, SPELL_LEAPING_FACE_MAUL);
diff --git a/src/scripts/northrend/grizzly_hills.cpp b/src/scripts/northrend/grizzly_hills.cpp
index 438e5091d6d..3a2466eacdb 100644
--- a/src/scripts/northrend/grizzly_hills.cpp
+++ b/src/scripts/northrend/grizzly_hills.cpp
@@ -394,7 +394,7 @@ struct npc_outhouse_bunnyAI : public ScriptedAI
if (uiType == 1)
m_gender = uiData;
}
-
+
void SpellHit(Unit* pCaster, const SpellEntry* pSpell)
{
if (pSpell->Id == SPELL_OUTHOUSE_GROANS)
@@ -440,15 +440,15 @@ struct npc_tallhorn_stagAI : public ScriptedAI
void UpdateAI(const uint32 uiDiff)
{
if (m_uiPhase = 1)
- {
- if (GameObject* haunch = me->FindNearestGameObject(OBJECT_HAUNCH, 2.0f))
+ {
+ if (GameObject* haunch = me->FindNearestGameObject(OBJECT_HAUNCH, 2.0f))
{
me->SetStandState(UNIT_STAND_STATE_DEAD);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
me->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
}
m_uiPhase = 0;
- }
+ }
}
};
@@ -475,16 +475,16 @@ struct npc_amberpine_woodsmanAI : public ScriptedAI
{
m_uiTimer = 0;
m_uiPhase = 1;
- }
-
- void UpdateAI(const uint32 uiDiff)
- {
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
// call this each update tick?
- if (Creature* stag = me->FindNearestCreature(TALLHORN_STAG, 0.2f))
- {
+ if (Creature* stag = me->FindNearestCreature(TALLHORN_STAG, 0.2f))
+ {
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING);
}
- else
+ else
if (m_uiPhase)
{
if (m_uiTimer <= uiDiff)
@@ -495,7 +495,7 @@ struct npc_amberpine_woodsmanAI : public ScriptedAI
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LOOT);
m_uiTimer = 3000;
m_uiPhase = 2;
- break;
+ break;
case 2:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_ATTACK1H);
m_uiTimer = 4000;
@@ -506,7 +506,7 @@ struct npc_amberpine_woodsmanAI : public ScriptedAI
else
m_uiTimer -= uiDiff;
}
- ScriptedAI::UpdateAI(uiDiff);
+ ScriptedAI::UpdateAI(uiDiff);
UpdateVictim();
}
diff --git a/src/scripts/northrend/gundrak/instance_gundrak.cpp b/src/scripts/northrend/gundrak/instance_gundrak.cpp
index e96495eee26..2d7cf27cc38 100644
--- a/src/scripts/northrend/gundrak/instance_gundrak.cpp
+++ b/src/scripts/northrend/gundrak/instance_gundrak.cpp
@@ -298,7 +298,7 @@ struct instance_gundrak : public ScriptedInstance
void SetData64(uint32 type, uint64 data)
{
if (type == DATA_RUIN_DWELLER_DIED)
- DwellerGUIDs.erase(data);
+ DwellerGUIDs.erase(data);
}
uint32 GetData(uint32 type)
diff --git a/src/scripts/northrend/icecrown.cpp b/src/scripts/northrend/icecrown.cpp
index ff43dd4a49a..15f50e74fb7 100644
--- a/src/scripts/northrend/icecrown.cpp
+++ b/src/scripts/northrend/icecrown.cpp
@@ -191,7 +191,7 @@ struct npc_argent_valiantAI : public ScriptedAI
pCreature->GetMotionMaster()->MovePoint(0,8599.258,963.951,547.553);
pCreature->setFaction(35); //wrong faction in db?
}
-
+
uint32 uiChargeTimer;
uint32 uiShieldBreakerTimer;
@@ -200,7 +200,7 @@ struct npc_argent_valiantAI : public ScriptedAI
uiChargeTimer = 7000;
uiShieldBreakerTimer = 10000;
}
-
+
void MovementInform(uint32 uiType, uint32 uiId)
{
if (uiType != POINT_MOTION_TYPE)
diff --git a/src/scripts/northrend/naxxramas/boss_gothik.cpp b/src/scripts/northrend/naxxramas/boss_gothik.cpp
index 19a1a088e73..7af552454b9 100644
--- a/src/scripts/northrend/naxxramas/boss_gothik.cpp
+++ b/src/scripts/northrend/naxxramas/boss_gothik.cpp
@@ -426,7 +426,7 @@ struct boss_gothikAI : public BossAI
++waveCount;
}
- else
+ else
{
phaseTwo = true;
DoScriptText(SAY_TELEPORT, me);
diff --git a/src/scripts/northrend/nexus/oculus/boss_drakos.cpp b/src/scripts/northrend/nexus/oculus/boss_drakos.cpp
index 44fdb87ece3..bd98fc43bc0 100644
--- a/src/scripts/northrend/nexus/oculus/boss_drakos.cpp
+++ b/src/scripts/northrend/nexus/oculus/boss_drakos.cpp
@@ -81,10 +81,10 @@ struct boss_drakosAI : public ScriptedAI
if (pInstance)
pInstance->SetData(DATA_DRAKOS_EVENT, IN_PROGRESS);
}
- void JustSummoned(Creature* summon)
- {
- lSummons.Summon(summon);
- }
+ void JustSummoned(Creature* summon)
+ {
+ lSummons.Summon(summon);
+ }
void UpdateAI(const uint32 diff)
{
@@ -140,7 +140,7 @@ struct boss_drakosAI : public ScriptedAI
DoScriptText(RAND(SAY_STOMP_1,SAY_STOMP_2,SAY_STOMP_3), m_creature);
DoCast(DUNGEON_MODE(SPELL_THUNDERING_STOMP, SPELL_THUNDERING_STOMP_H));
uiStompTimer = urand(15*IN_MILISECONDS, 18*IN_MILISECONDS);
- } else uiStompTimer -= diff ;
+ } else uiStompTimer -= diff ;
DoMeleeAttackIfReady();
}
diff --git a/src/scripts/northrend/violet_hold/boss_ichoron.cpp b/src/scripts/northrend/violet_hold/boss_ichoron.cpp
index 65eaec5b634..196a71d82f6 100644
--- a/src/scripts/northrend/violet_hold/boss_ichoron.cpp
+++ b/src/scripts/northrend/violet_hold/boss_ichoron.cpp
@@ -326,7 +326,7 @@ struct mob_ichor_globuleAI : public ScriptedAI
{
mob_ichor_globuleAI(Creature* pCreature) : ScriptedAI(pCreature)
{
- pInstance = pCreature->GetInstanceData();
+ pInstance = pCreature->GetInstanceData();
}
ScriptedInstance* pInstance;
diff --git a/src/scripts/northrend/violet_hold/boss_lavanthor.cpp b/src/scripts/northrend/violet_hold/boss_lavanthor.cpp
index 9d9a24e57f6..b70f0b00dda 100644
--- a/src/scripts/northrend/violet_hold/boss_lavanthor.cpp
+++ b/src/scripts/northrend/violet_hold/boss_lavanthor.cpp
@@ -56,7 +56,7 @@ struct boss_lavanthorAI : public ScriptedAI
{
if (pInstance)
{
- if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_LAVANTHOR_CELL)))
+ if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_LAVANTHOR_CELL)))
if (pDoor->GetGoState() == GO_STATE_READY)
{
EnterEvadeMode();
diff --git a/src/scripts/northrend/violet_hold/boss_moragg.cpp b/src/scripts/northrend/violet_hold/boss_moragg.cpp
index fee6d0f35a0..d543aae9d55 100644
--- a/src/scripts/northrend/violet_hold/boss_moragg.cpp
+++ b/src/scripts/northrend/violet_hold/boss_moragg.cpp
@@ -51,7 +51,7 @@ struct boss_moraggAI : public ScriptedAI
{
if (GameObject *pDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_MORAGG_CELL)))
if(pDoor->GetGoState() == GO_STATE_READY)
- {
+ {
EnterEvadeMode();
return;
}
diff --git a/src/scripts/northrend/violet_hold/boss_xevozz.cpp b/src/scripts/northrend/violet_hold/boss_xevozz.cpp
index 58bc0644c71..4d29ff592e2 100644
--- a/src/scripts/northrend/violet_hold/boss_xevozz.cpp
+++ b/src/scripts/northrend/violet_hold/boss_xevozz.cpp
@@ -225,7 +225,7 @@ struct mob_ethereal_sphereAI : public ScriptedAI
{
mob_ethereal_sphereAI(Creature* pCreature) : ScriptedAI(pCreature)
{
- pInstance = pCreature->GetInstanceData();
+ pInstance = pCreature->GetInstanceData();
}
ScriptedInstance* pInstance;
diff --git a/src/scripts/northrend/zuldrak.cpp b/src/scripts/northrend/zuldrak.cpp
index 0dbedc2d22f..d5b35b3ed5f 100644
--- a/src/scripts/northrend/zuldrak.cpp
+++ b/src/scripts/northrend/zuldrak.cpp
@@ -929,16 +929,16 @@ struct npc_crusade_recruitAI : public ScriptedAI
uint8 m_uiPhase; //The current phase we are in
uint32 m_uiTimer; //Timer until phase transition
float m_heading; //Store creature heading
-
+
void Reset()
{
m_uiTimer = 0;
m_uiPhase = 0;
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER);
- m_heading = m_creature->GetOrientation();
+ m_heading = m_creature->GetOrientation();
}
-
+
void UpdateAI(const uint32 uiDiff)
{
if (m_uiPhase)
@@ -951,10 +951,10 @@ struct npc_crusade_recruitAI : public ScriptedAI
// say random text
m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- DoScriptText(RAND(SAY_RECRUIT_1,SAY_RECRUIT_2,SAY_RECRUIT_3), m_creature);
+ DoScriptText(RAND(SAY_RECRUIT_1,SAY_RECRUIT_2,SAY_RECRUIT_3), m_creature);
m_uiTimer = 3000;
m_uiPhase = 2;
- break;
+ break;
case 2:
// walk forward
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
@@ -973,7 +973,7 @@ struct npc_crusade_recruitAI : public ScriptedAI
else
m_uiTimer -= uiDiff;
}
- ScriptedAI::UpdateAI(uiDiff);
+ ScriptedAI::UpdateAI(uiDiff);
if (!UpdateVictim())
return;
@@ -986,7 +986,7 @@ CreatureAI* GetAI_npc_crusade_recruit(Creature* pCreature)
}
bool GossipHello_npc_crusade_recruit(Player* pPlayer, Creature* pCreature)
-{
+{
if (pPlayer->GetQuestStatus(QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
diff --git a/src/shared/Database/SqlOperations.h b/src/shared/Database/SqlOperations.h
index f6a5a0c974e..8c012afbf72 100644
--- a/src/shared/Database/SqlOperations.h
+++ b/src/shared/Database/SqlOperations.h
@@ -125,29 +125,29 @@ class SqlQueryHolderEx : public SqlOperation
class SqlAsyncTask : public ACE_Method_Request
{
public:
- SqlAsyncTask(Database * db, SqlOperation * op) : m_db(db), m_op(op) {}
- ~SqlAsyncTask() { if(!m_op) return; delete m_op; }
-
- int call()
- {
- if(m_db == NULL || m_op == NULL)
- return -1;
-
- try
- {
- m_op->Execute(m_db);
- }
- catch(...)
- {
- return -1;
- }
-
- return 0;
- }
+ SqlAsyncTask(Database * db, SqlOperation * op) : m_db(db), m_op(op) {}
+ ~SqlAsyncTask() { if(!m_op) return; delete m_op; }
+
+ int call()
+ {
+ if(m_db == NULL || m_op == NULL)
+ return -1;
+
+ try
+ {
+ m_op->Execute(m_db);
+ }
+ catch(...)
+ {
+ return -1;
+ }
+
+ return 0;
+ }
private:
- Database * m_db;
- SqlOperation * m_op;
+ Database * m_db;
+ SqlOperation * m_op;
};
#endif //__SQLOPERATIONS_H