5017 create character packet

11/16/2014 21:53 abdeen#1
Hello guys ... I am trying to create a source 5017 with my basic knowledge of packets
I made the auth server and its work fine ... now I am working on game server side
I am using [hybrid winsock client] socket for both ... account server and game server

The problem now in packet 1001 create character ... when I deserialize the packet using

PHP Code:
public class EntityCreate Interfaced.IPacket
{
Public 
string Character
Public 
ushort Body;
Public 
byte Class;

Public 
void Deserialize (byte [] buffer)
{
Character Encoding.ASCII.GetString (buffer2016).Replace ("\0""");
Body BitConverter.ToUInt16(buffer52);
Class = (
byteBitConverter.ToUInt16(buffer,  54);
}
public 
byte [] ToArray ()
{
}
public 
void Send (Client.GameState client)
{
}



I get the character name is something like (n, tAV\"liB/eC)

When the character name as I wrote is [ NotAvailable]

Also the body its come as something like (17649) and not 1003, 1004, 2001 or 2002

How I can fix this issue ?
11/16/2014 23:54 ~Crystaline#2
Check your CharacterInfo offsets.
11/17/2014 00:19 abdeen#3
Quote:
Originally Posted by ~Crystaline View Post
Check your CharacterInfo offsets.
It's correct offests for create intity packet 1001 what's wrong with my code tho ?

Edit : I didn't logged to the game yet, and this error comes with a invalid chars in the character name while registration and I break pointed untill I got the error is what I have explained
11/17/2014 01:26 pro4never#4
The fact that it's not giving you valid results proves without a shadow of a doubt that the offsets are NOT correct.

Seriously... the whole point of de serializing a packet is to read specific data from correct offsets. If the data isn't there then you're not reading it properly or are reading form the incorrect offset.

Literally look at the packet dump and it should be super obvious where data is being written in the packet.
11/17/2014 02:30 ~Crystaline#5
Quote:
Originally Posted by abdeen View Post
It's correct offests for create intity packet 1001 what's wrong with my code tho ?

Edit : I didn't logged to the game yet, and this error comes with a invalid chars in the character name while registration and I break pointed untill I got the error is what I have explained
Or maybe (just maybe), you're not sending the CharacterInfo. Don't show us the packet structure, show us how CreateEntity is handled in your source.