From bb02504469a6c769caf39e2780326d32d2beeb91 Mon Sep 17 00:00:00 2001 From: LordJZ Date: Sun, 12 Aug 2012 08:12:32 +0400 Subject: [PATCH] Check some power-related auras for proper power ids. Affected: SPELL_AURA_MOD_INCREASE_ENERGY SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT SPELL_AURA_PERIODIC_MANA_LEECH SPELL_AURA_PERIODIC_ENERGIZE SPELL_AURA_POWER_BURN_MANA --- src/game/DBCStores.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index b3ebd1987..472ccf7d0 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -578,8 +578,21 @@ void LoadDBCStores(const std::string& dataPath) for(uint32 i = 1; i < sSpellEffectStore.GetNumRows(); ++i) { - if(SpellEffectEntry const *spellEffect = sSpellEffectStore.LookupEntry(i)) + if (SpellEffectEntry const *spellEffect = sSpellEffectStore.LookupEntry(i)) + { + switch (spellEffect->EffectApplyAuraName) + { + case SPELL_AURA_MOD_INCREASE_ENERGY: + case SPELL_AURA_MOD_INCREASE_ENERGY_PERCENT: + case SPELL_AURA_PERIODIC_MANA_LEECH: + case SPELL_AURA_PERIODIC_ENERGIZE: + case SPELL_AURA_POWER_BURN_MANA: + MANGOS_ASSERT(spellEffect->EffectMiscValue >= 0 && spellEffect->EffectMiscValue < MAX_POWERS); + break; + } + sSpellEffectMap[spellEffect->EffectSpellId].effects[spellEffect->EffectIndex] = spellEffect; + } } LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellEquippedItemsStore, dbcPath,"SpellEquippedItems.dbc");