aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-12-31 21:12:33 +0100
committerShauren <shauren.trinity@gmail.com>2012-12-31 21:12:33 +0100
commit47ac83ec3a645c6c87f7180f2b168b04b75a8e7b (patch)
tree9b80d4d749f66e39ada8fad8e89630aa8a2ca609 /src
parentf1170ba0fb00c32d55bc7db0c0a2bae2aef2ec82 (diff)
Core/Units: Check aura presence before casting liquid spell to avoid resetting periodic tick timers
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp5
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 3607e8a9ec3..e6742559641 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -23511,7 +23511,10 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z)
if (liquid && liquid->SpellId)
{
if (res & (LIQUID_MAP_UNDER_WATER | LIQUID_MAP_IN_WATER))
- CastSpell(this, liquid->SpellId, true);
+ {
+ if (!HasAura(liquid->SpellId))
+ CastSpell(this, liquid->SpellId, true);
+ }
else
RemoveAurasDueToSpell(liquid->SpellId);
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 5085062b98c..fdc441d767c 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -3120,7 +3120,10 @@ void Unit::UpdateUnderwaterState(Map* m, float x, float y, float z)
if (liquid && liquid->SpellId)
{
if (res & (LIQUID_MAP_UNDER_WATER | LIQUID_MAP_IN_WATER))
- CastSpell(this, liquid->SpellId, true);
+ {
+ if (!HasAura(liquid->SpellId))
+ CastSpell(this, liquid->SpellId, true);
+ }
else
RemoveAurasDueToSpell(liquid->SpellId);
}