public static void Add ( NetworkMessage message, string senderName, ushort senderLevel, SpeechType speechType, string text, Location location, ChatChannel channelId, uint time ) { message.AddByte((byte)ServerPacketType.CreatureSpeech); message.AddUInt32(0x00000000); message.AddString(senderName); message.AddUInt16(senderLevel); message.AddByte((byte)speechType); switch (speechType) { case SpeechType.Say: case SpeechType.Whisper: case SpeechType.Yell: case SpeechType.MonsterSay: case SpeechType.MonsterYell: case SpeechType.PrivateNPCToPlayer: message.AddLocation(location); break; case SpeechType.ChannelRed: case SpeechType.ChannelRedAnonymous: case SpeechType.ChannelOrange: case SpeechType.ChannelYellow: case SpeechType.ChannelWhite: message.AddUInt16((ushort)channelId); break; case SpeechType.RuleViolationReport: message.AddUInt32(time); break; default: break; } message.AddString(text); }
public static void Add(NetworkMessage message, Location location, TextColor color, string text) { message.AddByte((byte)ServerPacketType.AnimatedText); message.AddLocation(location); message.AddByte((byte)color); message.AddString(text); }
public static void Add(NetworkMessage message, uint id, string name, byte loggedIn) { message.AddByte((byte)ServerPacketType.VipState); message.AddUInt32(id); message.AddString(name); message.AddByte(loggedIn); }
public static void Add(NetworkMessage message, IEnumerable <CharacterListItem> characters, ushort premiumDaysLeft) { message.AddByte((byte)ServerPacketType.CharacterList); message.AddByte((byte)characters.Count()); foreach (CharacterListItem character in characters) { message.AddString(character.Name); message.AddString(character.World); message.AddBytes(character.Ip); message.AddUInt16(character.Port); } message.AddUInt16(premiumDaysLeft); }
public static void Add( NetworkMessage message, string senderName, ushort senderLevel, SpeechType speechType, string text, Location location, ChatChannel channelId, uint time ) { message.AddByte((byte)ServerPacketType.CreatureSpeech); message.AddUInt32(0x00000000); message.AddString(senderName); message.AddUInt16(senderLevel); message.AddByte((byte)speechType); switch (speechType) { case SpeechType.Say: case SpeechType.Whisper: case SpeechType.Yell: case SpeechType.MonsterSay: case SpeechType.MonsterYell: case SpeechType.PrivateNPCToPlayer: message.AddLocation(location); break; case SpeechType.ChannelRed: case SpeechType.ChannelRedAnonymous: case SpeechType.ChannelOrange: case SpeechType.ChannelYellow: case SpeechType.ChannelWhite: message.AddUInt16((ushort)channelId); break; case SpeechType.RuleViolationReport: message.AddUInt32(time); break; default: break; } message.AddString(text); }
public static void Add(NetworkMessage message, List <Channel> channels) { message.AddByte((byte)ServerPacketType.ChannelList); message.AddByte((byte)channels.Count); foreach (var c in channels) { message.AddUInt16((ushort)c.Id); message.AddString(c.Name); } }
public static void Add(NetworkMessage message, List<Channel> channels) { message.AddByte((byte)ServerPacketType.ChannelList); message.AddByte((byte)channels.Count); foreach (var c in channels) { message.AddUInt16((ushort)c.Id); message.AddString(c.Name); } }
public static void Add(NetworkMessage message, Player player, IEnumerable <Outfit> outfits) { message.AddByte((byte)ServerPacketType.OutfitWindow); message.AddOutfit(player.Outfit); message.AddByte((byte)outfits.Count()); foreach (Outfit outfit in outfits) { message.AddUInt16((ushort)outfit.LookType); message.AddString(outfit.Name); message.AddByte(outfit.Addons); } }
public static void Add(NetworkMessage message, Player player, IEnumerable<Outfit> outfits) { message.AddByte((byte)ServerPacketType.OutfitWindow); message.AddOutfit(player.Outfit); message.AddByte((byte)outfits.Count()); foreach (Outfit outfit in outfits) { message.AddUInt16((ushort)outfit.LookType); message.AddString(outfit.Name); message.AddByte(outfit.Addons); } }
public static void Add ( NetworkMessage message, byte containerId, ushort containerSpriteId, string containerName, byte volume, bool hasParent, IEnumerable <Item> items ) { message.AddByte((byte)ServerPacketType.ContainerOpen); message.AddByte(containerId); message.AddUInt16(containerSpriteId); message.AddString(containerName); message.AddByte(volume); message.AddByte(Convert.ToByte(hasParent)); message.AddByte((byte)items.Count()); foreach (Item item in items) { message.AddItem(item); } }
public static void Add(NetworkMessage message, ushort channelId, string channelName) { message.AddByte((byte)ServerPacketType.ChannelOpen); message.AddUInt16(channelId); message.AddString(channelName); }
public static void Add(NetworkMessage message, TextMessageType type, string text) { message.AddByte((byte)ServerPacketType.TextMessage); message.AddByte((byte)type); message.AddString(text); }
public static void Add(NetworkMessage message,string Name) { message.AddByte((byte)ServerPacketType.ChannelOpenPrivate); message.AddString(Name); }
public static void Add(NetworkMessage message, string messageOfTheDay) { message.AddByte((byte)ServerPacketType.MessageOfTheDay); message.AddString("1\n" + messageOfTheDay); }
public void SendDisconnectLogin(string reason) { NetworkMessage message = new NetworkMessage(); message.AddByte((byte)ServerPacketType.Disconnect); message.AddString(reason); Send(message); }
public static void Add(NetworkMessage message, string Name) { message.AddByte((byte)ServerPacketType.ChannelOpenPrivate); message.AddString(Name); }