Пример #1
0
        internal byte[] CardEquipInfo()
        {
            PangyaBinaryWriter result;

            result = new PangyaBinaryWriter();
            //var P = IffEntry.Card.GetSPCL(CARD_TYPEID);
            result.WriteUInt32(0);
            result.WriteUInt32(CARD_TYPEID);
            result.WriteUInt32(CHAR_TYPEID);
            result.WriteUInt32(CID);
            result.WriteUInt32(0);
            result.WriteUInt32(0);
            //if (P != null)
            //{
            //    result.WriteUInt32(P.First().Key);
            //    result.WriteUInt32(P.First().Value);
            //}
            //else
            //{

            //}
            result.WriteUInt32(SLOT);
            if (CID == 0)
            {
                result.WriteZero(0x10);
                result.WriteZero(0x10);
            }
            else
            {
                result.WriteTime(REGDATE);
                result.WriteTime(ENDDATE);
            }
            result.WriteUInt32(GetType(CARD_TYPEID));
            result.WriteByte(1);
            return(result.GetBytes());
        }
Пример #2
0
 public byte[] GetMascotInfo()
 {
     using (var Packet = new PangyaBinaryWriter())
     {
         Packet.WriteUInt32(MascotIndex);
         Packet.WriteUInt32(MascotTypeID);
         Packet.WriteZero(5);
         Packet.WriteStr(MascotMessage, 16);
         Packet.WriteZero(14);
         Packet.WriteUInt16(MascotIsValid);
         Packet.WriteTime((MascotEndDate));
         Packet.WriteByte(0);
         var result = Packet.GetBytes();
         return(result);
     }
 }
Пример #3
0
        public static byte[] ShowBuyItem(AddItemData Item, BuyItemData BuyData, uint Pang, uint Cookies)
        {
            var result = new PangyaBinaryWriter();

            result.Write(new byte[] { 0xAA, 0x00 });
            result.WriteUInt16(1);//count Sucess item(coloca sempre 1 eu acho)
            result.WriteUInt32(Item.ItemTypeID);
            result.WriteUInt32(Item.ItemIndex);
            result.WriteUInt16(BuyData.DayTotal);
            result.WriteByte(BuyData.Flag);
            result.WriteUInt32(Item.ItemNewQty);
            result.WriteTime((BuyData.EndDate));
            result.WriteStr(Item.ItemUCCKey, 7);
            result.WriteUInt64(Pang);
            result.WriteUInt64(Cookies);
            return(result.GetBytes());
        }