[Quest API] Optionally parse EVENT_WARP

# Notes
- Optionally parse this event instead of always doing so.
This commit is contained in:
Kinglykrab
2023-02-12 16:47:43 -05:00
parent 107e768c90
commit d8acb9883d
+13 -4
View File
@@ -43,14 +43,18 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
zone->GetShortName() zone->GetShortName()
); );
LogCheat(fmt::runtime(message)); LogCheat(fmt::runtime(message));
std::string export_string = fmt::format(
if (parse->PlayerHasQuestSub(EVENT_WARP)) {
const auto& export_string = fmt::format(
"{} {} {}", "{} {} {}",
position1.x, position1.x,
position1.y, position1.y,
position1.z position1.z
); );
parse->EventPlayer(EVENT_WARP, m_target, export_string, 0); parse->EventPlayer(EVENT_WARP, m_target, export_string, 0);
} }
}
break; break;
case MQWarpAbsolute: case MQWarpAbsolute:
if (RuleB(Cheat, EnableMQWarpDetector) && if (RuleB(Cheat, EnableMQWarpDetector) &&
@@ -72,14 +76,19 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
zone->GetShortName() zone->GetShortName()
); );
LogCheat(fmt::runtime(message)); LogCheat(fmt::runtime(message));
std::string export_string = fmt::format(
if (parse->PlayerHasQuestSub(EVENT_WARP)) {
const auto& export_string = fmt::format(
"{} {} {}", "{} {} {}",
position1.x, position1.x,
position1.y, position1.y,
position1.z position1.z
); );
parse->EventPlayer(EVENT_WARP, m_target, export_string, 0);
m_time_since_last_warp_detection.Start(2500); parse->EventPlayer(EVENT_WARP, m_target, export_string, 0);;
}
m_time_since_last_warp_detection.Start(2500)
} }
break; break;
case MQWarpShadowStep: case MQWarpShadowStep: