* Some singleton renames for consistency:
accmgr -> AccountMgr objmgr -> ObjectMgr auctionmgr -> sAuctionMgr spellmgr -> sSpellMgr CreatureEAI_Mgr -> sEventAIMgr achievementmgr -> sAchievementMgr gameeventmgr -> sGameEventMgr sInstanceSaveManager -> sInstanceSaveMgr poolhandler -> sPoolMgr --HG-- branch : trunk
This commit is contained in:
@@ -37,13 +37,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 = objmgr.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 = objmgr.GetArenaTeamById(a_id))
|
||||
if (ArenaTeam *at = sObjectMgr.GetArenaTeamById(a_id))
|
||||
at->InspectStats(this, plr->GetGUID());
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
|
||||
uint32 ArenaTeamId;
|
||||
recv_data >> ArenaTeamId;
|
||||
|
||||
if (ArenaTeam *arenateam = objmgr.GetArenaTeamById(ArenaTeamId))
|
||||
if (ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId))
|
||||
{
|
||||
arenateam->Query(this);
|
||||
arenateam->Stats(this);
|
||||
@@ -71,7 +71,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
|
||||
uint32 ArenaTeamId; // arena team id
|
||||
recv_data >> ArenaTeamId;
|
||||
|
||||
if (ArenaTeam *arenateam = objmgr.GetArenaTeamById(ArenaTeamId))
|
||||
if (ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId))
|
||||
arenateam->Roster(this);
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
ArenaTeam *arenateam = objmgr.GetArenaTeamById(ArenaTeamId);
|
||||
ArenaTeam *arenateam = sObjectMgr.GetArenaTeamById(ArenaTeamId);
|
||||
if (!arenateam)
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_PLAYER_NOT_IN_TEAM);
|
||||
@@ -157,7 +157,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
|
||||
|
||||
ArenaTeam *at = objmgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
|
||||
ArenaTeam *at = sObjectMgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
|
||||
if (!at)
|
||||
return;
|
||||
|
||||
@@ -168,7 +168,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != objmgr.GetPlayerTeamByGUID(at->GetCaptain()))
|
||||
if (!sWorld.getConfig(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);
|
||||
@@ -200,7 +200,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
|
||||
uint32 ArenaTeamId; // arena team id
|
||||
recv_data >> ArenaTeamId;
|
||||
|
||||
ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId);
|
||||
ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
|
||||
if (!at)
|
||||
return;
|
||||
|
||||
@@ -235,7 +235,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
|
||||
uint32 ArenaTeamId; // arena team id
|
||||
recv_data >> ArenaTeamId;
|
||||
|
||||
if (ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId))
|
||||
if (ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId))
|
||||
{
|
||||
if (at->GetCaptain() != _player->GetGUID())
|
||||
return;
|
||||
@@ -258,7 +258,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
|
||||
recv_data >> ArenaTeamId;
|
||||
recv_data >> name;
|
||||
|
||||
ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId);
|
||||
ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
|
||||
if (!at) // arena team not found
|
||||
return;
|
||||
|
||||
@@ -300,7 +300,7 @@ void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data)
|
||||
recv_data >> ArenaTeamId;
|
||||
recv_data >> name;
|
||||
|
||||
ArenaTeam *at = objmgr.GetArenaTeamById(ArenaTeamId);
|
||||
ArenaTeam *at = sObjectMgr.GetArenaTeamById(ArenaTeamId);
|
||||
if (!at) // arena team not found
|
||||
return;
|
||||
|
||||
|
||||
@@ -117,11 +117,11 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
|
||||
void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPrice)
|
||||
{
|
||||
uint64 oldBidder_guid = MAKE_NEW_GUID(auction->bidder,0, HIGHGUID_PLAYER);
|
||||
Player *oldBidder = objmgr.GetPlayer(oldBidder_guid);
|
||||
Player *oldBidder = sObjectMgr.GetPlayer(oldBidder_guid);
|
||||
|
||||
uint32 oldBidder_accId = 0;
|
||||
if (!oldBidder)
|
||||
oldBidder_accId = objmgr.GetPlayerAccountIdByGUID(oldBidder_guid);
|
||||
oldBidder_accId = sObjectMgr.GetPlayerAccountIdByGUID(oldBidder_guid);
|
||||
|
||||
// old bidder exist
|
||||
if (oldBidder || oldBidder_accId)
|
||||
@@ -142,11 +142,11 @@ void WorldSession::SendAuctionOutbiddedMail(AuctionEntry *auction, uint32 newPri
|
||||
void WorldSession::SendAuctionCancelledToBidderMail(AuctionEntry* auction)
|
||||
{
|
||||
uint64 bidder_guid = MAKE_NEW_GUID(auction->bidder, 0, HIGHGUID_PLAYER);
|
||||
Player *bidder = objmgr.GetPlayer(bidder_guid);
|
||||
Player *bidder = sObjectMgr.GetPlayer(bidder_guid);
|
||||
|
||||
uint32 bidder_accId = 0;
|
||||
if (!bidder)
|
||||
bidder_accId = objmgr.GetPlayerAccountIdByGUID(bidder_guid);
|
||||
bidder_accId = sObjectMgr.GetPlayerAccountIdByGUID(bidder_guid);
|
||||
|
||||
// bidder exist
|
||||
if (bidder || bidder_accId)
|
||||
@@ -216,7 +216,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
||||
|
||||
Item *it = pl->GetItemByGuid(item);
|
||||
//do not allow to sell already auctioned items
|
||||
if (auctionmgr.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);
|
||||
@@ -241,10 +241,10 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
|
||||
|
||||
//we have to take deposit :
|
||||
uint32 deposit = auctionmgr.GetAuctionDeposit(auctionHouseEntry, etime, it);
|
||||
uint32 deposit = sAuctionMgr.GetAuctionDeposit(auctionHouseEntry, etime, it);
|
||||
if (pl->GetMoney() < deposit)
|
||||
{
|
||||
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_NOT_ENOUGHT_MONEY);
|
||||
@@ -262,7 +262,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
||||
uint32 auction_time = uint32(etime * sWorld.getRate(RATE_AUCTION_TIME));
|
||||
|
||||
AuctionEntry *AH = new AuctionEntry;
|
||||
AH->Id = objmgr.GenerateAuctionID();
|
||||
AH->Id = sObjectMgr.GenerateAuctionID();
|
||||
if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
||||
AH->auctioneer = 23442;
|
||||
else
|
||||
@@ -279,7 +279,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());
|
||||
auctionmgr.AddAItem(it);
|
||||
sAuctionMgr.AddAItem(it);
|
||||
auctionHouse->AddAuction(AH);
|
||||
|
||||
pl->MoveItemFromInventory(it->GetBagSlot(), it->GetSlot(), true);
|
||||
@@ -319,7 +319,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject *auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
|
||||
AuctionHouseObject *auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
|
||||
|
||||
AuctionEntry *auction = auctionHouse->GetAuction(auctionId);
|
||||
Player *pl = GetPlayer();
|
||||
@@ -332,8 +332,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 = objmgr.GetPlayer(MAKE_NEW_GUID(auction->owner, 0, HIGHGUID_PLAYER));
|
||||
if (!auction_owner && objmgr.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);
|
||||
@@ -400,16 +400,16 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
|
||||
auction->bid = auction->buyout;
|
||||
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, auction->buyout);
|
||||
|
||||
auctionmgr.SendAuctionSalePendingMail(auction);
|
||||
auctionmgr.SendAuctionSuccessfulMail(auction);
|
||||
auctionmgr.SendAuctionWonMail(auction);
|
||||
sAuctionMgr.SendAuctionSalePendingMail(auction);
|
||||
sAuctionMgr.SendAuctionSuccessfulMail(auction);
|
||||
sAuctionMgr.SendAuctionWonMail(auction);
|
||||
|
||||
SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK);
|
||||
|
||||
CharacterDatabase.BeginTransaction();
|
||||
auction->DeleteFromDB();
|
||||
uint32 item_template = auction->item_template;
|
||||
auctionmgr.RemoveAItem(auction->item_guidlow);
|
||||
sAuctionMgr.RemoveAItem(auction->item_guidlow);
|
||||
auctionHouse->RemoveAuction(auction, item_template);
|
||||
}
|
||||
pl->SaveInventoryAndGoldToDB();
|
||||
@@ -436,14 +436,14 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
|
||||
|
||||
AuctionEntry *auction = auctionHouse->GetAuction(auctionId);
|
||||
Player *pl = GetPlayer();
|
||||
|
||||
if (auction && auction->owner == pl->GetGUIDLow())
|
||||
{
|
||||
Item *pItem = auctionmgr.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
|
||||
@@ -487,7 +487,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
|
||||
pl->SaveInventoryAndGoldToDB();
|
||||
auction->DeleteFromDB();
|
||||
uint32 item_template = auction->item_template;
|
||||
auctionmgr.RemoveAItem(auction->item_guidlow);
|
||||
sAuctionMgr.RemoveAItem(auction->item_guidlow);
|
||||
auctionHouse->RemoveAuction(auction, item_template);
|
||||
CharacterDatabase.CommitTransaction();
|
||||
}
|
||||
@@ -519,7 +519,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = auctionmgr.GetAuctionsMap(pCreature->getFaction());
|
||||
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap(pCreature->getFaction());
|
||||
|
||||
WorldPacket data(SMSG_AUCTION_BIDDER_LIST_RESULT, (4+4+4));
|
||||
Player *pl = GetPlayer();
|
||||
@@ -566,7 +566,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = auctionmgr.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
|
||||
@@ -619,7 +619,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
AuctionHouseObject* auctionHouse = auctionmgr.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);
|
||||
|
||||
@@ -251,11 +251,11 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_
|
||||
uint32 count1 = 0; //always constant zero?
|
||||
uint32 count2 = 0; //count of next fields
|
||||
|
||||
Player *ali_plr = objmgr.GetPlayer(((BattlegroundWS*)bg)->GetAllianceFlagPickerGUID());
|
||||
Player *ali_plr = sObjectMgr.GetPlayer(((BattlegroundWS*)bg)->GetAllianceFlagPickerGUID());
|
||||
if (ali_plr)
|
||||
++count2;
|
||||
|
||||
Player *horde_plr = objmgr.GetPlayer(((BattlegroundWS*)bg)->GetHordeFlagPickerGUID());
|
||||
Player *horde_plr = sObjectMgr.GetPlayer(((BattlegroundWS*)bg)->GetHordeFlagPickerGUID());
|
||||
if (horde_plr)
|
||||
++count2;
|
||||
|
||||
@@ -468,7 +468,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)
|
||||
{
|
||||
ArenaTeam * at = objmgr.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);
|
||||
@@ -707,7 +707,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 = objmgr.GetArenaTeamById(ateamId);
|
||||
ArenaTeam * at = sObjectMgr.GetArenaTeamById(ateamId);
|
||||
if (!at)
|
||||
{
|
||||
_player->GetSession()->SendNotInArenaTeamPacket(arenatype);
|
||||
@@ -802,7 +802,7 @@ void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data)
|
||||
{
|
||||
uint64 playerGuid;
|
||||
recv_data >> playerGuid;
|
||||
Player *reportedPlayer = objmgr.GetPlayer(playerGuid);
|
||||
Player *reportedPlayer = sObjectMgr.GetPlayer(playerGuid);
|
||||
|
||||
if (!reportedPlayer)
|
||||
{
|
||||
|
||||
@@ -89,7 +89,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
|
||||
p_counter = data.wpos();
|
||||
data << uint32(counter); // raid reset count
|
||||
|
||||
ResetTimeByMapDifficultyMap const& resets = sInstanceSaveManager.GetResetTimeMap();
|
||||
ResetTimeByMapDifficultyMap const& resets = sInstanceSaveMgr.GetResetTimeMap();
|
||||
for (ResetTimeByMapDifficultyMap::const_iterator itr = resets.begin(); itr != resets.end(); ++itr)
|
||||
{
|
||||
uint32 mapid = PAIR32_LOPART(itr->first);
|
||||
|
||||
@@ -266,14 +266,14 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(name))
|
||||
if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(name))
|
||||
{
|
||||
data << (uint8)CHAR_NAME_RESERVED;
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
if (objmgr.GetPlayerGUIDByName(name))
|
||||
if (sObjectMgr.GetPlayerGUIDByName(name))
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_NAME_IN_USE;
|
||||
SendPacket(&data);
|
||||
@@ -446,7 +446,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
Player * pNewChar = new Player(this);
|
||||
if (!pNewChar->Create(objmgr.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();
|
||||
@@ -488,14 +488,14 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
|
||||
recv_data >> guid;
|
||||
|
||||
// can't delete loaded character
|
||||
if (objmgr.GetPlayer(guid))
|
||||
if (sObjectMgr.GetPlayer(guid))
|
||||
return;
|
||||
|
||||
uint32 accountId = 0;
|
||||
std::string name;
|
||||
|
||||
// is guild leader
|
||||
if (objmgr.GetGuildByLeader(guid))
|
||||
if (sObjectMgr.GetGuildByLeader(guid))
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_DELETE, 1);
|
||||
data << (uint8)CHAR_DELETE_FAILED_GUILD_LEADER;
|
||||
@@ -504,7 +504,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
// is arena team captain
|
||||
if (objmgr.GetArenaTeamByCaptain(guid))
|
||||
if (sObjectMgr.GetArenaTeamByCaptain(guid))
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_DELETE, 1);
|
||||
data << (uint8)CHAR_DELETE_FAILED_ARENA_CAPTAIN;
|
||||
@@ -664,7 +664,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
||||
|
||||
if (pCurrChar->GetGuildId() != 0)
|
||||
{
|
||||
Guild* guild = objmgr.GetGuildById(pCurrChar->GetGuildId());
|
||||
Guild* guild = sObjectMgr.GetGuildById(pCurrChar->GetGuildId());
|
||||
if (guild)
|
||||
{
|
||||
data.Initialize(SMSG_GUILD_EVENT, (1+1+guild->GetMOTD().size()+1));
|
||||
@@ -713,7 +713,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
||||
|
||||
if (!pCurrChar->GetMap()->Add(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
|
||||
{
|
||||
AreaTrigger const* at = objmgr.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
|
||||
@@ -944,7 +944,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
|
||||
// check name limitations
|
||||
if (GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(newname))
|
||||
if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_RENAME, 1);
|
||||
data << uint8(CHAR_NAME_RESERVED);
|
||||
@@ -1002,7 +1002,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
|
||||
// not accept declined names for unsupported languages
|
||||
std::string name;
|
||||
if (!objmgr.GetPlayerNameByGUID(guid, name))
|
||||
if (!sObjectMgr.GetPlayerNameByGUID(guid, name))
|
||||
{
|
||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||
data << uint32(1);
|
||||
@@ -1208,7 +1208,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
}
|
||||
|
||||
// check name limitations
|
||||
if (GetSecurity() == SEC_PLAYER && objmgr.IsReservedName(newname))
|
||||
if (GetSecurity() == SEC_PLAYER && sObjectMgr.IsReservedName(newname))
|
||||
{
|
||||
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
||||
data << uint8(CHAR_NAME_RESERVED);
|
||||
@@ -1217,7 +1217,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
}
|
||||
|
||||
// character with this name already exist
|
||||
if (uint64 newguid = objmgr.GetPlayerGUIDByName(newname))
|
||||
if (uint64 newguid = sObjectMgr.GetPlayerGUIDByName(newname))
|
||||
{
|
||||
if (newguid != guid)
|
||||
{
|
||||
|
||||
@@ -243,7 +243,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
|
||||
break;
|
||||
}
|
||||
|
||||
Player *player = objmgr.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()))
|
||||
@@ -330,7 +330,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
|
||||
|
||||
if (GetPlayer()->GetGuildId())
|
||||
{
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
|
||||
if (guild)
|
||||
guild->BroadcastToGuild(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
|
||||
@@ -368,7 +368,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
|
||||
|
||||
if (GetPlayer()->GetGuildId())
|
||||
{
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
|
||||
if (guild)
|
||||
guild->BroadcastToOfficers(this, msg, lang == LANG_ADDON ? LANG_ADDON : LANG_UNIVERSAL);
|
||||
@@ -714,7 +714,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data)
|
||||
recv_data >> iguid;
|
||||
recv_data >> unk; // probably related to spam reporting
|
||||
|
||||
Player *player = objmgr.GetPlayer(iguid);
|
||||
Player *player = sObjectMgr.GetPlayer(iguid);
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
Player *player = objmgr.GetPlayer(membername.c_str());
|
||||
Player *player = sObjectMgr.GetPlayer(membername.c_str());
|
||||
|
||||
// no player
|
||||
if (!player)
|
||||
@@ -217,7 +217,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
return;
|
||||
}
|
||||
|
||||
Player* leader = objmgr.GetPlayer(group->GetLeaderGUID());
|
||||
Player* leader = sObjectMgr.GetPlayer(group->GetLeaderGUID());
|
||||
|
||||
// forming a new group, create it
|
||||
if (!group->IsCreated())
|
||||
@@ -225,7 +225,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
if (leader)
|
||||
group->RemoveInvite(leader);
|
||||
group->Create(group->GetLeaderGUID(), group->GetLeaderName());
|
||||
objmgr.AddGroup(group);
|
||||
sObjectMgr.AddGroup(group);
|
||||
}
|
||||
|
||||
// everything's fine, do it, PLAYER'S GROUP IS SET IN ADDMEMBER!!!
|
||||
@@ -249,7 +249,7 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/)
|
||||
if (!group) return;
|
||||
|
||||
// remember leader if online
|
||||
Player *leader = objmgr.GetPlayer(group->GetLeaderGUID());
|
||||
Player *leader = sObjectMgr.GetPlayer(group->GetLeaderGUID());
|
||||
|
||||
// uninvite, group can be deleted
|
||||
GetPlayer()->UninviteFromGroup();
|
||||
@@ -353,7 +353,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
Player *player = objmgr.GetPlayer(guid);
|
||||
Player *player = sObjectMgr.GetPlayer(guid);
|
||||
|
||||
/** error handling **/
|
||||
if (!player || !group->IsLeader(GetPlayer()->GetGUID()) || player->GetGroup() != group)
|
||||
@@ -559,7 +559,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
/********************/
|
||||
|
||||
Player *movedPlayer = objmgr.GetPlayer(name.c_str());
|
||||
Player *movedPlayer = sObjectMgr.GetPlayer(name.c_str());
|
||||
if (movedPlayer)
|
||||
{
|
||||
//Do not allow leader to change group of player in combat
|
||||
@@ -570,7 +570,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
|
||||
group->ChangeMembersGroup(movedPlayer, groupNr);
|
||||
}
|
||||
else
|
||||
group->ChangeMembersGroup(objmgr.GetPlayerGUIDByName(name.c_str()), groupNr);
|
||||
group->ChangeMembersGroup(sObjectMgr.GetPlayerGUIDByName(name.c_str()), groupNr);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
|
||||
@@ -841,7 +841,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
|
||||
uint64 Guid;
|
||||
recv_data >> Guid;
|
||||
|
||||
Player *player = objmgr.GetPlayer(Guid);
|
||||
Player *player = sObjectMgr.GetPlayer(Guid);
|
||||
if (!player)
|
||||
{
|
||||
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
|
||||
|
||||
@@ -36,7 +36,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
|
||||
uint32 guildId;
|
||||
recvPacket >> guildId;
|
||||
|
||||
if (Guild *guild = objmgr.GetGuildById(guildId))
|
||||
if (Guild *guild = sObjectMgr.GetGuildById(guildId))
|
||||
{
|
||||
guild->Query(this);
|
||||
return;
|
||||
@@ -62,7 +62,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
objmgr.AddGuild(guild);
|
||||
sObjectMgr.AddGuild(guild);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||
@@ -83,7 +83,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -145,7 +145,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
|
||||
if (!normalizePlayerName(plName))
|
||||
return;
|
||||
|
||||
Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -193,12 +193,12 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
|
||||
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_ACCEPT");
|
||||
|
||||
guild = objmgr.GetGuildById(player->GetGuildIdInvited());
|
||||
guild = sObjectMgr.GetGuildById(player->GetGuildIdInvited());
|
||||
if (!guild || player->GetGuildId())
|
||||
return;
|
||||
|
||||
// not let enemies sign guild charter
|
||||
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != objmgr.GetPlayerTeamByGUID(guild->GetLeader()))
|
||||
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(guild->GetLeader()))
|
||||
return;
|
||||
|
||||
if (!guild->AddMember(GetPlayer()->GetGUID(),guild->GetLowestRank()))
|
||||
@@ -224,7 +224,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
|
||||
Guild *guild;
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_INFO");
|
||||
|
||||
guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -244,7 +244,7 @@ void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_ROSTER");
|
||||
|
||||
if (Guild* guild = objmgr.GetGuildById(_player->GetGuildId()))
|
||||
if (Guild* guild = sObjectMgr.GetGuildById(_player->GetGuildId()))
|
||||
guild->Roster(this);
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
|
||||
if (!normalizePlayerName(plName))
|
||||
return;
|
||||
|
||||
Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -314,7 +314,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
|
||||
if (!normalizePlayerName(plName))
|
||||
return;
|
||||
|
||||
Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
|
||||
if (!guild)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_LEAVE");
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(_player->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -402,7 +402,7 @@ void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_DISBAND");
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -432,7 +432,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
|
||||
if (!normalizePlayerName(name))
|
||||
return;
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(oldLeader->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(oldLeader->GetGuildId());
|
||||
|
||||
if (!guild)
|
||||
{
|
||||
@@ -472,7 +472,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
|
||||
else
|
||||
MOTD = "";
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -500,7 +500,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
|
||||
if (!normalizePlayerName(name))
|
||||
return;
|
||||
|
||||
Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -538,7 +538,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
|
||||
if (!normalizePlayerName(plName))
|
||||
return;
|
||||
|
||||
Guild* guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild* guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -574,7 +574,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
|
||||
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_RANK");
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
recvPacket.rpos(recvPacket.wpos()); // set to end to avoid warnings spam
|
||||
@@ -624,7 +624,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
|
||||
std::string rankname;
|
||||
recvPacket >> rankname;
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -650,7 +650,7 @@ void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received CMSG_GUILD_DEL_RANK");
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -687,7 +687,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
|
||||
|
||||
recvPacket >> GINFO;
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, "", ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
@@ -727,7 +727,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
|
||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
Guild *guild = objmgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||
if (!guild)
|
||||
{
|
||||
//"You are not part of a guild!";
|
||||
@@ -763,7 +763,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
|
||||
// empty
|
||||
sLog.outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
|
||||
if (uint32 GuildId = GetPlayer()->GetGuildId())
|
||||
if (Guild *pGuild = objmgr.GetGuildById(GuildId))
|
||||
if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
|
||||
pGuild->DisplayGuildEventLog(this);
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
|
||||
if (uint32 GuildId = GetPlayer()->GetGuildId())
|
||||
if (Guild *pGuild = objmgr.GetGuildById(GuildId))
|
||||
if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
|
||||
pGuild->SendMoneyInfo(this, GetPlayer()->GetGUIDLow());
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */)
|
||||
|
||||
if (uint32 GuildId = GetPlayer()->GetGuildId())
|
||||
{
|
||||
if (Guild *pGuild = objmgr.GetGuildById(GuildId))
|
||||
if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
|
||||
{
|
||||
uint32 rankId = GetPlayer()->GetRank();
|
||||
|
||||
@@ -819,7 +819,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data)
|
||||
|
||||
if (uint32 GuildId = GetPlayer()->GetGuildId())
|
||||
{
|
||||
if (Guild *pGuild = objmgr.GetGuildById(GuildId))
|
||||
if (Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
|
||||
{
|
||||
pGuild->DisplayGuildBankTabsInfo(this); // this also will load guild bank if not yet
|
||||
return;
|
||||
@@ -845,7 +845,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -879,7 +879,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -927,7 +927,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data)
|
||||
if (GuildId == 0)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -987,7 +987,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
{
|
||||
recv_data.rpos(recv_data.wpos()); // prevent additional spam at rejected packet
|
||||
@@ -1088,7 +1088,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -1139,7 +1139,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -1162,7 +1162,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -1184,7 +1184,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
@@ -1207,7 +1207,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data)
|
||||
if (!GuildId)
|
||||
return;
|
||||
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
|
||||
|
||||
sLog.outDetail("STORAGE: Item Query = %u", item);
|
||||
|
||||
ItemPrototype const *pProto = objmgr.GetItemPrototype(item);
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
|
||||
if (pProto)
|
||||
{
|
||||
std::string Name = pProto->Name1;
|
||||
@@ -296,7 +296,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
ItemLocale const *il = objmgr.GetItemLocale(pProto->ItemId);
|
||||
ItemLocale const *il = sObjectMgr.GetItemLocale(pProto->ItemId);
|
||||
if (il)
|
||||
{
|
||||
if (il->Name.size() > size_t(loc_idx) && !il->Name[loc_idx].empty())
|
||||
@@ -762,7 +762,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
|
||||
{
|
||||
if (VendorItem const* crItem = vItems->GetItem(vendorslot))
|
||||
{
|
||||
if (ItemPrototype const *pProto = objmgr.GetItemPrototype(crItem->item))
|
||||
if (ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(crItem->item))
|
||||
{
|
||||
if ((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
|
||||
continue;
|
||||
@@ -1023,14 +1023,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 = objmgr.GetItemSetNameEntry(itemid);
|
||||
ItemSetNameEntry const *pName = sObjectMgr.GetItemSetNameEntry(itemid);
|
||||
if (pName)
|
||||
{
|
||||
std::string Name = pName->name;
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
ItemSetNameLocale const *isnl = objmgr.GetItemSetNameLocale(itemid);
|
||||
ItemSetNameLocale const *isnl = sObjectMgr.GetItemSetNameLocale(itemid);
|
||||
if (isnl)
|
||||
if (isnl->Name.size() > size_t(loc_idx) && !isnl->Name[loc_idx].empty())
|
||||
Name = isnl->Name[loc_idx];
|
||||
|
||||
@@ -296,7 +296,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
|
||||
if (!(wplayer_name.empty() || wpname.find(wplayer_name) != std::wstring::npos))
|
||||
continue;
|
||||
|
||||
std::string gname = objmgr.GetGuildNameById(itr->second->GetGuildId());
|
||||
std::string gname = sObjectMgr.GetGuildNameById(itr->second->GetGuildId());
|
||||
std::wstring wgname;
|
||||
if (!Utf8toWStr(gname,wgname))
|
||||
continue;
|
||||
@@ -578,7 +578,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult_AutoPtr result, uin
|
||||
team = Player::TeamForRace((*result)[1].GetUInt8());
|
||||
friendAcctid = (*result)[2].GetUInt32();
|
||||
|
||||
if (session->GetSecurity() >= SEC_MODERATOR || sWorld.getConfig(CONFIG_ALLOW_GM_FRIEND) || accmgr.GetSecurity(friendAcctid) < SEC_MODERATOR)
|
||||
if (session->GetSecurity() >= SEC_MODERATOR || sWorld.getConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr.GetSecurity(friendAcctid) < SEC_MODERATOR)
|
||||
{
|
||||
if (friendGuid)
|
||||
{
|
||||
@@ -887,10 +887,10 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
||||
if (sScriptMgr.OnAreaTrigger(GetPlayer(), atEntry))
|
||||
return;
|
||||
|
||||
uint32 quest_id = objmgr.GetQuestForAreaTrigger(Trigger_ID);
|
||||
uint32 quest_id = sObjectMgr.GetQuestForAreaTrigger(Trigger_ID);
|
||||
if (quest_id && GetPlayer()->isAlive() && GetPlayer()->IsActiveQuest(quest_id))
|
||||
{
|
||||
Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
|
||||
Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest_id);
|
||||
if (pQuest)
|
||||
{
|
||||
if (GetPlayer()->GetQuestStatus(quest_id) == QUEST_STATUS_INCOMPLETE)
|
||||
@@ -898,7 +898,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
if (objmgr.IsTavernAreaTrigger(Trigger_ID))
|
||||
if (sObjectMgr.IsTavernAreaTrigger(Trigger_ID))
|
||||
{
|
||||
// set resting flag we are in the inn
|
||||
GetPlayer()->SetFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING);
|
||||
@@ -928,7 +928,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
// NULL if all values default (non teleport trigger)
|
||||
AreaTrigger const* at = objmgr.GetAreaTrigger(Trigger_ID);
|
||||
AreaTrigger const* at = sObjectMgr.GetAreaTrigger(Trigger_ID);
|
||||
if (!at)
|
||||
return;
|
||||
|
||||
@@ -1215,7 +1215,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
|
||||
|
||||
_player->SetSelection(guid);
|
||||
|
||||
Player *plr = objmgr.GetPlayer(guid);
|
||||
Player *plr = sObjectMgr.GetPlayer(guid);
|
||||
if (!plr) // wrong player
|
||||
return;
|
||||
|
||||
@@ -1244,7 +1244,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
Player *player = objmgr.GetPlayer(guid);
|
||||
Player *player = sObjectMgr.GetPlayer(guid);
|
||||
|
||||
if (!player)
|
||||
{
|
||||
@@ -1316,7 +1316,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
Player *plr = objmgr.GetPlayer(charname.c_str());
|
||||
Player *plr = sObjectMgr.GetPlayer(charname.c_str());
|
||||
|
||||
if (!plr)
|
||||
{
|
||||
@@ -1687,7 +1687,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data)
|
||||
if (!recv_data.readPackGUID(guid))
|
||||
return;
|
||||
|
||||
Player *player = objmgr.GetPlayer(guid);
|
||||
Player *player = sObjectMgr.GetPlayer(guid);
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
|
||||
// get the destination map entry, not the current one, this will fix homebind and reset greeting
|
||||
MapEntry const* mEntry = sMapStore.LookupEntry(loc.GetMapId());
|
||||
InstanceTemplate const* mInstance = objmgr.GetInstanceTemplate(loc.GetMapId());
|
||||
InstanceTemplate const* mInstance = sObjectMgr.GetInstanceTemplate(loc.GetMapId());
|
||||
|
||||
// reset instance validity, except if going to an instance inside an instance
|
||||
if (GetPlayer()->m_InstanceValid == false && !mInstance)
|
||||
@@ -157,7 +157,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
{
|
||||
if (mapDiff->resetTime)
|
||||
{
|
||||
if (uint32 timeReset = sInstanceSaveManager.GetResetTimeFor(mEntry->MapID,diff))
|
||||
if (uint32 timeReset = sInstanceSaveMgr.GetResetTimeFor(mEntry->MapID,diff))
|
||||
{
|
||||
uint32 timeleft = timeReset - time(NULL);
|
||||
GetPlayer()->SendInstanceResetWarning(mEntry->MapID, diff, timeleft);
|
||||
|
||||
@@ -179,7 +179,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
if (spellmgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell[i]))
|
||||
if (sSpellMgr.IsPrimaryProfessionFirstRankSpell(tSpell->learnedSpell[i]))
|
||||
primary_prof_first_rank = true;
|
||||
}
|
||||
if (!valid)
|
||||
@@ -203,7 +203,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
|
||||
{
|
||||
if (!tSpell->learnedSpell[i])
|
||||
continue;
|
||||
if (SpellChainNode const* chain_node = spellmgr.GetSpellChainNode(tSpell->learnedSpell[i]))
|
||||
if (SpellChainNode const* chain_node = sSpellMgr.GetSpellChainNode(tSpell->learnedSpell[i]))
|
||||
{
|
||||
if (chain_node->prev)
|
||||
{
|
||||
@@ -213,7 +213,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
|
||||
}
|
||||
if (maxReq == 3)
|
||||
break;
|
||||
SpellsRequiringSpellMapBounds spellsRequired = spellmgr.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);
|
||||
@@ -421,7 +421,7 @@ void WorldSession::SendSpiritResurrect()
|
||||
WorldSafeLocsEntry const *corpseGrave = NULL;
|
||||
Corpse *corpse = _player->GetCorpse();
|
||||
if (corpse)
|
||||
corpseGrave = objmgr.GetClosestGraveYard(
|
||||
corpseGrave = sObjectMgr.GetClosestGraveYard(
|
||||
corpse->GetPositionX(), corpse->GetPositionY(), corpse->GetPositionZ(), corpse->GetMapId(), _player->GetTeam());
|
||||
|
||||
// now can spawn bones
|
||||
@@ -430,7 +430,7 @@ void WorldSession::SendSpiritResurrect()
|
||||
// teleport to nearest from corpse graveyard, if different from nearest to player ghost
|
||||
if (corpseGrave)
|
||||
{
|
||||
WorldSafeLocsEntry const *ghostGrave = objmgr.GetClosestGraveYard(
|
||||
WorldSafeLocsEntry const *ghostGrave = sObjectMgr.GetClosestGraveYard(
|
||||
_player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetMapId(), _player->GetTeam());
|
||||
|
||||
if (corpseGrave != ghostGrave)
|
||||
@@ -673,7 +673,7 @@ void WorldSession::HandleUnstablePet(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creature_id);
|
||||
CreatureInfo const* creatureInfo = sObjectMgr.GetCreatureTemplate(creature_id);
|
||||
if (!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
|
||||
{
|
||||
// if problem in exotic pet
|
||||
@@ -791,7 +791,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creature_id);
|
||||
CreatureInfo const* creatureInfo = sObjectMgr.GetCreatureTemplate(creature_id);
|
||||
if (!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
|
||||
{
|
||||
// if problem in exotic pet
|
||||
@@ -860,7 +860,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
|
||||
uint32 GuildId = _player->GetGuildId();
|
||||
if (!GuildId)
|
||||
return;
|
||||
Guild *pGuild = objmgr.GetGuildById(GuildId);
|
||||
Guild *pGuild = sObjectMgr.GetGuildById(GuildId);
|
||||
if (!pGuild)
|
||||
return;
|
||||
pGuild->LogBankEvent(GUILD_BANK_LOG_REPAIR_MONEY, 0, _player->GetGUIDLow(), TotalCost);
|
||||
|
||||
@@ -571,7 +571,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (objmgr.IsReservedName(name))
|
||||
if (sObjectMgr.IsReservedName(name))
|
||||
{
|
||||
SendPetNameInvalid(PET_NAME_RESERVED, name, NULL);
|
||||
return;
|
||||
|
||||
@@ -147,12 +147,12 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
|
||||
if (type == 9)
|
||||
{
|
||||
if (objmgr.GetGuildByName(name))
|
||||
if (sObjectMgr.GetGuildByName(name))
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, name, ERR_GUILD_NAME_EXISTS_S);
|
||||
return;
|
||||
}
|
||||
if (objmgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
if (sObjectMgr.IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, name, ERR_GUILD_NAME_INVALID);
|
||||
return;
|
||||
@@ -160,19 +160,19 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objmgr.GetArenaTeamByName(name))
|
||||
if (sObjectMgr.GetArenaTeamByName(name))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
|
||||
return;
|
||||
}
|
||||
if (objmgr.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;
|
||||
}
|
||||
}
|
||||
|
||||
ItemPrototype const *pProto = objmgr.GetItemPrototype(charterid);
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(charterid);
|
||||
if (!pProto)
|
||||
{
|
||||
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, charterid, 0);
|
||||
@@ -397,12 +397,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
|
||||
if (type == 9)
|
||||
{
|
||||
if (objmgr.GetGuildByName(newname))
|
||||
if (sObjectMgr.GetGuildByName(newname))
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, newname, ERR_GUILD_NAME_EXISTS_S);
|
||||
return;
|
||||
}
|
||||
if (objmgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
|
||||
if (sObjectMgr.IsReservedName(newname) || !ObjectMgr::IsValidCharterName(newname))
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, newname, ERR_GUILD_NAME_INVALID);
|
||||
return;
|
||||
@@ -410,12 +410,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objmgr.GetArenaTeamByName(newname))
|
||||
if (sObjectMgr.GetArenaTeamByName(newname))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, newname, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
|
||||
return;
|
||||
}
|
||||
if (objmgr.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;
|
||||
@@ -467,7 +467,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
|
||||
// not let enemies sign guild charter
|
||||
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != objmgr.GetPlayerTeamByGUID(ownerguid))
|
||||
if (!sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr.GetPlayerTeamByGUID(ownerguid))
|
||||
{
|
||||
if (type != 9)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
|
||||
@@ -532,7 +532,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
|
||||
// update for owner if online
|
||||
if (Player *owner = objmgr.GetPlayer(ownerguid))
|
||||
if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
@@ -555,7 +555,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
// item->SetUInt32Value(ITEM_FIELD_ENCHANTMENT_1_1+1, signs);
|
||||
|
||||
// update for owner if online
|
||||
if (Player *owner = objmgr.GetPlayer(ownerguid))
|
||||
if (Player *owner = sObjectMgr.GetPlayer(ownerguid))
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
|
||||
Field *fields = result->Fetch();
|
||||
ownerguid = MAKE_NEW_GUID(fields[0].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
|
||||
Player *owner = objmgr.GetPlayer(ownerguid);
|
||||
Player *owner = sObjectMgr.GetPlayer(ownerguid);
|
||||
if (owner) // petition owner online
|
||||
{
|
||||
WorldPacket data(MSG_PETITION_DECLINE, 8);
|
||||
@@ -770,7 +770,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
|
||||
if (type == 9)
|
||||
{
|
||||
if (objmgr.GetGuildByName(name))
|
||||
if (sObjectMgr.GetGuildByName(name))
|
||||
{
|
||||
SendGuildCommandResult(GUILD_CREATE_S, name, ERR_GUILD_NAME_EXISTS_S);
|
||||
return;
|
||||
@@ -778,7 +778,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (objmgr.GetArenaTeamByName(name))
|
||||
if (sObjectMgr.GetArenaTeamByName(name))
|
||||
{
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, name, "", ERR_ARENA_TEAM_NAME_EXISTS_S);
|
||||
return;
|
||||
@@ -805,7 +805,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
// register guild and add guildmaster
|
||||
objmgr.AddGuild(guild);
|
||||
sObjectMgr.AddGuild(guild);
|
||||
|
||||
// add members
|
||||
for (uint8 i = 0; i < signs; ++i)
|
||||
@@ -831,7 +831,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
at->SetEmblem(backgroud, icon, iconcolor, border, bordercolor);
|
||||
|
||||
// register team and add captain
|
||||
objmgr.AddArenaTeam(at);
|
||||
sObjectMgr.AddArenaTeam(at);
|
||||
sLog.outDebug("PetitonsHandler: arena team added to objmrg");
|
||||
|
||||
// add members
|
||||
|
||||
@@ -127,7 +127,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket & recv_data)
|
||||
|
||||
recv_data >> guid;
|
||||
|
||||
Player *pChar = objmgr.GetPlayer(guid);
|
||||
Player *pChar = sObjectMgr.GetPlayer(guid);
|
||||
|
||||
if (pChar)
|
||||
SendNameQueryOpcode(pChar);
|
||||
@@ -156,7 +156,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
CreatureInfo const *ci = objmgr.GetCreatureTemplate(entry);
|
||||
CreatureInfo const *ci = sObjectMgr.GetCreatureTemplate(entry);
|
||||
if (ci)
|
||||
{
|
||||
|
||||
@@ -167,7 +167,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
CreatureLocale const *cl = objmgr.GetCreatureLocale(entry);
|
||||
CreatureLocale const *cl = sObjectMgr.GetCreatureLocale(entry);
|
||||
if (cl)
|
||||
{
|
||||
if (cl->Name.size() > size_t(loc_idx) && !cl->Name[loc_idx].empty())
|
||||
@@ -222,7 +222,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
|
||||
const GameObjectInfo *info = objmgr.GetGameObjectInfo(entryID);
|
||||
const GameObjectInfo *info = sObjectMgr.GetGameObjectInfo(entryID);
|
||||
if (info)
|
||||
{
|
||||
std::string Name;
|
||||
@@ -236,7 +236,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
GameObjectLocale const *gl = objmgr.GetGameObjectLocale(entryID);
|
||||
GameObjectLocale const *gl = sObjectMgr.GetGameObjectLocale(entryID);
|
||||
if (gl)
|
||||
{
|
||||
if (gl->Name.size() > size_t(loc_idx) && !gl->Name[loc_idx].empty())
|
||||
@@ -335,7 +335,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
recv_data >> guid;
|
||||
GetPlayer()->SetUInt64Value(UNIT_FIELD_TARGET, guid);
|
||||
|
||||
GossipText const* pGossip = objmgr.GetGossipText(textID);
|
||||
GossipText const* pGossip = sObjectMgr.GetGossipText(textID);
|
||||
|
||||
WorldPacket data(SMSG_NPC_TEXT_UPDATE, 100); // guess size
|
||||
data << textID;
|
||||
@@ -368,7 +368,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textID);
|
||||
NpcTextLocale const *nl = sObjectMgr.GetNpcTextLocale(textID);
|
||||
if (nl)
|
||||
{
|
||||
for (int i = 0; i < 8; ++i)
|
||||
@@ -439,7 +439,7 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
|
||||
int loc_idx = GetSessionDbLocaleIndex();
|
||||
if (loc_idx >= 0)
|
||||
{
|
||||
PageTextLocale const *pl = objmgr.GetPageTextLocale(pageID);
|
||||
PageTextLocale const *pl = sObjectMgr.GetPageTextLocale(pageID);
|
||||
if (pl)
|
||||
{
|
||||
if (pl->Text.size() > size_t(loc_idx) && !pl->Text[loc_idx].empty())
|
||||
@@ -497,7 +497,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
|
||||
if (questOk)
|
||||
{
|
||||
QuestPOIVector const *POI = objmgr.GetQuestPOIVector(questId);
|
||||
QuestPOIVector const *POI = sObjectMgr.GetQuestPOIVector(questId);
|
||||
|
||||
if (POI)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
Quest const* qInfo = objmgr.GetQuestTemplate(quest);
|
||||
Quest const* qInfo = sObjectMgr.GetQuestTemplate(quest);
|
||||
if (qInfo)
|
||||
{
|
||||
// prevent cheating
|
||||
@@ -243,7 +243,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
Quest const* pQuest = objmgr.GetQuestTemplate(quest);
|
||||
Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest);
|
||||
if (pQuest)
|
||||
{
|
||||
if (pQuest->IsAutoAccept() && _player->CanAddQuest(pQuest, true))
|
||||
@@ -266,7 +266,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data)
|
||||
recv_data >> quest;
|
||||
sLog.outDebug("WORLD: Received CMSG_QUEST_QUERY quest = %u",quest);
|
||||
|
||||
Quest const *pQuest = objmgr.GetQuestTemplate(quest);
|
||||
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
|
||||
if (pQuest)
|
||||
{
|
||||
_player->PlayerTalkClass->SendQuestQueryResponse(pQuest);
|
||||
@@ -297,7 +297,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
|
||||
if (!pObject->hasInvolvedQuest(quest))
|
||||
return;
|
||||
|
||||
Quest const *pQuest = objmgr.GetQuestTemplate(quest);
|
||||
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
|
||||
if (pQuest)
|
||||
{
|
||||
if (_player->CanRewardQuest(pQuest, reward, true))
|
||||
@@ -350,7 +350,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
|
||||
if (_player->GetQuestStatus(quest) != QUEST_STATUS_COMPLETE)
|
||||
return;
|
||||
|
||||
if (Quest const *pQuest = objmgr.GetQuestTemplate(quest))
|
||||
if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
|
||||
}
|
||||
|
||||
@@ -388,7 +388,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 = objmgr.GetQuestTemplate(quest))
|
||||
if (const Quest *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||
{
|
||||
if (pQuest->HasFlag(QUEST_TRINITY_FLAGS_TIMED))
|
||||
_player->RemoveTimedQuest(quest);
|
||||
@@ -412,7 +412,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
||||
|
||||
sLog.outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
|
||||
|
||||
if (const Quest* pQuest = objmgr.GetQuestTemplate(quest))
|
||||
if (const Quest* pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||
{
|
||||
if (!pQuest->HasFlag(QUEST_FLAGS_PARTY_ACCEPT))
|
||||
return;
|
||||
@@ -451,7 +451,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 = objmgr.GetQuestTemplate(quest);
|
||||
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
|
||||
if (pQuest)
|
||||
{
|
||||
// TODO: need a virtual function
|
||||
@@ -489,7 +489,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
|
||||
|
||||
sLog.outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
|
||||
|
||||
if (Quest const *pQuest = objmgr.GetQuestTemplate(questId))
|
||||
if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(questId))
|
||||
{
|
||||
if (Group* pGroup = _player->GetGroup())
|
||||
{
|
||||
@@ -572,14 +572,14 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
|
||||
{
|
||||
case TYPEID_GAMEOBJECT:
|
||||
{
|
||||
qir = &objmgr.mGOQuestInvolvedRelations;
|
||||
qr = &objmgr.mGOQuestRelations;
|
||||
qir = &sObjectMgr.mGOQuestInvolvedRelations;
|
||||
qr = &sObjectMgr.mGOQuestRelations;
|
||||
break;
|
||||
}
|
||||
case TYPEID_UNIT:
|
||||
{
|
||||
qir = &objmgr.mCreatureQuestInvolvedRelations;
|
||||
qr = &objmgr.mCreatureQuestRelations;
|
||||
qir = &sObjectMgr.mCreatureQuestInvolvedRelations;
|
||||
qr = &sObjectMgr.mCreatureQuestRelations;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -592,7 +592,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
|
||||
{
|
||||
uint32 result2 = 0;
|
||||
uint32 quest_id = i->second;
|
||||
Quest const *pQuest = objmgr.GetQuestTemplate(quest_id);
|
||||
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id);
|
||||
if (!pQuest) continue;
|
||||
|
||||
QuestStatus status = pPlayer->GetQuestStatus(quest_id);
|
||||
@@ -615,7 +615,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
|
||||
{
|
||||
uint32 result2 = 0;
|
||||
uint32 quest_id = i->second;
|
||||
Quest const *pQuest = objmgr.GetQuestTemplate(quest_id);
|
||||
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest_id);
|
||||
if (!pQuest)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -358,7 +358,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
|
||||
// auto-selection buff level base at target level (in spellInfo)
|
||||
if (targets.getUnitTarget())
|
||||
{
|
||||
SpellEntry const *actualSpellInfo = spellmgr.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)
|
||||
@@ -527,7 +527,7 @@ void WorldSession::HandleSpellClick(WorldPacket & recv_data)
|
||||
if (!unit->IsInWorld())
|
||||
return;
|
||||
|
||||
SpellClickInfoMapBounds clickPair = objmgr.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))
|
||||
|
||||
@@ -51,7 +51,7 @@ void WorldSession::SendTaxiStatus(uint64 guid)
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 curloc = objmgr.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)
|
||||
@@ -96,7 +96,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
|
||||
void WorldSession::SendTaxiMenu(Creature* unit)
|
||||
{
|
||||
// find current node
|
||||
uint32 curloc = objmgr.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;
|
||||
@@ -136,7 +136,7 @@ void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathN
|
||||
bool WorldSession::SendLearnNewTaxiNode(Creature* unit)
|
||||
{
|
||||
// find current node
|
||||
uint32 curloc = objmgr.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.
|
||||
@@ -257,10 +257,10 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
|
||||
|
||||
sLog.outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
|
||||
|
||||
uint32 mountDisplayId = objmgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
|
||||
uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
|
||||
|
||||
uint32 path, cost;
|
||||
objmgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
|
||||
sObjectMgr.GetTaxiPath(sourcenode, destinationnode, path, cost);
|
||||
|
||||
if (path && mountDisplayId)
|
||||
SendDoFlight(mountDisplayId, path, 1); // skip start fly node
|
||||
|
||||
@@ -33,7 +33,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
if (GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
|
||||
if (GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
|
||||
{
|
||||
WorldPacket data(SMSG_GMTICKET_CREATE, 4);
|
||||
data << uint32(1); // 1 - You already have GM ticket
|
||||
@@ -57,7 +57,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
|
||||
|
||||
GM_Ticket *ticket = new GM_Ticket;
|
||||
ticket->name = GetPlayer()->GetName();
|
||||
ticket->guid = objmgr.GenerateGMTicketId();
|
||||
ticket->guid = sObjectMgr.GenerateGMTicketId();
|
||||
ticket->playerGuid = GetPlayer()->GetGUID();
|
||||
ticket->message = ticketText;
|
||||
ticket->createtime = time(NULL);
|
||||
@@ -70,7 +70,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
|
||||
ticket->assignedToGM = 0;
|
||||
ticket->comment = "";
|
||||
|
||||
objmgr.AddOrUpdateGMTicket(*ticket, true);
|
||||
sObjectMgr.AddOrUpdateGMTicket(*ticket, true);
|
||||
|
||||
data << uint32(2);
|
||||
SendPacket(&data);
|
||||
@@ -86,7 +86,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
|
||||
std::string message;
|
||||
recv_data >> message;
|
||||
|
||||
GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
if (!ticket)
|
||||
{
|
||||
data << uint32(1);
|
||||
@@ -97,7 +97,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
|
||||
ticket->message = message;
|
||||
ticket->timestamp = time(NULL);
|
||||
|
||||
objmgr.AddOrUpdateGMTicket(*ticket);
|
||||
sObjectMgr.AddOrUpdateGMTicket(*ticket);
|
||||
|
||||
data << uint32(2);
|
||||
SendPacket(&data);
|
||||
@@ -108,7 +108,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
|
||||
|
||||
void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
GM_Ticket* ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
GM_Ticket* ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
|
||||
if (ticket)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
|
||||
SendPacket(&data);
|
||||
|
||||
sWorld.SendGMText(LANG_COMMAND_TICKETPLAYERABANDON, GetPlayer()->GetName(), ticket->guid);
|
||||
objmgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
|
||||
sObjectMgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
|
||||
SendGMTicketGetTicket(0x0A, 0);
|
||||
}
|
||||
}
|
||||
@@ -126,7 +126,7 @@ void WorldSession::HandleGMTicketGetTicketOpcode(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
SendQueryTimeResponse();
|
||||
|
||||
GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
GM_Ticket *ticket = sObjectMgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
if (ticket)
|
||||
SendGMTicketGetTicket(0x06, ticket->message.c_str());
|
||||
else
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale) :
|
||||
LookingForGroup_auto_join(false), LookingForGroup_auto_add(false), m_muteTime(mute_time),
|
||||
_player(NULL), m_Socket(sock),_security(sec), _accountId(id), m_expansion(expansion),
|
||||
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(objmgr.GetIndexForLocale(locale)),
|
||||
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(sObjectMgr.GetIndexForLocale(locale)),
|
||||
_logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false),
|
||||
m_latency(0), m_TutorialsChanged(false), m_timeOutTime(0)
|
||||
{
|
||||
@@ -407,7 +407,7 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
HandleMoveWorldportAckOpcode();
|
||||
|
||||
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
|
||||
Guild *guild = objmgr.GetGuildById(_player->GetGuildId());
|
||||
Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
|
||||
if (guild)
|
||||
{
|
||||
guild->SetMemberStats(_player->GetGUID());
|
||||
@@ -527,7 +527,7 @@ void WorldSession::SendNotification(int32 string_id,...)
|
||||
|
||||
const char * WorldSession::GetTrinityString(int32 entry) const
|
||||
{
|
||||
return objmgr.GetTrinityString(entry,GetSessionDbLocaleIndex());
|
||||
return sObjectMgr.GetTrinityString(entry,GetSessionDbLocaleIndex());
|
||||
}
|
||||
|
||||
void WorldSession::Handle_NULL(WorldPacket& recvPacket)
|
||||
|
||||
Reference in New Issue
Block a user