public void OnBanchoMatchTransferHost(BanchoMatchTransferHostArgs args) { if (args.pr.JoinedRoom == null || args.pr.JoinedRoom.HostId != args.pr.User.Id) { return; } if (args.SlotId > 16) { return; } var slot = args.pr.JoinedRoom.Slots[args.SlotId]; args.pr.JoinedRoom.SetHost(slot.UserId); }
public void OnBanchoMatchTransferHost(BanchoMatchTransferHostArgs args) { if (args.Pr.ActiveMatch == null || args.Pr.ActiveMatch.HostId != args.Pr.User.Id) { return; } if (args.SlotId > 16) { return; } var slot = args.Pr.ActiveMatch.Slots[args.SlotId]; args.Pr.ActiveMatch.SetHost(slot.UserId); args.Pr.ActiveMatch.Update(); }