mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-28 08:27:22 +00:00
Player: Saving fixes
Address issue of allowing a character to be saved before they were ready for updates.
This commit is contained in:
parent
3d85f6639e
commit
6a4f310d89
@ -314,6 +314,11 @@ void Character::SaveXMLToDatabase() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_OurEntity->GetPlayerReadyForUpdates()) {
|
||||||
|
LOG("Attempted to save before player %i:%s was not ready for updates. Character will NOT be saved.", GetID(), GetName().c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
m_OurEntity->UpdateXMLDoc(m_Doc);
|
m_OurEntity->UpdateXMLDoc(m_Doc);
|
||||||
|
|
||||||
WriteToDatabase();
|
WriteToDatabase();
|
||||||
|
Loading…
Reference in New Issue
Block a user