public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) { int position = msg.Position; if (msg.GetByte() != (byte)IncomingPacketType.OutfitWindow) return false; Destination = destination; Type = IncomingPacketType.OutfitWindow; Default = msg.GetOutfit(); byte count = msg.GetByte(); OutfitList = new List<AvalibleOutfit> { }; for (int i = 0; i < count; i++) { AvalibleOutfit outfit = new AvalibleOutfit(); outfit.Id = msg.GetUInt16(); outfit.Name = msg.GetString(); outfit.Addons = msg.GetByte(); OutfitList.Add(outfit); } return true; }
public override bool ParseMessage(NetworkMessage msg, PacketDestination destination) { int position = msg.Position; if (msg.GetByte() != (byte)IncomingPacketType.OutfitWindow) { return(false); } Destination = destination; Type = IncomingPacketType.OutfitWindow; Default = msg.GetOutfit(); byte count = msg.GetByte(); OutfitList = new List <AvalibleOutfit> { }; for (int i = 0; i < count; i++) { AvalibleOutfit outfit = new AvalibleOutfit(); outfit.Id = msg.GetUInt16(); outfit.Name = msg.GetString(); outfit.Addons = msg.GetByte(); OutfitList.Add(outfit); } return(true); }