mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
[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:
+2
-8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user