mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
feat: Add some save data tests (#1623)
* saving from a test works * testing works * Update SavingTests.cpp * test dServer stuff * tests * use dummy database and add missing pure fns * add more tests * add more tests * add rocket tests * Update BuffComponent.h * Update test_xml_data.xml * Update SavingTests.cpp * update
This commit is contained in:
@@ -40,8 +40,8 @@ void Character::UpdateInfoFromDatabase() {
|
||||
auto charInfo = Database::Get()->GetCharacterInfo(m_ID);
|
||||
|
||||
if (charInfo) {
|
||||
m_Name = charInfo->name;
|
||||
m_UnapprovedName = charInfo->pendingName;
|
||||
m_Name = charInfo->name;
|
||||
m_UnapprovedName = charInfo->pendingName;
|
||||
m_NameRejected = charInfo->needsRename;
|
||||
m_PropertyCloneID = charInfo->cloneId;
|
||||
m_PermissionMap = charInfo->permissionMap;
|
||||
|
@@ -38,6 +38,7 @@ public:
|
||||
|
||||
const std::string& GetXMLData() const { return m_XMLData; }
|
||||
const tinyxml2::XMLDocument& GetXMLDoc() const { return m_Doc; }
|
||||
void _setXmlDoc(tinyxml2::XMLDocument& doc) { doc.DeepCopy(&m_Doc); }
|
||||
|
||||
/**
|
||||
* Out of abundance of safety and clarity of what this saves, this is its own function.
|
||||
@@ -459,6 +460,10 @@ public:
|
||||
|
||||
User* GetParentUser() const { return m_ParentUser; }
|
||||
|
||||
void _doQuickXMLDataParse() { DoQuickXMLDataParse(); }
|
||||
|
||||
void _setXmlData(const std::string& xmlData) { m_XMLData = xmlData; }
|
||||
|
||||
private:
|
||||
void UpdateInfoFromDatabase();
|
||||
/**
|
||||
|
@@ -25,6 +25,8 @@ struct ZoneStatistics {
|
||||
uint64_t m_CoinsCollected;
|
||||
uint64_t m_EnemiesSmashed;
|
||||
uint64_t m_QuickBuildsCompleted;
|
||||
|
||||
bool operator==(const ZoneStatistics& rhs) const = default;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -279,9 +281,9 @@ public:
|
||||
*/
|
||||
void UpdateClientMinimap(bool showFaction, std::string ventureVisionType) const;
|
||||
|
||||
void SetCurrentInteracting(LWOOBJID objectID) {m_CurrentInteracting = objectID;};
|
||||
void SetCurrentInteracting(LWOOBJID objectID) { m_CurrentInteracting = objectID; };
|
||||
|
||||
LWOOBJID GetCurrentInteracting() {return m_CurrentInteracting;};
|
||||
LWOOBJID GetCurrentInteracting() { return m_CurrentInteracting; };
|
||||
|
||||
/**
|
||||
* Sends a player to another zone with an optional clone ID
|
||||
@@ -307,6 +309,14 @@ public:
|
||||
|
||||
void SetDroppedCoins(const uint64_t value) { m_DroppedCoins = value; };
|
||||
|
||||
const std::array<uint64_t, 4>& GetClaimCodes() const { return m_ClaimCodes; };
|
||||
|
||||
const std::map<LWOMAPID, ZoneStatistics>& GetZoneStatistics() const { return m_ZoneStatistics; };
|
||||
|
||||
const std::u16string& GetLastRocketConfig() const { return m_LastRocketConfig; };
|
||||
|
||||
uint64_t GetTotalTimePlayed() const { return m_TotalTimePlayed; };
|
||||
|
||||
/**
|
||||
* Character info regarding this character, including clothing styles, etc.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user