diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index d73e6faef..2663d3630 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -6155,7 +6155,7 @@ void Spell::EffectSummonDeadPet(uint32 /*i*/) void Spell::EffectDestroyAllTotems(uint32 /*i*/) { - float mana = 0; + uint32 mana = 0; for(int slot = 0; slot < MAX_TOTEM; ++slot) { if(!m_caster->m_TotemSlot[slot]) @@ -6167,13 +6167,16 @@ void Spell::EffectDestroyAllTotems(uint32 /*i*/) uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL); SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id); if(spellInfo) - mana += spellInfo->manaCost * damage / 100; + { + uint32 manacost = m_caster->GetCreateMana() * spellInfo->ManaCostPercentage / 100; + mana += manacost * damage / 100; + } ((Totem*)totem)->UnSummon(); } } - int32 gain = m_caster->ModifyPower(POWER_MANA,int32(mana)); - m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id, gain, POWER_MANA); + if (mana) + m_caster->CastCustomSpell(m_caster, 39104, &mana, NULL, NULL, true); } void Spell::EffectDurabilityDamage(uint32 i) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0673b312a..8583c7ad6 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7788" + #define REVISION_NR "7789" #endif // __REVISION_NR_H__