[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
This commit is contained in:
KayenEQ 2022-01-29 20:54:26 -05:00 committed by GitHub
parent cba95851a2
commit a6cd0bc33a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
{