Core/PacketIO: Updated packet structures to 9.2.0
Port From (https://github.com/TrinityCore/TrinityCore/commit/9f30afe3528441571f89cb2e1775c756774fa0cd)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user