mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 22:37:04 +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
|
|
@ -255,7 +255,7 @@ bool Item::Create( uint32 guidlow, uint32 itemid, Player const* owner)
|
|||
SetUInt64Value(ITEM_FIELD_OWNER, owner ? owner->GetGUID() : 0);
|
||||
SetUInt64Value(ITEM_FIELD_CONTAINED, owner ? owner->GetGUID() : 0);
|
||||
|
||||
ItemPrototype const *itemProto = objmgr.GetItemPrototype(itemid);
|
||||
ItemPrototype const *itemProto = ObjectMgr::GetItemPrototype(itemid);
|
||||
if(!itemProto)
|
||||
return false;
|
||||
|
||||
|
|
@ -441,7 +441,7 @@ void Item::DeleteFromInventoryDB()
|
|||
|
||||
ItemPrototype const *Item::GetProto() const
|
||||
{
|
||||
return objmgr.GetItemPrototype(GetEntry());
|
||||
return ObjectMgr::GetItemPrototype(GetEntry());
|
||||
}
|
||||
|
||||
Player* Item::GetOwner()const
|
||||
|
|
@ -936,7 +936,7 @@ Item* Item::CreateItem( uint32 item, uint32 count, Player const* player )
|
|||
if ( count < 1 )
|
||||
return NULL; //don't create item at zero count
|
||||
|
||||
ItemPrototype const *pProto = objmgr.GetItemPrototype( item );
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype( item );
|
||||
if( pProto )
|
||||
{
|
||||
if ( count > pProto->GetMaxStackSize())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue