mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr * spellmgr -> sSpellMgr * WaypointMgr -> sWaypointMgr * poolhandler -> sPoolMgr * objaccessor -> sObjectAccessor * mapmgr -> sMapMgr * sInstanceSaveManager -> sInstanceSaveMgr * ticketmgr -> sTicketMgr * CreatureEAI_Mgr -> sEventAIMgr * auctionmgr -> sAuctionMgr * achievementmgr -> sAchievementMgr
This commit is contained in:
parent
539072fcbd
commit
0734adb746
84 changed files with 1113 additions and 1113 deletions
|
|
@ -698,7 +698,7 @@ bool ChatHandler::HasLowerSecurity(Player* target, uint64 guid, bool strong)
|
|||
if (target)
|
||||
target_session = target->GetSession();
|
||||
else if (guid)
|
||||
target_account = objmgr.GetPlayerAccountIdByGUID(guid);
|
||||
target_account = sObjectMgr.GetPlayerAccountIdByGUID(guid);
|
||||
|
||||
if(!target_session && !target_account)
|
||||
{
|
||||
|
|
@ -1243,7 +1243,7 @@ valid examples:
|
|||
c = reader.peek();
|
||||
}
|
||||
|
||||
linkedQuest = objmgr.GetQuestTemplate(questid);
|
||||
linkedQuest = sObjectMgr.GetQuestTemplate(questid);
|
||||
|
||||
if(!linkedQuest)
|
||||
{
|
||||
|
|
@ -1414,7 +1414,7 @@ valid examples:
|
|||
if (linkedSpell->Attributes & SPELL_ATTR_TRADESPELL)
|
||||
{
|
||||
// lookup skillid
|
||||
SkillLineAbilityMapBounds bounds = spellmgr.GetSkillLineAbilityMapBounds(linkedSpell->Id);
|
||||
SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(linkedSpell->Id);
|
||||
if (bounds.first == bounds.second)
|
||||
{
|
||||
return false;
|
||||
|
|
@ -1461,7 +1461,7 @@ valid examples:
|
|||
{
|
||||
if (linkedQuest->GetTitle() != buffer)
|
||||
{
|
||||
QuestLocale const *ql = objmgr.GetQuestLocale(linkedQuest->GetQuestId());
|
||||
QuestLocale const *ql = sObjectMgr.GetQuestLocale(linkedQuest->GetQuestId());
|
||||
|
||||
if (!ql)
|
||||
{
|
||||
|
|
@ -1502,12 +1502,12 @@ valid examples:
|
|||
|
||||
if (expectedName != buffer)
|
||||
{
|
||||
ItemLocale const *il = objmgr.GetItemLocale(linkedItem->ItemId);
|
||||
ItemLocale const *il = sObjectMgr.GetItemLocale(linkedItem->ItemId);
|
||||
|
||||
bool foundName = false;
|
||||
for(uint8 i=LOCALE_koKR; i<MAX_LOCALE; ++i)
|
||||
{
|
||||
int8 dbIndex = objmgr.GetIndexForLocale(LocaleConstant(i));
|
||||
int8 dbIndex = sObjectMgr.GetIndexForLocale(LocaleConstant(i));
|
||||
if (dbIndex == -1 || il == NULL || dbIndex >= il->Name.size())
|
||||
// using strange database/client combinations can lead to this case
|
||||
expectedName = linkedItem->Name1;
|
||||
|
|
@ -1758,7 +1758,7 @@ Player * ChatHandler::getSelectedPlayer()
|
|||
if (guid == 0)
|
||||
return m_session->GetPlayer();
|
||||
|
||||
return objmgr.GetPlayer(guid);
|
||||
return sObjectMgr.GetPlayer(guid);
|
||||
}
|
||||
|
||||
Unit* ChatHandler::getSelectedUnit()
|
||||
|
|
@ -1935,7 +1935,7 @@ GameObject* ChatHandler::GetObjectGlobalyWithGuidOrNearWithDbGuid(uint32 lowguid
|
|||
|
||||
GameObject* obj = pl->GetMap()->GetGameObject(MAKE_NEW_GUID(lowguid, entry, HIGHGUID_GAMEOBJECT));
|
||||
|
||||
if(!obj && objmgr.GetGOData(lowguid)) // guid is DB guid of object
|
||||
if(!obj && sObjectMgr.GetGOData(lowguid)) // guid is DB guid of object
|
||||
{
|
||||
// search near player then
|
||||
CellPair p(MaNGOS::ComputeCellPair(pl->GetPositionX(), pl->GetPositionY()));
|
||||
|
|
@ -2036,9 +2036,9 @@ GameTele const* ChatHandler::extractGameTeleFromLink(char* text)
|
|||
// id case (explicit or from shift link)
|
||||
if(cId[0] >= '0' || cId[0] >= '9')
|
||||
if(uint32 id = atoi(cId))
|
||||
return objmgr.GetGameTele(id);
|
||||
return sObjectMgr.GetGameTele(id);
|
||||
|
||||
return objmgr.GetGameTele(cId);
|
||||
return sObjectMgr.GetGameTele(cId);
|
||||
}
|
||||
|
||||
enum GuidLinkType
|
||||
|
|
@ -2075,10 +2075,10 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
|
|||
if(!normalizePlayerName(name))
|
||||
return 0;
|
||||
|
||||
if(Player* player = objmgr.GetPlayer(name.c_str()))
|
||||
if(Player* player = sObjectMgr.GetPlayer(name.c_str()))
|
||||
return player->GetGUID();
|
||||
|
||||
if(uint64 guid = objmgr.GetPlayerGUIDByName(name))
|
||||
if(uint64 guid = sObjectMgr.GetPlayerGUIDByName(name))
|
||||
return guid;
|
||||
|
||||
return 0;
|
||||
|
|
@ -2087,7 +2087,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
|
|||
{
|
||||
uint32 lowguid = (uint32)atol(idS);
|
||||
|
||||
if(CreatureData const* data = objmgr.GetCreatureData(lowguid) )
|
||||
if(CreatureData const* data = sObjectMgr.GetCreatureData(lowguid) )
|
||||
return MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_UNIT);
|
||||
else
|
||||
return 0;
|
||||
|
|
@ -2096,7 +2096,7 @@ uint64 ChatHandler::extractGuidFromLink(char* text)
|
|||
{
|
||||
uint32 lowguid = (uint32)atol(idS);
|
||||
|
||||
if(GameObjectData const* data = objmgr.GetGOData(lowguid) )
|
||||
if(GameObjectData const* data = sObjectMgr.GetGOData(lowguid) )
|
||||
return MAKE_NEW_GUID(lowguid,data->id,HIGHGUID_GAMEOBJECT);
|
||||
else
|
||||
return 0;
|
||||
|
|
@ -2133,14 +2133,14 @@ bool ChatHandler::extractPlayerTarget(char* args, Player** player, uint64* playe
|
|||
return false;
|
||||
}
|
||||
|
||||
Player* pl = objmgr.GetPlayer(name.c_str());
|
||||
Player* pl = sObjectMgr.GetPlayer(name.c_str());
|
||||
|
||||
// if allowed player pointer
|
||||
if(player)
|
||||
*player = pl;
|
||||
|
||||
// if need guid value from DB (in name case for check player existence)
|
||||
uint64 guid = !pl && (player_guid || player_name) ? objmgr.GetPlayerGUIDByName(name) : 0;
|
||||
uint64 guid = !pl && (player_guid || player_name) ? sObjectMgr.GetPlayerGUIDByName(name) : 0;
|
||||
|
||||
// if allowed player guid (if no then only online players allowed)
|
||||
if(player_guid)
|
||||
|
|
@ -2226,7 +2226,7 @@ int ChatHandler::GetSessionDbLocaleIndex() const
|
|||
|
||||
const char *CliHandler::GetMangosString(int32 entry) const
|
||||
{
|
||||
return objmgr.GetMangosStringForDBCLocale(entry);
|
||||
return sObjectMgr.GetMangosStringForDBCLocale(entry);
|
||||
}
|
||||
|
||||
bool CliHandler::isAvailable(ChatCommand const& cmd) const
|
||||
|
|
@ -2258,5 +2258,5 @@ LocaleConstant CliHandler::GetSessionDbcLocale() const
|
|||
|
||||
int CliHandler::GetSessionDbLocaleIndex() const
|
||||
{
|
||||
return objmgr.GetDBCLocaleIndex();
|
||||
return sObjectMgr.GetDBCLocaleIndex();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue