[Quest API] Add $target export to EVENT_INSPECT in Perl (#2891)

* [Quest API] Add $target export to EVENT_INSPECT in Perl

# Notes
- Exports `$target` to `EVENT_INSPECT`.
- Allows operators to get information from target directly instead of using entity list.

* Update client_packet.cpp
This commit is contained in:
Alex King
2023-02-12 23:43:38 -05:00
committed by GitHub
parent e8f01fb6ac
commit 2c75e8fcd4
2 changed files with 10 additions and 7 deletions
+7 -7
View File
@@ -9398,13 +9398,13 @@ void Client::Handle_OP_LDoNDisarmTraps(const EQApplicationPacket *app)
void Client::Handle_OP_LDoNInspect(const EQApplicationPacket *app)
{
Mob * target = GetTarget();
if (target && target->GetClass() == LDON_TREASURE && !target->IsAura())
{
std::vector<std::any> args = { target };
if (parse->EventPlayer(EVENT_INSPECT, this, "", target->GetID(), &args) == 0)
{
Message(Chat::Yellow, "%s", target->GetCleanName());
auto* t = GetTarget();
if (t && t->GetClass() == LDON_TREASURE && !t->IsAura()) {
if (parse->PlayerHasQuestSub(EVENT_INSPECT)) {
std::vector<std::any> args = { t };
if (parse->EventPlayer(EVENT_INSPECT, this, "", t->GetID(), &args) == 0) {
Message(Chat::Yellow, fmt::format("{}", t->GetCleanName()).c_str());
}
}
}
}