public static void SetGameAttributes(Blaze.Packet p, PlayerInfo pi, NetworkStream ns) { List <Blaze.Tdf> input = Blaze.ReadPacketContent(p); pi.game.ATTR = (Blaze.TdfDoubleList)input[0]; List <Blaze.Tdf> result = new List <Blaze.Tdf>(); byte[] buff = Blaze.CreatePacket(p.Component, p.Command, 0, 0x1000, p.ID, result); ns.Write(buff, 0, buff.Length); ns.Flush(); foreach (PlayerInfo peer in pi.game.players) { if (peer != null) { try { AsyncGameManager.NotifyGameSettingsChange(peer, p, pi, peer.ns); } catch { pi.game.removePlayer((int)peer.userId); BlazeServer.Log("[CLNT] #" + pi.userId + " : 'SetGameAttributes' peer crashed!", System.Drawing.Color.Red); } } } }
public static void SetGameAttributes(Blaze.Packet p, PlayerInfo pi, NetworkStream ns) { List <Blaze.Tdf> input = Blaze.ReadPacketContent(p); pi.game.ATTR = (Blaze.TdfDoubleList)input[0]; List <Blaze.Tdf> result = new List <Blaze.Tdf>(); byte[] buff = Blaze.CreatePacket(p.Component, p.Command, 0, 0x1000, p.ID, result); ns.Write(buff, 0, buff.Length); ns.Flush(); AsyncGameManager.NotifyGameSettingsChange(p, pi, ns); }