internal void OnPlayerSetModifier(Player player, Player.Modifier modifier) { root.SendToPlayerByIndex(new PlayerSetModifier { Index = (byte)player.Index, Modifier = modifier }, 3, player.Index, NetDeliveryMethod.ReliableOrdered, PacketChannels.Main); }
private void OnPacketPlayerSetModifier(ref PlayerSetModifier p) { if (p.Index != localPlayerIndex) { return; } Player.Modifier modifier = p.Modifier; Await.NextAfterUpdate().OnCompleted(() => { if (players.Count > 0) { players[0].SetModifier(modifier); } }); }
void IServerPacket.Read(NetIncomingMessage msg) { Index = msg.ReadByte(); Modifier = (Player.Modifier)msg.ReadByte(); }