mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 22:37:02 +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
|
|
@ -483,7 +483,7 @@ bool ChatHandler::HandleGameObjectTargetCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
GameObjectInfo const* goI = objmgr.GetGameObjectInfo(id);
|
||||
GameObjectInfo const* goI = ObjectMgr::GetGameObjectInfo(id);
|
||||
|
||||
if (!goI)
|
||||
{
|
||||
|
|
@ -700,7 +700,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
|
|||
|
||||
char* spawntimeSecs = strtok(NULL, " ");
|
||||
|
||||
const GameObjectInfo *gInfo = objmgr.GetGameObjectInfo(id);
|
||||
const GameObjectInfo *gInfo = ObjectMgr::GetGameObjectInfo(id);
|
||||
|
||||
if (!gInfo)
|
||||
{
|
||||
|
|
@ -825,7 +825,7 @@ bool ChatHandler::HandleGameObjectNearCommand(const char* args)
|
|||
float z = fields[4].GetFloat();
|
||||
int mapid = fields[5].GetUInt16();
|
||||
|
||||
GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(entry);
|
||||
GameObjectInfo const * gInfo = ObjectMgr::GetGameObjectInfo(entry);
|
||||
|
||||
if(!gInfo)
|
||||
continue;
|
||||
|
|
@ -1142,7 +1142,7 @@ bool ChatHandler::HandleNpcAddVendorItemCommand(const char* args)
|
|||
|
||||
objmgr.AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
|
||||
|
||||
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
|
||||
ItemPrototype const* pProto = ObjectMgr::GetItemPrototype(itemId);
|
||||
|
||||
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,pProto->Name1,maxcount,incrtime,extendedcost);
|
||||
return true;
|
||||
|
|
@ -1178,7 +1178,7 @@ bool ChatHandler::HandleNpcDelVendorItemCommand(const char* args)
|
|||
return false;
|
||||
}
|
||||
|
||||
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
|
||||
ItemPrototype const* pProto = ObjectMgr::GetItemPrototype(itemId);
|
||||
|
||||
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,pProto->Name1);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue