fix(Core/Movement): Corrected calculating ground level in shallow water. (#5114)

This commit is contained in:
UltraNix
2021-04-04 23:22:13 +02:00
committed by GitHub
parent d639c1f429
commit 6eeb088211
2 changed files with 4 additions and 3 deletions

View File

@@ -1336,7 +1336,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
float ground = m_caster->GetMapHeight(x, y, z, true);
float liquidLevel = VMAP_INVALID_HEIGHT_VALUE;
LiquidData liquidData;
if (m_caster->GetMap()->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &liquidData))
if (m_caster->GetMap()->getLiquidStatus(x, y, z, MAP_ALL_LIQUIDS, &liquidData, m_caster->GetCollisionHeight()))
liquidLevel = liquidData.level;
if (liquidLevel <= ground) // When there is no liquid Map::GetWaterOrGroundLevel returns ground level