Beispiel #1
0
        public static bool Send(Objects.Client client, Objects.Outfit outfit)
        {
            SetOutfitPacket p = new SetOutfitPacket(client);

            p.Outfit = outfit;
            return(p.Send());
        }
        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;
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            if (msg.GetByte() != (byte)OutgoingPacketType.SetOutfit)
                return false;

            Destination = destination;
            Type = OutgoingPacketType.SetOutfit;

            Outfit = msg.GetOutfit();

            return true;
        }
Beispiel #5
0
        public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            if (msg.GetByte() != (byte)OutgoingPacketType.SetOutfit)
            {
                return(false);
            }

            Destination = destination;
            Type        = OutgoingPacketType.SetOutfit;

            Outfit = msg.GetOutfit();

            return(true);
        }
        public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            int position = msg.Position;

            if (msg.GetByte() != (byte)IncomingPacketType.CreatureOutfit)
                return false;

            Destination = destination;
            Type = IncomingPacketType.CreatureOutfit;

            CreatureId = msg.GetUInt32();
            Outfit = msg.GetOutfit();

            return true;
        }
        public override bool ParseMessage(NetworkMessage msg, PacketDestination destination)
        {
            int position = msg.Position;

            if (msg.GetByte() != (byte)IncomingPacketType.CreatureOutfit)
            {
                return(false);
            }

            Destination = destination;
            Type        = IncomingPacketType.CreatureOutfit;

            CreatureId = msg.GetUInt32();
            Outfit     = msg.GetOutfit();

            return(true);
        }
Beispiel #8
0
 public void AddOutfit(Objects.Outfit outfit)
 {
     AddBytes(outfit.ToByteArray());
 }