GameBase.Network.Internal.AddRoleData_Item.Create C# (CSharp) Method

Create() public method

public Create ( byte msg ) : void
msg byte
return void
        public void Create(byte[] msg)
        {
            PackIn inpack = new PackIn(msg);
            inpack.ReadUInt16();
            gameid = inpack.ReadUInt32();
            sortid = inpack.ReadUInt32();
            item.Create(null, inpack);
            //playerid = inpack.ReadInt32();
            //itemid = inpack.ReadUInt32();
            //postion = inpack.ReadUInt16();
            //stronglv = inpack.ReadByte();
            //gemcount = inpack.ReadByte();
            //gem1 = inpack.ReadUInt32();
            //gem2 = inpack.ReadUInt32();
            //forgename = inpack.ReadString();
            //amount = inpack.ReadUInt16();
            //war_ghost_exp = inpack.ReadInt32();
            //di_attack = inpack.ReadByte();
            //shui_attack = inpack.ReadByte();
            //huo_attack = inpack.ReadByte();
            //feng_attack = inpack.ReadByte();
            //property = inpack.ReadInt32();
            //gem3 = inpack.ReadByte();
            //god_strong = inpack.ReadInt32();
            //god_exp = inpack.ReadInt32();
        }

Usage Example

Exemplo n.º 1
0
        public void ProcessAddRoleData_Item(byte[] data)
        {
            GameBase.Network.Internal.AddRoleData_Item info = new GameBase.Network.Internal.AddRoleData_Item();
            info.Create(data);
            uint _key = 0;

            if (!Data.AddRoleData_Item(info, ref _key))
            {
                Log.Instance().WriteLog("保存角色物品信息失败,角色id:" + info.item.playerid.ToString());
            }
            GameBase.Network.Internal.AddRoleData_Item_Ret ret = new GameBase.Network.Internal.AddRoleData_Item_Ret();
            ret.id     = _key;
            ret.gameid = info.gameid;
            ret.sordid = info.sortid;
            SessionManager.Instance().SendMapServer(0, ret.GetBuffer());
        }