mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +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
|
|
@ -7621,11 +7621,14 @@ void Spell::EffectDestroyAllTotems(SpellEffectIndex /*eff_idx*/)
|
||||||
{
|
{
|
||||||
if (Totem* totem = m_caster->GetTotem(TotemSlot(slot)))
|
if (Totem* totem = m_caster->GetTotem(TotemSlot(slot)))
|
||||||
{
|
{
|
||||||
uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
if (damage)
|
||||||
if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id))
|
|
||||||
{
|
{
|
||||||
uint32 manacost = m_caster->GetCreateMana() * spellInfo->ManaCostPercentage / 100;
|
uint32 spell_id = totem->GetUInt32Value(UNIT_CREATED_BY_SPELL);
|
||||||
mana += manacost * damage / 100;
|
if (SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell_id))
|
||||||
|
{
|
||||||
|
uint32 manacost = spellInfo->manaCost + m_caster->GetCreateMana() * spellInfo->ManaCostPercentage / 100;
|
||||||
|
mana += manacost * damage / 100;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
totem->UnSummon();
|
totem->UnSummon();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10633"
|
#define REVISION_NR "10634"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue