* Some singleton renames for consistency:
accmgr -> AccountMgr objmgr -> ObjectMgr auctionmgr -> sAuctionMgr spellmgr -> sSpellMgr CreatureEAI_Mgr -> sEventAIMgr achievementmgr -> sAchievementMgr gameeventmgr -> sGameEventMgr sInstanceSaveManager -> sInstanceSaveMgr poolhandler -> sPoolMgr --HG-- branch : trunk
This commit is contained in:
@@ -267,7 +267,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 = sObjectMgr.GetItemPrototype(itemid);
|
||||
if (!itemProto)
|
||||
return false;
|
||||
|
||||
@@ -483,12 +483,12 @@ void Item::DeleteFromInventoryDB()
|
||||
|
||||
ItemPrototype const *Item::GetProto() const
|
||||
{
|
||||
return objmgr.GetItemPrototype(GetEntry());
|
||||
return sObjectMgr.GetItemPrototype(GetEntry());
|
||||
}
|
||||
|
||||
Player* Item::GetOwner()const
|
||||
{
|
||||
return objmgr.GetPlayer(GetOwnerGUID());
|
||||
return sObjectMgr.GetPlayer(GetOwnerGUID());
|
||||
}
|
||||
|
||||
uint32 Item::GetSkill()
|
||||
@@ -829,7 +829,7 @@ bool Item::IsFitToSpellRequirements(SpellEntry const* spellInfo) const
|
||||
// Special case - accept vellum for armor/weapon requirements
|
||||
if ((spellInfo->EquippedItemClass == ITEM_CLASS_ARMOR && proto->IsArmorVellum())
|
||||
||(spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON && proto->IsWeaponVellum()))
|
||||
if (spellmgr.IsSkillTypeSpell(spellInfo->Id, SKILL_ENCHANTING)) // only for enchanting spells
|
||||
if (sSpellMgr.IsSkillTypeSpell(spellInfo->Id, SKILL_ENCHANTING)) // only for enchanting spells
|
||||
return true;
|
||||
|
||||
if (spellInfo->EquippedItemClass != int32(proto->Class))
|
||||
@@ -1022,7 +1022,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 = sObjectMgr.GetItemPrototype(item);
|
||||
if (pProto)
|
||||
{
|
||||
if (count > pProto->GetMaxStackSize())
|
||||
@@ -1031,7 +1031,7 @@ Item* Item::CreateItem(uint32 item, uint32 count, Player const* player)
|
||||
ASSERT(count !=0 && "pProto->Stackable == 0 but checked at loading already");
|
||||
|
||||
Item *pItem = NewItemOrBag(pProto);
|
||||
if (pItem->Create(objmgr.GenerateLowGuid(HIGHGUID_ITEM), item, player))
|
||||
if (pItem->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_ITEM), item, player))
|
||||
{
|
||||
pItem->SetCount(count);
|
||||
return pItem;
|
||||
|
||||
Reference in New Issue
Block a user