[Loginserver] Modernize codebase (#4647)

* Beginning of cleanup

* More cleanup

* More cleanup

* Enc cleanup

* client manager cleanup

* client cleanup

* More cleanup

* More cleanup

* Cleanup

* More cleanup, account  context, account management

* Remove positional fmt bindings

* Use LoginAccountContext

* Update loginserver_webserver.cpp

* Remove comments

* Port CreateLoginServerAccount to repositories

* More cleanup

* More cleanup

* More cleanup

* More cleanup

* Remove a ton of functions

* More cleanup

* More cleanup

* More cleanup

* Cleanup SendClientAuthToWorld

* Consolidate world server logic

* Update login_accounts_repository.h

* Update login_accounts_repository.h

* Move api tokens to repositories

* Cleanup options

* Move everything else to repositories

* Update account_management.cpp

* uint64 account

* Update login_schema.sql

* Fix

* Update world_server.cpp

* auto
This commit is contained in:
Chris Miles
2025-02-06 12:47:02 -06:00
committed by GitHub
parent 1650efa787
commit 1a48add20e
33 changed files with 1566 additions and 3990 deletions
+4 -3
View File
@@ -164,9 +164,9 @@ void ClientListEntry::LSUpdate(ZoneServer *iZS)
if (WorldConfig::get()->UpdateStats) {
auto pack = new ServerPacket;
pack->opcode = ServerOP_LSZoneInfo;
pack->size = sizeof(ZoneInfo_Struct);
pack->size = sizeof(LoginserverZoneInfoUpdate);
pack->pBuffer = new uchar[pack->size];
ZoneInfo_Struct *zone = (ZoneInfo_Struct *) pack->pBuffer;
auto *zone = (LoginserverZoneInfoUpdate *) pack->pBuffer;
zone->count = iZS->NumPlayers();
zone->zone = iZS->GetZoneID();
zone->zone_wid = iZS->GetID();
@@ -174,6 +174,7 @@ void ClientListEntry::LSUpdate(ZoneServer *iZS)
safe_delete(pack);
}
}
void ClientListEntry::LSZoneChange(ZoneToZone_Struct *ztz)
{
if (WorldConfig::get()->UpdateStats) {
@@ -181,7 +182,7 @@ void ClientListEntry::LSZoneChange(ZoneToZone_Struct *ztz)
pack->opcode = ServerOP_LSPlayerZoneChange;
pack->size = sizeof(ServerLSPlayerZoneChange_Struct);
pack->pBuffer = new uchar[pack->size];
ServerLSPlayerZoneChange_Struct *zonechange = (ServerLSPlayerZoneChange_Struct *) pack->pBuffer;
auto *zonechange = (ServerLSPlayerZoneChange_Struct *) pack->pBuffer;
zonechange->lsaccount_id = LSID();
zonechange->from = ztz->current_zone_id;
zonechange->to = ztz->requested_zone_id;