Register for your free account! | Forgot your password?

You last visited: Today at 06:41

  • Please register to post and access all features, it's quick, easy and FREE!


Dimmed player after login

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
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...



abdeen is offline  
Old 01/26/2018, 19:51   #2
 
elite*gold: 67
Join Date: Aug 2014
Posts: 1,314
Received Thanks: 920
Incorrect MsgHero (Character Information) packet / Not completed the login sequence properly.


Xio. is offline  
Thanks
1 User
Old 01/26/2018, 20:04   #3
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
Received Thanks: 14
Quote:
Originally Posted by Xio. View Post
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...
abdeen is offline  
Old 01/26/2018, 22:34   #4
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,966
Received Thanks: 3,329
Check your status flags.


Spirited is offline  
Thanks
1 User
Old 01/26/2018, 23:38   #5
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
Received Thanks: 14
Quote:
Originally Posted by Spirited View Post
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
abdeen is offline  
Old 01/27/2018, 02:10   #6
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,966
Received Thanks: 3,329
Quote:
Originally Posted by abdeen View Post
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?
Spirited is offline  
Thanks
1 User
Old 01/27/2018, 14:01   #7
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
Received Thanks: 14
Quote:
Originally Posted by Spirited View Post
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..
abdeen is offline  
Old 01/27/2018, 15:11   #8
 
elite*gold: 67
Join Date: Aug 2014
Posts: 1,314
Received Thanks: 920
Quote:
Originally Posted by abdeen View Post
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.MapId0), (ushort)sizeof(MsgStatus)); 

after that It'll ask for Equips, Skills/Spells,...
Xio. is offline  
Thanks
1 User
Old 01/27/2018, 16:08   #9
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
Received Thanks: 14
Quote:
Originally Posted by Xio. View Post
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.MapId0), (ushort)sizeof(MsgStatus)); 
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...
abdeen is offline  
Old 01/27/2018, 20:31   #10
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,966
Received Thanks: 3,329
Quote:
Originally Posted by abdeen View Post
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();
    }
}
Spirited is offline  
Thanks
1 User
Old 01/27/2018, 23:33   #11
 
elite*gold: 0
Join Date: Apr 2017
Posts: 87
Received Thanks: 50
Quote:
Originally Posted by Spirited View Post
/// 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 XML comments? 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
{

}
boDil is offline  
Thanks
1 User
Old 01/28/2018, 01:13   #12
 
elite*gold: 12
Join Date: Jul 2011
Posts: 6,966
Received Thanks: 3,329
Quote:
Originally Posted by boDil View Post
Pull request: Fix PacketDump documentation.

By the way, are you aware of XML comments? 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();
        }
    }
Spirited is offline  
Thanks
1 User
Old 01/28/2018, 10:32   #13
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
Received Thanks: 14
Quote:
Originally Posted by Spirited View Post
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
abdeen is offline  
Old 01/28/2018, 10:37   #14
 
elite*gold: 0
Join Date: Apr 2017
Posts: 87
Received Thanks: 50
Quote:
Originally Posted by Spirited View Post
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.
boDil is offline  
Thanks
1 User
Old 01/28/2018, 10:40   #15
 
elite*gold: 0
Join Date: Mar 2010
Posts: 474
Received Thanks: 14
Quote:
Originally Posted by boDil View Post
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


abdeen is offline  
Reply

Tags
5017 client, c#



« I need 1 Information! | About VPS Protection! »

Similar Threads
After login back to login [Error]
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...
43 Replies - Dekaron Private Server
Login without MC - Login ohne "MC" - Login Sem MC
Deutsch ---------------------------------------------------------------------- Hallo, ich habe einen Server Metin2. Metin2classic.com habe ich...
6 Replies - Metin2 PServer - Discussions / Questions
Login without MC - Login ohne "MC" - Login Sem MC
Deutsch ---------------------------------------------------------------------- Hallo, ich habe einen Server Metin2. Metin2classic.com habe ich...
0 Replies - Metin2 PServer - Discussions / Questions



All times are GMT +2. The time now is 06:41.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.