From a6cd0bc33aefc3e0c9015cb833a1839dfe152074 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Sat, 29 Jan 2022 20:54:26 -0500 Subject: [PATCH] [Bug Fix] Do not allow /open to be used on traps or auras, causes crash (#1951) * Update client_packet.cpp * [Bug Fix] Do not allow /open to be used on traps or auras, causes crash * [Bug Fix] Do not allow /open to be used on traps or auras, causes crash --- zone/client_packet.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 9965778fc..05fa73495 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -9052,7 +9052,7 @@ void Client::Handle_OP_LDoNButton(const EQApplicationPacket *app) void Client::Handle_OP_LDoNDisarmTraps(const EQApplicationPacket *app) { Mob * target = GetTarget(); - if (target->IsNPC()) + if (target && target->IsNPC() && !target->IsAura()) { if (HasSkill(EQ::skills::SkillDisarmTraps)) { @@ -9071,21 +9071,22 @@ 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) + if (target && target->GetClass() == LDON_TREASURE && !target->IsAura()) Message(Chat::Yellow, "%s", target->GetCleanName()); } void Client::Handle_OP_LDoNOpen(const EQApplicationPacket *app) { Mob * target = GetTarget(); - if (target && target->IsNPC()) + if (target && target->IsNPC() && !target->IsAura()) { HandleLDoNOpen(target->CastToNPC()); + } } void Client::Handle_OP_LDoNPickLock(const EQApplicationPacket *app) { Mob * target = GetTarget(); - if (target->IsNPC()) + if (target && target->IsNPC() && !target->IsAura()) { if (HasSkill(EQ::skills::SkillPickLock)) { @@ -9104,7 +9105,7 @@ void Client::Handle_OP_LDoNPickLock(const EQApplicationPacket *app) void Client::Handle_OP_LDoNSenseTraps(const EQApplicationPacket *app) { Mob * target = GetTarget(); - if (target->IsNPC()) + if (target && target->IsNPC() && !target->IsAura()) { if (HasSkill(EQ::skills::SkillSenseTraps)) {