leorbmello Posted April 27, 2021 Posted April 27, 2021 Hi guys,I might need a help on understanding what am i missing here.* Client version 6907I already know that the packet id's have changed and already updated the packet id list. From what i can see, the client is ready to display the character at the screen and so on... but i get stuck at Initializing after sending the CofirmLocation information, it seems i'm missing something at the login sequence to get there.Well, this is the message action handler: public void MsgActionHandler(ClientSocket pClient, byte[] buffer) { MsgAction pInfo = new MsgAction(buffer); switch (pInfo.Action) { case MsgActionType.ConfirmLocation: { // send location to the client pClient.Send(new MsgAction(pClient.Character.Identity, 10160, pClient.Character.PosX, pClient.Character.PosY, MsgActionType.ConfirmLocation)); // load character inventory and equipments before spawn to others. // pClient.Character.LoadInventory(); // pClient.Character.LoadEquipment(); // // execute the entermap (load screen and etc) pClient.Character.EnterMap(); break; } /*case MsgActionType.ConfirmHotkeys: { //pClient.Send(pInfo); break; } case MsgActionType.ConfirmFriends: { // pClient.Send(pInfo); break; } case MsgActionType.ConfirmProficiencies: { // pClient.Character.SendCharacterProfs(); // pClient.Send(pInfo); break; } case MsgActionType.ConfirmSpells: { // pClient.Character.SendCharacterMagics(); // pClient.Send(pInfo); break; } case MsgActionType.ConfirmGuild: { // pClient.Send(pInfo); break; } case MsgActionType.ConfirmLogin: { // pClient.Send(pInfo); break; } case MsgActionType.ChangeFlyMapPortal: { if(!WorldManager.Portals.ContainsKey(pClient.Character.MapIdentity)) { Program.WriteLine("Invalid mapportal at : " + pClient.Character.MapIdentity + "(" + pClient.Character.PosX + ", " + pClient.Character.PosY + ")"); pClient.Character.FlyMap(1002, 430, 380); return; } PortalInfo pPortal = null; foreach (PortalInfo pPortalInfo in WorldManager.Portals[pClient.Character.MapIdentity].Values) if (pPortalInfo.PosX == pInfo.LeftData0 && pPortalInfo.PosY == pInfo.RightData0) { pPortal = pPortalInfo; break; } if (pPortal == null) { Program.WriteLine("Invalid passway at : " + pClient.Character.MapIdentity + "(" + pClient.Character.PosX + ", " + pClient.Character.PosY + ")"); pClient.Character.FlyMap(1002, 430, 380); return; } pClient.Character.FlyMap(pPortal.TargetMap, pPortal.TargetPosX, pPortal.TargetPosY); break; } case MsgActionType.PlayerJump: { pClient.Character.MovePos(MoveModeType.Jump, 0, pInfo.LeftData0, pInfo.RightData0, pInfo); break; }*/ case MsgActionType.ChangePKMode: { pInfo.Info.dwParam3 = pInfo.Info.dwParam; pClient.Send(pInfo); break; } default: { Program.WriteLine(String.Format("Missing MsgAction Handler: {0}[{1}]", pInfo.Action, (int)pInfo.Action)); Report(buffer); pClient.Send(pInfo); break; } } } When i send the ConfirmLocation, the client replies the ChangePK packet... From what i could check, the new versions are using the ProtoBuffer to build some packets, so i tested using this structure for the MsgAction: [ProtoContract] public class MsgActionInfo { [ProtoMember(1, IsRequired = true)] public uint Identity; [ProtoMember(2)] public uint Target; [ProtoMember(3)] public uint dwParam; [ProtoMember(4)] public int dwParam2; [ProtoMember(5)] public long dwParam3; [ProtoMember(6)] public bool SucDone; [ProtoMember(7)] public uint TargetPositionX; [ProtoMember(8)] public uint TargetPositionY; [ProtoMember(9, IsRequired = true)] public uint Timestamp; [ProtoMember(10)] public int TargetNpcIdentity; [ProtoMember(11)] public uint CheatLogData1; [ProtoMember(12, IsRequired = true)] public ushort Type; [ProtoMember(13, IsRequired = true)] public ushort Facing; [ProtoMember(14, IsRequired = true)] public uint PositionX; [ProtoMember(15, IsRequired = true)] public uint PositionY; [ProtoMember(16)] public uint CheatLogData2; [ProtoMember(17)] public uint MapID; [ProtoMember(18)] public uint CheatLogData3; [ProtoMember(19)] public int ScheduleTime; [ProtoMember(20)] public int LinkIndex; [ProtoMember(21)] public uint CheatLogData4; [ProtoMember(22)] public int RemainTime; [ProtoMember(23)] public bool MountCharge; [ProtoMember(24)] public List<byte[]> Strings; }And i got stuck here:Is there something new to the ConfirmLocation, or is the packet structure wrong? Quote
leorbmello Posted April 27, 2021 Author Posted April 27, 2021 The problem was just the ActionType... i was sending it wrong, i can login already, i just have to work on the positions now. Quote
leorbmello Posted April 27, 2021 Author Posted April 27, 2021 I've already setup the msg action correctly and some other packets, but i have a problem with showing the character name on the client with the character info, seems i'm missing the offset... i've tested the trial and error like building and rebuilding, offset by offset... but i didn't make it...i could spawn all character main informations correctly, but not the name... from what i've seen, the ShowName offset has been removed, is that correct?By the way, this will be a opensource project... i just want to setup the basics. Quote
Spirited Posted April 27, 2021 Posted April 27, 2021 Yeah, I don't think it's been used for a while. I'm not super familiar with the higher patches, but it looks like this is the latest that got added to the packet wiki: https://gitlab.com/conquer-online/wiki/-/wikis/Packets/MsgUserInfo#patch-5808. It won't be an exact match, but it might help with guessing some of the offsets. Optionally, you could also reverse the client like I have outlined here: Quote
leorbmello Posted April 27, 2021 Author Posted April 27, 2021 Aww thanks, good point, i've checked the wiki and also got nearly all offsets of the packet, just missing the name one.Gonna try the disassembler, thanks! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.