|
You last visited: Today at 17:22
Advertisement
Conquer Resource Wiki
Discussion on Conquer Resource Wiki within the CO2 Private Server forum part of the Conquer Online 2 category.
03/07/2010, 19:50
|
#61
|
elite*gold: 0
Join Date: Jan 2008
Posts: 1,444
Received Thanks: 1,176
|
Quote:
Originally Posted by Nullable
sizeof doesn't work that way.. you should read something about it or better try doing it yourself, and remember that the packet i'm reading is actually a pointer to the actual packet allocated on heap, in simple words sizeof doesn't work like this with pointers
|
When I will return to the C/C++, I will check for this operator  Anyway, thanks, it's good to know that.
|
|
|
03/20/2010, 01:52
|
#62
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Small Update:
Im going to be adding 5165 packets this weekend, and probably restructing the packet layouts to have a more definative way of doing things. If anyone has any suggestions as to how they would like to see the packets layed out please post here, ill happily take a look at what you have to say, it was after all made for the community (ie. you guys).
|
|
|
03/20/2010, 09:58
|
#63
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
|
Quote:
Originally Posted by Korvacs
Small Update:
Im going to be adding 5165 packets this weekend, and probably restructing the packet layouts to have a more definative way of doing things. If anyone has any suggestions as to how they would like to see the packets layed out please post here, ill happily take a look at what you have to say, it was after all made for the community (ie. you guys).
|
I`d personally like to see the offset numbers :P
|
|
|
03/21/2010, 03:06
|
#64
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Offsets are something that i considered originally, but i rejected it because i beleived that the community would struggle to understand the concept, ill have anouther think about them and see if i can make it simpler.
|
|
|
03/21/2010, 10:03
|
#65
|
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
|
Quote:
Originally Posted by Korvacs
Offsets are something that i considered originally, but i rejected it because i beleived that the community would struggle to understand the concept, ill have anouther think about them and see if i can make it simpler.
|
You could include an article about them as well and this would solve the problem
|
|
|
03/21/2010, 17:03
|
#66
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by ElDeRnEcRo
You could include an article about them as well and this would solve the problem 
|
Yeah thats a good idea.
I have started replacing the packet structures with a new layout using a table, which includes the offset, im also going to write a page about bytes/ushorts/uints/ulongs, and the offsets to help people to understand things alittle more, im also going to re-write all of the values to help make them more standard accross the wiki and easier to understand.
|
|
|
03/21/2010, 17:45
|
#67
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by Korvacs
Yeah thats a good idea.
I have started replacing the packet structures with a new layout using a table, which includes the offset, im also going to write a page about bytes/ushorts/uints/ulongs, and the offsets to help people to understand things alittle more, im also going to re-write all of the values to help make them more standard accross the wiki and easier to understand.
|
Love the new layout of the packets, it's amazing anyhow there is an error in this:  exactly at the exp variable in the 4267 version, here is the correct one:
PHP Code:
(ushort)Length;
(ushort)1006;
(uint)(Character.UID);
(uint)(Character.Model);
(ushort)(Character.Hair);
(ushort)(0);
(uint)(Money);
(ulong)(Experience); // Exactly here :P
(uint)(0);
(uint)(0);
(uint)(0);
(ushort)(Strength);
(ushort)(Agility);
(ushort)(Vitality);
(ushort)(Spirit);
(ushort)(AttributePoints);
(ushort)(Hitpoints);
(ushort)(Mana);
(ushort)(PkPoints);
(byte)(Character.Level);
(byte)(Character.Job);
(byte)(0);
(byte)(Character.RebornCount);
(byte)1;
(byte)(2);
(string with length)Character.Name
(string with length)Character.Spouse
|
|
|
03/21/2010, 17:50
|
#68
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Experience in the 4267 client never gets high enough to require a ulong, so strictly speaking its a uint for that packet
|
|
|
03/21/2010, 17:56
|
#69
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by Korvacs
Experience in the 4267 client never gets high enough to require a ulong, so strictly speaking its a uint for that packet 
|
Packet never worked with me using a uint, it worked with a ulong though
|
|
|
03/21/2010, 18:00
|
#70
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Nullable
Packet never worked with me using a uint, it worked with a ulong though 
|
It doesnt atually make the slightest bit of difference, but you can do this if you like:
PHP Code:
(ushort)Length;
(ushort)1006;
(uint)(Character.UID);
(uint)(Character.Model);
(ushort)(Character.Hair);
(ushort)(0);
(uint)(Money);
(uint)(Experience); // Change this
(uint)(0); //Add this
(uint)(0);
(uint)(0);
(uint)(0);
(ushort)(Strength);
(ushort)(Agility);
(ushort)(Vitality);
(ushort)(Spirit);
(ushort)(AttributePoints);
(ushort)(Hitpoints);
(ushort)(Mana);
(ushort)(PkPoints);
(byte)(Character.Level);
(byte)(Character.Job);
(byte)(0);
(byte)(Character.RebornCount);
(byte)1;
(byte)(2);
(string with length)Character.Name
(string with length)Character.Spouse
|
|
|
03/21/2010, 18:09
|
#71
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by Korvacs
It doesnt atually make the slightest bit of difference, but you can do this if you like:
PHP Code:
(ushort)Length;
(ushort)1006;
(uint)(Character.UID);
(uint)(Character.Model);
(ushort)(Character.Hair);
(ushort)(0);
(uint)(Money);
(uint)(Experience); // Change this
(uint)(0); //Add this
(uint)(0);
(uint)(0);
(uint)(0);
(ushort)(Strength);
(ushort)(Agility);
(ushort)(Vitality);
(ushort)(Spirit);
(ushort)(AttributePoints);
(ushort)(Hitpoints);
(ushort)(Mana);
(ushort)(PkPoints);
(byte)(Character.Level);
(byte)(Character.Job);
(byte)(0);
(byte)(Character.RebornCount);
(byte)1;
(byte)(2);
(string with length)Character.Name
(string with length)Character.Spouse
|
I know what you mean, 4 + 4 = 8 obviously, but wouldn't it be easier to build it up as a ulong instead of adding another blank uint, that's just my opinion.. anyhow it's fine as long as the packet posted on the wiki is fine
|
|
|
03/21/2010, 18:13
|
#72
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Ah well, i use a pointer for my packets so for me its:
PHP Code:
*(ushort*)PTR = (ushort)Buffer.Length; *((ushort*)(PTR + 2)) = 1006; *((uint*)(PTR + 4)) = Char.characterID; *((uint*)(PTR + 8)) = (uint)(Char.avatar * 10000) + Char.modelID; *((ushort*)(PTR + 12)) = Char.hairStyle; *((uint*)(PTR + 16)) = Char.InventoryGold; *((uint*)(PTR + 20)) = Char.experience; *((ushort*)(PTR + 40)) = Char.strengthPoints; *((ushort*)(PTR + 42)) = Char.agilityPoints; *((ushort*)(PTR + 44)) = Char.vitalityPoints; *((ushort*)(PTR + 46)) = Char.spiritPoints; *((ushort*)(PTR + 48)) = Char.statPoints; *((ushort*)(PTR + 50)) = Char.health; *((ushort*)(PTR + 52)) = Char.mana; *((ushort*)(PTR + 54)) = Char.pkPoints; *((byte*)(PTR + 56)) = Char.level; *((byte*)(PTR + 57)) = Char.profession; *((byte*)(PTR + 59)) = Char.reborn; *((byte*)(PTR + 60)) = 1; *((byte*)(PTR + 61)) = 2;
|
|
|
03/21/2010, 18:19
|
#73
|
elite*gold: 0
Join Date: Nov 2009
Posts: 390
Received Thanks: 321
|
Quote:
Originally Posted by Korvacs
Ah well, i use a pointer for my packets so for me its:
PHP Code:
*(ushort*)PTR = (ushort)Buffer.Length;
*((ushort*)(PTR + 2)) = 1006;
*((uint*)(PTR + 4)) = Char.characterID;
*((uint*)(PTR + 8)) = (uint)(Char.avatar * 10000) + Char.modelID;
*((ushort*)(PTR + 12)) = Char.hairStyle;
*((uint*)(PTR + 16)) = Char.InventoryGold;
*((uint*)(PTR + 20)) = Char.experience;
*((ushort*)(PTR + 40)) = Char.strengthPoints;
*((ushort*)(PTR + 42)) = Char.agilityPoints;
*((ushort*)(PTR + 44)) = Char.vitalityPoints;
*((ushort*)(PTR + 46)) = Char.spiritPoints;
*((ushort*)(PTR + 48)) = Char.statPoints;
*((ushort*)(PTR + 50)) = Char.health;
*((ushort*)(PTR + 52)) = Char.mana;
*((ushort*)(PTR + 54)) = Char.pkPoints;
*((byte*)(PTR + 56)) = Char.level;
*((byte*)(PTR + 57)) = Char.profession;
*((byte*)(PTR + 59)) = Char.reborn;
*((byte*)(PTR + 60)) = 1;
*((byte*)(PTR + 61)) = 2;
|
esshh too many de-reference operators, i wrap them up in a class
PHP Code:
public static int WriteUInt64(byte[] Packet, int Offset, ulong Arg)
{
fixed (byte* pckt = Packet)
{
*(pckt + Offset) = (byte)(Arg);
*(pckt + Offset + 1) = (byte)(Arg >> 8);
*(pckt + Offset + 2) = (byte)(Arg >> 16);
*(pckt + Offset + 3) = (byte)(Arg >> 24);
*(pckt + Offset + 4) = (byte)(Arg >> 32);
*(pckt + Offset + 5) = (byte)(Arg >> 40);
*(pckt + Offset + 6) = (byte)(Arg >> 48);
*(pckt + Offset + 7) = (byte)(Arg >> 56);
return (Offset + 8);
}
}
|
|
|
03/22/2010, 14:56
|
#74
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Nice, im going to do that at some point i think.
If anyone else sees anything that looks wrong, or they have anything to add please post here, i have done one or two 5165 packets, but as you can see im only just half way through converting the existing packets.
|
|
|
03/22/2010, 21:48
|
#75
|
elite*gold: 0
Join Date: Jun 2009
Posts: 378
Received Thanks: 141
|
When i get a chance Korvacs when i get home ill check my wiki for packets that you don't have. But if i'm not mistaken you got all the ones i have.
|
|
|
Similar Threads
|
[Resource] My Wiki
05/07/2011 - CO2 Private Server - 4 Replies
Hey. Hope you get use out of this.
If you want me to add anything, just say so and
what you want me to add below.
Link: https://conquerresources.wikispaces.com/
Edit: Here are all of the source downloads btw in a list:
http://spirited-fang.blogspot.com/p/source-downlo ads.html
Sincerely,
|
Resource Wiki
11/12/2010 - CO2 Private Server - 3 Replies
Hey everyone,
I know how helpful it is to have a Packet Wiki, so I thought that I would add this to help you all. It's a resource wiki that will help you customize your source. Hope you all like it!
http://conquerproject.wikispaces.com/space/badge/ 468x60
Link if you can't figure out that the image is the link: Conquer Project Resources
Sincerely,
Fang
|
All times are GMT +1. The time now is 17:24.
|
|