Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG-- branch : trunk
This commit is contained in:
1 parent
0948fc5bbe
commit
0f3b9019a8
159 files changed
+1943
-1939
No files matched your search
@@ -47,12 +47,12 @@ void LFGScripts::OnAddMember(Group* group, uint64 guid)
|
||||
}
|
||||
|
||||
// TODO - if group is queued and new player is added convert to rolecheck without notify the current players queued
|
||||
if (sLFGMgr.GetState(gguid) == LFG_STATE_QUEUED)
|
||||
sLFGMgr.Leave(NULL, group);
|
||||
if (sLFGMgr->GetState(gguid) == LFG_STATE_QUEUED)
|
||||
sLFGMgr->Leave(NULL, group);
|
||||
|
||||
if (sLFGMgr.GetState(guid) == LFG_STATE_QUEUED)
|
||||
if (Player *plr = sObjectMgr.GetPlayer(guid))
|
||||
sLFGMgr.Leave(plr);
|
||||
if (sLFGMgr->GetState(guid) == LFG_STATE_QUEUED)
|
||||
if (Player *plr = sObjectMgr->GetPlayer(guid))
|
||||
sLFGMgr->Leave(plr);
|
||||
}
|
||||
|
||||
void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method, uint64 kicker, const char* reason)
|
||||
@@ -62,10 +62,10 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method,
|
||||
return;
|
||||
|
||||
sLog.outDebug("LFGScripts::OnRemoveMember [" UI64FMTD "]: remove [" UI64FMTD "] Method: %d Kicker: [" UI64FMTD "] Reason: %s", gguid, guid, method, kicker, (reason ? reason : ""));
|
||||
if (sLFGMgr.GetState(gguid) == LFG_STATE_QUEUED)
|
||||
if (sLFGMgr->GetState(gguid) == LFG_STATE_QUEUED)
|
||||
{
|
||||
// TODO - Do not remove, just remove the one leaving and rejoin queue with all other data
|
||||
sLFGMgr.Leave(NULL, group);
|
||||
sLFGMgr->Leave(NULL, group);
|
||||
}
|
||||
|
||||
if (!group->isLFGGroup())
|
||||
@@ -77,12 +77,12 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method,
|
||||
std::string str_reason = "";
|
||||
if (reason)
|
||||
str_reason = std::string(reason);
|
||||
sLFGMgr.InitBoot(group, kicker, guid, str_reason);
|
||||
sLFGMgr->InitBoot(group, kicker, guid, str_reason);
|
||||
return;
|
||||
}
|
||||
|
||||
sLFGMgr.ClearState(guid);
|
||||
if (Player *plr = sObjectMgr.GetPlayer(guid))
|
||||
sLFGMgr->ClearState(guid);
|
||||
if (Player *plr = sObjectMgr->GetPlayer(guid))
|
||||
{
|
||||
/*
|
||||
if (method == GROUP_REMOVEMETHOD_LEAVE)
|
||||
@@ -94,11 +94,11 @@ void LFGScripts::OnRemoveMember(Group* group, uint64 guid, RemoveMethod& method,
|
||||
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_LEADER);
|
||||
plr->GetSession()->SendLfgUpdateParty(updateData);
|
||||
if (plr->GetMap()->IsDungeon()) // Teleport player out the dungeon
|
||||
sLFGMgr.TeleportPlayer(plr, true);
|
||||
sLFGMgr->TeleportPlayer(plr, true);
|
||||
}
|
||||
|
||||
if (sLFGMgr.GetState(gguid) != LFG_STATE_FINISHED_DUNGEON)// Need more players to finish the dungeon
|
||||
sLFGMgr.OfferContinue(group);
|
||||
if (sLFGMgr->GetState(gguid) != LFG_STATE_FINISHED_DUNGEON)// Need more players to finish the dungeon
|
||||
sLFGMgr->OfferContinue(group);
|
||||
}
|
||||
|
||||
void LFGScripts::OnDisband(Group* group)
|
||||
@@ -106,7 +106,7 @@ void LFGScripts::OnDisband(Group* group)
|
||||
uint64 gguid = group->GetGUID();
|
||||
sLog.outDebug("LFGScripts::OnDisband [" UI64FMTD "]", gguid);
|
||||
|
||||
sLFGMgr.RemoveGroupData(gguid);
|
||||
sLFGMgr->RemoveGroupData(gguid);
|
||||
}
|
||||
|
||||
void LFGScripts::OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid)
|
||||
@@ -116,14 +116,14 @@ void LFGScripts::OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLe
|
||||
return;
|
||||
|
||||
sLog.outDebug("LFGScripts::OnChangeLeader [" UI64FMTD "]: old [" UI64FMTD "] new [" UI64FMTD "]", gguid, newLeaderGuid, oldLeaderGuid);
|
||||
Player *plr = sObjectMgr.GetPlayer(newLeaderGuid);
|
||||
Player *plr = sObjectMgr->GetPlayer(newLeaderGuid);
|
||||
|
||||
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_LEADER);
|
||||
if (plr)
|
||||
plr->GetSession()->SendLfgUpdateParty(updateData);
|
||||
|
||||
|
||||
plr = sObjectMgr.GetPlayer(oldLeaderGuid);
|
||||
plr = sObjectMgr->GetPlayer(oldLeaderGuid);
|
||||
if (plr)
|
||||
{
|
||||
updateData.updateType = LFG_UPDATETYPE_GROUP_DISBAND;
|
||||
@@ -138,7 +138,7 @@ void LFGScripts::OnInviteMember(Group* group, uint64 guid)
|
||||
return;
|
||||
|
||||
sLog.outDebug("LFGScripts::OnInviteMember [" UI64FMTD "]: invite [" UI64FMTD "] leader [" UI64FMTD "]", gguid, guid, group->GetLeaderGUID());
|
||||
sLFGMgr.Leave(NULL, group);
|
||||
sLFGMgr->Leave(NULL, group);
|
||||
}
|
||||
|
||||
void LFGScripts::OnLevelChanged(Player* /*player*/, uint8 /*newLevel*/)
|
||||
@@ -148,18 +148,18 @@ void LFGScripts::OnLevelChanged(Player* /*player*/, uint8 /*newLevel*/)
|
||||
|
||||
void LFGScripts::OnLogout(Player* player)
|
||||
{
|
||||
sLFGMgr.Leave(player);
|
||||
sLFGMgr->Leave(player);
|
||||
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE);
|
||||
player->GetSession()->SendLfgUpdateParty(updateData);
|
||||
player->GetSession()->SendLfgUpdatePlayer(updateData);
|
||||
player->GetSession()->SendLfgUpdateSearch(false);
|
||||
uint64 guid = player->GetGUID();
|
||||
// TODO - Do not remove, add timer before deleting
|
||||
sLFGMgr.RemovePlayerData(guid);
|
||||
sLFGMgr->RemovePlayerData(guid);
|
||||
}
|
||||
|
||||
void LFGScripts::OnLogin(Player* player)
|
||||
{
|
||||
sLFGMgr.InitializeLockedDungeons(player);
|
||||
sLFGMgr->InitializeLockedDungeons(player);
|
||||
// TODO - Restore LfgPlayerData and send proper status to player if it was in a group
|
||||
}
|
||||
Reference in new issue
Block a user