diff options
| author | Shauren <none@none> | 2010-12-22 20:23:47 +0100 |
|---|---|---|
| committer | Shauren <none@none> | 2010-12-22 20:23:47 +0100 |
| commit | 7b4e1c6387a6787c2b2822494abae6b717f24547 (patch) | |
| tree | e336ea590dc6fc1520f33d3279eb36bb572fa3b1 /src/server/game/Entities/Player | |
| parent | 446c30050583bf1605ca6b402020fb68fcdc85d4 (diff) | |
Core/ObjectMgr: Static members are no longer accessed through singleton
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Entities/Player')
| -rwxr-xr-x | src/server/game/Entities/Player/Player.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index b3f9b351ad7..d58ed174ac1 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -869,7 +869,7 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c uint32 item_id = oEntry->ItemId[j]; // just skip, reported in ObjectMgr::LoadItemPrototypes - ItemPrototype const* iProto = sObjectMgr.GetItemPrototype(item_id); + ItemPrototype const* iProto = ObjectMgr::GetItemPrototype(item_id); if (!iProto) continue; @@ -1692,7 +1692,7 @@ bool Player::BuildEnumData(QueryResult result, WorldPacket * p_data) { uint32 visualbase = slot * 2; uint32 item_id = GetUInt32ValueFromArray(data, visualbase); - const ItemPrototype * proto = sObjectMgr.GetItemPrototype(item_id); + const ItemPrototype * proto = ObjectMgr::GetItemPrototype(item_id); if (!proto) { *p_data << uint32(0); @@ -4547,7 +4547,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC uint32 item_guidlow = fields[11].GetUInt32(); uint32 item_template = fields[12].GetUInt32(); - ItemPrototype const* itemProto = sObjectMgr.GetItemPrototype(item_template); + ItemPrototype const* itemProto = ObjectMgr::GetItemPrototype(item_template); if (!itemProto) { PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_ITEM_INSTANCE); @@ -6364,7 +6364,7 @@ bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type) } break; case ACTION_BUTTON_ITEM: - if (!sObjectMgr.GetItemPrototype(action)) + if (!ObjectMgr::GetItemPrototype(action)) { sLog.outError( "Item action %u not added into button %u for player %s: item not exist", action, button, GetName() ); return false; @@ -6678,7 +6678,7 @@ void Player::RewardReputation(Unit *pVictim, float rate) Map const *pMap = GetMap(); if (pMap && pMap->IsDungeon()) { - InstanceTemplate const *pInstance = sObjectMgr.GetInstanceTemplate(pMap->GetId()); + InstanceTemplate const *pInstance = ObjectMgr::GetInstanceTemplate(pMap->GetId()); if (pInstance) { AccessRequirement const *pAccessRequirement = sObjectMgr.GetAccessRequirement(pMap->GetId(), ((InstanceMap*)pMap)->GetDifficulty()); @@ -8245,7 +8245,7 @@ void Player::_ApplyAmmoBonuses() float currentAmmoDPS; - ItemPrototype const *ammo_proto = sObjectMgr.GetItemPrototype(ammo_id); + ItemPrototype const *ammo_proto = ObjectMgr::GetItemPrototype(ammo_id); if (!ammo_proto || ammo_proto->Class != ITEM_CLASS_PROJECTILE || !CheckAmmoCompatibility(ammo_proto)) currentAmmoDPS = 0.0f; else @@ -9966,7 +9966,7 @@ bool Player::HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_ } } - ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item); + ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item); if (pProto && pProto->GemProperties) { for (uint8 i = EQUIPMENT_SLOT_START; i < EQUIPMENT_SLOT_END; ++i) @@ -10023,7 +10023,7 @@ bool Player::HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 uint8 Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count) const { - ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(entry); + ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(entry); if (!pProto) { if (no_space_count) @@ -10304,7 +10304,7 @@ uint8 Player::_CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 { sLog.outDebug("STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count); - ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(entry); + ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(entry); if (!pProto) { if (no_space_count) @@ -11479,7 +11479,7 @@ uint8 Player::CanUseAmmo(uint32 item) const return EQUIP_ERR_YOU_ARE_DEAD; //if (isStunned()) // return EQUIP_ERR_YOU_ARE_STUNNED; - ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item); + ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item); if (pProto) { if (pProto->InventoryType!= INVTYPE_AMMO) @@ -12917,7 +12917,7 @@ void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid) case EQUIP_ERR_CANT_EQUIP_LEVEL_I: case EQUIP_ERR_PURCHASE_LEVEL_TOO_LOW: { - ItemPrototype const* proto = pItem ? pItem->GetProto() : sObjectMgr.GetItemPrototype(itemid); + ItemPrototype const* proto = pItem ? pItem->GetProto() : ObjectMgr::GetItemPrototype(itemid); data << uint32(proto ? proto->RequiredLevel : 0); break; } @@ -12932,7 +12932,7 @@ void Player::SendEquipError(uint8 msg, Item* pItem, Item *pItem2, uint32 itemid) case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_SOCKETED_EXCEEDED: case EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED: { - ItemPrototype const* proto = pItem ? pItem->GetProto() : sObjectMgr.GetItemPrototype(itemid); + ItemPrototype const* proto = pItem ? pItem->GetProto() : ObjectMgr::GetItemPrototype(itemid); data << uint32(proto ? proto->ItemLimitCategory : 0); break; } @@ -15510,7 +15510,7 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id) reqTarget = qInfo->ReqCreatureOrGOId[j]; if (reqTarget != entry) // if entry doesn't match, check for killcredits referenced in template { - CreatureInfo const *cinfo = sObjectMgr.GetCreatureTemplate(entry); + CreatureInfo const *cinfo = ObjectMgr::GetCreatureTemplate(entry); for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i) if (cinfo->KillCredit[i] == reqTarget) entry = cinfo->KillCredit[i]; @@ -15732,7 +15732,7 @@ bool Player::HasQuestForItem(uint32 itemid) const // examined item is a source item if (qinfo->ReqSourceId[j] == itemid) { - ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(itemid); + ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(itemid); // 'unique' item if (pProto->MaxCount && int32(GetItemCount(itemid, true)) < pProto->MaxCount) @@ -16928,7 +16928,7 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timediff) uint32 item_guid = fields[13].GetUInt32(); uint32 item_id = fields[14].GetUInt32(); - ItemPrototype const * proto = sObjectMgr.GetItemPrototype(item_id); + ItemPrototype const * proto = ObjectMgr::GetItemPrototype(item_id); if (!proto) { @@ -17149,7 +17149,7 @@ void Player::_LoadMailedItems(Mail *mail) mail->AddItem(item_guid_low, item_template); - ItemPrototype const *proto = sObjectMgr.GetItemPrototype(item_template); + ItemPrototype const *proto = ObjectMgr::GetItemPrototype(item_template); if (!proto) { @@ -17778,7 +17778,7 @@ bool Player::Satisfy(AccessRequirement const* ar, uint32 target_map, bool report else if (mapDiff->hasErrorMessage) // if (missingAchievement) covered by this case SendTransferAborted(target_map, TRANSFER_ABORT_DIFFICULTY, target_difficulty); else if (missingItem) - GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, sObjectMgr.GetItemPrototype(missingItem)->Name1); + GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED_AND_ITEM), LevelMin, ObjectMgr::GetItemPrototype(missingItem)->Name1); else if (LevelMin) GetSession()->SendAreaTriggerMessage(GetSession()->GetTrinityString(LANG_LEVEL_MINREQUIRED), LevelMin); } @@ -19922,7 +19922,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 if (!isAlive()) return false; - ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item); + ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item); if (!pProto) { SendBuyError(BUY_ERR_CANT_FIND_ITEM, NULL, item, 0); @@ -23090,7 +23090,7 @@ uint8 Player::CanEquipUniqueItem(Item* pItem, uint8 eslot, uint32 limit_count) c if (!enchantEntry) continue; - ItemPrototype const* pGem = sObjectMgr.GetItemPrototype(enchantEntry->GemID); + ItemPrototype const* pGem = ObjectMgr::GetItemPrototype(enchantEntry->GemID); if (!pGem) continue; |
