23 public const NETWORK_ID = ProtocolInfo::CAMERA_AIM_ASSIST_PACKET;
25 private string $presetId;
27 private float $distance;
28 private CameraAimAssistTargetMode $targetMode;
29 private CameraAimAssistActionType $actionType;
34 public static function create(
string $presetId,
Vector2 $viewAngle,
float $distance, CameraAimAssistTargetMode $targetMode, CameraAimAssistActionType $actionType) : self{
36 $result->presetId = $presetId;
37 $result->viewAngle = $viewAngle;
38 $result->distance = $distance;
39 $result->targetMode = $targetMode;
40 $result->actionType = $actionType;
44 public function getPresetId() : string{ return $this->presetId; }
46 public function getViewAngle() : Vector2{ return $this->viewAngle; }
48 public function getDistance() : float{ return $this->distance; }
50 public function getTargetMode() : CameraAimAssistTargetMode{ return $this->targetMode; }
52 public function getActionType() : CameraAimAssistActionType{ return $this->actionType; }
55 $this->presetId = $in->getString();
58 $this->targetMode = CameraAimAssistTargetMode::fromPacket($in->
getByte());
59 $this->actionType = CameraAimAssistActionType::fromPacket($in->
getByte());
63 $out->putString($this->presetId);
65 $out->putLFloat($this->distance);
66 $out->putByte($this->targetMode->value);
67 $out->putByte($this->actionType->value);
71 return $handler->handleCameraAimAssist($this);