mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-26 11:01:28 +00:00
[Quest API] (Performance) Check event EVENT_FEIGN_DEATH exists before export and execute (#2916)
* [Quest API] Optionally parse EVENT_FEIGN_DEATH # Notes - Optionally parse this event instead of always doing so. * Remove unused reference, fix other PR * Update task_client_state.cpp --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
parent
9836b5cf67
commit
de047fb851
@ -81,10 +81,10 @@ void CheatManager::CheatDetected(CheatTypes type, glm::vec3 position1, glm::vec3
|
||||
position1.z
|
||||
);
|
||||
|
||||
parse->EventPlayer(EVENT_WARP, m_target, export_string, 0);;
|
||||
parse->EventPlayer(EVENT_WARP, m_target, export_string, 0);
|
||||
}
|
||||
|
||||
m_time_since_last_warp_detection.Start(2500)
|
||||
m_time_since_last_warp_detection.Start(2500);
|
||||
}
|
||||
break;
|
||||
case MQWarpShadowStep:
|
||||
|
||||
@ -3662,21 +3662,25 @@ void EntityList::ClearFeignAggro(Mob *targ)
|
||||
}
|
||||
|
||||
if (targ->IsClient()) {
|
||||
std::vector<std::any> args;
|
||||
args.push_back(it->second);
|
||||
int i = parse->EventPlayer(EVENT_FEIGN_DEATH, targ->CastToClient(), "", 0, &args);
|
||||
if (i != 0) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
if (parse->PlayerHasQuestSub(EVENT_FEIGN_DEATH)) {
|
||||
std::vector<std::any> args = { it->second };
|
||||
|
||||
if (it->second->IsNPC()) {
|
||||
int i = parse->EventNPC(EVENT_FEIGN_DEATH, it->second->CastToNPC(), targ, "", 0);
|
||||
int i = parse->EventPlayer(EVENT_FEIGN_DEATH, targ->CastToClient(), "", 0, &args);
|
||||
if (i != 0) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (it->second->IsNPC()) {
|
||||
if (parse->HasQuestSub(it->second->GetNPCTypeID(), EVENT_FEIGN_DEATH)) {
|
||||
int i = parse->EventNPC(EVENT_FEIGN_DEATH, it->second->CastToNPC(), targ, "", 0);
|
||||
if (i != 0) {
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
it->second->RemoveFromHateList(targ);
|
||||
|
||||
@ -2202,6 +2202,7 @@ void ClientTaskState::AcceptNewTask(
|
||||
.task_name = task_manager->GetTaskName(static_cast<uint32>(task_id)),
|
||||
};
|
||||
RecordPlayerEventLogWithClient(client, PlayerEvent::TASK_ACCEPT, e);
|
||||
}
|
||||
}
|
||||
|
||||
if (parse->PlayerHasQuestSub(EVENT_TASK_ACCEPTED)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user