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

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

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);
}

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);
}