mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
configure server host and port in enter game
This commit is contained in:
@@ -27,6 +27,12 @@
|
||||
#include <framework/graphics/graphics.h>
|
||||
#include <framework/core/eventdispatcher.h>
|
||||
|
||||
void UICheckBox::setup()
|
||||
{
|
||||
UIWidget::setup();
|
||||
setFocusable(false);
|
||||
}
|
||||
|
||||
void UICheckBox::render()
|
||||
{
|
||||
if(m_image) {
|
||||
|
@@ -28,6 +28,7 @@
|
||||
class UICheckBox : public UIWidget
|
||||
{
|
||||
public:
|
||||
void setup();
|
||||
void render();
|
||||
|
||||
bool isChecked();
|
||||
|
@@ -45,8 +45,6 @@ namespace Otc
|
||||
|
||||
static const int ClientVersion = 862;
|
||||
static const int PicSignature = 0x4E119CBF;
|
||||
static const char* Host = "sv3.radbr.com";
|
||||
static const int HostPort = 7171;
|
||||
|
||||
enum OsTypes {
|
||||
OsWindow = 1,
|
||||
|
@@ -33,7 +33,7 @@ ProtocolLogin::ProtocolLogin()
|
||||
enableChecksum();
|
||||
}
|
||||
|
||||
void ProtocolLogin::login(const std::string& accountName, const std::string& accountPassword)
|
||||
void ProtocolLogin::login(const std::string& host, int port, const std::string& accountName, const std::string& accountPassword)
|
||||
{
|
||||
if(accountName.empty() || accountPassword.empty()) {
|
||||
callLuaField("onError", "You must enter an account name and password.");
|
||||
@@ -43,7 +43,7 @@ void ProtocolLogin::login(const std::string& accountName, const std::string& acc
|
||||
m_accountName = accountName;
|
||||
m_accountPassword = accountPassword;
|
||||
|
||||
connect(Otc::Host, Otc::HostPort);
|
||||
connect(host, port);
|
||||
}
|
||||
|
||||
void ProtocolLogin::onConnect()
|
||||
|
@@ -36,7 +36,7 @@ public:
|
||||
|
||||
static ProtocolLoginPtr create() { return ProtocolLoginPtr(new ProtocolLogin); }
|
||||
|
||||
void login(const std::string& accountName, const std::string& accountPassword);
|
||||
void login(const std::string& host, int port, const std::string& accountName, const std::string& accountPassword);
|
||||
void cancelLogin() { disconnect(); }
|
||||
|
||||
void onConnect();
|
||||
|
Reference in New Issue
Block a user