From 34a4b2ab37578e471cc141073d03bcef179f6c87 Mon Sep 17 00:00:00 2001 From: Derision Date: Sat, 23 Feb 2013 23:12:10 +0000 Subject: [PATCH] Misc fizes. --- zone/command.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/zone/command.cpp b/zone/command.cpp index 4355427c5..364cbfea2 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -11373,7 +11373,14 @@ void command_camerashake(Client *c, const Seperator *sep) void command_disarmtrap(Client *c, const Seperator *sep) { - Mob * target = c->GetTarget(); + Mob *target = c->GetTarget(); + + if(!target) + { + c->Message(13, "You must have a target."); + return; + } + if(target->IsNPC()) { if(c->HasSkill(DISARM_TRAPS)) @@ -11392,7 +11399,13 @@ void command_disarmtrap(Client *c, const Seperator *sep) void command_sensetrap(Client *c, const Seperator *sep) { - Mob * target = c->GetTarget(); + Mob * target = c->GetTarget(); + if(!target) + { + c->Message(13, "You must have a target."); + return; + } + if(target->IsNPC()) { if(c->HasSkill(SENSE_TRAPS)) @@ -11411,7 +11424,13 @@ void command_sensetrap(Client *c, const Seperator *sep) void command_picklock(Client *c, const Seperator *sep) { - Mob * target = c->GetTarget(); + Mob * target = c->GetTarget(); + if(!target) + { + c->Message(13, "You must have a target."); + return; + } + if(target->IsNPC()) { if(c->HasSkill(PICK_LOCK))