Address news feed showing up on every world transfer (#855)

Addresses the news feed showing up on every world transfer
This commit is contained in:
David Markowitz
2022-11-27 22:19:15 -08:00
committed by GitHub
parent 56da3f8543
commit 09dfb6df3a
4 changed files with 56 additions and 12 deletions

View File

@@ -23,6 +23,10 @@ public:
Character(uint32_t id, User* parentUser);
~Character();
/**
* Write the current m_Doc to the database for saving.
*/
void WriteToDatabase();
void SaveXMLToDatabase();
void UpdateFromDatabase();
@@ -32,6 +36,15 @@ public:
const std::string& GetXMLData() const { return m_XMLData; }
tinyxml2::XMLDocument* GetXMLDoc() const { return m_Doc; }
/**
* Out of abundance of safety and clarity of what this saves, this is its own function.
*
* Clears the s element from the flag element and saves the xml to the database. Used to prevent the news
* feed from showing up on world transfers.
*
*/
void SetIsNewLogin();
/**
* Gets the database ID of the character
* @return the database ID of the character
@@ -427,7 +440,7 @@ public:
/**
* @brief Get the flying state
* @return value of the flying state
* @return value of the flying state
*/
bool GetIsFlying() { return m_IsFlying; }