|
You last visited: Today at 00:47
Advertisement
[Help] About Packet
Discussion on [Help] About Packet within the CO2 Private Server forum part of the Conquer Online 2 category.
09/10/2009, 06:19
|
#1
|
elite*gold: 0
Join Date: Sep 2009
Posts: 5
Received Thanks: 0
|
[Help] About Packet
An-nyong....
Can someone teach me
about packet info like this...
Code:
public byte[] CharacterInfo(Character Charr)
{
byte[] Packet = new byte[70 + Charr.Name.Length + Charr.Spouse.Length];
long Model = Convert.ToInt64(Convert.ToString(Charr.Avatar) + Convert.ToString(Charr.Model));
fixed (byte* p = Packet)
{
*((ushort*)p) = (ushort)Packet.Length;
*((ushort*)(p + 2)) = 1006;
*((uint*)(p + 4)) = (uint)Charr.UID;
*((uint*)(p + 8)) = (uint)Model;
*((ushort*)(p + 12)) = (ushort)Charr.Hair;
*((uint*)(p + 14)) = (uint)Charr.Silvers;
*((uint*)(p + 18)) = (uint)Charr.CPs;
*((uint*)(p + 22)) = (uint)Charr.Exp;
*((ushort*)(p + 42)) = (ushort)5130;
*((ushort*)(p + 46)) = (ushort)Charr.Str;
*((ushort*)(p + 48)) = (ushort)Charr.Agi;
*((ushort*)(p + 50)) = (ushort)Charr.Vit;
*((ushort*)(p + 52)) = (ushort)Charr.Spi;
*((ushort*)(p + 54)) = (ushort)Charr.StatP;
*((ushort*)(p + 56)) = (ushort)Charr.CurHP;
*((ushort*)(p + 58)) = (ushort)Charr.CurMP;
*((ushort*)(p + 60)) = (ushort)Charr.PKPoints;
*(p + 62) = Charr.Level;
*(p + 63) = Charr.Job;
*((ushort*)(p + 65)) = (ushort)Charr.RBCount;
*(p + 66) = 1;
*(p + 67) = 2;
*(p + 68) = (byte)Charr.Name.Length;
Packet[69 + Charr.Name.Length] = (byte)Charr.Spouse.Length;
for (sbyte i = 0; i < Charr.Name.Length; i++)
{
*(p + 69 + i) = (byte)Charr.Name[i];
}
for (sbyte i = 0; i < Charr.Spouse.Length; i++)
{
*(p + 70 + Charr.Name.Length + i) = (byte)Charr.Spouse[i];
}
}
return Packet;
}
what is that mean?
example this..
Code:
*((ushort*)p) = (ushort)Packet.Length;
Thank you
|
|
|
09/10/2009, 06:26
|
#2
|
elite*gold: 0
Join Date: Feb 2009
Posts: 192
Received Thanks: 107
|
I don't know whats that
you can ask MOD
anyway...from Korea in this forum?
Nice...
|
|
|
09/10/2009, 06:30
|
#3
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
That's how the structures of TQ Packets work.
The first 2 values are the packet length (how big it is), then the packet ID.
Code:
*((ushort*)p) = (ushort)Packet.Length;
*((ushort*)(p + 2)) = 1006;
Searching this forum and Google will help you alot to understand packets more.
|
|
|
09/10/2009, 06:37
|
#4
|
elite*gold: 0
Join Date: Sep 2009
Posts: 5
Received Thanks: 0
|
Quote:
Originally Posted by kinshi88
That's how the structures of TQ Packets work.
The first 2 values are the packet length (how big it is), then the packet ID.
Code:
*((ushort*)p) = (ushort)Packet.Length;
*((ushort*)(p + 2)) = 1006;
Searching this forum and Google will help you alot to understand packets more.
|
Thank you Ahjussi... i will google it
|
|
|
09/10/2009, 11:14
|
#5
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
|
Quote:
Originally Posted by Joon Hye Min
Thank you Ahjussi... i will google it 
|
WTF?
|
|
|
09/10/2009, 16:11
|
#6
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by ~Yuki~
WTF? 
|
haha  , thought the same  Is not something that jsut can be told what it is. Is more complicated  Go read C# Visual guidse and so on to learn 
Google won't help much
|
|
|
09/10/2009, 17:31
|
#7
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
Quote:
Originally Posted by grillmad
Google won't help much 
|
How will Google not help?
Google has the entire internet in their databases.
How is that not useful?
|
|
|
09/10/2009, 19:06
|
#8
|
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
|
Quote:
Originally Posted by kinshi88
How will Google not help?
Google has the entire internet in their databases.
How is that not useful?
|
You haven't told him what to search for.
|
|
|
09/10/2009, 20:03
|
#9
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
Quote:
Originally Posted by unknownone
You haven't told him what to search for.
|
I'm sorry.
I thought he might have some common sense.
|
|
|
09/10/2009, 20:25
|
#10
|
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
|
Quote:
Originally Posted by kinshi88
I'm sorry.
I thought he might have some common sense.
|
No, I'm serious. If he doesn't know the concept he is searching for, that ain't much good.
fyi, "Packets" isn't gonna find him what he wants.
|
|
|
09/10/2009, 22:57
|
#11
|
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,162
|
That will probably give it all more sence.
|
|
|
09/10/2009, 23:33
|
#12
|
elite*gold: 20
Join Date: Apr 2008
Posts: 2,281
Received Thanks: 913
|
Quote:
Originally Posted by unknownone
No, I'm serious. If he doesn't know the concept he is searching for, that ain't much good.
fyi, "Packets" isn't gonna find him what he wants.
|
Uh hur hur Durrrr =P
But yes, I can agree with you =D
|
|
|
09/11/2009, 01:26
|
#13
|
elite*gold: 20
Join Date: Aug 2009
Posts: 1,344
Received Thanks: 651
|
Quote:
Originally Posted by EmmeTheCoder
That will probably give it all more sence.
|
Do you even know what your talking about?
|
|
|
09/11/2009, 02:37
|
#14
|
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
|
Quote:
Originally Posted by EmmeTheCoder
That will probably give it all more sence.
|
Do you even know the difference between a reference and a value type?
|
|
|
09/11/2009, 03:54
|
#15
|
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
|
Quote:
Originally Posted by Zion~
Do you even know what your talking about?
|
That link emme provided is actually very resourceful and completely relevant.
Now ask the same question to yourself
|
|
|
All times are GMT +1. The time now is 00:48.
|
|