当前位置: 首页>>代码示例>>C#>>正文


C# Packet.ReadByte方法代码示例

本文整理汇总了C#中ServerEngine.PacketEngine.Packet.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# Packet.ReadByte方法的具体用法?C# Packet.ReadByte怎么用?C# Packet.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ServerEngine.PacketEngine.Packet的用法示例。


在下文中一共展示了Packet.ReadByte方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RecvAddStatRequest

        public static AddStatInfo RecvAddStatRequest(Packet p)
        {
            p.Skip(2);
            byte stat = p.ReadByte();
            byte amount = p.ReadByte();

            AddStatInfo asi = new AddStatInfo
            {
                Stat = stat,
                Amount = amount
            };

            return asi;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:14,代码来源:PacketManager.cs

示例2: RecvAddItemToShop

        public static AddItemToShopInfo RecvAddItemToShop(Packet p)
        {
            p.Skip(2);
            byte frombag = p.ReadByte();
            byte fromslot = p.ReadByte();
            int itemid = p.ReadInt();
            byte slot = p.ReadByte();
            int price = p.ReadInt();

            AddItemToShopInfo i = new AddItemToShopInfo
            {
                FromBag = frombag,
                FromSlot = fromslot,
                ItemID = itemid,
                Slot = slot,
                Price = price
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:20,代码来源:PacketManager.cs

示例3: RecvAddItemToWarehouse

        public static AddItemToWarehouseInfo RecvAddItemToWarehouse(Packet p)
        {
            p.Skip(2);
            int charid = p.ReadInt();
            int itemid = p.ReadInt();
            byte frombag = p.ReadByte();
            byte fromslot = p.ReadByte();
            byte toslot = p.ReadByte();
            byte tobag = p.ReadByte();

            AddItemToWarehouseInfo i = new AddItemToWarehouseInfo
            {
                CharacterID = charid,
                ItemID = itemid,
                FromBag = frombag,
                FromSlot = fromslot,
                ToBag = tobag,
                ToSlot = toslot
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:22,代码来源:PacketManager.cs

示例4: RecvAcceptImbueItem

        public static AcceptImbueItem RecvAcceptImbueItem(Packet p)
        {
            p.Skip(2);
            int NpcID = p.ReadInt();

            int toImbueID = p.ReadInt();
            byte toImbueBag = p.ReadByte();
            byte toImbueSlot = p.ReadByte();

            int imbueItem1ID = p.ReadInt();
            byte imbueItem1Bag = p.ReadByte();
            byte imbueItem1Slot = p.ReadByte();

            int imbueItem2ID = p.ReadInt();
            byte imbueItem2Bag = p.ReadByte();
            byte imbueItem2Slot = p.ReadByte();

            int imbueItem3ID = p.ReadInt();
            byte imbueItem3Bag = p.ReadByte();
            byte imbueItem3Slot = p.ReadByte();

            AcceptImbueItem i = new AcceptImbueItem
            {
                NpcID = NpcID,
                ToImbueItemID = toImbueID,
                ToImbueItemBag = toImbueBag,
                ToImbueItemSlot = toImbueSlot,
                ImbueItem1ID = imbueItem1ID,
                ImbueItem1Bag = imbueItem1Bag,
                ImbueItem1Slot = imbueItem1Slot,
                ImbueItem2ID = imbueItem2ID,
                ImbueItem2Bag = imbueItem2Bag,
                ImbueItem2Slot = imbueItem2Slot,
                ImbueItem3ID = imbueItem3ID,
                ImbueItem3Bag = imbueItem3Bag,
                ImbueItem3Slot = imbueItem3Slot
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:40,代码来源:PacketManager.cs

示例5: RecvBuyItem

        public static BuyItemInfo RecvBuyItem(Packet p)
        {
            p.Skip(2);
            int npcid = p.ReadInt();
            short wref = p.ReadShort();
            p.Skip(2);
            short amount = p.ReadShort();
            p.Skip(2);
            byte bag = p.ReadByte();

            BuyItemInfo i = new BuyItemInfo
            {
                NpcID = npcid,
                ReferenceID = wref,
                Amount = amount,
                Bag = bag
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:20,代码来源:PacketManager.cs

示例6: RecvInventoryRequest

 public static int RecvInventoryRequest(Packet p)
 {
     p.Skip(2);
     int inventory = p.ReadByte();
     return inventory;
 }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:6,代码来源:PacketManager.cs

示例7: RecvImbueItem

        public static ImbueItemInfo RecvImbueItem(Packet p)
        {
            p.Skip(2);
            int itemid = p.ReadInt();
            byte bag = p.ReadByte();
            byte slot = p.ReadByte();

            ImbueItemInfo i = new ImbueItemInfo
            {
                ItemID = itemid,
                Bag = bag,
                Slot = slot
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:16,代码来源:PacketManager.cs

示例8: RecvDropItem

        public static DropItemInfo RecvDropItem(Packet p)
        {
            p.Skip(2);
            byte frombag = p.ReadByte();
            byte fromslot = p.ReadByte();
            int itemid = p.ReadInt();
            short tox = p.ReadShort();
            short toy = p.ReadShort();
            byte toz = p.ReadByte();
            int something = p.ReadInt();

            DropItemInfo drop = new DropItemInfo
            {
                FromBag = frombag,
                FromSlot = fromslot,
                ItemID = itemid,
                ToX = tox,
                ToY = toy,
                ToZ = toz,
                Something = something
            };

            return drop;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:24,代码来源:PacketManager.cs

示例9: RecvCreateCharacter

        public static Character RecvCreateCharacter(Packet p)
        {
            p.Skip(2);
            byte cClass = p.ReadByte();
            string name = p.ReadString();

            Character c = new Character()
            {
                Class = cClass,
                Name = name
            };

            return c;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:14,代码来源:PacketManager.cs

示例10: RecvCombineItems

        public static CombineItemsInfo RecvCombineItems(Packet p)
        {
            p.Skip(2);
            byte something = p.ReadByte();
            byte something2 = p.ReadByte();
            int itemId = p.ReadInt();
            byte bag = p.ReadByte();
            byte slot = p.ReadByte();

            CombineItemsInfo i = new CombineItemsInfo
            {
                ItemID = itemId,
                Bag = bag,
                Slot = slot
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:18,代码来源:PacketManager.cs

示例11: RecvKillPet

        public static KillPet RecvKillPet(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            int id = p.ReadInt();
            byte action = p.ReadByte();

            KillPet i = new KillPet
            {
                Type = type,
                PetID = id,
                Action = action
            };

            return i;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:16,代码来源:PacketManager.cs

示例12: RecvPickItem

        public static PickItemInfo RecvPickItem(Packet p)
        {
            p.Skip(2);
            int mapid = p.ReadInt();
            int itemid = p.ReadInt();
            short fromx = p.ReadShort();
            short fromy = p.ReadShort();
            byte fromz = p.ReadByte();
            int mapitemid = p.ReadInt();
            short amount = p.ReadShort();

            PickItemInfo pi = new PickItemInfo
            {
                MapID = mapid,
                ItemID = itemid,
                FromX = fromx,
                FromY = fromy,
                FromZ = fromz,
                MapItemID = mapitemid,
                Amount = amount
            };

            return pi;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:24,代码来源:PacketManager.cs

示例13: RecvStartMoving

        public static MovementInfo RecvStartMoving(Packet p)
        {
            p.Skip(2);
            int charid = p.ReadInt();

            short from_x = p.ReadShort();
            short from_y = p.ReadShort();
            byte from_z = p.ReadByte();

            short to_x = p.ReadShort();
            short to_y = p.ReadShort();
            byte to_z = p.ReadByte();
            short direction = p.ReadShort();

            MovementInfo mi = new MovementInfo
            {
                PacketID = 1,
                CharacterID = charid,
                FromX = from_x,
                FromY = from_y,
                FromZ = from_z,
                ToX = to_x,
                ToY = to_y,
                ToZ = to_z,
                Rotation = direction
            };

            return mi;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:29,代码来源:PacketManager.cs

示例14: RecvChannelRequest

        public static ChannelRequest RecvChannelRequest(Packet p)
        {
            p.Skip(2);
            int worldID = p.ReadByte();

            ChannelRequest c = new ChannelRequest()
            {
                WorldID = worldID
            };

            return c;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:12,代码来源:PacketManager.cs

示例15: RecvChannelLogin

        public static ChannelLogin RecvChannelLogin(Packet p)
        {
            p.Skip(2);
            int characterID = p.ReadInt();
            int accountID = p.ReadShort();
            int channelID = p.ReadShort();
            int worldID = p.ReadByte();

            ChannelLogin u = new ChannelLogin()
            {
                CharacterID = characterID,
                AccountID = accountID,
                ChannelID = channelID,
                WorldID = worldID
            };

            return u;
        }
开发者ID:zarut,项目名称:xiah-gcf-emulator,代码行数:18,代码来源:PacketManager.cs


注:本文中的ServerEngine.PacketEngine.Packet.ReadByte方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。