Example #1
0
        }                                                                           //im too damn lazy to type this._wh every time. sorry

        public WorldPacket(WorldCommand cmd, WorldHandler wh)
        {
            this.wh  = wh;
            this.cmd = cmd;
            data     = new List <byte>();
            append((UInt16)0);
            append((UInt16)cmd);
        }
Example #2
0
 public WorldSession(WorldHandler wh, AccountInfo info)
 {
     ip           = (wh._client.Client.RemoteEndPoint as IPEndPoint).Address;
     _wh          = wh;
     _info        = info;
     _info.online = true;
     Program.authDatabase.Accounts.Update(_info);
     ophandler = new OpcodeHandler(this);
 }
Example #3
0
        public WorldPacket(byte[] data, WorldHandler wh)
        {
            this.wh   = wh;
            this.data = new List <byte>();
            this.data.AddRange(data);

            byte[] cmdbuffer = { data[0], data[1], data[2], data[3] };
            byte[] decCMD    = wh._ac.decrypt(cmdbuffer);
            this.data[0] = decCMD[0];
            this.data[1] = decCMD[1];
            this.data[2] = decCMD[2];
            this.data[3] = decCMD[3];
            this.cmd     = (WorldCommand)BitConverter.ToUInt32(decCMD, 0);
            this._rpos   = 4;
        }