mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-12 19:28:21 +00:00
Add better logs to saving (#1068)
* Fix overread in projectile behavior * Fix stuns * Correctly read in bitStream * Fix projectile behavior * Address movement type issues * Update shutdown time to be accurate * Fix small issues * Fix missing template * Add note for compile jobs * Add bounds check for speed division * Add better logs
This commit is contained in:
parent
5479cf4428
commit
cffb1449d8
@ -373,7 +373,7 @@ void Character::SaveXMLToDatabase() {
|
||||
|
||||
//Call upon the entity to update our xmlDoc:
|
||||
if (!m_OurEntity) {
|
||||
Game::logger->Log("Character", "We didn't have an entity set while saving! CHARACTER WILL NOT BE SAVED!");
|
||||
Game::logger->Log("Character", "%i:%s didn't have an entity set while saving! CHARACTER WILL NOT BE SAVED!", this->GetID(), this->GetName().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@ -384,7 +384,7 @@ void Character::SaveXMLToDatabase() {
|
||||
//For metrics, log the time it took to save:
|
||||
auto end = std::chrono::system_clock::now();
|
||||
std::chrono::duration<double> elapsed = end - start;
|
||||
Game::logger->Log("Character", "Saved character to Database in: %fs", elapsed.count());
|
||||
Game::logger->Log("Character", "%i:%s Saved character to Database in: %fs", this->GetID(), this->GetName().c_str(), elapsed.count());
|
||||
}
|
||||
|
||||
void Character::SetIsNewLogin() {
|
||||
@ -396,7 +396,7 @@ void Character::SetIsNewLogin() {
|
||||
while (currentChild) {
|
||||
if (currentChild->Attribute("si")) {
|
||||
flags->DeleteChild(currentChild);
|
||||
Game::logger->Log("Character", "Removed isLoggedIn flag from character %i, saving character to database", GetID());
|
||||
Game::logger->Log("Character", "Removed isLoggedIn flag from character %i:%s, saving character to database", GetID(), GetName().c_str());
|
||||
WriteToDatabase();
|
||||
}
|
||||
currentChild = currentChild->NextSiblingElement();
|
||||
|
Loading…
Reference in New Issue
Block a user