[Feature] Add Character Auto Login (#4216)

* [Feature] Add Character Auto Login

* Add commands and finalize.

* Add methods without character name.

* Update perl_client.cpp

* Add other methods.

* Repository methods.

* Update account_repository.h

* Update command_subsettings_repository.h

* Update command_subsettings_repository.h

* Update client.cpp
This commit is contained in:
Alex King
2024-04-15 06:13:39 -04:00
committed by GitHub
parent ac12ba153e
commit 0a3f1d3c41
19 changed files with 346 additions and 121 deletions
+9 -3
View File
@@ -194,14 +194,20 @@ bool Client::CanTradeFVNoDropItem()
void Client::SendEnterWorld(std::string name)
{
std::string live_name {};
if (is_player_zoning) {
live_name = database.GetLiveChar(GetAccountID());
if(database.GetAccountIDByChar(live_name) != GetAccountID()) {
if (database.GetAccountIDByChar(live_name) != GetAccountID()) {
eqs->Close();
return;
} else {
LogInfo("Telling client to continue session");
}
LogInfo("Zoning with live_name [{}] account_id [{}]", live_name, GetAccountID());
}
if (RuleB(World, EnableAutoLogin)) {
live_name = AccountRepository::GetAutoLoginCharacterNameByAccountID(database, GetAccountID());
LogInfo("Attempting to auto login with live_name [{}] account_id [{}]", live_name, GetAccountID());
}
auto outapp = new EQApplicationPacket(OP_EnterWorld, live_name.length() + 1);