mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7789] Fixed mana gain from spell effect EffectDestroyAllTotems.
Signed-off-by: ApoC <apoc@nymfe.net>
This commit is contained in:
parent
54f29f7138
commit
4c29782d66
2 changed files with 8 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7788"
|
||||
#define REVISION_NR "7789"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue