Ejemplo n.º 1
0
        public override int ReadFrom(byte[] Buffer, int StartIndex = 0)
        {
            int cursor = StartIndex;

            cursor += base.ReadFrom(Buffer, cursor);

            TradePartner = new ObjectBase(true, Buffer, cursor);
            cursor += TradePartner.ByteLength;

            ushort len = BitConverter.ToUInt16(Buffer, cursor);
            cursor += TypeSizes.SHORT;

            OfferedItems = new TradeOfferObject[len];
            for (int i = 0; i < len; i++)
            {
                OfferedItems[i] = new TradeOfferObject(Buffer, cursor);
                cursor += OfferedItems[i].ByteLength;
            }

            return cursor - StartIndex;
        }
Ejemplo n.º 2
0
 public BuyListMessage(ObjectBase TradePartner, TradeOfferObject[] OfferedItems)
     : base(MessageTypeGameMode.BuyList)
 {           
     this.TradePartner = TradePartner; 
     this.OfferedItems = OfferedItems;          
 }
 public WithdrawAlListMessage(ObjectBase NPC, TradeOfferObject[] Items)
     : base(MessageTypeGameMode.WithDrawAlList)
 {
     this.NPC = NPC;
     this.Items = Items;         
 }