Skip to content

Commit

Permalink
Merge pull request #85 from Dyshay/allowDnsName
Browse files Browse the repository at this point in the history
Fix to connect to server
  • Loading branch information
Dyshay authored Mar 11, 2020
2 parents 58a3c7b + 4dd9383 commit f5ac2bf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Comun/Network/TCPClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class TcpClient : IDisposable

public TcpClient(Account prmAccount) => account = prmAccount;

public void ConnectToServer(IPAddress ip, int port)
public void ConnectToServer(IPAddress[] ip, int port)
{
try
{
Expand Down
4 changes: 2 additions & 2 deletions Otros/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public Account(AccountConfig prmAccountConfig)
public void Connect()
{
connexion = new TcpClient(this);
connexion.ConnectToServer(IPAddress.Parse(GlobalConfig.loginIP), GlobalConfig.loginPort);
connexion.ConnectToServer(Dns.GetHostAddresses("dofus-co-retro-f9e1b368375d4153.elb.eu-west-1.amazonaws.com"), GlobalConfig.loginPort);
}

public void Disconnect()
Expand All @@ -74,7 +74,7 @@ public void Disconnect()
public void SwitchToGameServer(string ip, int port)
{
connexion.DisconnectSocket();
connexion.ConnectToServer(IPAddress.Parse(ip), port);
connexion.ConnectToServer(Dns.GetHostAddresses(ip), port);
}

public AccountStates AccountState
Expand Down
2 changes: 1 addition & 1 deletion Utilities/Config/GlobalConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal class GlobalConfig
private static List<AccountConfig> accounts_List;
private static readonly string accounts_List_Path = Path.Combine(Directory.GetCurrentDirectory(), "accounts.bot");
public static bool show_debug_messages { get; set; }
public static string loginIP = "34.251.172.139";
public static string loginIP = "dofus-co-retro-f9e1b368375d4153.elb.eu-west-1.amazonaws.com";
public static short loginPort = 443;

static GlobalConfig()
Expand Down

0 comments on commit f5ac2bf

Please sign in to comment.