public override void OnEvent(TargetSelectionRequestEvent targetingRequest) { base.OnEvent(targetingRequest); if (targetingRequest.FromSelf) { return; } World.FindPlayer(targetingRequest.RaisedBy)?.Attributes.UpdateTarget(targetingRequest.TargetId.PackedValue, updateState: true); }
public void SelectTarget(Unit target) { if (!Player.ExistsIn(World)) { return; } Player.SetTarget(target); TargetSelectionRequestEvent targetSelectionRequest = TargetSelectionRequestEvent.Create(Bolt.GlobalTargets.OnlyServer); targetSelectionRequest.TargetId = target?.BoltEntity.NetworkId ?? default; targetSelectionRequest.Send(); }