Core/ObjectMgr: Static members are no longer accessed through singleton
--HG-- branch : trunk
This commit is contained in:
@@ -248,7 +248,7 @@ bool LootStoreItem::Roll(bool rate) const
|
||||
if (mincountOrRef < 0) // reference case
|
||||
return roll_chance_f(chance* (rate ? sWorld.getRate(RATE_DROP_ITEM_REFERENCED) : 1.0f));
|
||||
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(itemid);
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(itemid);
|
||||
|
||||
float qualityModifier = pProto && rate ? sWorld.getRate(qualityToRate[pProto->Quality]) : 1.0f;
|
||||
|
||||
@@ -272,7 +272,7 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const
|
||||
|
||||
if (mincountOrRef > 0) // item (quest or non-quest) entry, maybe grouped
|
||||
{
|
||||
ItemPrototype const *proto = sObjectMgr.GetItemPrototype(itemid);
|
||||
ItemPrototype const *proto = ObjectMgr::GetItemPrototype(itemid);
|
||||
if (!proto)
|
||||
{
|
||||
sLog.outErrorDb("Table '%s' entry %d item %d: item entry not listed in `item_template` - skipped", store.GetName(), entry, itemid);
|
||||
@@ -322,7 +322,7 @@ LootItem::LootItem(LootStoreItem const& li)
|
||||
itemid = li.itemid;
|
||||
conditions = li.conditions;
|
||||
|
||||
ItemPrototype const* proto = sObjectMgr.GetItemPrototype(itemid);
|
||||
ItemPrototype const* proto = ObjectMgr::GetItemPrototype(itemid);
|
||||
freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT);
|
||||
|
||||
needs_quest = li.needs_quest;
|
||||
@@ -400,7 +400,7 @@ void Loot::AddItem(LootStoreItem const & item)
|
||||
// non-ffa conditionals are counted in FillNonQuestNonFFAConditionalLoot()
|
||||
if (item.conditions.empty())
|
||||
{
|
||||
ItemPrototype const* proto = sObjectMgr.GetItemPrototype(item.itemid);
|
||||
ItemPrototype const* proto = ObjectMgr::GetItemPrototype(item.itemid);
|
||||
if (!proto || (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT) == 0)
|
||||
++unlootedCount;
|
||||
}
|
||||
@@ -789,7 +789,7 @@ ByteBuffer& operator<<(ByteBuffer& b, LootItem const& li)
|
||||
{
|
||||
b << uint32(li.itemid);
|
||||
b << uint32(li.count); // nr of items of this type
|
||||
b << uint32(sObjectMgr.GetItemPrototype(li.itemid)->DisplayInfoID);
|
||||
b << uint32(ObjectMgr::GetItemPrototype(li.itemid)->DisplayInfoID);
|
||||
b << uint32(li.randomSuffix);
|
||||
b << uint32(li.randomPropertyId);
|
||||
//b << uint8(0); // slot type - will send after this function call
|
||||
|
||||
Reference in New Issue
Block a user