mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-11 09:58:05 +00:00
Added reputation tracker in charxml
This commit is contained in:
@@ -256,7 +256,11 @@ void CharacterComponent::LoadFromXML() {
|
||||
Game::logger->Log("CharacterComponent", "Failed to find char tag while loading XML!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (character->QueryAttribute("rpt", &m_Reputation) == tinyxml2::XML_NO_ATTRIBUTE) {
|
||||
SetReputation(0);
|
||||
}
|
||||
|
||||
Game::logger->Log("CharacterComponent", "error is %i", character->QueryAttribute("rpt", &m_Reputation));
|
||||
character->QueryInt64Attribute("ls", &m_Uscore);
|
||||
|
||||
// Load the statistics
|
||||
@@ -378,6 +382,8 @@ void CharacterComponent::UpdateXml(tinyxml2::XMLDocument* doc) {
|
||||
}
|
||||
|
||||
character->SetAttribute("ls", m_Uscore);
|
||||
// Custom attribute to keep track of reputation.
|
||||
character->SetAttribute("rpt", GetReputation());
|
||||
character->SetAttribute("stt", StatisticsToString().c_str());
|
||||
|
||||
// Set the zone statistics of the form <zs><s/> ... <s/></zs>
|
||||
|
Reference in New Issue
Block a user