Get zone/area IDs from vmap data in the liquid update
* Add new method Map::getFullVMapDataForPosition to get area info and liquid info in a single vmap lookup * Use this lookup in Map:: relocation methods to update m_areaId and m_zoneId fields on WorldObject * Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields * Clean up liquid state handling on Unit and Player * Hand floor's Z coord up through GetFullTerrainStatusForPosition, use it to update a new field in WorldObject, and use that to feed a new GetFloorZ call on WorldObject.
This commit is contained in:
1 parent
c700779949
commit
f8d9d954d1
17 files changed
+315
-145
No files matched your search
@@ -1289,7 +1289,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
float ground = m_caster->GetMap()->GetHeight(m_caster->GetPhases(), x, y, z, true, 50.0f);
|
||||
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))
|
||||
liquidLevel = liquidData.level;
|
||||
|
||||
if (liquidLevel <= ground) // When there is no liquid Map::GetWaterOrGroundLevel returns ground level
|
||||
|
||||
Reference in new issue
Block a user