EntitySpawn (5378+)

03/25/2011 19:40 iStefan#1
Thank you .Kinshi, Thank you Impulse.
Thank you Moderator for closing this (in advance) :D

#request close.
03/25/2011 20:11 .Kinshi#2
The size of the packet and the offset for the player name is wrong.

Code:
Size: 8 + 214 + (C.Name.Length)

Packet[212] = 4;
Packet[213] = (byte)(C.Name.Length);
WriteString(C.Name, 214, Packet);
03/26/2011 09:42 iStefan#3
Quote:
Originally Posted by .Kinshi View Post
The size of the packet and the offset for the player name is wrong.

Code:
Size: 8 + 214 + (C.Name.Length)

Packet[212] = 4;
Packet[213] = (byte)(C.Name.Length);
WriteString(C.Name, 214, Packet);
Dude it's impossible the size to be 214 + 8 + Charname lenght
Because in EntitySpawn there's clan name one or 2 offsets more than Char Name. So.. Think about it.
03/26/2011 10:31 -impulse-#4
Code:
SpawnPacket = new byte[8 + 214 + Name.Length];
WriteUInt16((ushort)(214 + Name.Length), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[212] = 3;
SpawnPacket[213] = (byte)_Name.Length;
WriteString(_Name, 214, SpawnPacket);
Works just the way it should.
03/26/2011 10:38 iStefan#5
Quote:
Originally Posted by -impulse- View Post
Code:
SpawnPacket = new byte[8 + 214 + Name.Length];
WriteUInt16((ushort)(214 + Name.Length), 0, SpawnPacket);
WriteUInt16(10014, 2, SpawnPacket);
SpawnPacket[212] = 3;
SpawnPacket[213] = (byte)_Name.Length;
WriteString(_Name, 214, SpawnPacket);
Works just the way it should.
It Does, but your length is incorrect. If you want to spawn clan name, you gotta increase the length. However, Thank you for your help, I Appreciate that.
This can be closed.
03/26/2011 10:53 .Kinshi#6
Then just add the clan name length onto the spawn packet length.
03/26/2011 11:56 iStefan#7
Quote:
Originally Posted by .Kinshi View Post
Then just add the clan name length onto the spawn packet length.
Jesus Christ. I'm not gonna argue, You'll see yourself when you get to Clans (if you ever do them)
03/26/2011 19:00 tanelipe#8
#Closed