aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-10 09:56:39 -0600
committermegamage <none@none>2009-02-10 09:56:39 -0600
commit3a129a443c154e301bc8140271af50dbfa4448cf (patch)
treefe535346694ae415856a2eb804163cb16d5fc5c0
parent70798207f8ce00186d5dac623d8768ced42c5c4e (diff)
[7258] Fixed access to field of possible deleted periodic aura. Author: VladimirMangos
--HG-- branch : trunk
-rw-r--r--src/game/SpellAuras.cpp3
-rw-r--r--src/shared/revision_nr.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index efc7417f551..74fcfefae41 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5564,6 +5564,7 @@ void Aura::PeriodicTick()
Unit* target = m_target; // aura can be deleted in DealDamage
SpellEntry const* spellProto = GetSpellProto();
float multiplier = spellProto->EffectMultipleValue[GetEffIndex()] > 0 ? spellProto->EffectMultipleValue[GetEffIndex()] : 1;
+ int32 stackAmount = GetStackAmount();
// Set trigger flag
uint32 procAttacker = PROC_FLAG_ON_DO_PERIODIC;// | PROC_FLAG_SUCCESSFUL_HARMFUL_SPELL_HIT;
@@ -5587,7 +5588,7 @@ void Aura::PeriodicTick()
if(Player *modOwner = pCaster->GetSpellModOwner())
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_MULTIPLE_VALUE, multiplier);
- uint32 heal = pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, GetStackAmount());
+ uint32 heal = pCaster->SpellHealingBonus(pCaster, spellProto, uint32(new_damage * multiplier), DOT, stackAmount);
int32 gain = pCaster->ModifyHealth(heal);
pCaster->getHostilRefManager().threatAssist(pCaster, gain * 0.5f, spellProto);
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 4ffcae7a663..7e520b37f57 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 "7257"
+ #define REVISION_NR "7258"
#endif // __REVISION_NR_H__