public static byte[] CustomData(String sender, String ident, byte[] data) { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteString(ident); packet.WriteString(sender); packet.WriteBytes(data); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CUSTOM_DATA); }
public static byte[] SupportsCustomEmotes() { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteByte(16); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_SUPPORTS_CUSTOM_EMOTES); packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }
public static byte[] CustomEmoteDelete(UserObject userobj, String shortcut) { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteString(userobj.Name); packet.WriteString(shortcut); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CUSTOM_EMOTE_DELETE); packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }
public static byte[] CustomEmoteItem(UserObject userobj, CustomEmoticon item) { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteString(userobj.Name); packet.WriteString(item.Shortcut); packet.WriteByte(item.Size); packet.WriteBytes(item.Image); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CUSTOM_EMOTES_ITEM); packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }
public static byte[] CustomFontDefault(UserObject userobj) { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteString(userobj.Name); // user's name + null packet.WriteByte(10); // limited to between 8 to 16 packet.WriteString("Verdana"); // null terminated packet.WriteByte(255); packet.WriteByte(255); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_CUSTOM_FONT); // id = 204 packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }
public static byte[] VoiceChatChunk(String sender, byte[] buffer) { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteString(sender); packet.WriteBytes(buffer); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_VC_CHUNK); packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }
public static byte[] SupportsVoiceClips() { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteByte(Settings.CanVoiceChat ? (byte)1 : (byte)0); packet.WriteByte(0); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_VC_SUPPORTED); packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }
public static byte[] VoiceChatUserSupport(UserObject userobj) { AresTCPPacketWriter packet = new AresTCPPacketWriter(); packet.WriteString(userobj.Name); packet.WriteByte(userobj.CanVCPublic ? (byte)1 : (byte)0); packet.WriteByte(userobj.CanVCPrivate ? (byte)1 : (byte)0); byte[] buf = packet.ToAresPacket(ProtoMessage.MSG_CHAT_SERVER_VC_USER_SUPPORTED); packet = new AresTCPPacketWriter(); packet.WriteBytes(buf); return packet.ToAresPacket(ProtoMessage.MSG_CHAT_ADVANCED_FEATURES_PROTOCOL); }