Core/Units: Check aura presence before casting liquid spell to avoid resetting periodic tick timers

This commit is contained in:
Shauren committed 2012-12-31 21:12:33 +01:00
1 parent f1170ba0fb
commit 47ac83ec3a
2 files changed
+8 -2

No files matched your search

+4 -1
View File
@@ -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);
}
+4 -1
View File
@@ -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);
}