|
You last visited: Today at 05:35
Advertisement
Dimmed player after login
Discussion on Dimmed player after login within the CO2 Private Server forum part of the Conquer Online 2 category.
01/26/2018, 18:52
|
#1
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Dimmed player after login
Hello guys. I am working on client 5017
After player is logged in and i open status window, it's seems to empty, no player character is displayed as this picture
Also if i logged in with another player...
First player see second player as dimmed image without animation, second player see first one same issue
Here are pictures to more explain
Sorry but im on phone right now so i captured the images by phone camera
So please just tell me what causes to this proplems...
|
|
|
01/26/2018, 19:51
|
#2
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,321
Received Thanks: 927
|
Incorrect MsgHero (Character Information) packet / Not completed the login sequence properly.
|
|
|
01/26/2018, 20:04
|
#3
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Xio.
Incorrect MsgHero (Character Information) packet / Not completed the login sequence properly.
|
But everything in character info packet is delivered fine such as name, class, money, level, cps, spouse, flags etc...
|
|
|
01/26/2018, 22:34
|
#4
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
|
Check your status flags.
|
|
|
01/26/2018, 23:38
|
#5
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Spirited
Check your status flags.
|
Character info packet dosenot have status flag i think, do you mean in spawn packet?
Anyway flag offest in packet is 12, and it's set to 0
|
|
|
01/27/2018, 02:10
|
#6
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
|
Quote:
Originally Posted by abdeen
Character info packet dosenot have status flag i think, do you mean in spawn packet?
Anyway flag offest in packet is 12, and it's set to 0
|
I'd double check that you're not writing over the offset with other values by accident. And yeah, for the spawn packet. The other issue might be placing equipment in the wrong slot? Hard to tell. Did it work before for another patch?
|
|
|
01/27/2018, 14:01
|
#7
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Spirited
I'd double check that you're not writing over the offset with other values by accident. And yeah, for the spawn packet. The other issue might be placing equipment in the wrong slot? Hard to tell. Did it work before for another patch?
|
First i would like to thank you for being here answering people questions...
Second, i am already both checked that am not writing over the offset with other values, also i set flag to none (0x00) , and it's new character and haven't items or equipment yet so all items id's set to 0.
I thought about it's mesh issue but i am calculating mesh like ( face * 10000 + body) ex(67 × 1000 + 1004)
So where is my fault and what's i am doing wrong, or what's i am missing..
|
|
|
01/27/2018, 15:11
|
#8
|
elite*gold: 67
Join Date: Aug 2014
Posts: 1,321
Received Thanks: 927
|
Quote:
Originally Posted by abdeen
First i would like to thank you for being here answering people questions...
Second, i am already both checked that am not writing over the offset with other values, also i set flag to none (0x00) , and it's new character and haven't items or equipment yet so all items id's set to 0.
I thought about it's mesh issue but i am calculating mesh like ( face * 10000 + body) ex(67 × 1000 + 1004)
So where is my fault and what's i am doing wrong, or what's i am missing..
|
Mesh Calc is right, you didn't finish the login sequence then. You didn't send the map status most likely. (Eg. NewbieProtect, No PK, Jail, Mine,..)
Here's what you gotta send after you receive subtype 74 (MsgActionType.MapShow):
PHP Code:
player.ForceSend(MapShowPacket(player), (ushort)sizeof(MsgAction)); player.ForceSend(MsgStatus.Create(player.MapId, 0), (ushort)sizeof(MsgStatus));
PHP Code:
public static byte[] MapShowPacket(YiObj obj) { MsgAction* msgP = stackalloc MsgAction[1]; msgP->Size = (ushort)sizeof(MsgAction); msgP->Id = 1010; msgP->Timestamp = Environment.TickCount; msgP->UniqueId = obj.UniqueId; msgP->Param = obj.MapId; msgP->X = obj.Location.X; msgP->Y = obj.Location.Y; msgP->Direction = (byte)obj.Direction; msgP->Type = MsgActionType.MapShow; return *msgP; } [StructLayout(LayoutKind.Sequential, Pack = 1)] public unsafe struct MsgStatus { public ushort Size; public ushort Id; public uint MapId; public uint DynMapId; public uint Flags;
public static byte[] Create(uint mapId, uint flags) { var packet = stackalloc MsgStatus[1]; packet->Size = (ushort) sizeof(MsgStatus); packet->Id = 1110; packet->MapId = mapId; packet->DynMapId = mapId; packet->Flags = flags; return *packet; }
public static implicit operator byte[](MsgStatus msg) { var buffer = BufferPool.GetBuffer(); fixed (byte* p = buffer) *(MsgStatus*)p = *&msg; return buffer; } }
after that It'll ask for Equips, Skills/Spells,...
|
|
|
01/27/2018, 16:08
|
#9
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Xio.
Mesh Calc is right, you didn't finish the login sequence then. You didn't send the map status most likely. (Eg. NewbieProtect, No PK, Jail, Mine,..)
Here's what you gotta send after you receive subtype 74:
PHP Code:
player.ForceSend(MapShowPacket(player), (ushort)sizeof(MsgAction)); player.ForceSend(MsgStatus.Create(player.MapId, 0), (ushort)sizeof(MsgStatus));
PHP Code:
public static byte[] MapShowPacket(YiObj obj) { MsgAction* msgP = stackalloc MsgAction[1]; msgP->Size = (ushort)sizeof(MsgAction); msgP->Id = 1010; msgP->Timestamp = Environment.TickCount; msgP->UniqueId = obj.UniqueId; msgP->Param = obj.MapId; msgP->X = obj.Location.X; msgP->Y = obj.Location.Y; msgP->Direction = (byte)obj.Direction; msgP->Type = MsgActionType.MapShow; return *msgP; } [StructLayout(LayoutKind.Sequential, Pack = 1)] public unsafe struct MsgStatus { public ushort Size; public ushort Id; public uint MapId; public uint DynMapId; public uint Flags; public static byte[] Create(uint mapId, uint flags) { var packet = stackalloc MsgStatus[1]; packet->Size = (ushort) sizeof(MsgStatus); packet->Id = 1110; packet->MapId = mapId; packet->DynMapId = mapId; packet->Flags = flags; return *packet; } public static implicit operator byte[](MsgStatus msg) { var buffer = BufferPool.GetBuffer(); fixed (byte* p = buffer) *(MsgStatus*)p = *&msg; return buffer; } }
|
After receiving acket 1052 i send to client (answer _ok) messge packet 1004, then i send character information packet 1006, then i receive packet 1010 with type 74, then i send same packet with same type including player uid, x, y, facing and timestamp, i also send same packet with type 104 for map color, and at last i send map status packet, after that i receive friends inquiry type and items etc....
So i think sequence is going fine,, but i dunno why i face my current problem...
|
|
|
01/27/2018, 20:31
|
#10
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
|
Quote:
Originally Posted by abdeen
After receiving acket 1052 i send to client (answer _ok) messge packet 1004, then i send character information packet 1006, then i receive packet 1010 with type 74, then i send same packet with same type including player uid, x, y, facing and timestamp, i also send same packet with type 104 for map color, and at last i send map status packet, after that i receive friends inquiry type and items etc....
So i think sequence is going fine,, but i dunno why i face my current problem...
|
I guess we need more information then. Can you place a breakpoint on your game server's packet handler and tell us the order of packet types being handled (and if there are any that you aren't handling)? Can you also post your packet structures for and (including how you're decoding and encoding packets)? Packet dumps from them would also be very nice. I'll include a snippet from my source if you need a hex dump function. Also, what are the ID ranges of your characters?
Code:
/// PacketDump encapsulates functions for formatting byte data has a
/// hexadecimal dump. The format of the hex dump matches the output of
/// hexdump -C from Linux command line.
public static class PacketDump {
public static string Hex(byte[] data) {
StringBuilder builder = new StringBuilder();
for (int l = 0; l < data.Length; l += 16) {
// Write the address and body
builder.AppendFormat("{0:X4}:", l);
for (int i = l; i < l + 16; i++) {
builder.Append(i % 8 == 0 ? " " : " ");
builder.Append(i >= data.Length ? " " :
string.Format("{0:X2}", data[i]));
}
// Write the ASCII conversion
int v = l + 16 >= data.Length ? data.Length : l + 16;
builder.Append(" | ");
for (int i = l; i < v; i++)
builder.Append(
data[i] < 32 || data[i] > 126 ? '.' : (char)data[i]);
builder.Append(" |\n");
}
builder.Append("\n");
return builder.ToString();
}
}
|
|
|
01/27/2018, 23:33
|
#11
|
elite*gold: 0
Join Date: Apr 2017
Posts: 91
Received Thanks: 56
|
Quote:
Originally Posted by Spirited
/// PacketDump encapsulates implements functions for formatting byte data has as a
/// hexadecimal dump. The format of the hex dump matches the output of
/// hexdump -C from the Linux command line.
|
Pull request: Fix PacketDump documentation.
By the way, are you aware of ? They can be pretty nice, especially with IDE support.
Quote:
Originally Posted by https://docs.microsoft.com/en-us/dotnet/csharp/codedoc
XML documentation comments use triple forward slashes (///) and an XML formatted comment body. For example:
Code:
/// <summary>
/// This class does something.
/// </summary>
public class SomeClass
{
}
|
|
|
|
01/28/2018, 01:13
|
#12
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,211
Received Thanks: 4,114
|
Quote:
Originally Posted by boDil
Pull request: Fix PacketDump documentation.
By the way, are you aware of ? They can be pretty nice, especially with IDE support.
|
Fixed, I attached the new copy below. And Intellisense accepts non-XML formatted comments in its spec. Anything that isn't XML formatted is presumed as summary fields. It can also be mixed with param XML tags, which I prefer since a single line summary field can suddenly become 3 lines. It's subjective.
Code:
/// PacketDump implements functions for formatting byte data as text
/// or another human readable format. Primarily used to debug missing
/// packet handlers or reverse engineer unknown packet structures.
public static class PacketDump {
/// Converts bytes to a hexadecimal string. The format of the hex
/// dump matches the output of hexdump -C from Linux command line.
/// <param name="data">Packet as a byte array</param>
public static string Hex(byte[] data) {
StringBuilder builder = new StringBuilder();
for (int l = 0; l < data.Length; l += 16) {
// Write the address and body
builder.AppendFormat("{0:X4}:", l);
for (int i = l; i < l + 16; i++) {
builder.Append(i % 8 == 0 ? " " : " ");
builder.Append(i >= data.Length ? " " :
string.Format("{0:X2}", data[i]));
}
// Write the ASCII conversion
int v = l + 16 >= data.Length ? data.Length : l + 16;
builder.Append(" | ");
for (int i = l; i < v; i++)
builder.Append(
data[i] < 32 || data[i] > 126 ? '.' : (char)data[i]);
builder.Append(" |\n");
}
builder.Append("\n");
return builder.ToString();
}
}
|
|
|
01/28/2018, 10:32
|
#13
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by Spirited
I guess we need more information then. Can you place a breakpoint on your game server's packet handler and tell us the order of packet types being handled (and if there are any that you aren't handling)? Can you also post your packet structures for and (including how you're decoding and encoding packets)? Packet dumps from them would also be very nice. I'll include a snippet from my source if you need a hex dump function. Also, what are the ID ranges of your characters?
Code:
/// PacketDump encapsulates functions for formatting byte data has a
/// hexadecimal dump. The format of the hex dump matches the output of
/// hexdump -C from Linux command line.
public static class PacketDump {
public static string Hex(byte[] data) {
StringBuilder builder = new StringBuilder();
for (int l = 0; l < data.Length; l += 16) {
// Write the address and body
builder.AppendFormat("{0:X4}:", l);
for (int i = l; i < l + 16; i++) {
builder.Append(i % 8 == 0 ? " " : " ");
builder.Append(i >= data.Length ? " " :
string.Format("{0:X2}", data[i]));
}
// Write the ASCII conversion
int v = l + 16 >= data.Length ? data.Length : l + 16;
builder.Append(" | ");
for (int i = l; i < v; i++)
builder.Append(
data[i] < 32 || data[i] > 126 ? '.' : (char)data[i]);
builder.Append(" |\n");
}
builder.Append("\n");
return builder.ToString();
}
}
|
Thanks bro, i would thank you and everyone tried to help...
last night after i checked client debug file and i found that a message says (got a player with id 100001 {DateTime})
so i think of player id, when i found mine start from 100001 and another source starts from 1000001, i figured out my mistake, changed the ids and everything is well now, my problem is fix, and yeah it was id range and a new experience i got is each type of entity such as (npc, monster and player) have it`s own id range (Start, End)...
Thanks again
|
|
|
01/28/2018, 10:37
|
#14
|
elite*gold: 0
Join Date: Apr 2017
Posts: 91
Received Thanks: 56
|
Quote:
Originally Posted by Spirited
And Intellisense accepts non-XML formatted comments in its spec. Anything that isn't XML formatted is presumed as summary fields. It can also be mixed with param XML tags, which I prefer since a single line summary field can suddenly become 3 lines. It's subjective.
|
That's weird, my VS2017 doesn't seem to support non-XML formatted comments.
Here's without XML formatting:
Here's with XML formatting:
Maybe there's a setting that I can't find that makes it work, though. I just don't remember it ever being supported in any VS version.
Works just fine in VSCode, though.
|
|
|
01/28/2018, 10:40
|
#15
|
elite*gold: 0
Join Date: Mar 2010
Posts: 475
Received Thanks: 14
|
Quote:
Originally Posted by boDil
That's weird, my VS2017 doesn't seem to support non-XML formatted comments.
Here's without XML formatting:
Here's with XML formatting:
Maybe there's a setting that I can't find that makes it work, though. I just don't remember it ever being supported in any VS version.
Works just fine in VSCode, though.
|
it`s works without any settings i think, or if there so it`s works by defualts
|
|
|
|
|
Similar Threads
|
After login back to login [Error]
09/12/2015 - Dekaron Private Server - 43 Replies
Hey all , this error never happen to me and i cant find the why it is happening.
I just login in account and after login (2-5 seconds) i got dc and back to login , and i even cant make a char .
If someone can help would be nice :)
|
Login without MC - Login ohne "MC" - Login Sem MC
01/08/2011 - Metin2 Private Server - 6 Replies
Deutsch
------------------------------------------------- ---------------------
Hallo, ich habe einen Server Metin2. Metin2classic.com habe ich versucht, Kunden ohne MC bieten, aber nie nach rechts.:
Das Problem ist:
-Der Spieler kann auf Ihr Konto zugreifen, immer der Charakter-Auswahl
So wählt er einen Charakter, kehrt er an den Anfang
------------------------------------------------- ---------------------
English
------------------------------------------------- ---------------------...
|
Login without MC - Login ohne "MC" - Login Sem MC
01/08/2011 - Metin2 Private Server - 0 Replies
Deutsch
------------------------------------------------- ---------------------
Hallo, ich habe einen Server Metin2. Metin2classic.com habe ich versucht, Kunden ohne MC bieten, aber nie nach rechts.:
Das Problem ist:
-Der Spieler kann auf Ihr Konto zugreifen, immer der Charakter-Auswahl
So wählt er einen Charakter, kehrt er an den Anfang
------------------------------------------------- ---------------------
English
------------------------------------------------- ---------------------...
|
All times are GMT +2. The time now is 05:35.
|
|