fix: session flags not being loaded every other world load (#1763)

tested that news screen no longer shows up on every other world load
This commit is contained in:
David Markowitz 2025-04-11 07:10:38 -07:00 committed by GitHub
parent f5c212fb86
commit 6b0f3a66e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -204,6 +204,7 @@ void Character::DoQuickXMLDataParse() {
while (currentChild) { while (currentChild) {
const auto* temp = currentChild->Attribute("v"); const auto* temp = currentChild->Attribute("v");
const auto* id = currentChild->Attribute("id"); const auto* id = currentChild->Attribute("id");
const auto* si = currentChild->Attribute("si");
if (temp && id) { if (temp && id) {
uint32_t index = 0; uint32_t index = 0;
uint64_t value = 0; uint64_t value = 0;
@ -212,6 +213,9 @@ void Character::DoQuickXMLDataParse() {
value = std::stoull(temp); value = std::stoull(temp);
m_PlayerFlags.insert(std::make_pair(index, value)); m_PlayerFlags.insert(std::make_pair(index, value));
} else if (si) {
auto value = GeneralUtils::TryParse<uint32_t>(si);
if (value) m_SessionFlags.insert(value.value());
} }
currentChild = currentChild->NextSiblingElement(); currentChild = currentChild->NextSiblingElement();
} }