Entity Spawn packet problem?

01/21/2013 21:07 JobvdH#1
Hello all,

I've been coding my own source and everything wen't well untill I've come to the Entity Spawn part.
Here is the problem:

[Only registered and activated users can see links. Click Here To Register...]
[Only registered and activated users can see links. Click Here To Register...]

Here is my spawn packet:
Code:
            WriteUInt(client.Identity, 4);
            WriteUInt((20 * 10000) + client.Mesh, 8);
            WriteUInt(0, 12); //Status
            WriteUShort(0, 14); //Guild ID
            WriteUShort(0, 16); //GuildRank
            WriteUInt(0, 20); //Helm ID
            WriteUInt(0, 24); //Armour ID
            WriteUInt(0, 28); //RightHand ID
            WriteUInt(0, 32); //LeftHand ID
            WriteUShort(client.PosX, 44); //CoordX
            WriteUShort(client.PosY, 46); //CoordY
            WriteUShort(client.HairStyle, 48); //Hairstyle
            WriteByte(0, 50); //Direction
            WriteByte(0, 51); //Action
            WriteBoolean(true, 52); //Show Names
            WriteByte((byte)client.Name.Length, 53);
            WriteStringWithLength(client.Name, 54);
Anyone may know the problem? It only occurs with the second (or above) logged in character.

Thanks in advance,
JobvdH!
01/21/2013 21:47 Super Aids#2
Patch?

Also your packet handler, rather than just the packet structure as you do spawn to each other, so.
01/21/2013 22:00 Spirited#3
What is client.Mesh? If it's anything other than the body (1004), then you have a problem.
It seriously looks like a weird client bug though.
01/21/2013 22:09 pro4never#4
What is the UID of the character? Should be 1 million ++
01/21/2013 22:27 JobvdH#5
UID of JobvdH is: 100000
UID of JohnDoe is 100001

Also the body is 1004.
The body is called client.Mesh in the packet structure.

This is patch 4294

EDIT: Pro4Never, thats the sollution, I missed one '0'.

Problem solved
#Request close
01/21/2013 22:30 Spirited#6
Quote:
Originally Posted by JobvdH View Post
UID of JobvdH is: 100000
UID of JohnDoe is 100001

Also the body is 1004.
The body is called client.Mesh in the packet structure.

This is patch 4294
100000 is less than
1000000.
01/21/2013 22:30 JobvdH#7
Just edited my post and noticed you posted it.
Thanks for the help all!
01/22/2013 03:45 CptSky#8
Always use valid UIDs ranges ! And you'll avoid most problems ;)

[Only registered and activated users can see links. Click Here To Register...]