public static void PlayerPetrificationCommandReceived(int fromClient, Packet packet) { int playerIdPetrified = packet.ReadInt(); int sequenceNumber = packet.ReadInt(); PetrificationCommand petrificationCommand = new PetrificationCommand(sequenceNumber, playerIdPetrified); Server.clients[fromClient].serverMasterController.AccumulatePetrificationRequestToBePlayedOnServerFromClient(petrificationCommand); }
public static void PetrifyPlayer(PetrificationCommand petrificationCommand) { using (Packet packet = new Packet((int)ClientPackets.playerPetrifyCommand)) { packet.Write(petrificationCommand.playerIdPetrified); packet.Write(petrificationCommand.sequenceNoForPetrificationCommand); SendTCPData(packet); } }