From f6f3060c9da5a278e5d62b16d5efafc0da70ee16 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Mon, 24 Jul 2017 22:58:58 -0400 Subject: [PATCH] Fix trap removal --- zone/client_packet.cpp | 12 +++++++++++- zone/string_ids.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 777bcdeb9..95c9013b2 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -11805,7 +11805,17 @@ void Client::Handle_OP_RemoveTrap(const EQApplicationPacket *app) } auto id = app->ReadUInt32(0); - RemoveAura(id); + bool good = false; + for (int i = 0; i < trap_mgr.count; ++i) { + if (trap_mgr.auras[i].spawn_id == id) { + good = true; + break; + } + } + if (good) + RemoveAura(id); + else + Message_StringID(MT_SpellFailure, NOT_YOUR_TRAP); // pretty sure this was red } void Client::Handle_OP_Report(const EQApplicationPacket *app) diff --git a/zone/string_ids.h b/zone/string_ids.h index 663d2067a..c8175c8b6 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -286,6 +286,7 @@ #define TRADESKILL_LEARN_RECIPE 3457 //You have learned the recipe %1! #define EXPEDITION_MIN_REMAIN 3551 //You only have %1 minutes remaining before this expedition comes to an end. #define LOOT_NOT_ALLOWED 3562 //You are not allowed to loot the item: %1. +#define NOT_YOUR_TRAP 3671 //You cannot remove this, you are only allowed to remove traps you have set. #define NO_CAST_ON_PET 4045 //You cannot cast this spell on your pet. #define REWIND_WAIT 4059 //You must wait a bit longer before using the rewind command again. #define CORPSEDRAG_LIMIT 4061 //You are already dragging as much as you can!