mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[10634] Include non-percent mana cost in EffectDestroyAllTotems mana return.
Also small speedup for no-return spells.
This commit is contained in:
parent
bf2b256720
commit
0901a4c2ac
2 changed files with 8 additions and 5 deletions
|
|
@ -7620,13 +7620,16 @@ void Spell::EffectDestroyAllTotems(SpellEffectIndex /*eff_idx*/)
|
|||
for(int slot = 0; slot < MAX_TOTEM_SLOT; ++slot)
|
||||
{
|
||||
if (Totem* totem = m_caster->GetTotem(TotemSlot(slot)))
|
||||
{
|
||||
if (damage)
|
||||
{
|
||||
uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||
if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id))
|
||||
{
|
||||
uint32 manacost = m_caster->GetCreateMana() * spellInfo->ManaCostPercentage / 100;
|
||||
uint32 manacost = spellInfo->manaCost + m_caster->GetCreateMana() * spellInfo->ManaCostPercentage / 100;
|
||||
mana += manacost * damage / 100;
|
||||
}
|
||||
}
|
||||
totem->UnSummon();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10633"
|
||||
#define REVISION_NR "10634"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue