Add spaces after commas
This commit is contained in:
@@ -46,7 +46,7 @@ BattlegroundSA::~BattlegroundSA()
|
||||
void BattlegroundSA::Reset()
|
||||
{
|
||||
TotalTime = 0;
|
||||
Attackers = ((urand(0,1)) ? TEAM_ALLIANCE : TEAM_HORDE);
|
||||
Attackers = ((urand(0, 1)) ? TEAM_ALLIANCE : TEAM_HORDE);
|
||||
for (uint8 i = 0; i <= 5; i++)
|
||||
GateStatus[i] = BG_SA_GATE_OK;
|
||||
ShipsStarted = false;
|
||||
@@ -83,7 +83,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
|
||||
for (uint8 i = 0; i < BG_SA_BOAT_ONE; 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))
|
||||
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))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -99,18 +99,18 @@ bool BattlegroundSA::ResetObjs()
|
||||
boatid= Attackers ? BG_SA_BOAT_TWO_H : BG_SA_BOAT_TWO_A;
|
||||
break;
|
||||
}
|
||||
if (!AddObject(i,boatid,BG_SA_ObjSpawnlocs[i][0],
|
||||
if (!AddObject(i, boatid, BG_SA_ObjSpawnlocs[i][0],
|
||||
BG_SA_ObjSpawnlocs[i][1],
|
||||
BG_SA_ObjSpawnlocs[i][2]+(Attackers ? -3.750f: 0),
|
||||
BG_SA_ObjSpawnlocs[i][3],0,0,0,0,RESPAWN_ONE_DAY))
|
||||
BG_SA_ObjSpawnlocs[i][3], 0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
return false;
|
||||
}
|
||||
for (uint8 i = BG_SA_SIGIL_1; 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))
|
||||
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))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -125,8 +125,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],600))
|
||||
BG_SA_NpcSpawnlocs[i][0], BG_SA_NpcSpawnlocs[i][1],
|
||||
BG_SA_NpcSpawnlocs[i][2], BG_SA_NpcSpawnlocs[i][3], 600))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
|
||||
if (!sg)
|
||||
{
|
||||
sLog->outError("SOTA: Can't find GY entry %u",BG_SA_GYEntries[i]);
|
||||
sLog->outError("SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
{
|
||||
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);
|
||||
sLog->outError("SOTA: couldn't spawn GY: %u", i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
AddObject(i, (BG_SA_ObjEntries[i] - (Attackers == TEAM_ALLIANCE ? 1:0)),
|
||||
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);
|
||||
0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
GetBGObject(i)->SetUInt32Value(GAMEOBJECT_FACTION, atF);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
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);
|
||||
0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
GetBGObject(i)->SetUInt32Value(GAMEOBJECT_FACTION, defF);
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
AddObject(i, BG_SA_ObjEntries[BG_SA_BOMB],
|
||||
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);
|
||||
0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
GetBGObject(i)->SetUInt32Value(GAMEOBJECT_FACTION, atF);
|
||||
}
|
||||
|
||||
@@ -220,8 +220,8 @@ bool BattlegroundSA::ResetObjs()
|
||||
UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_HRD, 0);
|
||||
UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_HRD, 0);
|
||||
|
||||
UpdateWorldState(BG_SA_HORDE_DEFENCE_TOKEN,1);
|
||||
UpdateWorldState(BG_SA_ALLIANCE_DEFENCE_TOKEN,0);
|
||||
UpdateWorldState(BG_SA_HORDE_DEFENCE_TOKEN, 1);
|
||||
UpdateWorldState(BG_SA_ALLIANCE_DEFENCE_TOKEN, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -233,8 +233,8 @@ bool BattlegroundSA::ResetObjs()
|
||||
UpdateWorldState(BG_SA_RIGHT_ATT_TOKEN_HRD, 1);
|
||||
UpdateWorldState(BG_SA_LEFT_ATT_TOKEN_HRD, 1);
|
||||
|
||||
UpdateWorldState(BG_SA_HORDE_DEFENCE_TOKEN,0);
|
||||
UpdateWorldState(BG_SA_ALLIANCE_DEFENCE_TOKEN,1);
|
||||
UpdateWorldState(BG_SA_HORDE_DEFENCE_TOKEN, 0);
|
||||
UpdateWorldState(BG_SA_ALLIANCE_DEFENCE_TOKEN, 1);
|
||||
}
|
||||
|
||||
UpdateWorldState(BG_SA_PURPLE_GATEWS, 1);
|
||||
@@ -443,9 +443,9 @@ void BattlegroundSA::AddPlayer(Player *plr)
|
||||
{
|
||||
if (plr->GetTeamId() == Attackers)
|
||||
{
|
||||
plr->CastSpell(plr,12438,true);//Without this player falls before boat loads...
|
||||
plr->CastSpell(plr, 12438, true);//Without this player falls before boat loads...
|
||||
|
||||
if (urand(0,1))
|
||||
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);
|
||||
@@ -465,7 +465,7 @@ void BattlegroundSA::AddPlayer(Player *plr)
|
||||
m_PlayerScores[plr->GetGUID()] = sc;
|
||||
}
|
||||
|
||||
void BattlegroundSA::RemovePlayer(Player* /*plr*/,uint64 /*guid*/)
|
||||
void BattlegroundSA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ void BattlegroundSA::UpdatePlayerScore(Player* Source, uint32 type, uint32 value
|
||||
else if (type == SCORE_DESTROYED_WALL)
|
||||
((BattlegroundSAScore*)itr->second)->gates_destroyed += value;
|
||||
else
|
||||
Battleground::UpdatePlayerScore(Source,type,value, doAddHonor);
|
||||
Battleground::UpdatePlayerScore(Source, type, value, doAddHonor);
|
||||
}
|
||||
|
||||
void BattlegroundSA::TeleportPlayers()
|
||||
@@ -511,9 +511,9 @@ void BattlegroundSA::TeleportPlayers()
|
||||
|
||||
if (plr->GetTeamId() == Attackers)
|
||||
{
|
||||
plr->CastSpell(plr,12438,true); //Without this player falls before boat loads...
|
||||
plr->CastSpell(plr, 12438, true); //Without this player falls before boat loads...
|
||||
|
||||
if (urand(0,1))
|
||||
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);
|
||||
@@ -635,9 +635,9 @@ void BattlegroundSA::DestroyGate(Player* pl, GameObject* /*go*/, uint32 destroye
|
||||
|
||||
if (i < 5)
|
||||
DelObject(i+9);
|
||||
UpdatePlayerScore(pl,SCORE_DESTROYED_WALL, 1);
|
||||
UpdatePlayerScore(pl, SCORE_DESTROYED_WALL, 1);
|
||||
if (rewardHonor)
|
||||
UpdatePlayerScore(pl,SCORE_BONUS_HONOR,(GetBonusHonorFromKill(1)));
|
||||
UpdatePlayerScore(pl, SCORE_BONUS_HONOR, (GetBonusHonorFromKill(1)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -648,9 +648,9 @@ WorldSafeLocsEntry const* BattlegroundSA::GetClosestGraveYard(Player* player)
|
||||
WorldSafeLocsEntry const* ret;
|
||||
WorldSafeLocsEntry const* closest;
|
||||
float dist, nearest;
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
|
||||
player->GetPosition(x,y,z);
|
||||
player->GetPosition(x, y, z);
|
||||
|
||||
if (player->GetTeamId() == Attackers)
|
||||
safeloc = BG_SA_GYEntries[BG_SA_BEACH_GY];
|
||||
@@ -727,9 +727,9 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
|
||||
case BG_SA_LEFT_CAPTURABLE_GY:
|
||||
flag = BG_SA_LEFT_FLAG;
|
||||
DelObject(flag);
|
||||
AddObject(flag,(BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)),
|
||||
BG_SA_ObjSpawnlocs[flag][0],BG_SA_ObjSpawnlocs[flag][1],
|
||||
BG_SA_ObjSpawnlocs[flag][2],BG_SA_ObjSpawnlocs[flag][3],0,0,0,0,RESPAWN_ONE_DAY);
|
||||
AddObject(flag, (BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)),
|
||||
BG_SA_ObjSpawnlocs[flag][0], BG_SA_ObjSpawnlocs[flag][1],
|
||||
BG_SA_ObjSpawnlocs[flag][2], BG_SA_ObjSpawnlocs[flag][3], 0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
|
||||
npc = BG_SA_NPC_RIGSPARK;
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, Attackers,
|
||||
@@ -747,8 +747,8 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
|
||||
flag = BG_SA_RIGHT_FLAG;
|
||||
DelObject(flag);
|
||||
AddObject(flag, (BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)),
|
||||
BG_SA_ObjSpawnlocs[flag][0],BG_SA_ObjSpawnlocs[flag][1],
|
||||
BG_SA_ObjSpawnlocs[flag][2],BG_SA_ObjSpawnlocs[flag][3],0,0,0,0,RESPAWN_ONE_DAY);
|
||||
BG_SA_ObjSpawnlocs[flag][0], BG_SA_ObjSpawnlocs[flag][1],
|
||||
BG_SA_ObjSpawnlocs[flag][2], BG_SA_ObjSpawnlocs[flag][3], 0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
|
||||
npc = BG_SA_NPC_SPARKLIGHT;
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, Attackers,
|
||||
@@ -766,8 +766,8 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player *Source)
|
||||
flag = BG_SA_CENTRAL_FLAG;
|
||||
DelObject(flag);
|
||||
AddObject(flag, (BG_SA_ObjEntries[flag] - (Source->GetTeamId() == TEAM_ALLIANCE ? 0:1)),
|
||||
BG_SA_ObjSpawnlocs[flag][0],BG_SA_ObjSpawnlocs[flag][1],
|
||||
BG_SA_ObjSpawnlocs[flag][2],BG_SA_ObjSpawnlocs[flag][3],0,0,0,0,RESPAWN_ONE_DAY);
|
||||
BG_SA_ObjSpawnlocs[flag][0], BG_SA_ObjSpawnlocs[flag][1],
|
||||
BG_SA_ObjSpawnlocs[flag][2], BG_SA_ObjSpawnlocs[flag][3], 0, 0, 0, 0, RESPAWN_ONE_DAY);
|
||||
|
||||
UpdateWorldState(BG_SA_CENTER_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||
UpdateWorldState(BG_SA_CENTER_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
||||
|
||||
Reference in New Issue
Block a user