aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server/Protocol
diff options
context:
space:
mode:
authorShauren <none@none>2010-12-22 21:25:23 +0100
committerShauren <none@none>2010-12-22 21:25:23 +0100
commit0f3b9019a88777bef8383e699d27a7e8615f93f2 (patch)
treeb88e120ad46050aa073ee451676801aabbd3eaa1 /src/server/game/Server/Protocol
parent0948fc5bbed08ae6edee4fa1ff86df5cfbffa996 (diff)
Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Server/Protocol')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp22
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp42
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp94
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CalendarHandler.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CharacterHandler.cpp48
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ChatHandler.cpp36
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/GroupHandler.cpp16
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/GuildHandler.cpp8
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ItemHandler.cpp12
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/LFGHandler.cpp38
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MailHandler.cpp20
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MiscHandler.cpp40
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MovementHandler.cpp6
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/NPCHandler.cpp14
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/PetHandler.cpp2
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp32
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/QueryHandler.cpp30
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/QuestHandler.cpp58
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/SpellHandler.cpp8
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/TaxiHandler.cpp10
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/TicketHandler.cpp30
21 files changed, 284 insertions, 284 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
index e80f771c768..9a211d49acf 100755
--- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
@@ -35,13 +35,13 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
recv_data >> guid;
sLog.outDebug("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
- if (Player *plr = sObjectMgr.GetPlayer(guid))
+ if (Player *plr = sObjectMgr->GetPlayer(guid))
{
for (uint8 i = 0; i < MAX_ARENA_SLOT; ++i)
{
if (uint32 a_id = plr->GetArenaTeamId(i))
{
- if (ArenaTeam *at = sObjectMgr.GetArenaTeamById(a_id))
+ if (ArenaTeam *at = sObjectMgr->GetArenaTeamById(a_id))
at->InspectStats(this, plr->GetGUID());
}
}
@@ -55,7 +55,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId;
recv_data >> ArenaTeamId;
- if (ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId))
+ if (ArenaTeam *arenateam = sObjectMgr->GetArenaTeamById(ArenaTeamId))
{
arenateam->Query(this);
arenateam->Stats(this);
@@ -69,7 +69,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
- if (ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId))
+ if (ArenaTeam *arenateam = sObjectMgr->GetArenaTeamById(ArenaTeamId))
arenateam->Roster(this);
}
@@ -104,7 +104,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
return;
}
- ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *arenateam = sObjectMgr->GetArenaTeamById(ArenaTeamId);
if (!arenateam)
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_PLAYER_NOT_IN_TEAM);
@@ -155,7 +155,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
{
sLog.outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
- ArenaTeam *at = sObjectMgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
+ ArenaTeam *at = sObjectMgr->GetArenaTeamById(_player->GetArenaTeamIdInvited());
if (!at)
return;
@@ -166,7 +166,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
return;
}
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(at->GetCaptain()))
+ if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != sObjectMgr->GetPlayerTeamByGUID(at->GetCaptain()))
{
// not let enemies sign petition
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -198,7 +198,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
- ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *at = sObjectMgr->GetArenaTeamById(ArenaTeamId);
if (!at)
return;
@@ -233,7 +233,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
- if (ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId))
+ if (ArenaTeam *at = sObjectMgr->GetArenaTeamById(ArenaTeamId))
{
if (at->GetCaptain() != _player->GetGUID())
return;
@@ -256,7 +256,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
recv_data >> ArenaTeamId;
recv_data >> name;
- ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *at = sObjectMgr->GetArenaTeamById(ArenaTeamId);
if (!at) // arena team not found
return;
@@ -298,7 +298,7 @@ void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data)
recv_data >> ArenaTeamId;
recv_data >> name;
- ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
+ ArenaTeam *at = sObjectMgr->GetArenaTeamById(ArenaTeamId);
if (!at) // arena team not found
return;
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
index 1ecb0a001c5..dbb55094de3 100755
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
@@ -167,7 +167,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
Item *it = pl->GetItemByGuid(item);
//do not allow to sell already auctioned items
- if (sAuctionMgr.GetAItem(GUID_LOPART(item)))
+ if (sAuctionMgr->GetAItem(GUID_LOPART(item)))
{
sLog.outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", pl->GetName(), GUID_LOPART(item));
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
@@ -198,10 +198,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
- AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
//we have to take deposit :
- uint32 deposit = sAuctionMgr.GetAuctionDeposit(auctionHouseEntry, etime, it, count);
+ uint32 deposit = sAuctionMgr->GetAuctionDeposit(auctionHouseEntry, etime, it, count);
if (!pl->HasEnoughMoney(deposit))
{
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
@@ -219,7 +219,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
uint32 auction_time = uint32(etime * sWorld.getRate(RATE_AUCTION_TIME));
AuctionEntry *AH = new AuctionEntry;
- AH->Id = sObjectMgr.GenerateAuctionID();
+ AH->Id = sObjectMgr->GenerateAuctionID();
if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
AH->auctioneer = 23442;
else
@@ -236,7 +236,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
AH->auctionHouseEntry = auctionHouseEntry;
sLog.outDetail("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
- sAuctionMgr.AddAItem(it);
+ sAuctionMgr->AddAItem(it);
auctionHouse->AddAuction(AH);
pl->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
@@ -276,7 +276,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject *auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject *auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
AuctionEntry *auction = auctionHouse->GetAuction(auctionId);
Player *pl = GetPlayer();
@@ -289,8 +289,8 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
}
// impossible have online own another character (use this for speedup check in case online owner)
- Player* auction_owner = sObjectMgr.GetPlayer(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER));
- if (!auction_owner && sObjectMgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == pl->GetSession()->GetAccountId())
+ Player* auction_owner = sObjectMgr->GetPlayer(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER));
+ if (!auction_owner && sObjectMgr->GetPlayerAccountIdByGUID(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER)) == pl->GetSession()->GetAccountId())
{
//you cannot bid your another character auction:
SendAuctionCommandResult(0, AUCTION_PLACE_BID, CANNOT_BID_YOUR_AUCTION_ERROR);
@@ -327,7 +327,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
else
{
// mail to last bidder and return money
- sAuctionMgr.SendAuctionOutbiddedMail(auction, price, GetPlayer(), trans);
+ sAuctionMgr->SendAuctionOutbiddedMail(auction, price, GetPlayer(), trans);
pl->ModifyMoney(-int32(price));
}
}
@@ -351,23 +351,23 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
{
pl->ModifyMoney(-int32(auction->buyout));
if (auction->bidder) //buyout for bidded auction ..
- sAuctionMgr.SendAuctionOutbiddedMail(auction, auction->buyout, GetPlayer(), trans);
+ sAuctionMgr->SendAuctionOutbiddedMail(auction, auction->buyout, GetPlayer(), trans);
}
auction->bidder = pl->GetGUIDLow();
auction->bid = auction->buyout;
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, auction->buyout);
//- Mails must be under transaction control too to prevent data loss
- sAuctionMgr.SendAuctionSalePendingMail(auction, trans);
- sAuctionMgr.SendAuctionSuccessfulMail(auction, trans);
- sAuctionMgr.SendAuctionWonMail(auction, trans);
+ sAuctionMgr->SendAuctionSalePendingMail(auction, trans);
+ sAuctionMgr->SendAuctionSuccessfulMail(auction, trans);
+ sAuctionMgr->SendAuctionWonMail(auction, trans);
SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK);
auction->DeleteFromDB(trans);
uint32 item_template = auction->item_template;
- sAuctionMgr.RemoveAItem(auction->item_guidlow);
+ sAuctionMgr->RemoveAItem(auction->item_guidlow);
auctionHouse->RemoveAuction(auction, item_template);
}
pl->SaveInventoryAndGoldToDB(trans);
@@ -394,7 +394,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
AuctionEntry *auction = auctionHouse->GetAuction(auctionId);
Player *pl = GetPlayer();
@@ -402,7 +402,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
if (auction && auction->owner == pl->GetGUIDLow())
{
- Item *pItem = sAuctionMgr.GetAItem(auction->item_guidlow);
+ Item *pItem = sAuctionMgr->GetAItem(auction->item_guidlow);
if (pItem)
{
if (auction->bidder > 0) // If we have a bidder, we have to send him the money he paid
@@ -411,7 +411,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
if (!pl->HasEnoughMoney(auctionCut)) //player doesn't have enough money, maybe message needed
return;
//some auctionBidderNotification would be needed, but don't know that parts..
- sAuctionMgr.SendAuctionCancelledToBidderMail(auction, trans);
+ sAuctionMgr->SendAuctionCancelledToBidderMail(auction, trans);
pl->ModifyMoney(-int32(auctionCut));
}
// Return the item by mail
@@ -448,7 +448,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction(trans);
uint32 item_template = auction->item_template;
- sAuctionMgr.RemoveAItem(auction->item_guidlow);
+ sAuctionMgr->RemoveAItem(auction->item_guidlow);
auctionHouse->RemoveAuction(auction, item_template);
}
@@ -479,7 +479,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4));
Player *pl = GetPlayer();
@@ -526,7 +526,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
WorldPacket data(SMSG_AUCTION_OWNER_LIST_RESULT, (4+4+4));
data << (uint32) 0; // amount place holder
@@ -579,7 +579,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
- AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
+ AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
//sLog.outDebug("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
// GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
index 3d9face508d..700053d430d 100755
--- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
@@ -51,7 +51,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
// Stop the npc if moving
unit->StopMoving();
- BattlegroundTypeId bgTypeId = sBattlegroundMgr.GetBattleMasterBG(unit->GetEntry());
+ BattlegroundTypeId bgTypeId = sBattlegroundMgr->GetBattleMasterBG(unit->GetEntry());
if (!_player->GetBGAccessByLevel(bgTypeId))
{
@@ -66,7 +66,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
void WorldSession::SendBattlegGroundList(uint64 guid, BattlegroundTypeId bgTypeId)
{
WorldPacket data;
- sBattlegroundMgr.BuildBattlegroundListPacket(&data, guid, _player, bgTypeId, 0);
+ sBattlegroundMgr->BuildBattlegroundListPacket(&data, guid, _player, bgTypeId, 0);
SendPacket(&data);
}
@@ -90,7 +90,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
return;
}
- if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeId_, NULL))
+ if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, bgTypeId_, NULL))
{
ChatHandler(this).PSendSysMessage(LANG_BG_DISABLED);
return;
@@ -111,10 +111,10 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
// get bg instance or bg template if instance not found
Battleground *bg = NULL;
if (instanceId)
- bg = sBattlegroundMgr.GetBattlegroundThroughClientInstance(instanceId, bgTypeId);
+ bg = sBattlegroundMgr->GetBattlegroundThroughClientInstance(instanceId, bgTypeId);
if (!bg)
- bg = sBattlegroundMgr.GetBattlegroundTemplate(bgTypeId);
+ bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg)
return;
@@ -132,7 +132,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
{
// player is using dungeon finder or raid finder
WorldPacket data;
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_LFG_CANT_USE_BATTLEGROUND);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_LFG_CANT_USE_BATTLEGROUND);
GetPlayer()->GetSession()->SendPacket(&data);
return;
}
@@ -141,7 +141,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (!_player->CanJoinToBattleground())
{
WorldPacket data;
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
_player->GetSession()->SendPacket(&data);
return;
}
@@ -150,7 +150,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
{
//player is already in random queue
WorldPacket data;
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_IN_RANDOM_BG);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_IN_RANDOM_BG);
_player->GetSession()->SendPacket(&data);
return;
}
@@ -159,7 +159,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
{
//player is already in queue, can't start random queue
WorldPacket data;
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_IN_NON_RANDOM_BG);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_IN_NON_RANDOM_BG);
_player->GetSession()->SendPacket(&data);
return;
}
@@ -173,12 +173,12 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (!_player->HasFreeBattlegroundQueueId())
{
WorldPacket data;
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, ERR_BATTLEGROUND_TOO_MANY_QUEUES);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, ERR_BATTLEGROUND_TOO_MANY_QUEUES);
_player->GetSession()->SendPacket(&data);
return;
}
- BattlegroundQueue& bgQueue = sBattlegroundMgr.m_BattlegroundQueues[bgQueueTypeId];
+ BattlegroundQueue& bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId];
GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, NULL, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0);
uint32 avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
@@ -187,7 +187,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
WorldPacket data;
// send status packet (in queue)
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
}
@@ -202,7 +202,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
err = grp->CanJoinBattlegroundQueue(bg, bgQueueTypeId, 0, bg->GetMaxPlayersPerTeam(), false, 0);
isPremade = (grp->GetMembersCount() >= bg->GetMinPlayersPerTeam());
- BattlegroundQueue& bgQueue = sBattlegroundMgr.m_BattlegroundQueues[bgQueueTypeId];
+ BattlegroundQueue& bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId];
GroupQueueInfo * ginfo = NULL;
uint32 avgTime = 0;
@@ -222,7 +222,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (err <= 0)
{
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
continue;
}
@@ -231,16 +231,16 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
uint32 queueSlot = member->AddBattlegroundQueueId(bgQueueTypeId);
// send status packet (in queue)
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
member->GetSession()->SendPacket(&data);
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
}
sLog.outDebug("Battleground: group end");
}
- sBattlegroundMgr.ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
+ sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_data*/)
@@ -259,11 +259,11 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_
uint32 count1 = 0; //always constant zero?
uint32 count2 = 0; //count of next fields
- Player *ali_plr = sObjectMgr.GetPlayer(((BattlegroundWS*)bg)->GetAllianceFlagPickerGUID());
+ Player *ali_plr = sObjectMgr->GetPlayer(((BattlegroundWS*)bg)->GetAllianceFlagPickerGUID());
if (ali_plr)
++count2;
- Player *horde_plr = sObjectMgr.GetPlayer(((BattlegroundWS*)bg)->GetHordeFlagPickerGUID());
+ Player *horde_plr = sObjectMgr->GetPlayer(((BattlegroundWS*)bg)->GetHordeFlagPickerGUID());
if (horde_plr)
++count2;
@@ -320,7 +320,7 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/)
return;
WorldPacket data;
- sBattlegroundMgr.BuildPvpLogDataPacket(&data, bg);
+ sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg);
SendPacket(&data);
sLog.outDebug("WORLD: Sent MSG_PVP_LOG_DATA Message");
@@ -347,7 +347,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
}
WorldPacket data;
- sBattlegroundMgr.BuildBattlegroundListPacket(&data, 0, _player, BattlegroundTypeId(bgTypeId), fromWhere);
+ sBattlegroundMgr->BuildBattlegroundListPacket(&data, 0, _player, BattlegroundTypeId(bgTypeId), fromWhere);
SendPacket(&data);
}
@@ -377,7 +377,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
//get GroupQueueInfo from BattlegroundQueue
BattlegroundTypeId bgTypeId = BattlegroundTypeId(bgTypeId_);
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, type);
- BattlegroundQueue& bgQueue = sBattlegroundMgr.m_BattlegroundQueues[bgQueueTypeId];
+ BattlegroundQueue& bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId];
//we must use temporary variable, because GroupQueueInfo pointer can be deleted in BattlegroundQueue::RemovePlayer() function
GroupQueueInfo ginfo;
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
@@ -392,11 +392,11 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
return;
}
- Battleground *bg = sBattlegroundMgr.GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
+ Battleground *bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
// bg template might and must be used in case of leaving queue, when instance is not created yet
if (!bg && action == 0)
- bg = sBattlegroundMgr.GetBattlegroundTemplate(bgTypeId);
+ bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg)
{
sLog.outError("BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
@@ -416,7 +416,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
{
//send bg command result to show nice message
WorldPacket data2;
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
_player->GetSession()->SendPacket(&data2);
action = 0;
sLog.outDebug("Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow());
@@ -453,7 +453,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
_player->CleanupAfterTaxiFlight();
}
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType());
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_IN_PROGRESS, 0, bg->GetStartTime(), bg->GetArenaType());
_player->GetSession()->SendPacket(&data);
// remove battleground queue status from BGmgr
bgQueue.RemovePlayer(_player->GetGUID(), false);
@@ -467,7 +467,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
// set the destination team
_player->SetBGTeam(ginfo.Team);
// bg->HandleBeforeTeleportToBattleground(_player);
- sBattlegroundMgr.SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
+ sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
// add only in HandleMoveWorldPortAck()
// bg->AddPlayer(_player,team);
sLog.outDebug("Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
@@ -476,7 +476,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
// if player leaves rated arena match before match start, it is counted as he played but he lost
if (ginfo.IsRated && ginfo.IsInvitedToBGInstanceGUID)
{
- ArenaTeam * at = sObjectMgr.GetArenaTeamById(ginfo.Team);
+ ArenaTeam * at = sObjectMgr->GetArenaTeamById(ginfo.Team);
if (at)
{
sLog.outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
@@ -485,11 +485,11 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
}
}
_player->RemoveBattlegroundQueueId(bgQueueTypeId); // must be called this way, because if you move this call to queue->removeplayer, it causes bugs
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_NONE, 0, 0, 0);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_NONE, 0, 0, 0);
bgQueue.RemovePlayer(_player->GetGUID(), true);
// player left queue, we should update it - do not update Arena Queue
if (!ginfo.ArenaType)
- sBattlegroundMgr.ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
+ sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
SendPacket(&data);
sLog.outDebug("Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
break;
@@ -541,30 +541,30 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
{
// this line is checked, i only don't know if GetStartTime is changing itself after bg end!
// send status in Battleground
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, i, STATUS_IN_PROGRESS, bg->GetEndTime(), bg->GetStartTime(), arenaType);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, i, STATUS_IN_PROGRESS, bg->GetEndTime(), bg->GetStartTime(), arenaType);
SendPacket(&data);
continue;
}
}
//we are sending update to player about queue - he can be invited there!
//get GroupQueueInfo for queue status
- BattlegroundQueue& bgQueue = sBattlegroundMgr.m_BattlegroundQueues[bgQueueTypeId];
+ BattlegroundQueue& bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId];
GroupQueueInfo ginfo;
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
continue;
if (ginfo.IsInvitedToBGInstanceGUID)
{
- bg = sBattlegroundMgr.GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
+ bg = sBattlegroundMgr->GetBattleground(ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
if (!bg)
continue;
uint32 remainingTime = getMSTimeDiff(getMSTime(), ginfo.RemoveInviteTime);
// send status invited to Battleground
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, i, STATUS_WAIT_JOIN, remainingTime, 0, arenaType);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, i, STATUS_WAIT_JOIN, remainingTime, 0, arenaType);
SendPacket(&data);
}
else
{
- bg = sBattlegroundMgr.GetBattlegroundTemplate(bgTypeId);
+ bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg)
continue;
@@ -575,7 +575,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
uint32 avgTime = bgQueue.GetAverageQueueWaitTime(&ginfo, bracketEntry->GetBracketId());
// send status in Battleground Queue
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, i, STATUS_WAIT_QUEUE, avgTime, getMSTimeDiff(ginfo.JoinTime, getMSTime()), arenaType);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, i, STATUS_WAIT_QUEUE, avgTime, getMSTimeDiff(ginfo.JoinTime, getMSTime()), arenaType);
SendPacket(&data);
}
}
@@ -598,7 +598,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data)
return;
if (bg)
- sBattlegroundMgr.SendAreaSpiritHealerQueryOpcode(_player, bg, guid);
+ sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid);
}
@@ -668,14 +668,14 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
}
//check existance
- Battleground* bg = sBattlegroundMgr.GetBattlegroundTemplate(BATTLEGROUND_AA);
+ Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(BATTLEGROUND_AA);
if (!bg)
{
sLog.outError("Battleground: template bg (all arenas) not found");
return;
}
- if (sDisableMgr.IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, BATTLEGROUND_AA, NULL))
+ if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_BATTLEGROUND, BATTLEGROUND_AA, NULL))
{
ChatHandler(this).PSendSysMessage(LANG_ARENA_DISABLED);
return;
@@ -716,7 +716,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
{
ateamId = _player->GetArenaTeamId(arenaslot);
// check real arenateam existence only here (if it was moved to group->CanJoin .. () then we would ahve to get it twice)
- ArenaTeam * at = sObjectMgr.GetArenaTeamById(ateamId);
+ ArenaTeam * at = sObjectMgr->GetArenaTeamById(ateamId);
if (!at)
{
_player->GetSession()->SendNotInArenaTeamPacket(arenatype);
@@ -731,7 +731,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
arenaRating = 1;
}
- BattlegroundQueue &bgQueue = sBattlegroundMgr.m_BattlegroundQueues[bgQueueTypeId];
+ BattlegroundQueue &bgQueue = sBattlegroundMgr->m_BattlegroundQueues[bgQueueTypeId];
if (asGroup)
{
uint32 avgTime = 0;
@@ -761,7 +761,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
if (err <= 0)
{
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
continue;
}
@@ -770,9 +770,9 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
uint32 queueSlot = member->AddBattlegroundQueueId(bgQueueTypeId);
// send status packet (in queue)
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
member->GetSession()->SendPacket(&data);
- sBattlegroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
+ sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
}
@@ -785,18 +785,18 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
WorldPacket data;
// send status packet (in queue)
- sBattlegroundMgr.BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
+ sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
}
- sBattlegroundMgr.ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
+ sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data)
{
uint64 playerGuid;
recv_data >> playerGuid;
- Player *reportedPlayer = sObjectMgr.GetPlayer(playerGuid);
+ Player *reportedPlayer = sObjectMgr->GetPlayer(playerGuid);
if (!reportedPlayer)
{
diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
index 0f5ca51ffa5..9c13aba4109 100755
--- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
@@ -89,7 +89,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
p_counter = data.wpos();
data << uint32(counter); // raid reset count
- ResetTimeByMapDifficultyMap const& resets = sInstanceSaveMgr.GetResetTimeMap();
+ ResetTimeByMapDifficultyMap const& resets = sInstanceSaveMgr->GetResetTimeMap();
for (ResetTimeByMapDifficultyMap::const_iterator itr = resets.begin(); itr != resets.end(); ++itr)
{
uint32 mapid = PAIR32_LOPART(itr->first);
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index d7c07af8109..0c9452da0f2 100755
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -352,14 +352,14 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
return;
}
- if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(name))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr->IsReservedName(name))
{
data << (uint8)CHAR_NAME_RESERVED;
SendPacket(&data);
return;
}
- if (sObjectMgr.GetPlayerGUIDByName(name))
+ if (sObjectMgr->GetPlayerGUIDByName(name))
{
data << (uint8)CHAR_CREATE_NAME_IN_USE;
SendPacket(&data);
@@ -532,7 +532,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
}
Player * pNewChar = new Player(this);
- if (!pNewChar->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_PLAYER), name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId))
+ if (!pNewChar->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PLAYER), name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId))
{
// Player not create (race/class problem?)
pNewChar->CleanupsBeforeDelete();
@@ -564,7 +564,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
std::string IP_str = GetRemoteAddress();
sLog.outDetail("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
- sScriptMgr.OnPlayerCreate(pNewChar);
+ sScriptMgr->OnPlayerCreate(pNewChar);
delete pNewChar; // created only to call SaveToDB()
}
@@ -575,14 +575,14 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
recv_data >> guid;
// can't delete loaded character
- if (sObjectMgr.GetPlayer(guid))
+ if (sObjectMgr->GetPlayer(guid))
return;
uint32 accountId = 0;
std::string name;
// is guild leader
- if (sObjectMgr.GetGuildByLeader(guid))
+ if (sObjectMgr->GetGuildByLeader(guid))
{
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_FAILED_GUILD_LEADER;
@@ -591,7 +591,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
}
// is arena team captain
- if (sObjectMgr.GetArenaTeamByCaptain(guid))
+ if (sObjectMgr->GetArenaTeamByCaptain(guid))
{
WorldPacket data(SMSG_CHAR_DELETE, 1);
data << (uint8)CHAR_DELETE_FAILED_ARENA_CAPTAIN;
@@ -614,7 +614,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
std::string IP_str = GetRemoteAddress();
sLog.outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
sLog.outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
- sScriptMgr.OnPlayerDelete(guid);
+ sScriptMgr->OnPlayerDelete(guid);
if (sLog.IsOutCharDump()) // optimize GetPlayerDump call
{
@@ -750,7 +750,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
if (pCurrChar->GetGuildId() != 0)
{
- if (Guild* pGuild = sObjectMgr.GetGuildById(pCurrChar->GetGuildId()))
+ if (Guild* pGuild = sObjectMgr->GetGuildById(pCurrChar->GetGuildId()))
pGuild->SendLoginInfo(this);
else
{
@@ -787,7 +787,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
if (!pCurrChar->GetMap()->Add(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
{
- AreaTrigger const* at = sObjectMgr.GetGoBackTrigger(pCurrChar->GetMapId());
+ AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId());
if (at)
pCurrChar->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, pCurrChar->GetOrientation());
else
@@ -812,7 +812,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
}
// friend status
- sSocialMgr.SendFriendStatus(pCurrChar, FRIEND_ONLINE, pCurrChar->GetGUIDLow(), true);
+ sSocialMgr->SendFriendStatus(pCurrChar, FRIEND_ONLINE, pCurrChar->GetGUIDLow(), true);
// Place character in world (and load zone) before some object loading
pCurrChar->LoadCorpse();
@@ -880,7 +880,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
m_playerLoading = false;
- sScriptMgr.OnPlayerLogin(pCurrChar);
+ sScriptMgr->OnPlayerLogin(pCurrChar);
delete holder;
}
@@ -1019,7 +1019,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
}
// check name limitations
- if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr->IsReservedName(newname))
{
WorldPacket data(SMSG_CHAR_RENAME, 1);
data << uint8(CHAR_NAME_RESERVED);
@@ -1075,7 +1075,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
// not accept declined names for unsupported languages
std::string name;
- if (!sObjectMgr.GetPlayerNameByGUID(guid, name))
+ if (!sObjectMgr->GetPlayerNameByGUID(guid, name))
{
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
data << uint32(1);
@@ -1281,7 +1281,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
}
// check name limitations
- if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr->IsReservedName(newname))
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
data << uint8(CHAR_NAME_RESERVED);
@@ -1290,7 +1290,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
}
// character with this name already exist
- if (uint64 newguid = sObjectMgr.GetPlayerGUIDByName(newname))
+ if (uint64 newguid = sObjectMgr->GetPlayerGUIDByName(newname))
{
if (newguid != guid)
{
@@ -1453,7 +1453,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
uint32 at_loginFlags = fields[2].GetUInt32();
uint32 used_loginFlag = ((recv_data.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION);
- if (!sObjectMgr.GetPlayerInfo(race, playerClass))
+ if (!sObjectMgr->GetPlayerInfo(race, playerClass))
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_CREATE_ERROR);
@@ -1500,7 +1500,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// check name limitations
- if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
+ if (GetSecurity() == SEC_PLAYER && sObjectMgr->IsReservedName(newname))
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
data << uint8(CHAR_NAME_RESERVED);
@@ -1509,7 +1509,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// character with this name already exist
- if (uint64 newguid = sObjectMgr.GetPlayerGUIDByName(newname))
+ if (uint64 newguid = sObjectMgr->GetPlayerGUIDByName(newname))
{
if (newguid != guid)
{
@@ -1641,7 +1641,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
// Delete record of the faction old completed quests
{
std::ostringstream quests;
- ObjectMgr::QuestMap const& qTemplates = sObjectMgr.GetQuestTemplates();
+ ObjectMgr::QuestMap const& qTemplates = sObjectMgr->GetQuestTemplates();
for (ObjectMgr::QuestMap::const_iterator iter = qTemplates.begin(); iter != qTemplates.end(); ++iter)
{
Quest *qinfo = iter->second;
@@ -1700,7 +1700,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Achievement conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr.factionchange_achievements.begin(); it != sObjectMgr.factionchange_achievements.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_achievements.begin(); it != sObjectMgr->factionchange_achievements.end(); ++it)
{
uint32 achiev_alliance = it->first;
uint32 achiev_horde = it->second;
@@ -1711,7 +1711,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Item conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr.factionchange_items.begin(); it != sObjectMgr.factionchange_items.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_items.begin(); it != sObjectMgr->factionchange_items.end(); ++it)
{
uint32 item_alliance = it->first;
uint32 item_horde = it->second;
@@ -1720,7 +1720,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Spell conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr.factionchange_spells.begin(); it != sObjectMgr.factionchange_spells.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_spells.begin(); it != sObjectMgr->factionchange_spells.end(); ++it)
{
uint32 spell_alliance = it->first;
uint32 spell_horde = it->second;
@@ -1731,7 +1731,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Reputation conversion
- for (std::map<uint32, uint32>::const_iterator it = sObjectMgr.factionchange_reputations.begin(); it != sObjectMgr.factionchange_reputations.end(); ++it)
+ for (std::map<uint32, uint32>::const_iterator it = sObjectMgr->factionchange_reputations.begin(); it != sObjectMgr->factionchange_reputations.end(); ++it)
{
uint32 reputation_alliance = it->first;
uint32 reputation_horde = it->second;
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
index 1f0c1788646..d236c7f0196 100755
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
@@ -117,7 +117,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
return;
}
- sScriptMgr.OnPlayerChat(GetPlayer(), CHAT_MSG_ADDON, lang, msg);
+ sScriptMgr->OnPlayerChat(GetPlayer(), CHAT_MSG_ADDON, lang, msg);
}
// Disabled addon channel?
@@ -264,7 +264,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
break;
}
- Player *player = sObjectMgr.GetPlayer(to.c_str());
+ Player *player = sObjectMgr->GetPlayer(to.c_str());
uint32 tSecurity = GetSecurity();
uint32 pSecurity = player ? player->GetSession()->GetSecurity() : SEC_PLAYER;
if (!player || (tSecurity == SEC_PLAYER && pSecurity > SEC_PLAYER && !player->isAcceptWhispers()))
@@ -307,7 +307,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if ((type == CHAT_MSG_PARTY_LEADER) && !group->IsLeader(_player->GetGUID()))
return;
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::FillMessageData(&data, this, type, lang, NULL, 0, msg.c_str(), NULL);
@@ -317,9 +317,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
{
if (GetPlayer()->GetGuildId())
{
- if (Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId()))
+ if (Guild *guild = sObjectMgr->GetGuildById(GetPlayer()->GetGuildId()))
{
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, guild);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);
guild->BroadcastToGuild(this, false, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
@@ -329,9 +329,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
{
if (GetPlayer()->GetGuildId())
{
- if (Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId()))
+ if (Guild *guild = sObjectMgr->GetGuildById(GetPlayer()->GetGuildId()))
{
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, guild);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, guild);
guild->BroadcastToGuild(this, true, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
}
@@ -348,7 +348,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
return;
}
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::FillMessageData(&data, this, CHAT_MSG_RAID, lang, "", 0, msg.c_str(), NULL);
@@ -365,7 +365,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
return;
}
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::FillMessageData(&data, this, CHAT_MSG_RAID_LEADER, lang, "", 0, msg.c_str(), NULL);
@@ -377,7 +377,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (!group || !group->isRaidGroup() || !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID())) || group->isBGGroup())
return;
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
//in battleground, raid warning is sent only to players in battleground - code is ok
@@ -391,7 +391,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (!group || !group->isBGGroup())
return;
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::FillMessageData(&data, this, CHAT_MSG_BATTLEGROUND, lang, "", 0, msg.c_str(), NULL);
@@ -404,7 +404,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (!group || !group->isBGGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
return;
- sScriptMgr.OnPlayerChat(GetPlayer(), type, lang, msg, group);
+ sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
WorldPacket data;
ChatHandler::FillMessageData(&data, this, CHAT_MSG_BATTLEGROUND_LEADER, lang, "", 0, msg.c_str(), NULL);
@@ -423,7 +423,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (Channel *chn = cMgr->GetChannel(channel, _player))
{
- sScriptMgr.OnPlayerChat(_player, type, lang, msg, chn);
+ sScriptMgr->OnPlayerChat(_player, type, lang, msg, chn);
chn->Say(_player->GetGUID(), msg.c_str(), lang);
}
@@ -440,7 +440,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
_player->afkMsg = msg;
}
- sScriptMgr.OnPlayerChat(_player, type, lang, msg);
+ sScriptMgr->OnPlayerChat(_player, type, lang, msg);
_player->ToggleAFK();
if (_player->isAFK() && _player->isDND())
@@ -458,7 +458,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
_player->dndMsg = msg;
}
- sScriptMgr.OnPlayerChat(_player, type, lang, msg);
+ sScriptMgr->OnPlayerChat(_player, type, lang, msg);
_player->ToggleDND();
if (_player->isDND() && _player->isAFK())
@@ -478,7 +478,7 @@ void WorldSession::HandleEmoteOpcode(WorldPacket & recv_data)
uint32 emote;
recv_data >> emote;
- sScriptMgr.OnPlayerEmote(GetPlayer(), emote);
+ sScriptMgr->OnPlayerEmote(GetPlayer(), emote);
GetPlayer()->HandleEmoteCommand(emote);
}
@@ -533,7 +533,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data)
recv_data >> emoteNum;
recv_data >> guid;
- sScriptMgr.OnPlayerTextEmote(GetPlayer(), text_emote, emoteNum, guid);
+ sScriptMgr->OnPlayerTextEmote(GetPlayer(), text_emote, emoteNum, guid);
EmotesTextEntry const *em = sEmotesTextStore.LookupEntry(text_emote);
if (!em)
@@ -586,7 +586,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data)
recv_data >> iguid;
recv_data >> unk; // probably related to spam reporting
- Player *player = sObjectMgr.GetPlayer(iguid);
+ Player *player = sObjectMgr->GetPlayer(iguid);
if (!player || !player->GetSession())
return;
diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
index 9d6de7ed542..cc395d4e5b7 100755
--- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
@@ -70,7 +70,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
return;
}
- Player *player = sObjectMgr.GetPlayer(membername.c_str());
+ Player *player = sObjectMgr->GetPlayer(membername.c_str());
// no player
if (!player)
@@ -214,7 +214,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data)
return;
}
- Player* leader = sObjectMgr.GetPlayer(group->GetLeaderGUID());
+ Player* leader = sObjectMgr->GetPlayer(group->GetLeaderGUID());
// forming a new group, create it
if (!group->IsCreated())
@@ -222,7 +222,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data)
if (leader)
group->RemoveInvite(leader);
group->Create(group->GetLeaderGUID(), group->GetLeaderName());
- sObjectMgr.AddGroup(group);
+ sObjectMgr->AddGroup(group);
}
// everything's fine, do it, PLAYER'S GROUP IS SET IN ADDMEMBER!!!
@@ -241,7 +241,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/)
GetPlayer()->UninviteFromGroup();
// remember leader if online
- Player *leader = sObjectMgr.GetPlayer(group->GetLeaderGUID());
+ Player *leader = sObjectMgr->GetPlayer(group->GetLeaderGUID());
if (!leader || !leader->GetSession())
return;
@@ -343,7 +343,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
- Player *player = sObjectMgr.GetPlayer(guid);
+ Player *player = sObjectMgr->GetPlayer(guid);
/** error handling **/
if (!player || !group->IsLeader(GetPlayer()->GetGUID()) || player->GetGroup() != group)
@@ -550,7 +550,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
return;
/********************/
- Player *movedPlayer = sObjectMgr.GetPlayer(name.c_str());
+ Player *movedPlayer = sObjectMgr->GetPlayer(name.c_str());
if (movedPlayer)
{
//Do not allow leader to change group of player in combat
@@ -561,7 +561,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
group->ChangeMembersGroup(movedPlayer, groupNr);
}
else
- group->ChangeMembersGroup(sObjectMgr.GetPlayerGUIDByName(name.c_str()), groupNr);
+ group->ChangeMembersGroup(sObjectMgr->GetPlayerGUIDByName(name.c_str()), groupNr);
}
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
@@ -832,7 +832,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
uint64 Guid;
recv_data >> Guid;
- Player *player = sObjectMgr.GetPlayer(Guid);
+ Player *player = sObjectMgr->GetPlayer(Guid);
if (!player)
{
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
index d66bab0ad5f..cbd443ec4fe 100755
--- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
@@ -32,7 +32,7 @@
inline Guild* _GetPlayerGuild(WorldSession* session, bool sendError = false)
{
if (uint32 guildId = session->GetPlayer()->GetGuildId()) // If guild id = 0, player is not in guild
- if (Guild* pGuild = sObjectMgr.GetGuildById(guildId)) // Find guild by id
+ if (Guild* pGuild = sObjectMgr->GetGuildById(guildId)) // Find guild by id
return pGuild;
if (sendError)
Guild::SendCommandResult(session, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -46,7 +46,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
uint32 guildId;
recvPacket >> guildId;
// Use received guild id to access guild method (not player's guild id)
- if (Guild* pGuild = sObjectMgr.GetGuildById(guildId))
+ if (Guild* pGuild = sObjectMgr->GetGuildById(guildId))
pGuild->HandleQuery(this);
else
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD);
@@ -63,7 +63,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
{
Guild* pGuild = new Guild();
if (pGuild->Create(GetPlayer(), name))
- sObjectMgr.AddGuild(pGuild);
+ sObjectMgr->AddGuild(pGuild);
else
delete pGuild;
}
@@ -99,7 +99,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
// Player cannot be in guild
if (!GetPlayer()->GetGuildId())
// Guild where player was invited must exist
- if (Guild* pGuild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildIdInvited()))
+ if (Guild* pGuild = sObjectMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
pGuild->HandleAcceptMember(this);
}
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
index 8e0a2e11896..c3a1f66012c 100755
--- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
@@ -294,10 +294,10 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- if (ItemLocale const *il = sObjectMgr.GetItemLocale(pProto->ItemId))
+ if (ItemLocale const *il = sObjectMgr->GetItemLocale(pProto->ItemId))
{
- sObjectMgr.GetLocaleString(il->Name, loc_idx, Name);
- sObjectMgr.GetLocaleString(il->Description, loc_idx, Description);
+ sObjectMgr->GetLocaleString(il->Name, loc_idx, Name);
+ sObjectMgr->GetLocaleString(il->Description, loc_idx, Description);
}
}
// guess size
@@ -1016,14 +1016,14 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
recv_data.read_skip<uint64>(); // guid
sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
- ItemSetNameEntry const *pName = sObjectMgr.GetItemSetNameEntry(itemid);
+ ItemSetNameEntry const *pName = sObjectMgr->GetItemSetNameEntry(itemid);
if (pName)
{
std::string Name = pName->name;
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
- if (ItemSetNameLocale const *isnl = sObjectMgr.GetItemSetNameLocale(itemid))
- sObjectMgr.GetLocaleString(isnl->Name, loc_idx, Name);
+ if (ItemSetNameLocale const *isnl = sObjectMgr->GetItemSetNameLocale(itemid))
+ sObjectMgr->GetLocaleString(isnl->Name, loc_idx, Name);
WorldPacket data(SMSG_ITEM_NAME_QUERY_RESPONSE, (4+Name.size()+1+4));
data << uint32(itemid);
diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
index f3c463dcdc4..5ad12742f61 100755
--- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
@@ -79,7 +79,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
std::string comment;
recv_data >> comment;
sLog.outDebug("CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
- sLFGMgr.Join(GetPlayer(), uint8(roles), newDungeons, comment);
+ sLFGMgr->Join(GetPlayer(), uint8(roles), newDungeons, comment);
}
void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/)
@@ -90,7 +90,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/)
// Check cheating - only leader can leave the queue
if (!grp || grp->GetLeaderGUID() == GetPlayer()->GetGUID())
- sLFGMgr.Leave(GetPlayer(), grp);
+ sLFGMgr->Leave(GetPlayer(), grp);
}
void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recv_data)
@@ -101,7 +101,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recv_data)
recv_data >> accept;
sLog.outDebug("CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
- sLFGMgr.UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
+ sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
}
void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
@@ -116,8 +116,8 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
return;
}
sLog.outDebug("CMSG_LFG_SET_ROLES [" UI64FMTD "] Roles: %u", guid, roles);
- sLFGMgr.SetRoles(guid, roles);
- sLFGMgr.UpdateRoleCheck(grp, GetPlayer());
+ sLFGMgr->SetRoles(guid, roles);
+ sLFGMgr->UpdateRoleCheck(grp, GetPlayer());
}
void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recv_data)
@@ -127,7 +127,7 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recv_data)
uint64 guid = GetPlayer()->GetGUID();
sLog.outDebug("CMSG_SET_LFG_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
- sLFGMgr.SetComment(guid, comment);
+ sLFGMgr->SetComment(guid, comment);
}
void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recv_data)
@@ -136,7 +136,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recv_data)
recv_data >> agree;
sLog.outDebug("CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", GetPlayer()->GetGUID(), agree ? 1 : 0);
- sLFGMgr.UpdateBoot(GetPlayer(), agree);
+ sLFGMgr->UpdateBoot(GetPlayer(), agree);
}
void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recv_data)
@@ -145,7 +145,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recv_data)
recv_data >> out;
sLog.outDebug("CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
- sLFGMgr.TeleportPlayer(GetPlayer(), out, true);
+ sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
}
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data*/)
@@ -167,7 +167,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data
}
// Get player locked Dungeons
- LfgLockMap lock = sLFGMgr.GetLockedDungeons(guid);
+ LfgLockMap lock = sLFGMgr->GetLockedDungeons(guid);
uint32 rsize = uint32(randomDungeons.size());
uint32 lsize = uint32(lock.size());
@@ -178,17 +178,17 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data
for (LfgDungeonSet::const_iterator it = randomDungeons.begin(); it != randomDungeons.end(); ++it)
{
data << uint32(*it); // Dungeon Entry (id + type)
- LfgReward const* reward = sLFGMgr.GetRandomDungeonReward(*it, level);
+ LfgReward const* reward = sLFGMgr->GetRandomDungeonReward(*it, level);
Quest const* qRew = NULL;
uint8 done = 0;
if (reward)
{
- qRew = sObjectMgr.GetQuestTemplate(reward->reward[0].questId);
+ qRew = sObjectMgr->GetQuestTemplate(reward->reward[0].questId);
if (qRew)
{
done = !GetPlayer()->CanRewardQuest(qRew, false);
if (done)
- qRew = sObjectMgr.GetQuestTemplate(reward->reward[1].questId);
+ qRew = sObjectMgr->GetQuestTemplate(reward->reward[1].questId);
}
}
if (qRew)
@@ -250,7 +250,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data
if (pguid == guid)
continue;
- lockMap[pguid] = sLFGMgr.GetLockedDungeons(pguid);
+ lockMap[pguid] = sLFGMgr->GetLockedDungeons(pguid);
}
uint32 size = 0;
@@ -276,7 +276,7 @@ void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recv_data)
uint32 dungeonId; // Raid id queue to leave
recv_data >> dungeonId;
sLog.outDebug("CMSG_SEARCH_LFG_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId);
- //sLFGMgr.LeaveLfr(GetPlayer(), dungeonId);
+ //sLFGMgr->LeaveLfr(GetPlayer(), dungeonId);
}
void WorldSession::SendLfgUpdatePlayer(const LfgUpdateData& updateData)
@@ -418,7 +418,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck)
data << uint64(guid); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- Player* plr = sObjectMgr.GetPlayer(guid);
+ Player* plr = sObjectMgr->GetPlayer(guid);
data << uint8(plr ? plr->getLevel() : 0); // Level
for (LfgRolesMap::const_iterator it = pRoleCheck->roles.begin(); it != pRoleCheck->roles.end(); ++it)
@@ -431,7 +431,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck)
data << uint64(guid); // Guid
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
- plr = sObjectMgr.GetPlayer(guid);
+ plr = sObjectMgr->GetPlayer(guid);
data << uint8(plr ? plr->getLevel() : 0); // Level
}
}
@@ -554,11 +554,11 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* p
uint32 dungeonId = pProp->dungeonId;
bool isSameDungeon = false;
bool isContinue = false;
- Group* grp = dLowGuid ? sObjectMgr.GetGroupByGUID(dLowGuid) : NULL;
+ Group* grp = dLowGuid ? sObjectMgr->GetGroupByGUID(dLowGuid) : NULL;
if (grp)
{
uint64 gguid = grp->GetGUID();
- isContinue = grp->isLFGGroup() && sLFGMgr.GetState(gguid) != LFG_STATE_FINISHED_DUNGEON;
+ isContinue = grp->isLFGGroup() && sLFGMgr->GetState(gguid) != LFG_STATE_FINISHED_DUNGEON;
isSameDungeon = GetPlayer()->GetGroup() == grp && isContinue;
}
@@ -567,7 +567,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* p
if (!isContinue) // Only show proposal dungeon if it's continue
{
- LfgDungeonSet playerDungeons = sLFGMgr.GetSelectedDungeons(guid);
+ LfgDungeonSet playerDungeons = sLFGMgr->GetSelectedDungeons(guid);
if (playerDungeons.size())
dungeonId = (*playerDungeons.begin());
}
diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
index 23948c174dc..f9718b8a4d4 100755
--- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
@@ -84,7 +84,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
uint64 rc = 0;
if (normalizePlayerName(receiver))
- rc = sObjectMgr.GetPlayerGUIDByName(receiver);
+ rc = sObjectMgr->GetPlayerGUIDByName(receiver);
if (!rc)
{
@@ -112,7 +112,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
return;
}
- Player *receive = sObjectMgr.GetPlayer(rc);
+ Player *receive = sObjectMgr->GetPlayer(rc);
uint32 rc_team = 0;
uint8 mails_count = 0; //do not allow to send to one player more than 100 mails
@@ -126,7 +126,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
else
{
- rc_team = sObjectMgr.GetPlayerTeamByGUID(rc);
+ rc_team = sObjectMgr->GetPlayerTeamByGUID(rc);
if (QueryResult result = CharacterDatabase.PQuery("SELECT COUNT(*) FROM mail WHERE receiver = '%u'", GUID_LOPART(rc)))
{
Field *fields = result->Fetch();
@@ -174,7 +174,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
uint32 rc_account = receive
? receive->GetSession()->GetAccountId()
- : sObjectMgr.GetPlayerAccountIdByGUID(rc);
+ : sObjectMgr->GetPlayerAccountIdByGUID(rc);
Item* items[MAX_MAIL_ITEMS];
@@ -439,7 +439,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
if (m->COD > 0) //if there is COD, take COD money from player and send them to sender by mail
{
uint64 sender_guid = MAKE_NEW_GUID(m->sender, 0, HIGHGUID_PLAYER);
- Player *receive = sObjectMgr.GetPlayer(sender_guid);
+ Player *receive = sObjectMgr->GetPlayer(sender_guid);
uint32 sender_accId = 0;
@@ -454,16 +454,16 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
else
{
// can be calculated early
- sender_accId = sObjectMgr.GetPlayerAccountIdByGUID(sender_guid);
+ sender_accId = sObjectMgr->GetPlayerAccountIdByGUID(sender_guid);
- if (!sObjectMgr.GetPlayerNameByGUID(sender_guid,sender_name))
- sender_name = sObjectMgr.GetTrinityStringForDBCLocale(LANG_UNKNOWN);
+ if (!sObjectMgr->GetPlayerNameByGUID(sender_guid,sender_name))
+ sender_name = sObjectMgr->GetTrinityStringForDBCLocale(LANG_UNKNOWN);
}
sLog.outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount(),m->COD,sender_name.c_str(),sender_accId);
}
else if (!receive)
- sender_accId = sObjectMgr.GetPlayerAccountIdByGUID(sender_guid);
+ sender_accId = sObjectMgr->GetPlayerAccountIdByGUID(sender_guid);
// check player existence
if (receive || sender_accId)
@@ -670,7 +670,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
}
Item *bodyItem = new Item; // This is not bag and then can be used new Item.
- if (!bodyItem->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl))
+ if (!bodyItem->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_ITEM), MAIL_BODY_ITEM_TEMPLATE, pl))
{
delete bodyItem;
return;
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index 9d420683c0f..1b53e009346 100755
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -140,13 +140,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
if (unit)
{
unit->AI()->sGossipSelectCode(_player, menuId, gossipListId, code.c_str());
- if (!sScriptMgr.OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()))
+ if (!sScriptMgr->OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str()))
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
{
go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str());
- sScriptMgr.OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str());
+ sScriptMgr->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId), code.c_str());
}
}
else
@@ -154,13 +154,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
if (unit)
{
unit->AI()->sGossipSelect(_player, menuId, gossipListId);
- if (!sScriptMgr.OnGossipSelect(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)))
+ if (!sScriptMgr->OnGossipSelect(_player, unit, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId)))
_player->OnGossipSelect(unit, gossipListId, menuId);
}
else
{
go->AI()->GossipSelect(_player, menuId, gossipListId);
- sScriptMgr.OnGossipSelect(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId));
+ sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GossipOptionSender(gossipListId), _player->PlayerTalkClass->GossipOptionAction(gossipListId));
}
}
}
@@ -304,7 +304,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
if (!(wplayer_name.empty() || wpname.find(wplayer_name) != std::wstring::npos))
continue;
- std::string gname = sObjectMgr.GetGuildNameById(itr->second->GetGuildId());
+ std::string gname = sObjectMgr->GetGuildNameById(itr->second->GetGuildId());
std::wstring wgname;
if (!Utf8toWStr(gname,wgname))
continue;
@@ -587,7 +587,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string
team = Player::TeamForRace((*result)[1].GetUInt8());
friendAcctid = (*result)[2].GetUInt32();
- if (GetSecurity() >= SEC_MODERATOR || sWorld.getBoolConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr.GetSecurity(friendAcctid) < SEC_MODERATOR)
+ if (GetSecurity() >= SEC_MODERATOR || sWorld.getBoolConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr->GetSecurity(friendAcctid) < SEC_MODERATOR)
{
if (friendGuid)
{
@@ -615,7 +615,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string
}
}
- sSocialMgr.SendFriendStatus(GetPlayer(), friendResult, GUID_LOPART(friendGuid), false);
+ sSocialMgr->SendFriendStatus(GetPlayer(), friendResult, GUID_LOPART(friendGuid), false);
sLog.outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)");
}
@@ -630,7 +630,7 @@ void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data)
_player->GetSocial()->RemoveFromSocialList(GUID_LOPART(FriendGUID), false);
- sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false);
+ sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false);
sLog.outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)");
}
@@ -686,7 +686,7 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult result)
}
}
- sSocialMgr.SendFriendStatus(GetPlayer(), ignoreResult, GUID_LOPART(IgnoreGuid), false);
+ sSocialMgr->SendFriendStatus(GetPlayer(), ignoreResult, GUID_LOPART(IgnoreGuid), false);
sLog.outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)");
}
@@ -701,7 +701,7 @@ void WorldSession::HandleDelIgnoreOpcode(WorldPacket & recv_data)
_player->GetSocial()->RemoveFromSocialList(GUID_LOPART(IgnoreGUID), true);
- sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false);
+ sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false);
sLog.outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)");
}
@@ -894,13 +894,13 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (GetPlayer()->isDebugAreaTriggers)
ChatHandler(GetPlayer()).PSendSysMessage(LANG_DEBUG_AREATRIGGER_REACHED, Trigger_ID);
- if (sScriptMgr.OnAreaTrigger(GetPlayer(), atEntry))
+ if (sScriptMgr->OnAreaTrigger(GetPlayer(), atEntry))
return;
- uint32 quest_id = sObjectMgr.GetQuestForAreaTrigger(Trigger_ID);
+ uint32 quest_id = sObjectMgr->GetQuestForAreaTrigger(Trigger_ID);
if (quest_id && GetPlayer()->isAlive() && GetPlayer()->IsActiveQuest(quest_id))
{
- Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
+ Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest_id);
if (pQuest)
{
if (GetPlayer()->GetQuestStatus(quest_id) == QUEST_STATUS_INCOMPLETE)
@@ -908,7 +908,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
}
}
- if (sObjectMgr.IsTavernAreaTrigger(Trigger_ID))
+ if (sObjectMgr->IsTavernAreaTrigger(Trigger_ID))
{
// set resting flag we are in the inn
GetPlayer()->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING);
@@ -938,13 +938,13 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
}
// NULL if all values default (non teleport trigger)
- AreaTrigger const* at = sObjectMgr.GetAreaTrigger(Trigger_ID);
+ AreaTrigger const* at = sObjectMgr->GetAreaTrigger(Trigger_ID);
if (!at)
return;
// Check only if target map != current player's map
// check if player can enter instance : instance not full, and raid instance not in encounter fight
- if (GetPlayer()->GetMapId() != at->target_mapId && !sMapMgr.CanPlayerEnter(at->target_mapId, GetPlayer(), false))
+ if (GetPlayer()->GetMapId() != at->target_mapId && !sMapMgr->CanPlayerEnter(at->target_mapId, GetPlayer(), false))
return;
// Check if we are in LfgGroup and trying to get out the dungeon
@@ -1225,7 +1225,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
_player->SetSelection(guid);
- Player *plr = sObjectMgr.GetPlayer(guid);
+ Player *plr = sObjectMgr->GetPlayer(guid);
if (!plr) // wrong player
return;
@@ -1254,7 +1254,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
uint64 guid;
recv_data >> guid;
- Player *player = sObjectMgr.GetPlayer(guid);
+ Player *player = sObjectMgr->GetPlayer(guid);
if (!player)
{
@@ -1326,7 +1326,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
return;
}
- Player *plr = sObjectMgr.GetPlayer(charname.c_str());
+ Player *plr = sObjectMgr->GetPlayer(charname.c_str());
if (!plr)
{
@@ -1696,7 +1696,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data)
uint64 guid;
recv_data.readPackGUID(guid);
- Player *player = sObjectMgr.GetPlayer(guid);
+ Player *player = sObjectMgr->GetPlayer(guid);
if (!player)
return;
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
index a2b6add0146..dc66f0399d8 100755
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
@@ -73,7 +73,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
}
// relocate the player to the teleport destination
- Map * newMap = sMapMgr.CreateMap(loc.GetMapId(), GetPlayer(), 0);
+ Map * newMap = sMapMgr->CreateMap(loc.GetMapId(), GetPlayer(), 0);
// the CanEnter checks are done in TeleporTo but conditions may change
// while the player is in transit, for example the map may get full
if (!newMap || !newMap->CanEnter(GetPlayer()))
@@ -155,7 +155,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
{
if (mapDiff->resetTime)
{
- if (time_t timeReset = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff))
+ if (time_t timeReset = sInstanceSaveMgr->GetResetTimeFor(mEntry->MapID,diff))
{
uint32 timeleft = uint32(timeReset - time(NULL));
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
@@ -302,7 +302,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recv_data)
if (plMover && !plMover->GetTransport())
{
// elevators also cause the client to send MOVEMENTFLAG_ONTRANSPORT - just unmount if the guid can be found in the transport list
- for (MapManager::TransportSet::const_iterator iter = sMapMgr.m_Transports.begin(); iter != sMapMgr.m_Transports.end(); ++iter)
+ for (MapManager::TransportSet::const_iterator iter = sMapMgr->m_Transports.begin(); iter != sMapMgr->m_Transports.end(); ++iter)
{
if ((*iter)->GetGUID() == movementInfo.t_guid)
{
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
index 7adc5fced69..cc1f1ea6d78 100755
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
@@ -177,7 +177,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
valid = false;
break;
}
- if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell[i]))
+ if (sSpellMgr->IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell[i]))
primary_prof_first_rank = true;
}
if (!valid)
@@ -201,7 +201,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
{
if (!tSpell->learnedSpell[i])
continue;
- if (SpellChainNode const* chain_node = sSpellMgr.GetSpellChainNode(tSpell->learnedSpell[i]))
+ if (SpellChainNode const* chain_node = sSpellMgr->GetSpellChainNode(tSpell->learnedSpell[i]))
{
if (chain_node->prev)
{
@@ -211,7 +211,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
}
if (maxReq == 3)
break;
- SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr.GetSpellsRequiredForSpellBounds(tSpell->learnedSpell[i]);
+ SpellsRequiringSpellMapBounds spellsRequired = sSpellMgr->GetSpellsRequiredForSpellBounds(tSpell->learnedSpell[i]);
for (SpellsRequiringSpellMap::const_iterator itr2 = spellsRequired.first; itr2 != spellsRequired.second && maxReq < 3; ++itr2)
{
data << uint32(itr2->second);
@@ -333,12 +333,12 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
if (bg)
{
bg->AddPlayerToResurrectQueue(unit->GetGUID(), _player->GetGUID());
- sBattlegroundMgr.SendAreaSpiritHealerQueryOpcode(_player, bg, unit->GetGUID());
+ sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, unit->GetGUID());
return;
}
}
- if (!sScriptMgr.OnGossipHello(_player, unit))
+ if (!sScriptMgr->OnGossipHello(_player, unit))
{
// _player->TalkedToCreature(unit->GetEntry(), unit->GetGUID());
_player->PrepareGossipMenu(unit, unit->GetCreatureInfo()->GossipMenuId, true);
@@ -420,7 +420,7 @@ void WorldSession::SendSpiritResurrect()
WorldSafeLocsEntry const *corpseGrave = NULL;
Corpse *corpse = _player->GetCorpse();
if (corpse)
- corpseGrave = sObjectMgr.GetClosestGraveYard(
+ corpseGrave = sObjectMgr->GetClosestGraveYard(
corpse->GetPositionX(), corpse->GetPositionY(), corpse->GetPositionZ(), corpse->GetMapId(), _player->GetTeam());
// now can spawn bones
@@ -429,7 +429,7 @@ void WorldSession::SendSpiritResurrect()
// teleport to nearest from corpse graveyard, if different from nearest to player ghost
if (corpseGrave)
{
- WorldSafeLocsEntry const *ghostGrave = sObjectMgr.GetClosestGraveYard(
+ WorldSafeLocsEntry const *ghostGrave = sObjectMgr->GetClosestGraveYard(
_player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetMapId(), _player->GetTeam());
if (corpseGrave != ghostGrave)
diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
index 4d54bb6981a..f099cd9c51d 100755
--- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
@@ -602,7 +602,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
return;
}
- if (sObjectMgr.IsReservedName(name))
+ if (sObjectMgr->IsReservedName(name))
{
SendPetNameInvalid(PET_NAME_RESERVED, name, NULL);
return;
diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
index a76fa218165..01421e34a66 100755
--- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
@@ -154,12 +154,12 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
if (type == GUILD_CHARTER_TYPE)
{
- if (sObjectMgr.GetGuildByName(name))
+ if (sObjectMgr->GetGuildByName(name))
{
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_EXISTS_S, name);
return;
}
- if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
+ if (sObjectMgr->IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
{
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_INVALID, name);
return;
@@ -167,12 +167,12 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
}
else
{
- if (sObjectMgr.GetArenaTeamByName(name))
+ if (sObjectMgr->GetArenaTeamByName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
- if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
+ if (sObjectMgr->IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
@@ -404,12 +404,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
if (type == GUILD_CHARTER_TYPE)
{
- if (sObjectMgr.GetGuildByName(newname))
+ if (sObjectMgr->GetGuildByName(newname))
{
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_EXISTS_S, newname);
return;
}
- if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
+ if (sObjectMgr->IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
{
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_INVALID, newname);
return;
@@ -417,12 +417,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
}
else
{
- if (sObjectMgr.GetArenaTeamByName(newname))
+ if (sObjectMgr->GetArenaTeamByName(newname))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
}
- if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
+ if (sObjectMgr->IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_INVALID);
return;
@@ -474,7 +474,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
return;
// not let enemies sign guild charter
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(ownerguid))
+ if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr->GetPlayerTeamByGUID(ownerguid))
{
if (type != GUILD_CHARTER_TYPE)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -539,7 +539,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
SendPacket(&data);
// update for owner if online
- if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
+ if (Player *owner = sObjectMgr->GetPlayer(ownerguid))
owner->GetSession()->SendPacket(&data);
return;
}
@@ -562,7 +562,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
// item->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1+1, signs);
// update for owner if online
- if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
+ if (Player *owner = sObjectMgr->GetPlayer(ownerguid))
owner->GetSession()->SendPacket(&data);
}
@@ -583,7 +583,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
Field *fields = result->Fetch();
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
- Player *owner = sObjectMgr.GetPlayer(ownerguid);
+ Player *owner = sObjectMgr->GetPlayer(ownerguid);
if (owner) // petition owner online
{
WorldPacket data(MSG_PETITION_DECLINE, 8);
@@ -777,7 +777,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
if (type == GUILD_CHARTER_TYPE)
{
- if (sObjectMgr.GetGuildByName(name))
+ if (sObjectMgr->GetGuildByName(name))
{
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_EXISTS_S, name);
return;
@@ -785,7 +785,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
}
else
{
- if (sObjectMgr.GetArenaTeamByName(name))
+ if (sObjectMgr->GetArenaTeamByName(name))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
return;
@@ -812,7 +812,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
}
// register guild and add guildmaster
- sObjectMgr.AddGuild(guild);
+ sObjectMgr->AddGuild(guild);
// add members
for (uint8 i = 0; i < signs; ++i)
@@ -838,7 +838,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
at->SetEmblem(backgroud, icon, iconcolor, border, bordercolor);
// register team and add captain
- sObjectMgr.AddArenaTeam(at);
+ sObjectMgr->AddArenaTeam(at);
sLog.outDebug("PetitonsHandler: arena team added to objmrg");
// add members
diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
index df85f197d4c..5e2ac1e0ccc 100755
--- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
@@ -126,7 +126,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket & recv_data)
recv_data >> guid;
- Player *pChar = sObjectMgr.GetPlayer(guid);
+ Player *pChar = sObjectMgr->GetPlayer(guid);
if (pChar)
SendNameQueryOpcode(pChar);
@@ -166,10 +166,10 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- if (CreatureLocale const *cl = sObjectMgr.GetCreatureLocale(entry))
+ if (CreatureLocale const *cl = sObjectMgr->GetCreatureLocale(entry))
{
- sObjectMgr.GetLocaleString(cl->Name, loc_idx, Name);
- sObjectMgr.GetLocaleString(cl->SubName, loc_idx, SubName);
+ sObjectMgr->GetLocaleString(cl->Name, loc_idx, Name);
+ sObjectMgr->GetLocaleString(cl->SubName, loc_idx, SubName);
}
}
sLog.outDetail("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name, entry);
@@ -232,10 +232,10 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- if (GameObjectLocale const *gl = sObjectMgr.GetGameObjectLocale(entryID))
+ if (GameObjectLocale const *gl = sObjectMgr->GetGameObjectLocale(entryID))
{
- sObjectMgr.GetLocaleString(gl->Name, loc_idx, Name);
- sObjectMgr.GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
+ sObjectMgr->GetLocaleString(gl->Name, loc_idx, Name);
+ sObjectMgr->GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
}
}
sLog.outDetail("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name, entryID);
@@ -295,7 +295,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
if (corpseMapEntry->IsDungeon() && corpseMapEntry->entrance_map >= 0)
{
// if corpse map have entrance
- if (Map const* entranceMap = sMapMgr.CreateBaseMap(corpseMapEntry->entrance_map))
+ if (Map const* entranceMap = sMapMgr->CreateBaseMap(corpseMapEntry->entrance_map))
{
mapid = corpseMapEntry->entrance_map;
x = corpseMapEntry->entrance_x;
@@ -328,7 +328,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
recv_data >> guid;
GetPlayer()->SetUInt64Value(UNIT_FIELD_TARGET, guid);
- GossipText const* pGossip = sObjectMgr.GetGossipText(textID);
+ GossipText const* pGossip = sObjectMgr->GetGossipText(textID);
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
data << textID;
@@ -361,12 +361,12 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
{
- if (NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textID))
+ if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textID))
{
for (int i = 0; i < MAX_LOCALES; ++i)
{
- sObjectMgr.GetLocaleString(nl->Text_0[i], loc_idx, Text_0[i]);
- sObjectMgr.GetLocaleString(nl->Text_1[i], loc_idx, Text_1[i]);
+ sObjectMgr->GetLocaleString(nl->Text_0[i], loc_idx, Text_0[i]);
+ sObjectMgr->GetLocaleString(nl->Text_1[i], loc_idx, Text_1[i]);
}
}
}
@@ -428,8 +428,8 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
int loc_idx = GetSessionDbLocaleIndex();
if (loc_idx >= 0)
- if (PageTextLocale const *pl = sObjectMgr.GetPageTextLocale(pageID))
- sObjectMgr.GetLocaleString(pl->Text, loc_idx, Text);
+ if (PageTextLocale const *pl = sObjectMgr->GetPageTextLocale(pageID))
+ sObjectMgr->GetLocaleString(pl->Text, loc_idx, Text);
data << Text;
data << uint32(pPage->Next_Page);
@@ -481,7 +481,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
if (questOk)
{
- QuestPOIVector const *POI = sObjectMgr.GetQuestPOIVector(questId);
+ QuestPOIVector const *POI = sObjectMgr->GetQuestPOIVector(questId);
if (POI)
{
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
index 9ce3b4b3a25..be73fd32003 100755
--- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
@@ -58,7 +58,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
Creature* cr_questgiver=questgiver->ToCreature();
if (!cr_questgiver->IsHostileTo(_player)) // not show quest status to enemies
{
- questStatus = sScriptMgr.GetDialogStatus(_player, cr_questgiver);
+ questStatus = sScriptMgr->GetDialogStatus(_player, cr_questgiver);
if (questStatus > 6)
questStatus = getDialogStatus(_player, cr_questgiver, defstatus);
}
@@ -68,7 +68,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
{
sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid)));
GameObject* go_questgiver=(GameObject*)questgiver;
- questStatus = sScriptMgr.GetDialogStatus(_player, go_questgiver);
+ questStatus = sScriptMgr->GetDialogStatus(_player, go_questgiver);
if (questStatus > 6)
questStatus = getDialogStatus(_player, go_questgiver, defstatus);
break;
@@ -103,7 +103,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
// Stop the npc if moving
pCreature->StopMoving();
- if (sScriptMgr.OnGossipHello(_player, pCreature))
+ if (sScriptMgr->OnGossipHello(_player, pCreature))
return;
_player->PrepareGossipMenu(pCreature, pCreature->GetCreatureInfo()->GossipMenuId, true);
@@ -135,7 +135,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
return;
}
- Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest);
+ Quest const* qInfo = sObjectMgr->GetQuestTemplate(quest);
if (qInfo)
{
// prevent cheating
@@ -190,13 +190,13 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
switch(pObject->GetTypeId())
{
case TYPEID_UNIT:
- sScriptMgr.OnQuestAccept(_player, (pObject->ToCreature()), qInfo);
+ sScriptMgr->OnQuestAccept(_player, (pObject->ToCreature()), qInfo);
(pObject->ToCreature())->AI()->sQuestAccept(_player, qInfo);
break;
case TYPEID_ITEM:
case TYPEID_CONTAINER:
{
- sScriptMgr.OnQuestAccept(_player, ((Item*)pObject), qInfo);
+ sScriptMgr->OnQuestAccept(_player, ((Item*)pObject), qInfo);
// destroy not required for quest finish quest starting item
bool destroyItem = true;
@@ -215,7 +215,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
break;
}
case TYPEID_GAMEOBJECT:
- sScriptMgr.OnQuestAccept(_player, ((GameObject*)pObject), qInfo);
+ sScriptMgr->OnQuestAccept(_player, ((GameObject*)pObject), qInfo);
(pObject->ToGameObject())->AI()->QuestAccept(_player, qInfo);
break;
default:
@@ -249,7 +249,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
return;
}
- Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest);
+ Quest const* pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
{
if (pQuest->IsAutoAccept() && _player->CanAddQuest(pQuest, true))
@@ -275,7 +275,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data)
recv_data >> quest;
sLog.outDebug("WORLD: Received CMSG_QUEST_QUERY quest = %u",quest);
- Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
+ Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
{
_player->PlayerTalkClass->SendQuestQueryResponse(pQuest);
@@ -306,7 +306,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
if (!pObject->hasInvolvedQuest(quest))
return;
- Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
+ Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
{
if (_player->CanRewardQuest(pQuest, reward, true))
@@ -316,7 +316,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
switch(pObject->GetTypeId())
{
case TYPEID_UNIT:
- if (!(sScriptMgr.OnQuestReward(_player, (pObject->ToCreature()), pQuest, reward)))
+ if (!(sScriptMgr->OnQuestReward(_player, (pObject->ToCreature()), pQuest, reward)))
{
// Send next quest
if (Quest const* nextquest = _player->GetNextQuest(guid ,pQuest))
@@ -326,7 +326,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
}
break;
case TYPEID_GAMEOBJECT:
- if (!sScriptMgr.OnQuestReward(_player, ((GameObject*)pObject), pQuest, reward))
+ if (!sScriptMgr->OnQuestReward(_player, ((GameObject*)pObject), pQuest, reward))
{
// Send next quest
if (Quest const* nextquest = _player->GetNextQuest(guid ,pQuest))
@@ -364,7 +364,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
if (_player->GetQuestStatus(quest) != QUEST_STATUS_COMPLETE)
return;
- if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest))
+ if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest))
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
}
@@ -402,7 +402,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
if (!_player->TakeQuestSourceItem(quest, true))
return; // can't un-equip some items, reject quest cancel
- if (const Quest *pQuest = sObjectMgr.GetQuestTemplate(quest))
+ if (const Quest *pQuest = sObjectMgr->GetQuestTemplate(quest))
{
if (pQuest->HasFlag(QUEST_TRINITY_FLAGS_TIMED))
_player->RemoveTimedQuest(quest);
@@ -426,7 +426,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
sLog.outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
- if (const Quest* pQuest = sObjectMgr.GetQuestTemplate(quest))
+ if (const Quest* pQuest = sObjectMgr->GetQuestTemplate(quest))
{
if (!pQuest->HasFlag(QUEST_FLAGS_PARTY_ACCEPT))
return;
@@ -465,7 +465,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
- Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
+ Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
{
if (!_player->CanSeeStartQuest(pQuest) && _player->GetQuestStatus(quest)==QUEST_STATUS_NONE)
@@ -509,7 +509,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
sLog.outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
- if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(questId))
+ if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(questId))
{
if (Group* pGroup = _player->GetGroup())
{
@@ -592,14 +592,14 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
case TYPEID_GAMEOBJECT:
{
- qr = sObjectMgr.GetGOQuestRelationBounds(questgiver->GetEntry());
- qir = sObjectMgr.GetGOQuestInvolvedRelationBounds(questgiver->GetEntry());
+ qr = sObjectMgr->GetGOQuestRelationBounds(questgiver->GetEntry());
+ qir = sObjectMgr->GetGOQuestInvolvedRelationBounds(questgiver->GetEntry());
break;
}
case TYPEID_UNIT:
{
- qr = sObjectMgr.GetCreatureQuestRelationBounds(questgiver->GetEntry());
- qir = sObjectMgr.GetCreatureQuestInvolvedRelationBounds(questgiver->GetEntry());
+ qr = sObjectMgr->GetCreatureQuestRelationBounds(questgiver->GetEntry());
+ qir = sObjectMgr->GetCreatureQuestInvolvedRelationBounds(questgiver->GetEntry());
break;
}
default:
@@ -612,11 +612,11 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
uint32 result2 = 0;
uint32 quest_id = i->second;
- Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id);
+ Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest_id);
if (!pQuest) continue;
- ConditionList conditions = sConditionMgr.GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId());
- if (!sConditionMgr.IsPlayerMeetToConditions(pPlayer, conditions))
+ ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId());
+ if (!sConditionMgr->IsPlayerMeetToConditions(pPlayer, conditions))
continue;
QuestStatus status = pPlayer->GetQuestStatus(quest_id);
@@ -639,12 +639,12 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
uint32 result2 = 0;
uint32 quest_id = i->second;
- Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id);
+ Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest_id);
if (!pQuest)
continue;
- ConditionList conditions = sConditionMgr.GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId());
- if (!sConditionMgr.IsPlayerMeetToConditions(pPlayer, conditions))
+ ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_QUEST_SHOW_MARK, pQuest->GetQuestId());
+ if (!sConditionMgr->IsPlayerMeetToConditions(pPlayer, conditions))
continue;
QuestStatus status = pPlayer->GetQuestStatus(quest_id);
@@ -700,7 +700,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
continue;
if (!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
continue;
- questStatus = sScriptMgr.GetDialogStatus(_player, questgiver);
+ questStatus = sScriptMgr->GetDialogStatus(_player, questgiver);
if (questStatus > 6)
questStatus = getDialogStatus(_player, questgiver, defstatus);
@@ -715,7 +715,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
continue;
if (questgiver->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
continue;
- questStatus = sScriptMgr.GetDialogStatus(_player, questgiver);
+ questStatus = sScriptMgr->GetDialogStatus(_player, questgiver);
if (questStatus > 6)
questStatus = getDialogStatus(_player, questgiver, defstatus);
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index eccd40e3379..c74c867c232 100755
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -178,7 +178,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
}
// Note: If script stop casting it must send appropriate data to client to prevent stuck item in gray state.
- if (!sScriptMgr.OnItemUse(pUser,pItem,targets))
+ if (!sScriptMgr->OnItemUse(pUser,pItem,targets))
{
// no script or script not process request by self
pUser->CastItemUseSpell(pItem,targets,castCount,glyphIndex);
@@ -294,7 +294,7 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recv_data)
if (!obj)
return;
- if (sScriptMgr.OnGossipHello(_player, obj))
+ if (sScriptMgr->OnGossipHello(_player, obj))
return;
obj->AI()->GossipHello(_player);
@@ -392,7 +392,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
// auto-selection buff level base at target level (in spellInfo)
if (targets.getUnitTarget())
{
- SpellEntry const *actualSpellInfo = sSpellMgr.SelectAuraRankForPlayerLevel(spellInfo,targets.getUnitTarget()->getLevel());
+ SpellEntry const *actualSpellInfo = sSpellMgr->SelectAuraRankForPlayerLevel(spellInfo,targets.getUnitTarget()->getLevel());
// if rank not found then function return NULL but in explicit cast case original spell can be casted and later failed with appropriate error message
if (actualSpellInfo)
@@ -561,7 +561,7 @@ void WorldSession::HandleSpellClick(WorldPacket & recv_data)
if (!unit->IsInWorld())
return;
- SpellClickInfoMapBounds clickPair = sObjectMgr.GetSpellClickInfoMapBounds(unit->GetEntry());
+ SpellClickInfoMapBounds clickPair = sObjectMgr->GetSpellClickInfoMapBounds(unit->GetEntry());
for (SpellClickInfoMap::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
{
if (itr->second.IsFitToRequirements(_player, unit))
diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
index 15937a4b54c..cbf980e3245 100755
--- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
@@ -49,7 +49,7 @@ void WorldSession::SendTaxiStatus(uint64 guid)
return;
}
- uint32 curloc = sObjectMgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
+ uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
// not found nearest
if (curloc == 0)
@@ -94,7 +94,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
void WorldSession::SendTaxiMenu(Creature* unit)
{
// find current node
- uint32 curloc = sObjectMgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
+ uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
if (curloc == 0)
return;
@@ -134,7 +134,7 @@ void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathN
bool WorldSession::SendLearnNewTaxiNode(Creature* unit)
{
// find current node
- uint32 curloc = sObjectMgr.GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
+ uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
if (curloc == 0)
return true; // `true` send to avoid WorldSession::SendTaxiMenu call with one more curlock seartch with same false result.
@@ -254,10 +254,10 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
sLog.outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
- uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
+ uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
uint32 path, cost;
- sObjectMgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
+ sObjectMgr->GetTaxiPath(sourcenode, destinationnode, path, cost);
if (path && mountDisplayId)
SendDoFlight(mountDisplayId, path, 1); // skip start fly node
diff --git a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp b/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
index 2e05078f51d..4ece09a7588 100755
--- a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
@@ -29,7 +29,7 @@
void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
{
// Don't accept tickets if the ticket queue is disabled. (Ticket UI is greyed out but not fully dependable)
- if (sTicketMgr.GetStatus() == GMTICKET_QUEUE_STATUS_DISABLED)
+ if (sTicketMgr->GetStatus() == GMTICKET_QUEUE_STATUS_DISABLED)
return;
if (GetPlayer()->getLevel() < sWorld.getIntConfig(CONFIG_TICKET_LEVEL_REQ))
@@ -38,7 +38,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
return;
}
- if (sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
+ if (sTicketMgr->GetGMTicketByPlayer(GetPlayer()->GetGUID()))
{
WorldPacket data(SMSG_GMTICKET_CREATE, 4);
data << uint32(GMTICKET_RESPONSE_FAILURE); // You already have GM ticket
@@ -63,7 +63,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
GM_Ticket *ticket = new GM_Ticket;
ticket->name = GetPlayer()->GetName();
- ticket->guid = sTicketMgr.GenerateGMTicketId();
+ ticket->guid = sTicketMgr->GenerateGMTicketId();
ticket->playerGuid = GetPlayer()->GetGUID();
ticket->message = ticketText;
ticket->createtime = time(NULL);
@@ -79,7 +79,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
ticket->escalated = TICKET_UNASSIGNED;
ticket->response = "";
- sTicketMgr.AddOrUpdateGMTicket(*ticket, true);
+ sTicketMgr->AddOrUpdateGMTicket(*ticket, true);
WorldPacket data(SMSG_GMTICKET_CREATE, 4);
data << uint32(GMTICKET_RESPONSE_SUCCESS);
@@ -93,7 +93,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
std::string message;
recv_data >> message;
- GM_Ticket *ticket = sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
+ GM_Ticket *ticket = sTicketMgr->GetGMTicketByPlayer(GetPlayer()->GetGUID());
if (!ticket)
{
WorldPacket data(SMSG_GMTICKET_UPDATETEXT, 4);
@@ -105,7 +105,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
ticket->message = message;
ticket->timestamp = time(NULL);
- sTicketMgr.AddOrUpdateGMTicket(*ticket);
+ sTicketMgr->AddOrUpdateGMTicket(*ticket);
WorldPacket data(SMSG_GMTICKET_UPDATETEXT, 4);
data << uint32(GMTICKET_RESPONSE_SUCCESS);
@@ -116,7 +116,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
{
- GM_Ticket* ticket = sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
+ GM_Ticket* ticket = sTicketMgr->GetGMTicketByPlayer(GetPlayer()->GetGUID());
if (ticket)
{
@@ -125,7 +125,7 @@ void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
SendPacket(&data);
sWorld.SendGMText(LANG_COMMAND_TICKETPLAYERABANDON, GetPlayer()->GetName(), ticket->guid);
- sTicketMgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
+ sTicketMgr->RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
SendGMTicketGetTicket(GMTICKET_STATUS_DEFAULT, NULL);
}
}
@@ -134,7 +134,7 @@ void WorldSession::HandleGMTicketGetTicketOpcode(WorldPacket & /*recv_data*/)
{
SendQueryTimeResponse();
- if (GM_Ticket *ticket = sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
+ if (GM_Ticket *ticket = sTicketMgr->GetGMTicketByPlayer(GetPlayer()->GetGUID()))
{
if (ticket->completed)
SendGMTicketResponse(ticket);
@@ -150,7 +150,7 @@ void WorldSession::HandleGMTicketSystemStatusOpcode(WorldPacket & /*recv_data*/)
WorldPacket data(SMSG_GMTICKET_SYSTEMSTATUS, 4);
// Note: This only disables the ticket UI at client side and is not fully reliable
// are we sure this is a uint32? Should ask Zor
- data << uint32(sTicketMgr.GetStatus() ? GMTICKET_QUEUE_STATUS_ENABLED : GMTICKET_QUEUE_STATUS_DISABLED);
+ data << uint32(sTicketMgr->GetStatus() ? GMTICKET_QUEUE_STATUS_ENABLED : GMTICKET_QUEUE_STATUS_DISABLED);
SendPacket(&data);
}
@@ -175,7 +175,7 @@ void WorldSession::SendGMTicketGetTicket(uint32 status, char const* text, GM_Tic
ticketAge /= DAY;
data << float(ticketAge); // ticketAge (days)
- if (GM_Ticket *oldestTicket = sTicketMgr.GetOldestOpenGMTicket())
+ if (GM_Ticket *oldestTicket = sTicketMgr->GetOldestOpenGMTicket())
{
// get ticketage, but it's stored in seconds so we have to do it in days
float oldestTicketAge = (float)time(NULL) - (float)oldestTicket->timestamp;
@@ -186,7 +186,7 @@ void WorldSession::SendGMTicketGetTicket(uint32 status, char const* text, GM_Tic
data << float(0);
// I am not sure how blizzlike this is, and we don't really have a way to find out
- int64 lastChange = int64(sTicketMgr.GetLastChange());
+ int64 lastChange = int64(sTicketMgr->GetLastChange());
float timeDiff = float(int64(time(NULL)) - lastChange);
timeDiff /= DAY;
data << float(timeDiff);
@@ -225,7 +225,7 @@ void WorldSession::SendGMTicketResponse(GM_Ticket *ticket)
void WorldSession::HandleGMSurveySubmit(WorldPacket& recv_data)
{
- uint64 nextSurveyID = sTicketMgr.GetNextSurveyID();
+ uint64 nextSurveyID = sTicketMgr->GetNextSurveyID();
// just put the survey into the database
std::ostringstream ss;
uint32 mainSurvey; // GMSurveyCurrentSurvey.dbc, column 1 (all 9) ref to GMSurveySurveys.dbc
@@ -297,7 +297,7 @@ void WorldSession::HandleReportLag(WorldPacket& recv_data)
void WorldSession::HandleGMResponseResolve(WorldPacket& /*recvPacket*/)
{
// empty packet
- GM_Ticket* ticket = sTicketMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
+ GM_Ticket* ticket = sTicketMgr->GetGMTicketByPlayer(GetPlayer()->GetGUID());
if (ticket)
{
@@ -312,7 +312,7 @@ void WorldSession::HandleGMResponseResolve(WorldPacket& /*recvPacket*/)
WorldPacket data2(SMSG_GMTICKET_DELETETICKET, 4);
data2 << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
SendPacket(&data2);
- sTicketMgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), true);
+ sTicketMgr->RemoveGMTicket(ticket, GetPlayer()->GetGUID(), true);
SendGMTicketGetTicket(GMTICKET_STATUS_DEFAULT, NULL);
}
}