Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG-- branch : trunk
This commit is contained in:
@@ -1601,7 +1601,7 @@ void WorldObject::MonsterTextEmote(const char* text, uint64 TargetGuid, bool IsB
|
||||
|
||||
void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossWhisper)
|
||||
{
|
||||
Player *player = sObjectMgr.GetPlayer(receiver);
|
||||
Player *player = sObjectMgr->GetPlayer(receiver);
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
@@ -1876,7 +1876,7 @@ namespace Trinity
|
||||
: i_object(obj), i_msgtype(msgtype), i_textId(textId), i_language(language), i_targetGUID(targetGUID) {}
|
||||
void operator()(WorldPacket& data, LocaleConstant loc_idx)
|
||||
{
|
||||
char const* text = sObjectMgr.GetTrinityString(i_textId,loc_idx);
|
||||
char const* text = sObjectMgr->GetTrinityString(i_textId,loc_idx);
|
||||
|
||||
// TODO: i_object.GetName() also must be localized?
|
||||
i_object.BuildMonsterChat(&data,i_msgtype,text,i_language,i_object.GetNameForLocaleIdx(loc_idx),i_targetGUID);
|
||||
@@ -1951,12 +1951,12 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
|
||||
|
||||
void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper)
|
||||
{
|
||||
Player *player = sObjectMgr.GetPlayer(receiver);
|
||||
Player *player = sObjectMgr->GetPlayer(receiver);
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
LocaleConstant loc_idx = player->GetSession()->GetSessionDbLocaleIndex();
|
||||
char const* text = sObjectMgr.GetTrinityString(textId, loc_idx);
|
||||
char const* text = sObjectMgr->GetTrinityString(textId, loc_idx);
|
||||
|
||||
WorldPacket data(SMSG_MESSAGECHAT, 200);
|
||||
BuildMonsterChat(&data,IsBossWhisper ? CHAT_MSG_RAID_BOSS_WHISPER : CHAT_MSG_MONSTER_WHISPER,text,LANG_UNIVERSAL,GetNameForLocaleIdx(loc_idx),receiver);
|
||||
@@ -2111,7 +2111,7 @@ TempSummon *Map::SummonCreature(uint32 entry, const Position &pos, SummonPropert
|
||||
default: return NULL;
|
||||
}
|
||||
|
||||
if (!summon->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
|
||||
if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
|
||||
{
|
||||
delete summon;
|
||||
return NULL;
|
||||
@@ -2135,7 +2135,7 @@ void WorldObject::SetZoneScript()
|
||||
if (map->IsDungeon())
|
||||
m_zoneScript = (ZoneScript*)((InstanceMap*)map)->GetInstanceScript();
|
||||
else if (!map->IsBattlegroundOrArena())
|
||||
m_zoneScript = sOutdoorPvPMgr.GetZoneScript(GetZoneId());
|
||||
m_zoneScript = sOutdoorPvPMgr->GetZoneScript(GetZoneId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2194,8 +2194,8 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
}
|
||||
|
||||
Map *map = GetMap();
|
||||
uint32 pet_number = sObjectMgr.GeneratePetNumber();
|
||||
if (!pet->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
|
||||
uint32 pet_number = sObjectMgr->GeneratePetNumber();
|
||||
if (!pet->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_PET), map, GetPhaseMask(), entry, pet_number))
|
||||
{
|
||||
sLog.outError("no such creature entry %u", entry);
|
||||
delete pet;
|
||||
@@ -2279,7 +2279,7 @@ GameObject* WorldObject::SummonGameObject(uint32 entry, float x, float y, float
|
||||
}
|
||||
Map *map = GetMap();
|
||||
GameObject *go = new GameObject();
|
||||
if (!go->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x,y,z,ang,rotation0,rotation1,rotation2,rotation3,100,GO_STATE_READY))
|
||||
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), entry, map, GetPhaseMask(), x,y,z,ang,rotation0,rotation1,rotation2,rotation3,100,GO_STATE_READY))
|
||||
{
|
||||
delete go;
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user