Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG-- branch : trunk
This commit is contained in:
@@ -250,7 +250,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
|
||||
for (int8 i = 1; i >= 0; --i)
|
||||
{
|
||||
uint32 at_id = bg->m_ArenaTeamIds[i];
|
||||
ArenaTeam* at = sObjectMgr.GetArenaTeamById(at_id);
|
||||
ArenaTeam* at = sObjectMgr->GetArenaTeamById(at_id);
|
||||
if (at)
|
||||
*data << at->GetName();
|
||||
else
|
||||
@@ -290,7 +290,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
|
||||
}
|
||||
else
|
||||
{
|
||||
Player *plr = sObjectMgr.GetPlayer(itr2->first);
|
||||
Player *plr = sObjectMgr->GetPlayer(itr2->first);
|
||||
uint32 team = bg->GetPlayerTeam(itr2->first);
|
||||
if (!team && plr)
|
||||
team = plr->GetBGTeam();
|
||||
@@ -595,7 +595,7 @@ Battleground * BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId bgTypeI
|
||||
bg->SetBracket(bracketEntry);
|
||||
|
||||
// generate a new instance id
|
||||
bg->SetInstanceID(sMapMgr.GenerateInstanceId()); // set instance id
|
||||
bg->SetInstanceID(sMapMgr->GenerateInstanceId()); // set instance id
|
||||
bg->SetClientInstanceID(CreateClientVisibleInstanceId(isRandom ? BATTLEGROUND_RB : bgTypeId, bracketEntry->GetBracketId()));
|
||||
|
||||
// reset the new bg (set status to status_wait_queue from status_none)
|
||||
@@ -688,7 +688,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
Field *fields = result->Fetch();
|
||||
|
||||
uint32 bgTypeID_ = fields[0].GetUInt32();
|
||||
if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeID_, NULL))
|
||||
if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeID_, NULL))
|
||||
continue;
|
||||
|
||||
// can be overwrite by values from DB
|
||||
@@ -766,7 +766,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
}
|
||||
|
||||
selectionWeight = fields[9].GetUInt8();
|
||||
scriptId = sObjectMgr.GetScriptId(fields[10].GetCString());
|
||||
scriptId = sObjectMgr->GetScriptId(fields[10].GetCString());
|
||||
//sLog.outDetail("Creating battleground %s, %u-%u", bl->name[sWorld.GetDBClang()], MinLvl, MaxLvl);
|
||||
if (!CreateBattleground(bgTypeID, IsArena, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, bl->name[sWorld.GetDefaultDbcLocale()], bl->mapid[0], AStartLoc[0], AStartLoc[1], AStartLoc[2], AStartLoc[3], HStartLoc[0], HStartLoc[1], HStartLoc[2], HStartLoc[3], scriptId))
|
||||
continue;
|
||||
@@ -815,7 +815,7 @@ void BattlegroundMgr::DistributeArenaPoints()
|
||||
std::map<uint32, uint32> PlayerPoints;
|
||||
|
||||
//at first update all points for all team members
|
||||
for (ObjectMgr::ArenaTeamMap::iterator team_itr = sObjectMgr.GetArenaTeamMapBegin(); team_itr != sObjectMgr.GetArenaTeamMapEnd(); ++team_itr)
|
||||
for (ObjectMgr::ArenaTeamMap::iterator team_itr = sObjectMgr->GetArenaTeamMapBegin(); team_itr != sObjectMgr->GetArenaTeamMapEnd(); ++team_itr)
|
||||
if (ArenaTeam * at = team_itr->second)
|
||||
at->UpdateArenaPointsHelper(PlayerPoints);
|
||||
|
||||
@@ -826,7 +826,7 @@ void BattlegroundMgr::DistributeArenaPoints()
|
||||
CharacterDatabase.PExecute("UPDATE characters SET arenaPoints = arenaPoints + '%u' WHERE guid = '%u'", plr_itr->second, plr_itr->first);
|
||||
|
||||
//add points to player if online
|
||||
Player* pl = sObjectMgr.GetPlayer(plr_itr->first);
|
||||
Player* pl = sObjectMgr->GetPlayer(plr_itr->first);
|
||||
if (pl)
|
||||
pl->ModifyArenaPoints(plr_itr->second);
|
||||
}
|
||||
@@ -836,7 +836,7 @@ void BattlegroundMgr::DistributeArenaPoints()
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_END);
|
||||
|
||||
sWorld.SendWorldText(LANG_DIST_ARENA_POINTS_TEAM_START);
|
||||
for (ObjectMgr::ArenaTeamMap::iterator titr = sObjectMgr.GetArenaTeamMapBegin(); titr != sObjectMgr.GetArenaTeamMapEnd(); ++titr)
|
||||
for (ObjectMgr::ArenaTeamMap::iterator titr = sObjectMgr->GetArenaTeamMapBegin(); titr != sObjectMgr->GetArenaTeamMapEnd(); ++titr)
|
||||
{
|
||||
if (ArenaTeam * at = titr->second)
|
||||
{
|
||||
@@ -897,7 +897,7 @@ void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket *data, const uint6
|
||||
size_t count_pos = data->wpos();
|
||||
*data << uint32(0); // number of bg instances
|
||||
|
||||
if (Battleground* bgTemplate = sBattlegroundMgr.GetBattlegroundTemplate(bgTypeId))
|
||||
if (Battleground* bgTemplate = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId))
|
||||
{
|
||||
// expected bracket entry
|
||||
if (PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bgTemplate->GetMapId(),plr->getLevel()))
|
||||
|
||||
Reference in New Issue
Block a user