Core/ObjectMgr: Static members are no longer accessed through singleton

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-12-22 20:23:47 +01:00
parent 446c300505
commit 7b4e1c6387
43 changed files with 123 additions and 128 deletions
@@ -70,7 +70,7 @@ void Bag::RemoveFromWorld()
bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
{
ItemPrototype const * itemProto = sObjectMgr.GetItemPrototype(itemid);
ItemPrototype const * itemProto = ObjectMgr::GetItemPrototype(itemid);
if (!itemProto || itemProto->ContainerSlots > MAX_BAG_SIZE)
return false;
+3 -3
View File
@@ -265,7 +265,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 = sObjectMgr.GetItemPrototype(itemid);
ItemPrototype const *itemProto = ObjectMgr::GetItemPrototype(itemid);
if (!itemProto)
return false;
@@ -467,7 +467,7 @@ void Item::DeleteFromInventoryDB(SQLTransaction& trans)
ItemPrototype const *Item::GetProto() const
{
return sObjectMgr.GetItemPrototype(GetEntry());
return ObjectMgr::GetItemPrototype(GetEntry());
}
Player* Item::GetOwner()const
@@ -1006,7 +1006,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 = sObjectMgr.GetItemPrototype(item);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item);
if (pProto)
{
if (count > pProto->GetMaxStackSize())
@@ -120,7 +120,7 @@ uint32 GetItemEnchantMod(int32 entry)
uint32 GenerateEnchSuffixFactor(uint32 item_id)
{
ItemPrototype const *itemProto = sObjectMgr.GetItemPrototype(item_id);
ItemPrototype const *itemProto = ObjectMgr::GetItemPrototype(item_id);
if (!itemProto)
return 0;