Core/PacketIO: Updated packet structures to 9.2.0

Port From (https://github.com/TrinityCore/TrinityCore/commit/9f30afe3528441571f89cb2e1775c756774fa0cd)
This commit is contained in:
hondacrx
2022-05-09 23:14:38 -04:00
parent 1ca851db26
commit 0bbabbd667
32 changed files with 1309 additions and 1023 deletions
@@ -370,6 +370,9 @@ namespace Game.Entities
case AreaTriggerTypes.Cylinder:
SearchUnitInCylinder(targetList);
break;
case AreaTriggerTypes.Disk:
SearchUnitInDisk(targetList);
break;
default:
break;
}
@@ -452,6 +455,18 @@ namespace Game.Entities
targetList.RemoveAll(unit => unit.GetPositionZ() < minZ || unit.GetPositionZ() > maxZ);
}
void SearchUnitInDisk(List<Unit> targetList)
{
SearchUnits(targetList, GetMaxSearchRadius(), false);
float innerRadius = _shape.DiskDatas.InnerRadius;
float height = _shape.DiskDatas.Height;
float minZ = GetPositionZ() - height;
float maxZ = GetPositionZ() + height;
targetList.RemoveAll(unit => unit.IsInDist2d(this, innerRadius) || unit.GetPositionZ() < minZ || unit.GetPositionZ() > maxZ);
}
void HandleUnitEnterExit(List<Unit> newTargetList)
{
List<ObjectGuid> exitUnits = _insideUnits;