Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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;
        }
Esempio n. 4
0
        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;
        }
Esempio n. 5
0
        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;
        }
Esempio n. 6
0
 public static int RecvInventoryRequest(Packet p)
 {
     p.Skip(2);
     int inventory = p.ReadByte();
     return inventory;
 }
Esempio n. 7
0
        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;
        }
Esempio n. 8
0
        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;
        }
Esempio n. 9
0
        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;
        }
Esempio n. 10
0
        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;
        }
Esempio n. 11
0
        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;
        }
Esempio n. 12
0
        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;
        }
Esempio n. 13
0
        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;
        }
Esempio n. 14
0
        public static ChannelRequest RecvChannelRequest(Packet p)
        {
            p.Skip(2);
            int worldID = p.ReadByte();

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

            return c;
        }
Esempio n. 15
0
        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;
        }
Esempio n. 16
0
        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;
        }
Esempio n. 17
0
        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;
        }
Esempio n. 18
0
        public static FriendAddInfo RecvFriendAdd(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            byte answer = p.ReadByte();
            int askerid = p.ReadInt();
            int targetid = p.ReadInt();

            FriendAddInfo i = new FriendAddInfo
            {
                Type = (FriendAddTypes)type,
                Answer = (FriendAddAnswers)answer,
                AskerID = askerid,
                TargetID = targetid
            };

            return i;
        }
Esempio n. 19
0
        public static MoveShopItemToBagInfo RecvMoveShopItemToBag(Packet p)
        {
            p.Skip(2);
            byte fromslot = p.ReadByte();
            int itemid = p.ReadInt();
            byte tobag = p.ReadByte();
            byte toslot = p.ReadByte();

            MoveShopItemToBagInfo i = new MoveShopItemToBagInfo
            {
                FromSlot = fromslot,
                ItemID = itemid,
                ToBag = tobag,
                ToSlot = toslot
            };

            return i;
        }
Esempio n. 20
0
        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;
        }
Esempio n. 21
0
        public static NpcTradeInfo RecvNpcTrade(Packet p)
        {
            p.Skip(2);
            int map = p.ReadInt();
            int npc = p.ReadInt();
            byte bag = p.ReadByte();

            NpcTradeInfo nti = new NpcTradeInfo
            {
                MapID = map,
                NpcID = npc,
                Bag = bag
            };

            return nti;
        }
Esempio n. 22
0
        /// <summary>
        /// Generates the unit server login information from packet
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public static UnitLogin RecvUnitLogin(Packet p)
        {
            p.Skip(2);
            string account = p.ReadString();
            int hash = p.ReadShort();
            int map = p.ReadShort();
            int channel = p.ReadByte();
            p.Skip(6);
            int characterID = p.ReadInt();

            UnitLogin u = new UnitLogin()
            {
                Account = account,
                AccountID = hash,
                Channel = channel,
                CharacterID = characterID
            };

            return u;
        }
Esempio n. 23
0
 public static int RecvSkillListRequest(Packet p)
 {
     p.Skip(2);
     int skill = p.ReadByte();
     return skill;
 }
Esempio n. 24
0
        public static GuildChatInfo RecvGuildChat(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            string message = p.ReadString();

            GuildChatInfo i = new GuildChatInfo
            {
                Type = type,
                Message = message
            };

            return i;
        }
Esempio n. 25
0
        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;
        }
Esempio n. 26
0
        public static ChatMessageInfo RecvChatMessage(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            int targetId = p.ReadInt();
            string message = p.ReadString();
            string targetName = p.ReadString(); // if you dont have id

            ChatMessageInfo cmi = new ChatMessageInfo
            {
                Type = (ChatType)type,
                TargetID = targetId,
                Message = message,
                TargetName = targetName
            };

            return cmi;
        }
Esempio n. 27
0
        public static CommandInfo RecvCommand(Packet p)
        {
            p.Skip(2);
            byte type = p.ReadByte();
            byte action = p.ReadByte();
            byte something = p.ReadByte();
            byte something2 = p.ReadByte();

            CommandInfo c = new CommandInfo
            {
                Type = type,
                Action = action,
                Something = something,
                Something2 = something2
            };

            return c;
        }
Esempio n. 28
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="p"></param>
        /// <param name="c"></param>
        /// <returns>World Id</returns>
        public static int RecvConnectWorld(Packet p)
        {
            p.Skip(2);
            int worldID = p.ReadByte(); // if theres plenty of worlds, it would get the ip & port from worldlist[worldID] i guess

            return worldID;
        }
Esempio n. 29
0
        public static ChannelChangeInfo RecvChannelChange(Packet p)
        {
            p.Skip(2);
            byte something1 = p.ReadByte();
            byte something2 = p.ReadByte();

            ChannelChangeInfo cci = new ChannelChangeInfo
            {
                Something = something1,
                Something2 = something2
            };

            return cci;
        }
Esempio n. 30
0
        public static CastSkillInfo RecvCastSkill2(Packet p)
        {
            p.Skip(2);
            int skillid = p.ReadInt();
            byte castertype = p.ReadByte();
            int casterid = p.ReadInt();
            short casterx = p.ReadShort();
            short castery = p.ReadShort();
            byte casterz = p.ReadByte();
            byte targettype = p.ReadByte();
            int targetid = p.ReadInt();
            short targetx = p.ReadShort();
            short targety = p.ReadShort();
            byte targetz = p.ReadByte();

            CastSkillInfo i = new CastSkillInfo
            {
                PacketID = 2,
                SkillID = skillid,
                CasterType = castertype,
                CasterID = casterid,
                CasterX = casterx,
                CasterY = castery,
                CasterZ = casterz,
                TargetType = targettype,
                TargetID = targetid,
                TargetX = targetx,
                TargetY = targety,
                TargetZ = targetz
            };

            return i;
        }