aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraczman <none@none>2009-05-24 22:22:21 +0200
committerraczman <none@none>2009-05-24 22:22:21 +0200
commit1d79be09e7028c91041c2d1d118dd913b8881bac (patch)
tree9be5e0d8b8498cef5a0b2a2f4c0e1c45862421c2 /src
parent4423ac319404dd52492e8ed0b56433046fb7fd9e (diff)
Fix logical error in commit 1523
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index b3ee5acbe3b..6dd2930b1bd 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5916,19 +5916,16 @@ void Aura::PeriodicDummyTick()
{
if ((*i)->GetId() == GetId())
{
+ BattleGround *bg = ((Player*)m_target)->GetBattleGround();
// Get tick number
int32 tick = (m_maxduration - m_duration) / m_modifier.periodictime;
// Default case (not on arenas)
- if (tick == 0)
+ if (tick == 0 )
{
(*i)->GetModifier()->m_amount = m_modifier.m_amount;
- ((Player*)m_target)->UpdateManaRegen();
- // Disable continue
- m_isPeriodic = false;
+
}
- return;
//**********************************************
- // Code commended since arena patch not added
// This feature uses only in arenas
//**********************************************
// Here need increase mana regen per tick (6 second rule)
@@ -5936,9 +5933,13 @@ void Aura::PeriodicDummyTick()
// on 1 tick - 166% (handled in 4 second)
// on 2 tick - 133% (handled in 6 second)
// Not need update after 3 tick
- BattleGround *bg = ((Player*)m_target)->GetBattleGround();
+
if(!bg || !bg->isArena())
+ {
+ m_isPeriodic = false;
+ ((Player*)m_target)->UpdateManaRegen();
return;
+ }
if (tick > 3)
return;
// Apply bonus for 0 - 3 tick