[Quest API] Fix Perl EVENT_HP double parsing in Spire. (#2585)

This condition caused the variables to show twice due to the way Sprie parses the source code, and the condition itself is unnecessary since we can just use an inline ternary in this case.
This commit is contained in:
Alex King
2022-11-27 14:27:27 -05:00
committed by GitHub
parent 9a7770377d
commit fb4d4e1382
+2 -8
View File
@@ -1588,14 +1588,8 @@ void PerlembParser::ExportEventVariables(
}
case EVENT_HP: {
if (extradata == 1) {
ExportVar(package_name.c_str(), "hpevent", "-1");
ExportVar(package_name.c_str(), "inchpevent", data);
}
else {
ExportVar(package_name.c_str(), "hpevent", data);
ExportVar(package_name.c_str(), "inchpevent", "-1");
}
ExportVar(package_name.c_str(), "hpevent", extradata ? "-1" : data);
ExportVar(package_name.c_str(), "inchpevent", extradata ? data : "-1");
break;
}