Core/Players

* Add liquid special aura only if player is in it (not when above)
* Use CastSpell instead of AddAura - checks all dbc conditions on spell
This commit is contained in:
Shauren
2012-03-07 18:57:47 +01:00
parent 2e58d7b515
commit a1a7a2d7c0
4 changed files with 18 additions and 2 deletions
+6 -1
View File
@@ -23075,7 +23075,12 @@ void Player::UpdateUnderwaterState(Map* m, float x, float y, float z)
RemoveAurasDueToSpell(_lastLiquid->SpellId);
if (liquid && liquid->SpellId)
AddAura(liquid->SpellId, this);
{
if (res & (LIQUID_MAP_UNDER_WATER | LIQUID_MAP_IN_WATER | LIQUID_MAP_WATER_WALK))
CastSpell(this, liquid->SpellId, this);
else
RemoveAurasDueToSpell(liquid->SpellId);
}
_lastLiquid = liquid;
}