UCS / Raid / Zone Fixes (#1033)

* Cache EntityList::GetRaidByClient

* Adjustments [skip ci]

* Update entity [skip ci]

* More cleanup [skip ci]

* More tweaks [skip ci]

* Cleanup [skip ci]

* Fix bugs with UCS reconnection on crash / exit, not adding soft deleted characters, put main loop on UV lib

* Reduce log spam that should be debugging; send keepalives to clients so that they properly prune from the connection list

* Shutdown the eventloop to properly shutdown the zone versus calling a hard exit
This commit is contained in:
Chris Miles
2020-04-14 23:28:43 -05:00
committed by GitHub
parent bffeee8d1a
commit 16cfad1966
14 changed files with 146 additions and 69 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ void Database::GetAccountStatus(Client *client)
{
std::string query = StringFormat(
"SELECT `status`, `hideme`, `karma`, `revoked` FROM `account` WHERE `id` = '%i' LIMIT 1",
"SELECT `status`, `hideme`, `karma`, `revoked` FROM `account` WHERE `id` = %i LIMIT 1",
client->GetAccountID()
);
@@ -173,7 +173,7 @@ int Database::FindAccount(const char *characterName, Client *client)
query = StringFormat(
"SELECT `id`, `name`, `level` FROM `character_data` "
"WHERE `account_id` = %i AND `name` != '%s'",
"WHERE `account_id` = %i AND `name` != '%s' AND deleted_at is NULL",
accountID, characterName
);
@@ -320,7 +320,7 @@ void Database::SendHeaders(Client *client)
int unknownField3 = 1;
int characterID = FindCharacter(client->MailBoxName().c_str());
LogInfo("Sendheaders for [{}], CharID is [{}]", client->MailBoxName().c_str(), characterID);
LogDebug("Sendheaders for [{}], CharID is [{}]", client->MailBoxName().c_str(), characterID);
if (characterID <= 0) {
return;