Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 07:44

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



ShowEquipmentsPacket 5508

Discussion on ShowEquipmentsPacket 5508 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
ShowEquipmentsPacket 5508

Code:
public ShowEquipmentsPacket()
            : base(1009, 100)
        {
        }
        public UInt32 heroId
        {
            get
            {
                return ReadUInt32(4);
            }
            set
            {
                WriteUInt32(4, value);
            }
        }
        public UInt32 heroID
        {
            get
            {
                return ReadUInt32(8);
            }
            set
            {
                WriteUInt32(8, value);
            }
        }
        public UInt16 Mode
        {
            get
            {
                return ReadUInt16(12);
            }
            set
            {
                WriteUInt16(12, value);
            }
        }
        public UInt32 Helm
        {
            get
            {
                return ReadUInt32(32);
            }
            set
            {
                WriteUInt32(32, value);
            }
        }
        public UInt32 Necklace
        {
            get
            {
                return ReadUInt32(36);
            }
            set
            {
                WriteUInt32(36, value);
            }
        }
        public UInt32 Armor
        {
            get
            {
                return ReadUInt32(40);
            }
            set
            {
                WriteUInt32(40, value);
            }
        }
        public UInt32 RHand
        {
            get
            {
                return ReadUInt32(44);
            }
            set
            {
                WriteUInt32(44, value);
            }
        }
        public UInt32 LHand
        {
            get
            {
                return ReadUInt32(48);
            }
            set
            {
                WriteUInt32(48, value);
            }
        }
        public UInt32 Ring
        {
            get
            {
                return ReadUInt32(52);
            }
            set
            {
                WriteUInt32(52, value);
            }
        }
        public UInt32 Talisman
        {
            get
            {
                return ReadUInt32(56);
            }
            set
            {
                WriteUInt32(56, value);
            }
        }
        public UInt32 Boots
        {
            get
            {
                return ReadUInt32(60);
            }
            set
            {
                WriteUInt32(60, value);
            }
        }
        public UInt32 Garment
        {
            get
            {
                return ReadUInt32(64);
            }
            set
            {
                WriteUInt32(64, value);
            }
        }
        public UInt32 AccessoryOne
        {
            get
            {
                return ReadUInt32(68);
            }
            set
            {
                WriteUInt32(68, value);
            }
        }
        public UInt32 AccessoryTwo
        {
            get
            {
                return ReadUInt32(72);
            }
            set
            {
                WriteUInt32(72, value);
            }
        }
here how am using it

Code:
ShowEquipmentsPacket show = new ShowEquipmentsPacket();
                        show.heroId = (uint)hero.id;
                        show.heroID = (uint)hero.id;
                        show.Mode = 0x2E;
                        foreach (var i in world.getItemsFromDBbyHeroId(hero.id))
                        {
                            ItemInfoPacket item = new ItemInfoPacket();
                            item.itemId = (uint)i.id;
                            item.itemTypeId = (uint)i.type;
                            item.CurrentDura = (ushort)i.CurrentDura;
                            item.MaxDura = (ushort)i.MaxDura;
                            item.Mode = i.Mode;
                            item.Location = i.Location;
                            item.SocketProgress = (uint)i.SocketProgress;
                            item.FirstSocket = i.FirstSocket;
                            item.SecondSocket = i.SecondSocket;
                            item.Effect = (ushort)i.Effect;
                            item.Composition = i.Composition;
                            item.Bless = i.Bless;
                            item.isFree = i.isFree;
                            item.Enchant = i.Enchant;
                            item.Suspicious = i.Suspicious;
                            item.isLocked = i.isLocked;
                            item.Colour = i.Colour;
                            item.CompositionProgress = (uint)i.CompositionProgress;
                            item.Inscribed = i.Inscribed;
                            item.InscribeTime = (uint)i.InscribeTime;
                            item.Amount = (ushort)i.Amount;
                            SendPacket(item);

                            if (i.Location == 1)
                            {
                                show.Helm = (uint)i.type;
                            }
                            if (i.Location == 2)
                            {
                                show.Necklace = (uint)i.type;
                            }
                            if (i.Location == 3)
                            {
                                show.Armor = (uint)i.type;
                            }
                            if (i.Location == 4)
                            {
                                show.RHand = (uint)i.type;
                            }
                            if (i.Location == 5)
                            {
                                show.LHand = (uint)i.type;
                            }
                            //TODO: the other items
                        }
                        SendPacket(show);
output as hex
Code:
64 00 F1 03 43 42 0F 00 43 42 0F 00 2E 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 75 14 02 00 87 50 09 00 87 50 09 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
but uh! it's not spewing the equipment
Mr_PoP is offline  
Old 07/13/2011, 23:12   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Why are you trying to send all equipments at once? It's not needed (not to mention incorrect).

Look at any public source and you'll see how the packet should be laid out.

There's no need to re-send item info packets at all. If the item shows for the user then the item info has already been sent. You simply need to send the 1009 (to self only) with ALL equipped uids in correct offsets.

The way you have it there seems to be sending 1009 for EACH item.


What you should be doing (could be better solutions but w/e...) is write a basic "displayGear" method which simply sets up the 1009 packet and then does

foreach(item i in gears)
switch(PositionType(I.Location))
case PositionType.Head:
viewPacket.Head = I.UID;
break;

etc

Then send it.
pro4never is offline  
Old 07/14/2011, 04:29   #3
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
Quote:
Originally Posted by pro4never View Post
Why are you trying to send all equipments at once? It's not needed (not to mention incorrect).

Look at any public source and you'll see how the packet should be laid out.

There's no need to re-send item info packets at all. If the item shows for the user then the item info has already been sent. You simply need to send the 1009 (to self only) with ALL equipped uids in correct offsets.

The way you have it there seems to be sending 1009 for EACH item.


What you should be doing (could be better solutions but w/e...) is write a basic "displayGear" method which simply sets up the 1009 packet and then does

foreach(item i in gears)
switch(PositionType(I.Location))
case PositionType.Head:
viewPacket.Head = I.UID;
break;

etc

Then send it.
am not sending the iteminfopacket 2wic and am sending it when the client request the commandpacket->HotkeysItems....

so am sending Time then the code i have mentioned , and if u looked good you will find that SendPacket(show); is out of the foreach scope the foreach scope is loading the items and writing the right location of every item in the showpacket so out the scope of foreach am sending the packet , so am sending it once not for every item..i believe it's something wrong with my offsets though
Mr_PoP is offline  
Old 07/14/2011, 14:57   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Ahh sorry I just got back from a very long day when I read that... My bad.

I'd say try testing this all via cmd first. Ensure that the items display properly in your inventory and in your character window first and then use a command to say... place slot 1 as uid X and test it one at a time to confirm all offsets and functionality of the packet.
pro4never is offline  
Thanks
1 User
Old 07/14/2011, 18:57   #5
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285
Quote:
Originally Posted by pro4never View Post
Ahh sorry I just got back from a very long day when I read that... My bad.

I'd say try testing this all via cmd first. Ensure that the items display properly in your inventory and in your character window first and then use a command to say... place slot 1 as uid X and test it one at a time to confirm all offsets and functionality of the packet.
nvm at least you tried to help me .

about your advice i will try to work on it , thanks for your time i appreciate it
Mr_PoP is offline  
Old 07/15/2011, 02:57   #6
 
Mr_PoP's Avatar
 
elite*gold: 0
Join Date: Apr 2008
Posts: 759
Received Thanks: 285

Code:
64 00 F1 03 43 42 0F 00 43 42 0F 00 2E 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 75 14 02 00 87 50 09 00 87 50 09 00 00 0
0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
i can't see what's wrong

Code:
100 -> 0
1009 -> 2
1000003 -> 4
1000003 -> 8
46(0x2E)-> 12
136309 -> 40
610439 -> 44
610439 -> 48
it seems like every thing is OK !_!
Mr_PoP is offline  
Reply


Similar Threads Similar Threads
ItemInfoPacket Patch 5508
07/21/2011 - CO2 Private Server - 8 Replies
Packet Offests Length -> 0 Type -> 2 UInt32 itemId -> 4 UInt32 itemTypeId -> 8 UInt16 CurrentDura -> 12 UInt16 MaxDura -> 14 UInt16 Mode -> 16 byte Location -> 18 UInt16 SpecialType -> 22



All times are GMT +1. The time now is 07:45.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.