Core/ObjectMgr: Static members are no longer accessed through singleton
--HG-- branch : trunk
This commit is contained in:
1 parent
446c300505
commit
7b4e1c6387
43 files changed
+123
-128
No files matched your search
@@ -3885,7 +3885,7 @@ void Spell::SendCastResult(Player* caster, SpellEntry const* spellInfo, uint8 ca
|
||||
for (int8 x=0;x < 3;x++)
|
||||
if (spellInfo->EffectItemType[x])
|
||||
item = spellInfo->EffectItemType[x];
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item);
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item);
|
||||
if (pProto && pProto->ItemLimitCategory)
|
||||
data << uint32(pProto->ItemLimitCategory);
|
||||
break;
|
||||
@@ -4065,7 +4065,7 @@ void Spell::WriteAmmoToPacket(WorldPacket * data)
|
||||
uint32 ammoID = m_caster->ToPlayer()->GetUInt32Value(PLAYER_AMMO_ID);
|
||||
if (ammoID)
|
||||
{
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(ammoID);
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(ammoID);
|
||||
if (pProto)
|
||||
{
|
||||
ammoDisplayID = pProto->DisplayInfoID;
|
||||
@@ -5570,7 +5570,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells
|
||||
bool AllowMount = !m_caster->GetMap()->IsDungeon() || m_caster->GetMap()->IsBattlegroundOrArena();
|
||||
InstanceTemplate const *it = sObjectMgr.GetInstanceTemplate(m_caster->GetMapId());
|
||||
InstanceTemplate const *it = ObjectMgr::GetInstanceTemplate(m_caster->GetMapId());
|
||||
if (it)
|
||||
AllowMount = it->allowMount;
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !AllowMount && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId)
|
||||
@@ -6140,7 +6140,7 @@ SpellCastResult Spell::CheckItems()
|
||||
uint8 msg = p_caster->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, m_spellInfo->EffectItemType[i], 1);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(m_spellInfo->EffectItemType[i]);
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(m_spellInfo->EffectItemType[i]);
|
||||
// TODO: Needs review
|
||||
if (pProto && !(pProto->ItemLimitCategory))
|
||||
{
|
||||
@@ -6344,7 +6344,7 @@ SpellCastResult Spell::CheckItems()
|
||||
return SPELL_FAILED_NO_AMMO;
|
||||
}
|
||||
|
||||
ItemPrototype const *ammoProto = sObjectMgr.GetItemPrototype(ammo);
|
||||
ItemPrototype const *ammoProto = ObjectMgr::GetItemPrototype(ammo);
|
||||
if (!ammoProto)
|
||||
return SPELL_FAILED_NO_AMMO;
|
||||
|
||||
@@ -6383,7 +6383,7 @@ SpellCastResult Spell::CheckItems()
|
||||
case SPELL_EFFECT_CREATE_MANA_GEM:
|
||||
{
|
||||
uint32 item_id = m_spellInfo->EffectItemType[i];
|
||||
ItemPrototype const *pProto = sObjectMgr.GetItemPrototype(item_id);
|
||||
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item_id);
|
||||
|
||||
if (!pProto)
|
||||
return SPELL_FAILED_ITEM_AT_MAX_CHARGES;
|
||||
|
||||
Reference in new issue
Block a user