mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Don't use singleton to access static functions.
* This affects especially ObjectMgr functions: - GetCreatureInfo - GetGameObjectInfo - GetInstanceTemplate These are in fact static functions.
This commit is contained in:
parent
34dab079c4
commit
1f23884757
40 changed files with 104 additions and 104 deletions
|
|
@ -621,7 +621,7 @@ void GameEventMgr::GameEventUnspawn(int16 event_id)
|
|||
{
|
||||
objmgr.RemoveGameobjectFromGrid(*itr, data);
|
||||
|
||||
if( GameObject* pGameobject = ObjectAccessor::Instance().GetGameObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT)) )
|
||||
if( GameObject* pGameobject = ObjectAccessor::GetGameObjectInWorld(MAKE_NEW_GUID(*itr, data->id, HIGHGUID_GAMEOBJECT)) )
|
||||
pGameobject->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
|
|
@ -688,7 +688,7 @@ void GameEventMgr::ChangeEquipOrModel(int16 event_id, bool activate)
|
|||
CreatureData const* data2 = objmgr.GetCreatureData(itr->first);
|
||||
if (data2 && activate)
|
||||
{
|
||||
CreatureInfo const *cinfo = objmgr.GetCreatureTemplate(data2->id);
|
||||
CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(data2->id);
|
||||
uint32 display_id = objmgr.ChooseDisplayId(0,cinfo,data2);
|
||||
CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
|
||||
if (minfo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue