Exemple #1
0
 public GamePack()
 {
     m_Key = new GamePacketKeyEx();
     m_Key.InitKey();
     m_stream   = new MemoryStream();
     m_ListData = new List <byte[]>();
 }
Exemple #2
0
 public GamePack()
 {
     m_Key = new GamePacketKeyEx();
     m_Key.InitKey();
     m_stream = new MemoryStream();
     m_ListData = new List<byte[]>();
 }
Exemple #3
0
        public override void Create(byte[] msg = null,GamePacketKeyEx key = null)
        {
           
            base.Create(msg,key);
            if (msg != null)
            {
                PackIn packin = new PackIn(msg);
                rgba = packin.ReadInt32();
                type = packin.ReadUInt16();
                tag = packin.ReadUInt16();
                param = packin.ReadInt32();
                param1 = packin.ReadInt32();
                param2 = packin.ReadInt32();
                btype = packin.ReadByte();

                byte nLen = packin.ReadByte();
                str1 = packin.ReadString(nLen);
                nLen = packin.ReadByte();
                str2 = packin.ReadString(nLen);
                packin.ReadByte();
                nLen = packin.ReadByte();
                str3 = packin.ReadString(nLen);
                packin.ReadByte();
                param3 = packin.ReadUInt16();
            }
        }
Exemple #4
0
 public BaseMsg()
 {
     m_Data = null;
     mKey = null;
     mMsgLen = 0;
     mParam = 0;
 }
Exemple #5
0
 public virtual void Create(byte[] msg = null,GamePacketKeyEx key = null)
 {
     m_Data = msg;
     mKey = key;
 }
Exemple #6
0
 public PacketOut(GamePacketKeyEx key = null)
 {
     stream = new MemoryStream();
     write = new BinaryWriter(stream);
     m_key = key;
 }
Exemple #7
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg.Length == mMsgLen - 2)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         id = inpack.ReadUInt32();
         type = inpack.ReadInt32();
         param = inpack.ReadInt32();
         sp = inpack.ReadInt32();
     }
 }
Exemple #8
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
 }
Exemple #9
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         typeid = inpack.ReadUInt32();
         type = inpack.ReadInt16();
         fightpower = inpack.ReadInt16();
         level = inpack.ReadInt16();
         param = inpack.ReadInt16();
           
        
     }
 }
Exemple #10
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         type = inpack.ReadUInt32();
         itemid = inpack.ReadUInt32();
         materialid = inpack.ReadUInt32();
         if (inpack.IsComplete()) return;
         param = inpack.ReadUInt32();
         if (inpack.IsComplete()) return;
         param1 = inpack.ReadUInt32();
     }
 }
Exemple #11
0
        public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
        {
            base.Create(msg, key);
            if (msg != null && msg.Length == mMsgLen - 2)
            {
                PackIn inpack = new PackIn(msg);
                inpack.ReadUInt16();
                time = inpack.ReadInt32();
                roleid = inpack.ReadUInt32();
                monsterid = inpack.ReadUInt32();
                role_x = inpack.ReadInt16();
                role_y = inpack.ReadInt16();
                tag = inpack.ReadUInt32();
                injuredvalue = inpack.ReadUInt32();
                for (int i = 0; i < param.Length; i++)
                {
                    param[i] = inpack.ReadInt32();
                }

            }
        }
Exemple #12
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         role_id = inpack.ReadUInt32();
         amount = inpack.ReadUInt32();
         value = inpack.ReadUInt32();
         sp = inpack.ReadUInt32();
     }
 }
Exemple #13
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null )
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         time = inpack.ReadInt32();
         roleId = inpack.ReadUInt32();
         idTarget = inpack.ReadUInt32();
         usPosX = inpack.ReadUInt16();
         usPosY = inpack.ReadUInt16();
         tag = inpack.ReadUInt32();
         usType = inpack.ReadUInt32();
         int j = 12;
         if (tag == 2) j = 11;
         for (int i = 0; i < j; i++)
         {
             param[i] = inpack.ReadByte();
         }
     }
 }
Exemple #14
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         param = inpack.ReadInt32();
         param2 = inpack.ReadUInt16();
         optionid = inpack.ReadByte();
         interactType = inpack.ReadUInt16();
         byte nlen = inpack.ReadByte();
         text = inpack.ReadString(nlen);
         for (int i = 0; i < param3.Length; i++)
         {
             param3[i] = inpack.ReadByte();
         }
     }
 }
Exemple #15
0
 public void Clear(GamePacketKeyEx key = null)
 {
     m_key = key;
     stream.SetLength(0);
 }
Exemple #16
0
 public void SetKey(GamePacketKeyEx key) { mKey = key; }
Exemple #17
0
        public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
        {
            base.Create(msg, key);
            if (msg != null)
            {
                PackIn inpack = new PackIn(msg);
                inpack.ReadUInt16();
                Name = inpack.ReadBuff(16);
                version = inpack.ReadInt32();
            }

        }
Exemple #18
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         type = inpack.ReadInt32();
         tag = inpack.ReadInt16();
         tag2 = inpack.ReadByte();
      //   len = inpack.ReadByte();
         if (inpack.IsComplete()) return;
         str = inpack.ReadString();
         //for (int i = 0; i < param1.Length; i++)
         //{
         //    param1[i] = inpack.ReadByte();
         // }
     }
 }
Exemple #19
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         tag = inpack.ReadString(16);
         name = inpack.ReadString(16);
         tag1 = inpack.ReadString(16);
         hardwaretag = inpack.ReadString(44);
         version = inpack.ReadInt32();
         lookface = inpack.ReadUInt32();
         profession = inpack.ReadUInt16();
         param = inpack.ReadUInt16();
         param1 = inpack.ReadInt32();
         param2 = inpack.ReadInt32();
     }
 }
Exemple #20
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         tick = inpack.ReadInt32();
         type = inpack.ReadByte();
         param = inpack.ReadByte();
         param3 = inpack.ReadInt16();
         param1 = inpack.ReadInt32();
         param2 = inpack.ReadInt32();
         itemid = inpack.ReadUInt32();
     }
 }
Exemple #21
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         id = inpack.ReadUInt32();
         dwData = inpack.ReadUInt32();
         usAction = inpack.ReadUInt16();
         param = inpack.ReadUInt16();
         amount = inpack.ReadUInt16();
         param1 = inpack.ReadUInt16();
         param2 = inpack.ReadUInt32();
         param3 = inpack.ReadInt32();
     }
 }
Exemple #22
0
        public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
        {
            base.Create(msg, key);
            if (msg != null )
            {
                PackIn inpack = new PackIn(msg);
                inpack.ReadInt16();
  

                roleid = inpack.ReadUInt32();
                lookface = inpack.ReadUInt32();
                hair = inpack.ReadUInt32();
                gold = inpack.ReadUInt32();
                gamegold = inpack.ReadUInt32();
                exp = inpack.ReadUInt32();
                expparam = inpack.ReadUInt32();
                mentorexp = inpack.ReadUInt32();
                mercenarexp = inpack.ReadUInt32();
                potential = inpack.ReadUInt32();
                attackpower = inpack.ReadUInt16();
                constitution = inpack.ReadUInt16();
                doage = inpack.ReadUInt16();
                decdoage = inpack.ReadUInt16();
                health = inpack.ReadUInt16();
                magic_attack = inpack.ReadUInt16();
                addpoint = inpack.ReadUInt16();
                life = inpack.ReadUInt16();
                maxlife = inpack.ReadUInt16();
                manna = inpack.ReadUInt16();
                param = inpack.ReadUInt32();
                param1 = inpack.ReadUInt32();
                pk = inpack.ReadUInt16();
                level = inpack.ReadByte();
                profession = inpack.ReadByte();
                param2 = inpack.ReadByte();
                param3 = inpack.ReadByte();
                param4 = inpack.ReadByte();
                mentorlevel = inpack.ReadByte();
                param14 = inpack.ReadByte();
                guanjue = inpack.ReadByte();
       
              //  Mercenarylevel = inpack.ReadUInt16();
                maxpetcall = inpack.ReadUInt16();
                exploit = inpack.ReadInt32();
                bonuspoint = inpack.ReadInt32();
                edubroodpacksize = inpack.ReadByte();
                winglevel = inpack.ReadByte();
                godpetpackagelimit = inpack.ReadByte();
                demonlev = inpack.ReadByte();
                demonexp = inpack.ReadInt32();
                demonexpparam = inpack.ReadInt32();
                param5 = inpack.ReadInt32();
                godlevel = inpack.ReadInt32();
                param9 = inpack.ReadByte();
                param10 = inpack.ReadUInt16();
                param11 = inpack.ReadByte();
    
                for (int i = 0; i < param6.Length; i++)
                {
                    param6[i]= inpack.ReadInt32();
                }
                originalserverid = inpack.ReadInt32();
                wordtreeareaid = inpack.ReadUInt16();
                for (int i = 0; i < param7.Length; i++)
                {
                    param7[i] = inpack.ReadInt32();
                }
                param8 = inpack.ReadUInt16();
       

            }
        }
Exemple #23
0
        public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
        {
            base.Create(msg, key);
            if (msg != null)
            {
                PackIn inpack = new PackIn(msg);
                inpack.ReadUInt16();
                param = inpack.ReadInt32();
                unTxtAttribute = inpack.ReadUInt16();
                tag = inpack.ReadUInt16();
                param = inpack.ReadInt32();
                param1 = inpack.ReadInt32();
                param2 = inpack.ReadInt32();
              //  param3 = inpack.ReadInt32();
                byte count = inpack.ReadByte();
                for (int i = 0; i < count; i++)
                {
                    String str = inpack.ReadString();
                    liststr.Add(str);
                }

                inpack.ReadByte();
                inpack.ReadByte();
                inpack.ReadByte();
            }
        }
Exemple #24
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null && msg.Length == mMsgLen - 2 )
     {
         PackIn packin = new PackIn(msg);
       
         packin.ReadUInt16(); //协议号
         time = packin.ReadInt32();
         id = packin.ReadUInt32();
         x = packin.ReadInt16();
         y = packin.ReadInt16();
         dir = packin.ReadByte();
         ucMode = packin.ReadByte();
         param = packin.ReadUInt16();
         param2 = packin.ReadInt32();
         
     }
 }
Exemple #25
0
 public void Clear(GamePacketKeyEx key = null)
 {
     m_key = key;
     stream.SetLength(0);
 }
Exemple #26
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null && msg.Length == mMsgLen - 2)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         id = inpack.ReadUInt32();
         param = inpack.ReadInt32();
         param = inpack.ReadInt32();
         for (int i = 0; i < param2.Length; i++)
         {
             param2[i] = inpack.ReadInt32();
         }
         lookface = inpack.ReadUInt32();
         x = inpack.ReadInt16();
         y = inpack.ReadInt16();
         hp_ = inpack.ReadUInt16();
         level = inpack.ReadUInt16();
         typeid = inpack.ReadUInt32();
         maxhp = inpack.ReadInt32();
         hp = inpack.ReadInt32();
         dir = inpack.ReadInt32();
     }
 }
Exemple #27
0
        public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
        {
 	         base.Create(msg, key);
             if (msg != null)
             {
                 PackIn inpack = new PackIn(msg);
                 inpack.ReadUInt16();
                 time = inpack.ReadInt32();
                 roleid = inpack.ReadUInt32();
                 type = inpack.ReadInt32();
                 param = inpack.ReadInt32();
                 value = inpack.ReadInt32();
                 tag = inpack.ReadInt32();
                 
            }
        }
Exemple #28
0
 public override void Create(byte[] msg = null, GamePacketKeyEx key = null)
 {
     base.Create(msg, key);
     if (msg != null)
     {
         PackIn inpack = new PackIn(msg);
         inpack.ReadUInt16();
         id = inpack.ReadUInt32();
         id = id ^ 9527;
         typeid = inpack.ReadUInt32();
         x = inpack.ReadInt16();
         y = inpack.ReadInt16();
         param = inpack.ReadInt32();
         tag = inpack.ReadUInt32();
         param1 = inpack.ReadInt32();
     }
 }
Exemple #29
0
 public PacketOut(GamePacketKeyEx key = null)
 {
     stream = new MemoryStream();
     write  = new BinaryWriter(stream);
     m_key  = key;
 }