From f083caf28d5184f4ca4f5dbad968fb92d6a2f0f0 Mon Sep 17 00:00:00 2001 From: Aleos Date: Wed, 13 Apr 2022 13:37:40 -0400 Subject: [PATCH] Fixes Status Database All CalcFlag (#6826) * Fixes #6812. * Resolves an issue with the All CalcFlag not properly being parsed for the Status Database resulting in these statuses not starting and ending the bonuses. Thanks to @eppc0330! --- src/map/status.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/map/status.cpp b/src/map/status.cpp index 66c8450521..83d28c7018 100644 --- a/src/map/status.cpp +++ b/src/map/status.cpp @@ -14759,18 +14759,16 @@ uint64 StatusDatabase::parseBodyNode(const ryml::NodeRef& node) { if (this->nodeExists(node, "CalcFlags")) { const ryml::NodeRef& flagNode = node["CalcFlags"]; - for (const auto &it : flagNode) { - if (this->nodeExists(it, "All")) { - bool active; + if (this->nodeExists(flagNode, "All")) { + bool active; - if (!this->asBool(it, "All", active)) - return 0; + if (!this->asBool(flagNode, "All", active)) + return 0; - if (active) - status->calc_flag = this->getSCB_ALL(); - else - status->calc_flag.reset(); - } + if (active) + status->calc_flag = this->getSCB_ALL(); + else + status->calc_flag.reset(); } for (const auto &it : flagNode) {