diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 5 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 1 | ||||
-rw-r--r-- | src/game/Unit.cpp | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 0f93e915adb..e361f09aa24 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1010,6 +1010,11 @@ void Aura::SetStackAmount(uint8 stackAmount) RefreshAura(); } +void Aura::InitStackAmount(uint8 stackAmount) +{ + m_stackAmount = stackAmount; +} + bool Aura::modStackAmount(int32 num) { // Can`t mod diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 2c0563e2c07..3534fac5c96 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -279,6 +279,7 @@ class TRINITY_DLL_SPEC Aura //int32 GetModifierValuePerStack() {return m_modifier.m_amount / m_stackAmount;} void SetStackAmount(uint8 num); bool modStackAmount(int32 num); // return true if last charge dropped + void InitStackAmount(uint8 stackAmount); uint32 GetAuraStateMask(){return m_auraStateMask;} void SetAuraState(uint8 num){m_auraStateMask |= 1<<(num-1);} //modifies aura's aura state (not unit!) void RefreshAura(); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 58d419de98f..85661e97dbf 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -3795,9 +3795,9 @@ bool Unit::AddAura(Aura *Aur) { // prevent adding stack more than once stackModified=true; - Aur->SetStackAmount(i2->second->GetStackAmount()); + Aur->InitStackAmount(i2->second->GetStackAmount()); if(Aur->GetStackAmount() < aurSpellInfo->StackAmount) - Aur->SetStackAmount(Aur->GetStackAmount()+1); + Aur->InitStackAmount(Aur->GetStackAmount()+1); } RemoveAura(i2,AURA_REMOVE_BY_STACK); i2=m_Auras.lower_bound(spair); |