Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-23 23:25:44 +01:00
parent 95daf7998f
commit 928443d899
245 changed files with 5711 additions and 5714 deletions
@@ -248,7 +248,7 @@ void BattlegroundAB::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 4021: // Unk2
//break;
default:
//sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
//sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
//Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -366,7 +366,7 @@ void BattlegroundAB::_SendNodeUpdate(uint8 node)
void BattlegroundAB::_NodeOccupied(uint8 node,Team team)
{
if (!AddSpiritGuide(node, BG_AB_SpiritGuidePos[node][0], BG_AB_SpiritGuidePos[node][1], BG_AB_SpiritGuidePos[node][2], BG_AB_SpiritGuidePos[node][3], team))
sLog.outError("Failed to spawn spirit guide! point: %u, team: %u,", node, team);
sLog->outError("Failed to spawn spirit guide! point: %u, team: %u,", node, team);
uint8 capturedNodes = 0;
for (uint8 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
@@ -571,7 +571,7 @@ bool BattlegroundAB::SetupBattleground()
|| !AddObject(BG_AB_OBJECT_AURA_CONTESTED + 8*i,BG_AB_OBJECTID_AURA_C,BG_AB_NodePositions[i][0],BG_AB_NodePositions[i][1],BG_AB_NodePositions[i][2],BG_AB_NodePositions[i][3], 0, 0, sin(BG_AB_NodePositions[i][3]/2), cos(BG_AB_NodePositions[i][3]/2),RESPAWN_ONE_DAY)
)
{
sLog.outErrorDb("BatteGroundAB: Failed to spawn some object Battleground not created!");
sLog->outErrorDb("BatteGroundAB: Failed to spawn some object Battleground not created!");
return false;
}
}
@@ -579,7 +579,7 @@ bool BattlegroundAB::SetupBattleground()
|| !AddObject(BG_AB_OBJECT_GATE_H,BG_AB_OBJECTID_GATE_H,BG_AB_DoorPositions[1][0],BG_AB_DoorPositions[1][1],BG_AB_DoorPositions[1][2],BG_AB_DoorPositions[1][3],BG_AB_DoorPositions[1][4],BG_AB_DoorPositions[1][5],BG_AB_DoorPositions[1][6],BG_AB_DoorPositions[1][7],RESPAWN_IMMEDIATELY)
)
{
sLog.outErrorDb("BatteGroundAB: Failed to spawn door object Battleground not created!");
sLog->outErrorDb("BatteGroundAB: Failed to spawn door object Battleground not created!");
return false;
}
//buffs
@@ -589,7 +589,7 @@ bool BattlegroundAB::SetupBattleground()
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 1, Buff_Entries[1], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3]/2), cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + 3 * i + 2, Buff_Entries[2], BG_AB_BuffPositions[i][0], BG_AB_BuffPositions[i][1], BG_AB_BuffPositions[i][2], BG_AB_BuffPositions[i][3], 0, 0, sin(BG_AB_BuffPositions[i][3]/2), cos(BG_AB_BuffPositions[i][3]/2), RESPAWN_ONE_DAY)
)
sLog.outErrorDb("BatteGroundAB: Failed to spawn buff object!");
sLog->outErrorDb("BatteGroundAB: Failed to spawn buff object!");
}
return true;
@@ -58,7 +58,7 @@ void BattlegroundAV::HandleKillPlayer(Player *player, Player *killer)
void BattlegroundAV::HandleKillUnit(Creature *unit, Player *killer)
{
sLog.outDebug("bg_av HandleKillUnit %i",unit->GetEntry());
sLog->outDebug("bg_av HandleKillUnit %i",unit->GetEntry());
if (GetStatus() != STATUS_IN_PROGRESS)
return;
uint32 entry = unit->GetEntry();
@@ -93,7 +93,7 @@ void BattlegroundAV::HandleKillUnit(Creature *unit, Player *killer)
{
if (!m_CaptainAlive[0])
{
sLog.outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
sLog->outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
return;
}
m_CaptainAlive[0]=false;
@@ -112,7 +112,7 @@ void BattlegroundAV::HandleKillUnit(Creature *unit, Player *killer)
{
if (!m_CaptainAlive[1])
{
sLog.outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
sLog->outError("Killed a Captain twice, please report this bug, if you haven't done \".respawn\"");
return;
}
m_CaptainAlive[1]=false;
@@ -139,7 +139,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
return;//maybe we should log this, cause this must be a cheater or a big bug
uint8 team = GetTeamIndexByTeamId(player->GetTeam());
//TODO add reputation, events (including quest not available anymore, next quest availabe, go/npc de/spawning)and maybe honor
sLog.outDebug("BG_AV Quest %i completed",questid);
sLog->outDebug("BG_AV Quest %i completed",questid);
switch(questid)
{
case AV_QUEST_A_SCRAPS1:
@@ -149,7 +149,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][0]+=20;
if (m_Team_QuestStatus[team][0] == 500 || m_Team_QuestStatus[team][0] == 1000 || m_Team_QuestStatus[team][0] == 1500) //25,50,75 turn ins
{
sLog.outDebug("BG_AV Quest %i completed starting with unit upgrading..",questid);
sLog->outDebug("BG_AV Quest %i completed starting with unit upgrading..",questid);
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i)
if (m_Nodes[i].Owner == player->GetTeam() && m_Nodes[i].State == POINT_CONTROLED)
{
@@ -164,21 +164,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][1]++;
RewardReputationToTeam(team,1,player->GetTeam());
if (m_Team_QuestStatus[team][1] == 30)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
break;
case AV_QUEST_A_COMMANDER2:
case AV_QUEST_H_COMMANDER2:
m_Team_QuestStatus[team][2]++;
RewardReputationToTeam(team,1,player->GetTeam());
if (m_Team_QuestStatus[team][2] == 60)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
break;
case AV_QUEST_A_COMMANDER3:
case AV_QUEST_H_COMMANDER3:
m_Team_QuestStatus[team][3]++;
RewardReputationToTeam(team,1,player->GetTeam());
if (m_Team_QuestStatus[team][1] == 120)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
break;
case AV_QUEST_A_BOSS1:
case AV_QUEST_H_BOSS1:
@@ -187,16 +187,16 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
case AV_QUEST_H_BOSS2:
m_Team_QuestStatus[team][4]++;
if (m_Team_QuestStatus[team][4] >= 200)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
break;
case AV_QUEST_A_NEAR_MINE:
case AV_QUEST_H_NEAR_MINE:
m_Team_QuestStatus[team][5]++;
if (m_Team_QuestStatus[team][5] == 28)
{
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
if (m_Team_QuestStatus[team][6] == 7)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid);
}
break;
case AV_QUEST_A_OTHER_MINE:
@@ -204,9 +204,9 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][6]++;
if (m_Team_QuestStatus[team][6] == 7)
{
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
if (m_Team_QuestStatus[team][5] == 20)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - ground assault ready",questid);
}
break;
case AV_QUEST_A_RIDER_HIDE:
@@ -214,9 +214,9 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][7]++;
if (m_Team_QuestStatus[team][7] == 25)
{
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
if (m_Team_QuestStatus[team][8] == 25)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid);
}
break;
case AV_QUEST_A_RIDER_TAME:
@@ -224,13 +224,13 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][8]++;
if (m_Team_QuestStatus[team][8] == 25)
{
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here",questid);
if (m_Team_QuestStatus[team][7] == 25)
sLog.outDebug("BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid);
sLog->outDebug("BG_AV Quest %i completed (need to implement some events here - rider assault ready",questid);
}
break;
default:
sLog.outDebug("BG_AV Quest %i completed but is not interesting at all",questid);
sLog->outDebug("BG_AV Quest %i completed but is not interesting at all",questid);
return; //was no interesting quest at all
break;
}
@@ -409,7 +409,7 @@ void BattlegroundAV::StartingEventCloseDoors()
void BattlegroundAV::StartingEventOpenDoors()
{
sLog.outDebug("BG_AV: start spawning mine stuff");
sLog->outDebug("BG_AV: start spawning mine stuff");
for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_N_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_N_MAX; i++)
SpawnBGObject(i,RESPAWN_IMMEDIATELY);
for (uint16 i= BG_AV_OBJECT_MINE_SUPPLY_S_MIN; i <= BG_AV_OBJECT_MINE_SUPPLY_S_MAX; i++)
@@ -479,7 +479,7 @@ void BattlegroundAV::RemovePlayer(Player* plr,uint64 /*guid*/)
{
if (!plr)
{
sLog.outError("bg_AV no player at remove");
sLog->outError("bg_AV no player at remove");
return;
}
//TODO search more buffs
@@ -519,7 +519,7 @@ void BattlegroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger)
//Source->Unmount();
break;
default:
sLog.outDebug("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outDebug("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
// Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -572,7 +572,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
uint32 object = GetObjectThroughNode(node);
sLog.outDebug("bg_av: player destroyed point node %i object %i",node,object);
sLog->outDebug("bg_av: player destroyed point node %i object %i",node,object);
//despawn banner
SpawnBGObject(object, RESPAWN_ONE_DAY);
@@ -587,7 +587,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
if (m_BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp);
else
sLog.outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist",AV_CPLACE_A_MARSHAL_SOUTH + tmp);
sLog->outError("BG_AV: playerdestroyedpoint: marshal %i doesn't exist",AV_CPLACE_A_MARSHAL_SOUTH + tmp);
//spawn destroyed aura
for (uint8 i=0; i <= 9; i++)
SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10),RESPAWN_IMMEDIATELY);
@@ -645,7 +645,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
if (!initial)
{
sLog.outDebug("bg_av depopulating mine %i (0=north,1=south)",mine);
sLog->outDebug("bg_av depopulating mine %i (0=north,1=south)",mine);
if (mine == AV_SOUTH_MINE)
for (uint16 i=AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
if (m_BgCreatures[i])
@@ -656,7 +656,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
}
SendMineWorldStates(mine);
sLog.outDebug("bg_av populating mine %i (0=north,1=south)",mine);
sLog->outDebug("bg_av populating mine %i (0=north,1=south)",mine);
uint16 miner;
//also neutral team exists.. after a big time, the neutral team tries to conquer the mine
if (mine == AV_NORTH_MINE)
@@ -678,7 +678,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, uint32 team, bool initial)
else
miner = AV_NPC_S_MINE_N_1;
//vermin
sLog.outDebug("spawning vermin");
sLog->outDebug("spawning vermin");
if (team == ALLIANCE)
cinfo = AV_NPC_S_MINE_A_3;
else if (team == HORDE)
@@ -752,7 +752,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
if (m_BgCreatures[node])
DelCreature(node);
if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], owner))
sLog.outError("AV: couldn't spawn spiritguide at node %i",node);
sLog->outError("AV: couldn't spawn spiritguide at node %i",node);
}
for (uint8 i=0; i<4; i++)
@@ -795,7 +795,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node)
BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
{
sLog.outDebug("bg_AV getnodethroughobject %i",object);
sLog->outDebug("bg_AV getnodethroughobject %i",object);
if (object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER)
return BG_AV_Nodes(object);
if (object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT)
@@ -810,14 +810,14 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
return BG_AV_Nodes(object - 29);
if (object == BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE)
return BG_AV_NODES_SNOWFALL_GRAVE;
sLog.outError("BattlegroundAV: ERROR! GetPlace got a wrong object :(");
sLog->outError("BattlegroundAV: ERROR! GetPlace got a wrong object :(");
ASSERT(false);
return BG_AV_Nodes(0);
}
uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
{ //this function is the counterpart to GetNodeThroughObject()
sLog.outDebug("bg_AV GetObjectThroughNode %i",node);
sLog->outDebug("bg_AV GetObjectThroughNode %i",node);
if (m_Nodes[node].Owner == ALLIANCE)
{
if (m_Nodes[node].State == POINT_ASSAULTED)
@@ -848,7 +848,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
}
else if (m_Nodes[node].Owner == AV_NEUTRAL_TEAM)
return BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE;
sLog.outError("BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i",node);
sLog->outError("BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i",node);
ASSERT(false);
return 0;
}
@@ -860,7 +860,7 @@ void BattlegroundAV::EventPlayerClickedOnFlag(Player *source, GameObject* target
if (GetStatus() != STATUS_IN_PROGRESS)
return;
int32 object = GetObjectType(target_obj->GetGUID());
sLog.outDebug("BG_AV using gameobject %i with type %i",target_obj->GetEntry(),object);
sLog->outDebug("BG_AV using gameobject %i with type %i",target_obj->GetEntry(),object);
if (object < 0)
return;
switch(target_obj->GetEntry())
@@ -899,10 +899,10 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
EventPlayerAssaultsPoint(player,object);
return;
}
sLog.outDebug("player defends point object: %i node: %i",object,node);
sLog->outDebug("player defends point object: %i node: %i",object,node);
if (m_Nodes[node].PrevOwner != team)
{
sLog.outError("BG_AV: player defends point which doesn't belong to his team %i",node);
sLog->outError("BG_AV: player defends point which doesn't belong to his team %i",node);
return;
}
@@ -961,7 +961,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
BG_AV_Nodes node = GetNodeThroughObject(object);
uint32 owner = m_Nodes[node].Owner; //maybe name it prevowner
uint32 team = player->GetTeam();
sLog.outDebug("bg_av: player assaults point object %i node %i",object,node);
sLog->outDebug("bg_av: player assaults point object %i node %i",object,node);
if (owner == team || team == m_Nodes[node].TotalOwner)
return; //surely a gm used this object
@@ -1118,7 +1118,7 @@ uint8 BattlegroundAV::GetWorldStateType(uint8 state, uint16 team) //this is used
if (state == POINT_ASSAULTED)
return 3;
}
sLog.outError("BG_AV: should update a strange worldstate state:%i team:%i",state,team);
sLog->outError("BG_AV: should update a strange worldstate state:%i team:%i",state,team);
return 5; //this will crash the game, but i want to know if something is wrong here
}
@@ -1197,7 +1197,7 @@ bool BattlegroundAV::SetupBattleground()
// horde gates
|| !AddObject(BG_AV_OBJECT_DOOR_H, BG_AV_OBJECTID_GATE_H, BG_AV_DoorPositons[1][0],BG_AV_DoorPositons[1][1],BG_AV_DoorPositons[1][2],BG_AV_DoorPositons[1][3],0,0,sin(BG_AV_DoorPositons[1][3]/2),cos(BG_AV_DoorPositons[1][3]/2),RESPAWN_IMMEDIATELY))
{
sLog.outErrorDb("BatteGroundAV: Failed to spawn some object Battleground not created!1");
sLog->outErrorDb("BatteGroundAV: Failed to spawn some object Battleground not created!1");
return false;
}
@@ -1215,7 +1215,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+i*3,BG_AV_OBJECTID_AURA_A,BG_AV_ObjectPos[i][0],BG_AV_ObjectPos[i][1],BG_AV_ObjectPos[i][2],BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3]/2), cos(BG_AV_ObjectPos[i][3]/2),RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_AURA_H_FIRSTAID_STATION+i*3,BG_AV_OBJECTID_AURA_H,BG_AV_ObjectPos[i][0],BG_AV_ObjectPos[i][1],BG_AV_ObjectPos[i][2],BG_AV_ObjectPos[i][3], 0, 0, sin(BG_AV_ObjectPos[i][3]/2), cos(BG_AV_ObjectPos[i][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!2");
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!2");
return false;
}
}
@@ -1230,7 +1230,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)),BG_AV_OBJECTID_TOWER_BANNER_A,BG_AV_ObjectPos[i+8][0],BG_AV_ObjectPos[i+8][1],BG_AV_ObjectPos[i+8][2],BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2),RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)),BG_AV_OBJECTID_TOWER_BANNER_PH,BG_AV_ObjectPos[i+8][0],BG_AV_ObjectPos[i+8][1],BG_AV_ObjectPos[i+8][2],BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!3");
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!3");
return false;
}
}
@@ -1243,7 +1243,7 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_TFLAG_A_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)),BG_AV_OBJECTID_TOWER_BANNER_PA,BG_AV_ObjectPos[i+8][0],BG_AV_ObjectPos[i+8][1],BG_AV_ObjectPos[i+8][2],BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2),RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_TFLAG_H_DUNBALDAR_SOUTH+(2*(i-BG_AV_NODES_DUNBALDAR_SOUTH)),BG_AV_OBJECTID_TOWER_BANNER_H,BG_AV_ObjectPos[i+8][0],BG_AV_ObjectPos[i+8][1],BG_AV_ObjectPos[i+8][2],BG_AV_ObjectPos[i+8][3], 0, 0, sin(BG_AV_ObjectPos[i+8][3]/2), cos(BG_AV_ObjectPos[i+8][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!4");
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!4");
return false;
}
}
@@ -1251,7 +1251,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j,BG_AV_OBJECTID_FIRE,BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][0],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][1],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][2],BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH+((i-BG_AV_NODES_DUNBALDAR_SOUTH)*10)+j][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!5.%i",i);
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!5.%i",i);
return false;
}
}
@@ -1265,7 +1265,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+(i*10)+j,BG_AV_OBJECTID_SMOKE,BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][0],BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][1],BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][2],BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!6.%i",i);
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!6.%i",i);
return false;
}
}
@@ -1273,7 +1273,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE+(i*10)+j,BG_AV_OBJECTID_FIRE,BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][0],BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][1],BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][2],BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A+(i*10)+j][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!7.%i",i);
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!7.%i",i);
return false;
}
}
@@ -1283,7 +1283,7 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN+i,BG_AV_OBJECTID_MINE_N,BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][0],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][1],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][2],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN+i][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i",i);
sLog->outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i",i);
return false;
}
}
@@ -1291,14 +1291,14 @@ bool BattlegroundAV::SetupBattleground()
{
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN+i,BG_AV_OBJECTID_MINE_S,BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][0],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][1],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][2],BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3], 0, 0, sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN+i][3]/2),RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i",i);
sLog->outError("BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i",i);
return false;
}
}
if (!AddObject(BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE, BG_AV_OBJECTID_BANNER_SNOWFALL_N ,BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][0],BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][1],BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][2],BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3],0,0,sin(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), cos(BG_AV_ObjectPos[BG_AV_NODES_SNOWFALL_GRAVE][3]/2), RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!8");
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!8");
return false;
}
for (uint8 i = 0; i < 4; i++)
@@ -1308,13 +1308,13 @@ bool BattlegroundAV::SetupBattleground()
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H+i, BG_AV_OBJECTID_SNOWFALL_CANDY_H ,BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3],0,0,sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY)
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH+i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH ,BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][0],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][1],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][2],BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3],0,0,sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1+i][3]/2), RESPAWN_ONE_DAY))
{
sLog.outError("BatteGroundAV: Failed to spawn some object Battleground not created!9.%i",i);
sLog->outError("BatteGroundAV: Failed to spawn some object Battleground not created!9.%i",i);
return false;
}
}
uint16 i;
sLog.outDebug("Alterac Valley: entering state STATUS_WAIT_JOIN ...");
sLog->outDebug("Alterac Valley: entering state STATUS_WAIT_JOIN ...");
// Initial Nodes
for (i = 0; i < BG_AV_OBJECT_MAX; i++)
SpawnBGObject(i, RESPAWN_ONE_DAY);
@@ -1345,22 +1345,22 @@ bool BattlegroundAV::SetupBattleground()
SpawnBGObject(BG_AV_OBJECT_AURA_N_SNOWFALL_GRAVE,RESPAWN_IMMEDIATELY);
//creatures
sLog.outDebug("BG_AV start poputlating nodes");
sLog->outDebug("BG_AV start poputlating nodes");
for (BG_AV_Nodes i= BG_AV_NODES_FIRSTAID_STATION; i < BG_AV_NODES_MAX; ++i)
{
if (m_Nodes[i].Owner)
PopulateNode(i);
}
//all creatures which don't get despawned through the script are static
sLog.outDebug("BG_AV: start spawning static creatures");
sLog->outDebug("BG_AV: start spawning static creatures");
for (i=0; i < AV_STATICCPLACE_MAX; i++)
AddAVCreature(0,i+AV_CPLACE_MAX);
//mainspiritguides:
sLog.outDebug("BG_AV: start spawning spiritguides creatures");
sLog->outDebug("BG_AV: start spawning spiritguides creatures");
AddSpiritGuide(7, BG_AV_CreaturePos[7][0], BG_AV_CreaturePos[7][1], BG_AV_CreaturePos[7][2], BG_AV_CreaturePos[7][3], ALLIANCE);
AddSpiritGuide(8, BG_AV_CreaturePos[8][0], BG_AV_CreaturePos[8][1], BG_AV_CreaturePos[8][2], BG_AV_CreaturePos[8][3], HORDE);
//spawn the marshals (those who get deleted, if a tower gets destroyed)
sLog.outDebug("BG_AV: start spawning marshal creatures");
sLog->outDebug("BG_AV: start spawning marshal creatures");
for (i=AV_NPC_A_MARSHAL_SOUTH; i <= AV_NPC_H_MARSHAL_WTOWER; i++)
AddAVCreature(i,AV_CPLACE_A_MARSHAL_SOUTH+(i-AV_NPC_A_MARSHAL_SOUTH));
AddAVCreature(AV_NPC_HERALD,AV_CPLACE_HERALD);
@@ -1387,7 +1387,7 @@ const char* BattlegroundAV::GetNodeName(BG_AV_Nodes node)
case BG_AV_NODES_FROSTWOLF_WTOWER: return GetTrinityString(LANG_BG_AV_NODE_TOWER_FROST_W);
case BG_AV_NODES_FROSTWOLF_HUT: return GetTrinityString(LANG_BG_AV_NODE_GRAVE_FROST_HUT);
default:
sLog.outError("tried to get name for node %u",node);
sLog->outError("tried to get name for node %u",node);
break;
}
@@ -1398,22 +1398,22 @@ void BattlegroundAV::AssaultNode(BG_AV_Nodes node, uint16 team)
{
if (m_Nodes[node].TotalOwner == team)
{
sLog.outCrash("Assaulting team is TotalOwner of node");
sLog->outCrash("Assaulting team is TotalOwner of node");
ASSERT (false);
}
if (m_Nodes[node].Owner == team)
{
sLog.outCrash("Assaulting team is owner of node");
sLog->outCrash("Assaulting team is owner of node");
ASSERT (false);
}
if (m_Nodes[node].State == POINT_DESTROYED)
{
sLog.outCrash("Destroyed node is being assaulted");
sLog->outCrash("Destroyed node is being assaulted");
ASSERT (false);
}
if (m_Nodes[node].State == POINT_ASSAULTED && m_Nodes[node].TotalOwner) //only assault an assaulted node if no totalowner exists
{
sLog.outCrash("Assault on an not assaulted node with total owner");
sLog->outCrash("Assault on an not assaulted node with total owner");
ASSERT (false);
}
//the timer gets another time, if the previous owner was 0 == Neutral
@@ -103,7 +103,7 @@ void BattlegroundBE::HandleKillPlayer(Player *player, Player *killer)
if (!killer)
{
sLog.outError("Killer player not found");
sLog->outError("Killer player not found");
return;
}
@@ -136,7 +136,7 @@ void BattlegroundBE::HandleAreaTrigger(Player *Source, uint32 Trigger)
//buff_guid = m_BgObjects[BG_BE_OBJECT_BUFF_2];
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -168,7 +168,7 @@ bool BattlegroundBE::SetupBattleground()
|| !AddObject(BG_BE_OBJECT_BUFF_1, BG_BE_OBJECT_TYPE_BUFF_1, 6249.042f, 275.3239f, 11.22033f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|| !AddObject(BG_BE_OBJECT_BUFF_2, BG_BE_OBJECT_TYPE_BUFF_2, 6228.26f, 249.566f, 11.21812f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
{
sLog.outErrorDb("BatteGroundBE: Failed to spawn some object!");
sLog->outErrorDb("BatteGroundBE: Failed to spawn some object!");
return false;
}
@@ -126,7 +126,7 @@ void BattlegroundDS::HandleKillPlayer(Player* player, Player* killer)
if (!killer)
{
sLog.outError("BattlegroundDS: Killer player not found");
sLog->outError("BattlegroundDS: Killer player not found");
return;
}
@@ -147,7 +147,7 @@ void BattlegroundDS::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 5348:
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -184,7 +184,7 @@ bool BattlegroundDS::SetupBattleground()
|| !AddObject(BG_DS_OBJECT_BUFF_1, BG_DS_OBJECT_TYPE_BUFF_1, 1291.7f, 813.424f, 7.11472f, 4.64562f, 0, 0, 0.730314f, -0.683111f, 120)
|| !AddObject(BG_DS_OBJECT_BUFF_2, BG_DS_OBJECT_TYPE_BUFF_2, 1291.7f, 768.911f, 7.11472f, 1.55194f, 0, 0, 0.700409f, 0.713742f, 120))
{
sLog.outErrorDb("BatteGroundDS: Failed to spawn some object!");
sLog->outErrorDb("BatteGroundDS: Failed to spawn some object!");
return false;
}
@@ -151,7 +151,7 @@ void BattlegroundEY::CheckSomeoneJoinedPoint()
Player *plr = sObjectMgr->GetPlayer(m_PlayersNearPoint[EY_POINTS_MAX][j]);
if (!plr)
{
sLog.outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
sLog->outError("BattlegroundEY:CheckSomeoneJoinedPoint: Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[EY_POINTS_MAX][j]));
++j;
continue;
}
@@ -191,7 +191,7 @@ void BattlegroundEY::CheckSomeoneLeftPoint()
Player *plr = sObjectMgr->GetPlayer(m_PlayersNearPoint[i][j]);
if (!plr)
{
sLog.outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
sLog->outError("BattlegroundEY:CheckSomeoneLeftPoint Player (GUID: %u) not found!", GUID_LOPART(m_PlayersNearPoint[i][j]));
//move not existed player to "free space" - this will cause many error showing in log, but it is a very important bug
m_PlayersNearPoint[EY_POINTS_MAX].push_back(m_PlayersNearPoint[i][j]);
m_PlayersNearPoint[i].erase(m_PlayersNearPoint[i].begin() + j);
@@ -410,7 +410,7 @@ void BattlegroundEY::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 5866:
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -473,7 +473,7 @@ bool BattlegroundEY::SetupBattleground()
|| !AddObject(BG_EY_OBJECT_TOWER_CAP_MAGE_TOWER, BG_OBJECT_HU_TOWER_CAP_EY_ENTRY, 2282.121582f, 1760.006958f, 1189.707153f, 1.919862f, 0, 0, 0.819152f, 0.573576f, RESPAWN_ONE_DAY)
)
{
sLog.outErrorDb("BatteGroundEY: Failed to spawn some object Battleground not created!");
sLog->outErrorDb("BatteGroundEY: Failed to spawn some object Battleground not created!");
return false;
}
@@ -483,28 +483,28 @@ bool BattlegroundEY::SetupBattleground()
AreaTriggerEntry const* at = sAreaTriggerStore.LookupEntry(m_Points_Trigger[i]);
if (!at)
{
sLog.outError("BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
sLog->outError("BattlegroundEY: Unknown trigger: %u", m_Points_Trigger[i]);
continue;
}
if (!AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3, Buff_Entries[0], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 1, Buff_Entries[1], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
|| !AddObject(BG_EY_OBJECT_SPEEDBUFF_FEL_REAVER + i * 3 + 2, Buff_Entries[2], at->x, at->y, at->z, 0.907571f, 0, 0, 0.438371f, 0.898794f, RESPAWN_ONE_DAY)
)
sLog.outError("BattlegroundEY: Cannot spawn buff");
sLog->outError("BattlegroundEY: Cannot spawn buff");
}
WorldSafeLocsEntry const *sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_ALLIANCE);
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
{
sLog.outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
sLog->outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
return false;
}
sg = sWorldSafeLocsStore.LookupEntry(EY_GRAVEYARD_MAIN_HORDE);
if (!sg || !AddSpiritGuide(EY_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
{
sLog.outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
sLog->outErrorDb("BatteGroundEY: Failed to spawn spirit guide! Battleground not created!");
return false;
}
@@ -569,7 +569,7 @@ void BattlegroundEY::RespawnFlagAfterDrop()
if (obj)
obj->Delete();
else
sLog.outError("BattlegroundEY: Unknown dropped flag guid: %u",GUID_LOPART(GetDroppedFlagGUID()));
sLog->outError("BattlegroundEY: Unknown dropped flag guid: %u",GUID_LOPART(GetDroppedFlagGUID()));
SetDroppedFlagGUID(0);
}
@@ -741,7 +741,7 @@ void BattlegroundEY::EventTeamCapturedPoint(Player *Source, uint32 Point)
WorldSafeLocsEntry const *sg = NULL;
sg = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[Point].GraveYardId);
if (!sg || !AddSpiritGuide(Point, sg->x, sg->y, sg->z, 3.124139f, Team))
sLog.outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
sLog->outError("BatteGroundEY: Failed to spawn spirit guide! point: %u, team: %u, graveyard_id: %u",
Point, Team, m_CapturingPointTypes[Point].GraveYardId);
// SpawnBGCreature(Point,RESPAWN_IMMEDIATELY);
@@ -893,7 +893,7 @@ WorldSafeLocsEntry const *BattlegroundEY::GetClosestGraveYard(Player* player)
if (!entry)
{
sLog.outError("BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
sLog->outError("BattlegroundEY: Not found the main team graveyard. Graveyard system isn't working!");
return NULL;
}
@@ -910,7 +910,7 @@ WorldSafeLocsEntry const *BattlegroundEY::GetClosestGraveYard(Player* player)
{
entry = sWorldSafeLocsStore.LookupEntry(m_CapturingPointTypes[i].GraveYardId);
if (!entry)
sLog.outError("BattlegroundEY: Not found graveyard: %u",m_CapturingPointTypes[i].GraveYardId);
sLog->outError("BattlegroundEY: Not found graveyard: %u",m_CapturingPointTypes[i].GraveYardId);
else
{
distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z);
@@ -100,7 +100,7 @@ void BattlegroundNA::HandleKillPlayer(Player *player, Player *killer)
if (!killer)
{
sLog.outError("BattlegroundNA: Killer player not found");
sLog->outError("BattlegroundNA: Killer player not found");
return;
}
@@ -129,7 +129,7 @@ void BattlegroundNA::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 4537: // buff trigger?
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -161,7 +161,7 @@ bool BattlegroundNA::SetupBattleground()
|| !AddObject(BG_NA_OBJECT_BUFF_1, BG_NA_OBJECT_TYPE_BUFF_1, 4009.189941f, 2895.250000f, 13.052700f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|| !AddObject(BG_NA_OBJECT_BUFF_2, BG_NA_OBJECT_TYPE_BUFF_2, 4103.330078f, 2946.350098f, 13.051300f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
{
sLog.outErrorDb("BatteGroundNA: Failed to spawn some object!");
sLog->outErrorDb("BatteGroundNA: Failed to spawn some object!");
return false;
}
@@ -100,7 +100,7 @@ void BattlegroundRL::HandleKillPlayer(Player *player, Player *killer)
if (!killer)
{
sLog.outError("Killer player not found");
sLog->outError("Killer player not found");
return;
}
@@ -130,7 +130,7 @@ void BattlegroundRL::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 4697: // buff trigger?
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -160,7 +160,7 @@ bool BattlegroundRL::SetupBattleground()
|| !AddObject(BG_RL_OBJECT_BUFF_1, BG_RL_OBJECT_TYPE_BUFF_1, 1328.719971f, 1632.719971f, 36.730400f, -1.448624f, 0, 0, 0.6626201f, -0.7489557f, 120)
|| !AddObject(BG_RL_OBJECT_BUFF_2, BG_RL_OBJECT_TYPE_BUFF_2, 1243.300049f, 1699.170044f, 34.872601f, -0.06981307f, 0, 0, 0.03489945f, -0.9993908f, 120))
{
sLog.outErrorDb("BatteGroundRL: Failed to spawn some object!");
sLog->outErrorDb("BatteGroundRL: Failed to spawn some object!");
return false;
}
@@ -149,7 +149,7 @@ void BattlegroundRV::HandleKillPlayer(Player *player, Player *killer)
if (!killer)
{
sLog.outError("BattlegroundRV: Killer player not found");
sLog->outError("BattlegroundRV: Killer player not found");
return;
}
@@ -179,7 +179,7 @@ void BattlegroundRV::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 5226:
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -234,7 +234,7 @@ bool BattlegroundRV::SetupBattleground()
*/
)
{
sLog.outErrorDb("BatteGroundRV: Failed to spawn some object!");
sLog->outErrorDb("BatteGroundRV: Failed to spawn some object!");
return false;
}
return true;
@@ -158,7 +158,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;
}
@@ -171,7 +171,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);
}
}
@@ -217,12 +217,12 @@ void BattlegroundWS::RespawnFlag(uint32 Team, bool captured)
{
if (Team == ALLIANCE)
{
sLog.outDebug("Respawn Alliance flag");
sLog->outDebug("Respawn Alliance flag");
m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
}
else
{
sLog.outDebug("Respawn Horde flag");
sLog->outDebug("Respawn Horde flag");
m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
}
@@ -260,7 +260,7 @@ void BattlegroundWS::RespawnFlagAfterDrop(uint32 team)
if (obj)
obj->Delete();
else
sLog.outError("unknown droped flag bg, guid: %u",GUID_LOPART(GetDroppedFlagGUID(team)));
sLog->outError("unknown droped flag bg, guid: %u",GUID_LOPART(GetDroppedFlagGUID(team)));
SetDroppedFlagGUID(0,team);
m_BothFlagsKept = false;
@@ -566,7 +566,7 @@ void BattlegroundWS::RemovePlayer(Player *plr, uint64 guid)
{
if (!plr)
{
sLog.outError("BattlegroundWS: Removing offline player who has the FLAG!!");
sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!");
this->SetAllianceFlagPicker(0);
this->RespawnFlag(ALLIANCE, false);
}
@@ -577,7 +577,7 @@ void BattlegroundWS::RemovePlayer(Player *plr, uint64 guid)
{
if (!plr)
{
sLog.outError("BattlegroundWS: Removing offline player who has the FLAG!!");
sLog->outError("BattlegroundWS: Removing offline player who has the FLAG!!");
this->SetHordeFlagPicker(0);
this->RespawnFlag(HORDE, false);
}
@@ -646,7 +646,7 @@ void BattlegroundWS::HandleAreaTrigger(Player *Source, uint32 Trigger)
case 4629: // unk4
break;
default:
sLog.outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
sLog->outError("WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@@ -681,25 +681,25 @@ bool BattlegroundWS::SetupBattleground()
|| !AddObject(BG_WS_OBJECT_DOOR_H_4, BG_OBJECT_DOOR_H_4_WS_ENTRY, 950.7952f, 1459.583f, 342.1523f, 0.05235988f, 0, 0, 0.02617695f, 0.9996573f, RESPAWN_IMMEDIATELY)
)
{
sLog.outErrorDb("BatteGroundWS: Failed to spawn some object Battleground not created!");
sLog->outErrorDb("BatteGroundWS: Failed to spawn some object Battleground not created!");
return false;
}
WorldSafeLocsEntry const *sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_ALLIANCE);
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_ALLIANCE, sg->x, sg->y, sg->z, 3.124139f, ALLIANCE))
{
sLog.outErrorDb("BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
sLog->outErrorDb("BatteGroundWS: Failed to spawn Alliance spirit guide! Battleground not created!");
return false;
}
sg = sWorldSafeLocsStore.LookupEntry(WS_GRAVEYARD_MAIN_HORDE);
if (!sg || !AddSpiritGuide(WS_SPIRIT_MAIN_HORDE, sg->x, sg->y, sg->z, 3.193953f, HORDE))
{
sLog.outErrorDb("BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
sLog->outErrorDb("BatteGroundWS: Failed to spawn Horde spirit guide! Battleground not created!");
return false;
}
sLog.outDebug("BatteGroundWS: BG objects and spirit guides spawned");
sLog->outDebug("BatteGroundWS: BG objects and spirit guides spawned");
return true;
}