From da3ba12560801116118eb73b9adcbfc5b8871e0a Mon Sep 17 00:00:00 2001 From: JJ Date: Wed, 6 Nov 2013 21:12:57 -0500 Subject: [PATCH] Fix for #npcedit qglobal --- changelog.txt | 5 ++++- zone/command.cpp | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/changelog.txt b/changelog.txt index 42a113c8b..10eb351f7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 11/06/2013 == +JJ: (Kingly_Krab) Fix for #npcedit qglobal command. + == 11/01/2013 == JJ: Added in-game commands to enable/disable tradeskill recipes -Commands: #enablerecipe recipe_id, #disablerecipe recipe_id @@ -19,7 +22,7 @@ Notes: - A per-client method will still need to be observed when coding for the new skill uses == 10/27/2013 == -Uleat: Attempted fix for high level (12) debug compile failiures +Uleat: Attempted fix for high level (12) debug compile failures Notes: - Explicit Windows vs. Linux code was not changed due to my inability to compile Linux code - Only CMake accessible flags were corrected if adding the 'std' namespace did not correct the issue diff --git a/zone/command.cpp b/zone/command.cpp index 93cdf6d46..f9fc24832 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -6983,8 +6983,8 @@ void command_npcedit(Client *c, const Seperator *sep) { char errbuf[MYSQL_ERRMSG_SIZE]; char *query = 0; - c->Message(15,"Quest globals have been %d for NPCID %u",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2])==0?"disabled":"enabled"); - database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set qglobal=%i where id=%i",atoi(sep->argplus[2])==0?0:1,c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf); + c->Message(15, "Quest globals have been %s for NPCID %u", atoi(sep->arg[2]) == 0 ? "disabled" : "enabled", c->GetTarget()->CastToNPC()->GetNPCTypeID()); + database.RunQuery(query, MakeAnyLenString(&query, "UPDATE npc_types SET qglobal=%i WHERE id=%i", atoi(sep->argplus[2]) == 0 ? 0 : 1, c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf); c->LogSQL(query); safe_delete_array(query); }