refactor(Core/Spells): Add helpers for HasAuraType (#20802)

This commit is contained in:
Kitzunu
2024-12-01 12:50:59 +01:00
committed by GitHub
parent 55f6bd0972
commit ed008a8780
41 changed files with 183 additions and 140 deletions

View File

@@ -3128,7 +3128,7 @@ float WorldObject::GetMapHeight(float x, float y, float z, bool vmap/* = true*/,
float WorldObject::GetMapWaterOrGroundLevel(float x, float y, float z, float* ground/* = nullptr*/) const
{
return GetMap()->GetWaterOrGroundLevel(GetPhaseMask(), x, y, z, ground,
IsUnit() ? !static_cast<Unit const*>(this)->HasAuraType(SPELL_AURA_WATER_WALK) : false,
IsUnit() ? !static_cast<Unit const*>(this)->HasWaterWalkAura() : false,
std::max(GetCollisionHeight(), Z_OFFSET_FIND_HEIGHT));
}