Help new packet login

04/08/2020 13:55 redbull2905#1
[Only registered and activated users can see links. Click Here To Register...]

I changed the value which is now 3125 but it still shows me this error


my code :

Code:
 default:
                            {
                                if (loadedAccount.Authority < AuthorityType.SMOD)
                                {
                                    MaintenanceLogDTO maintenanceLog = DAOFactory.MaintenanceLogDAO.LoadFirst();
                                    if (maintenanceLog != null && maintenanceLog.DateStart < DateTime.Now)
                                        {
                                            _session.SendPacket($"failc {(byte)LoginFailType.Maintenance}");
                                            return;
                                    }
                                }

                                int newSessionId = SessionFactory.Instance.GenerateSessionId();
                                Logger.Debug(string.Format(Language.Instance.GetMessageFromKey("CONNECTION"), user.Name,
                                    newSessionId));
                                try
                                {
                                    ipAddress = ipAddress.Substring(6, ipAddress.LastIndexOf(':') - 6);
                                    CommunicationServiceClient.Instance.RegisterAccountLogin(loadedAccount.AccountId,
                                        newSessionId, ipAddress);
                                }
                                catch (Exception ex)
                                {
                                    Logger.Error("General Error SessionId: " + newSessionId, ex);
                                }

                                    string[] clientData = loginPacket.ClientData.Split('.');

                                    if (clientData.Length < 2)
                                    {
                                        clientData = loginPacket.ClientDataOld.Split('.');
                                    }

                                    bool ignoreUserName = short.TryParse(clientData[3], out short clientVersion)
                                                          && (clientVersion < 3125
                                                           || ConfigurationManager.AppSettings["UseOldCrypto"] == "true");
                                    _session.SendPacket(BuildServersPacket(user.Name, newSessionId, ignoreUserName));
                            }
04/08/2020 15:38 Apourtartt#2
1) CountryID is in the login packet (Nos°577 and NsTeST)
2) if you are using the new loging system, it also appears in the "Username GF [countryID]" packet
04/08/2020 16:58 Rajmund1337#3
4 at the end is PL
I think it will be the same like ports
4004 - PL so at the end login should be 4

Thanks GF that could be usefull for Priv servers (player select in launcher language and then can play with his lang, not english)
04/08/2020 17:29 Apourtartt#4
Code:
const QMap <QString, int> langToId
{
    { "EN", 0 },
    { "DE", 1 },
    { "FR", 2 },
    { "IT", 3 },
    { "PL", 4 },
    { "ES", 5 },
    { "CZ", 6 },
    { "RU", 7 },
    { "TR", 8 }
};
04/08/2020 17:42 aluffino#5
This is the old packet when u login


This Is the new Packet

If u check the New Packet it have "286a3f41-b293-4735-9535-8bf5375ef204" this is the language by GF but i don't know how to fix it in the opennos source
04/08/2020 17:52 redbull2905#6
Quote:
Originally Posted by Apourtartt View Post
Code:
const QMap <QString, int> langToId
{
    { "EN", 0 },
    { "DE", 1 },
    { "FR", 2 },
    { "IT", 3 },
    { "PL", 4 },
    { "ES", 5 },
    { "CZ", 6 },
    { "RU", 7 },
    { "TR", 8 }
};
where do we put that?
04/08/2020 18:05 Apourtartt#7
Nowhere, I added it to complete this message :
Quote:
Originally Posted by Rajmund1337 View Post
4 at the end is PL
I think it will be the same like ports
4004 - PL so at the end login should be 4

Thanks GF that could be usefull for Priv servers (player select in launcher language and then can play with his lang, not english)
04/08/2020 21:22 Blowa#8
We are talking here about a string parsing, just a needle in a stack, it's about this kind of basic things.
[Only registered and activated users can see links. Click Here To Register...]
04/17/2020 12:15 p0w40wn3rz#9
Super noob here! how can i read login packets packets?
Wan't to learn how to implement this to change my game region.
04/17/2020 17:26 stefano78#10
nobody call tell you the answer because they don't have any idea please be quit and look another site when you don't have the answer that is not the help
04/18/2020 11:49 p0w40wn3rz#11
Quote:
Originally Posted by stefano78 View Post
nobody call tell you the answer because they don't have any idea please be quit and look another site when you don't have the answer that is not the help
Just saying that i'm willing to learn and help. i also have some info looking at the nosmall code.
if anyone who knows how to program want's to try and bypass send my a pm i guess.