mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
Fix integer issue with BricksCollected (#679)
This fixes an issue where BricksCollected goes to an insane number after selling more bricks than you collected in the area
This commit is contained in:
parent
26ddeaa429
commit
f80a26a944
@ -211,7 +211,7 @@ void CharacterComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
|||||||
ZoneStatistics statistics = {};
|
ZoneStatistics statistics = {};
|
||||||
|
|
||||||
child->QueryUnsigned64Attribute("ac", &statistics.m_AchievementsCollected);
|
child->QueryUnsigned64Attribute("ac", &statistics.m_AchievementsCollected);
|
||||||
child->QueryUnsigned64Attribute("bc", &statistics.m_BricksCollected);
|
child->QueryInt64Attribute("bc", &statistics.m_BricksCollected);
|
||||||
child->QueryUnsigned64Attribute("cc", &statistics.m_CoinsCollected);
|
child->QueryUnsigned64Attribute("cc", &statistics.m_CoinsCollected);
|
||||||
child->QueryUnsigned64Attribute("es", &statistics.m_EnemiesSmashed);
|
child->QueryUnsigned64Attribute("es", &statistics.m_EnemiesSmashed);
|
||||||
child->QueryUnsigned64Attribute("qbc", &statistics.m_QuickBuildsCompleted);
|
child->QueryUnsigned64Attribute("qbc", &statistics.m_QuickBuildsCompleted);
|
||||||
@ -226,6 +226,7 @@ void CharacterComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const tinyxml2::XMLAttribute* rocketConfig = character->FindAttribute("lcbp");
|
const tinyxml2::XMLAttribute* rocketConfig = character->FindAttribute("lcbp");
|
||||||
|
|
||||||
if (rocketConfig) {
|
if (rocketConfig) {
|
||||||
m_LastRocketConfig = GeneralUtils::ASCIIToUTF16(std::string(rocketConfig->Value()));
|
m_LastRocketConfig = GeneralUtils::ASCIIToUTF16(std::string(rocketConfig->Value()));
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
struct ZoneStatistics {
|
struct ZoneStatistics {
|
||||||
uint64_t m_AchievementsCollected;
|
uint64_t m_AchievementsCollected;
|
||||||
uint64_t m_BricksCollected;
|
int64_t m_BricksCollected;
|
||||||
uint64_t m_CoinsCollected;
|
uint64_t m_CoinsCollected;
|
||||||
uint64_t m_EnemiesSmashed;
|
uint64_t m_EnemiesSmashed;
|
||||||
uint64_t m_QuickBuildsCompleted;
|
uint64_t m_QuickBuildsCompleted;
|
||||||
@ -431,7 +431,7 @@ private:
|
|||||||
/**
|
/**
|
||||||
* The total amount of bricks collected by this character
|
* The total amount of bricks collected by this character
|
||||||
*/
|
*/
|
||||||
uint64_t m_BricksCollected;
|
int64_t m_BricksCollected;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The total amount of entities smashed by this character
|
* The total amount of entities smashed by this character
|
||||||
|
Loading…
Reference in New Issue
Block a user