Fix for #npcedit qglobal

This commit is contained in:
JJ 2013-11-06 21:12:57 -05:00
parent b8d1838dcc
commit da3ba12560
2 changed files with 6 additions and 3 deletions

View File

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

View File

@ -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);
}