Skip to content

Commit aea0bb1

Browse files
committed
Support latest loginWebService address
1 parent 1cdd229 commit aea0bb1

2 files changed

Lines changed: 4 additions & 23 deletions

File tree

Apps/Watch/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Program
3737

3838
static string _recordingName;
3939

40-
static int _httpPort = 80;
40+
static int _httpPort = 7171;
4141

4242
static bool _userQuit;
4343

@@ -107,9 +107,7 @@ static void Main(string[] args)
107107

108108
Initialize();
109109

110-
while (Console.ReadLine() != "quit")
111-
{
112-
}
110+
while (Console.ReadLine() != "quit") { }
113111

114112
_userQuit |= _clientSendThread != null;
115113
}

TibiaAPI/Network/Connection.cs

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ namespace OXGaming.TibiaAPI.Network
2323
/// </summary>
2424
public class Connection : Communication, IDisposable
2525
{
26-
private const string loginWebService1100 = "https://secure.tibia.com/services/login.php";
27-
private const string loginWebService1132 = "https://secure.tibia.com/services/clientservices.php";
28-
private const string loginWebService1186 = "https://www.tibia.com/services/clientservices.php";
26+
private const string LOGIN_WEB_SERVICE = "https://www.tibia.com/clientservices/loginservice.php";
2927

3028
private readonly object _clientSendLock = new object();
3129
private readonly object _serverSendLock = new object();
@@ -1002,22 +1000,7 @@ private async Task<byte[]> PostAsync(string content)
10021000

10031001
private string GetLoginWebService()
10041002
{
1005-
if (!string.IsNullOrEmpty(_loginWebService))
1006-
{
1007-
return _loginWebService;
1008-
}
1009-
1010-
if (_client.VersionNumber >= 11867253)
1011-
{
1012-
return loginWebService1186;
1013-
}
1014-
1015-
if (_client.VersionNumber >= 11325206)
1016-
{
1017-
return loginWebService1132;
1018-
}
1019-
1020-
return loginWebService1100;
1003+
return !string.IsNullOrEmpty(_loginWebService) ? _loginWebService : LOGIN_WEB_SERVICE;
10211004
}
10221005

10231006
#region IDisposable Support

0 commit comments

Comments
 (0)