Conditions/DisableMgr: converted from singleton to namespace with free functions.

This commit is contained in:
Spp-
2011-09-09 14:27:23 +02:00
parent c4c9165428
commit 45af1238cf
13 changed files with 54 additions and 66 deletions
+3 -3
View File
@@ -2486,7 +2486,7 @@ void ObjectMgr::LoadItemTemplates()
else if (itemTemplate.Spells[1].SpellId != -1)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemTemplate.Spells[1].SpellId);
if (!spellInfo && !sDisableMgr->IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[1].SpellId, NULL))
if (!spellInfo && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[1].SpellId, NULL))
{
sLog->outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, 1+1, itemTemplate.Spells[1].SpellId);
itemTemplate.Spells[0].SpellId = 0;
@@ -2534,7 +2534,7 @@ void ObjectMgr::LoadItemTemplates()
if (itemTemplate.Spells[j].SpellId && itemTemplate.Spells[j].SpellId != -1)
{
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itemTemplate.Spells[j].SpellId);
if (!spellInfo && !sDisableMgr->IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[j].SpellId, NULL))
if (!spellInfo && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, itemTemplate.Spells[j].SpellId, NULL))
{
sLog->outErrorDb("Item (Entry: %u) has wrong (not existing) spell in spellid_%d (%d)", entry, j+1, itemTemplate.Spells[j].SpellId);
itemTemplate.Spells[j].SpellId = 0;
@@ -3752,7 +3752,7 @@ void ObjectMgr::LoadQuests()
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
{
// skip post-loading checks for disabled quests
if (sDisableMgr->IsDisabledFor(DISABLE_TYPE_QUEST, iter->first, NULL))
if (DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, iter->first, NULL))
continue;
Quest * qinfo = iter->second;