public void Write(Packet packet) { packet.Write(Id, 32); packet.WriteWString(Name); packet.Write(0, 32); packet.Write(0, 32); packet.Write(Type, 2); packet.Write(Status, 3); packet.Write(Population, 3); packet.Write(0, 32); packet.Write(0, 64); packet.Write(0, 64); packet.Write(0, 14); packet.Write(0, 32); packet.WriteWString(""); packet.Write(0, 64); packet.Write(0, 16); packet.Write(0, 16); packet.Write(0, 16); packet.Write(0, 16); }
public static void HandleAuthRequest(Packet packet, AuthSession session) { packet.Read<uint>(32); packet.Read<ulong>(64); var loginName = packet.ReadString(); Console.WriteLine($"Account '{loginName}' tries to connect."); //var account = DB.Auth.Single<Account>(a => a.Email == loginName); //if (account != null && account.Online) { var authComplete = new Packet(ServerMessage.AuthComplete); authComplete.Write(0, 32); session.Send(authComplete); var connectToRealm = new Packet(ServerMessage.ConnectToRealm); connectToRealm.Write(BitConverter.ToUInt32(new byte[] { 1, 0, 0, 127 }, 0), 32); connectToRealm.Write(24000, 16); connectToRealm.Write(0, 64); connectToRealm.Write(0, 64); connectToRealm.Write(0, 32); connectToRealm.WriteWString("Multi-Emu"); connectToRealm.Write(0, 2); connectToRealm.Write(0, 21); session.Send(connectToRealm); } }
public void Write(Packet packet) { packet.Write(RealmId, 32); packet.Write(Messages.Count, 8); Messages.ForEach(m => packet.WriteWString(m)); }