當前位置: 首頁>>代碼示例>>C#>>正文


C# Packet.ReadInt方法代碼示例

本文整理匯總了C#中ServerEngine.PacketEngine.Packet.ReadInt方法的典型用法代碼示例。如果您正苦於以下問題:C# Packet.ReadInt方法的具體用法?C# Packet.ReadInt怎麽用?C# Packet.ReadInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ServerEngine.PacketEngine.Packet的用法示例。


在下文中一共展示了Packet.ReadInt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: 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

示例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: 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

示例5: 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

示例6: RecvLeaveParty

        public static LeavePartyInfo RecvLeaveParty(Packet p)
        {
            p.Skip(2);
            int partyid = p.ReadInt();

            LeavePartyInfo i = new LeavePartyInfo
            {
                PartyID = partyid
            };

            return i;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:12,代碼來源:PacketManager.cs

示例7: RecvWalkToPortal

 public static int RecvWalkToPortal(Packet p)
 {
     p.Skip(2);
     int mapid = p.ReadInt();
     return mapid;
 }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:6,代碼來源:PacketManager.cs

示例8: RecvStopMoving

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

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

            MovementInfo mi = new MovementInfo
            {
                PacketID = 3,
                CharacterID = charid,
                FromX = from_x,
                FromY = from_y,
                FromZ = from_z,
            };

            return mi;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:20,代碼來源:PacketManager.cs

示例9: 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

示例10: 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

示例11: RecvMoveItem

        public static MoveItemInfo RecvMoveItem(Packet p)
        {
            p.Skip(2);
            byte frombag = p.ReadByte();
            byte fromslot = p.ReadByte();
            int itemid = p.ReadInt();
            byte tobag = p.ReadByte();
            byte toslot = p.ReadByte();
            int itemunder = p.ReadInt();

            MoveItemInfo mii = new MoveItemInfo
            {
                FromBag = frombag,
                FromSlot = fromslot,
                ItemID = itemid,
                ToBag = tobag,
                ToSlot = toslot,
                ItemIDUnder = itemunder
            };

            return mii;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:22,代碼來源:PacketManager.cs

示例12: RecvPartyRequest

        public static PartyRequestInfo RecvPartyRequest(Packet p)
        {
            p.Skip(2);
            int asker = p.ReadInt();
            int target = p.ReadInt();
            PartyError error = (PartyError)p.ReadByte();
            PartyType type = (PartyType)p.ReadByte();

            PartyRequestInfo i = new PartyRequestInfo
            {
                AskerID = asker,
                TargetID = target,
                Error = error,
                Type = type
            };

            return i;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:18,代碼來源:PacketManager.cs

示例13: RecvOpenWarehouse

        public static OpenWarehouseInfo RecvOpenWarehouse(Packet p)
        {
            p.Skip(2);
            int npcid = p.ReadInt();

            OpenWarehouseInfo i = new OpenWarehouseInfo
            {
                NpcID = npcid
            };

            return i;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:12,代碼來源:PacketManager.cs

示例14: RecvOpenOtherPlayerShop

        public static OpenOtherPlayerShopInfo RecvOpenOtherPlayerShop(Packet p)
        {
            p.Skip(2);
            int playerid = p.ReadInt();

            OpenOtherPlayerShopInfo i = new OpenOtherPlayerShopInfo
            {
                CharacterID = playerid
            };

            return i;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:12,代碼來源:PacketManager.cs

示例15: RecvMoveWarehouseItem

        public static MoveWarehouseItemInfo RecvMoveWarehouseItem(Packet p)
        {
            p.Skip(2);
            byte fromslot = p.ReadByte();
            int itemid = p.ReadInt();
            byte toslot = p.ReadByte();
            int itemunderid = p.ReadInt();

            MoveWarehouseItemInfo i = new MoveWarehouseItemInfo
            {
                FromSlot = fromslot,
                ItemID = itemid,
                ToSlot = toslot,
                ItemUnderID = itemunderid
            };

            return i;
        }
開發者ID:zarut,項目名稱:xiah-gcf-emulator,代碼行數:18,代碼來源:PacketManager.cs


注:本文中的ServerEngine.PacketEngine.Packet.ReadInt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。