public static void StageSituation(List <StageObjectPair> objs) { using (Packet packet = new Packet((int)ClientPackets.StageSituation)) { for (int i = 0; i < objs.Count; i++) { StageObjectPair pair = objs[i]; packet.Write((int)pair.category); packet.Write(pair.id); } SendTCPData(packet); } }
public static void StageObjectMethod(StageObjectPair pair, string route, params object[] parameters) { using (Packet packet = new Packet((int)ServerPackets.StageObjectMethod)) { packet.Write((int)pair.category); packet.Write(pair.id); packet.Write(route); for (int i = 0; i < parameters.Length; i++) { packet.Write(parameters[i]); } SendTCPDataToAll(packet); } }
public static void StageObjectInfo(StageObjectPair pair, string route, object value, bool useUDP = false) { using (Packet packet = new Packet((int)ServerPackets.StageObjectInfo)) { packet.Write((int)pair.category); packet.Write(pair.id); packet.Write(route); packet.Write(value); if (useUDP) { SendUDPDataToAll(packet); } else { SendTCPDataToAll(packet); } } }