static public void HandlePacket(BaseClient client, PacketIn packet) { LobbyClient cclient = (LobbyClient)client; byte sloid = packet.GetUint8(); Program.CharMgr.SetEnter(cclient.Account.Id, sloid); WorldInfo Info = Program.CharMgr.GetWorldInfo(cclient.Account.WorldId); PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_WORLD_ENTER); if (Info == null) { Out.WriteUInt32R(1); } else { Out.WriteUInt32R(0); Out.WriteInt32R(Info.Ip); // WorldServerIp Out.WriteUInt16R((UInt16)Info.Port); // Port Out.WriteInt64R(TCPManager.GetTimeStamp()); } cclient.SendTCP(Out); }
static public void Send(LobbyClient client) { PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_LOGIN_SUCCESS); Out.WriteUnicodeString(client.Account.RealTag, 48); Out.WriteUInt32R(21); // Account Type Out.WriteInt64R(TCPManager.GetTimeStamp()); // Temps avant expiration du compte Out.WriteByte(0x13); // ms Out.WriteByte(0x29); // sec Out.WriteUInt16R(0x12); // Hour // Date de création Out.WriteByte(0x0E); // day Out.WriteByte(0x07); // month Out.WriteUInt16R(2010); // Year Out.WriteInt32R(1450); // Temps de jeu (secondes) Out.WriteInt32R(client.Account.Points); // Points APB for (int i = 1; i < 6; ++i) { Out.WriteInt32R( Program.FileMgr.GetFileVersion(client.Account.Id, i, true, "", "")); // Config file, Server Version } Out.WriteInt32R(0); Out.WriteUInt16(0x957D); Out.WriteUInt16(0x0400); Out.WriteUInt16(0x5052); Out.WriteUInt16(0x4F45); Out.WriteUInt16(0x552E); Out.WriteUInt16(0x3232); Out.WriteUInt16(0x3738); Out.WriteUInt16(0x3031); Out.WriteUInt16(0); Out.WriteUInt16(0x0067); Out.WriteUInt64(0x526C624331313256); Out.WriteUInt64(0x486E314100000000); Out.WriteUInt16(0); Out.WriteStringBytes(""); Out.WriteByte(0); client.SendTCP(Out); ANS_CHARACTER_INFO.Send(client); }
static public void Send(LobbyClient client) { PacketOut Out = new PacketOut((UInt32)Opcodes.LOGIN_PUZZLE); Out.WriteInt32R(Program.Version[0]); Out.WriteInt32R(Program.Version[1]); Out.WriteInt32R(Program.Version[2]); Out.WriteInt32R(Program.Build); Out.WriteByte(0x05); Out.WriteInt64R(-313054979819954861); Out.WriteUInt32R(0); Out.WriteUInt32R(0); Out.WriteUInt32R(0); client.SendTCP(Out); }
static public void HandlePacket(BaseClient client, PacketIn packet) { WorldClient cclient = (WorldClient)client; UInt32 AcctId = packet.GetUint32R(); Log.Debug("AskWorldEnter", "New client, Account = " + AcctId); cclient.Account = Program.CharMgr.GetAccount((int)AcctId); cclient.Character = Program.CharMgr.GetInfoForEnter((int)AcctId); PacketOut Out = new PacketOut((UInt32)Opcodes.ANS_WORLD_ENTER); if (cclient.Account == null || cclient.Character == null) { Out.WriteInt32R(1); } else { Out.WriteInt32R(0); Out.WriteInt32R(cclient.Character.Character.Id); Out.WriteInt32R(cclient.Account.Points); // Points Out.WriteByte(1); Out.WriteInt64R(TCPManager.GetTimeStamp()); Out.WriteFloat(5.00f); // fMarketPlaceMinimumBidPct Out.WriteByte(0); // GroupPublic Out.WriteByte(0); // GroupInvite Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 1, false, Program.Config.WorldName, cclient.Character.Character.Name)); // ConfigFileVersion Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 2, false, Program.Config.WorldName, cclient.Character.Character.Name)); Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 3, false, Program.Config.WorldName, cclient.Character.Character.Name)); Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 4, false, Program.Config.WorldName, cclient.Character.Character.Name)); Out.WriteInt32R(Program.FileMgr.GetFileVersion(cclient.Account.Id, 5, false, Program.Config.WorldName, cclient.Character.Character.Name)); Out.WriteByte(1); // Tutorial Complete Out.WriteByte(0); // lookInForGroup } cclient.SendTCP(Out); }