fix(Core/Movement): (#7008)
- 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 - Adjust GetZoneId/GetAreaId on WorldObject to always return these cached fields. - Clean up liquid state handling on Unit and Player - Implemented getting area id from gameobject spawns. - Removed old core related to getting movement flags dependent on environment. - Movement flags are now processed more precisely and dynamically. Original source: TrinityCore. - Closes #5086 - Updates #2208.
This commit is contained in:
parent
909c3e5799
commit
a8c0a2cc89
47 changed files with 1086 additions and 883 deletions
|
|
@ -26,7 +26,7 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
|
|||
float y = unit->GetPositionY();
|
||||
float z = unit->GetPositionZ();
|
||||
|
||||
Map const* map = unit->GetBaseMap();
|
||||
Map const* map = unit->GetMap();
|
||||
|
||||
bool is_water_ok, is_land_ok;
|
||||
_InitSpecific(unit, is_water_ok, is_land_ok);
|
||||
|
|
@ -50,7 +50,7 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
|
|||
}
|
||||
else if (unit->IsWithinLOS(wanderX, wanderY, z))
|
||||
{
|
||||
bool is_water = map->IsInWater(wanderX, wanderY, z);
|
||||
bool is_water = map->IsInWater(unit->GetPhaseMask(), wanderX, wanderY, z, unit->GetCollisionHeight());
|
||||
|
||||
if ((is_water && !is_water_ok) || (!is_water && !is_land_ok))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue