diff --git a/changelog.txt b/changelog.txt index 649e3968f..0b964c528 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,9 @@ demonstar55: Incrase Mob kick/bash timer by 3 demonstar55: Fix slow effect on NPC special attack reuse timers see: http://www.eqemulator.org/forums/showthread.php?t=38734 demonstar55: Slow fixes to bots! +demonstar55: Revamped how NPC attack rate is set + SQL: 2014_09_09_attack_delay.sql +demonstar55: Added attackdelay to #npcedit == 09/08/2014 == demonstar55: Fix slow calc diff --git a/zone/command.cpp b/zone/command.cpp index aa7e13760..61ddf72d3 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -7159,6 +7159,15 @@ void command_npcedit(Client *c, const Seperator *sep) c->LogSQL(query); safe_delete_array(query); } + else if ( strcasecmp( sep->arg[1], "Attackdelay" ) == 0 ) + { + char errbuf[MYSQL_ERRMSG_SIZE]; + char *query = 0; + c->Message(15,"NPCID %u now has attack_delay set to %f",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atof(sep->arg[2])); + database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set attack_delay=%f where id=%i",atof(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf); + c->LogSQL(query); + safe_delete_array(query); + } else if ( strcasecmp( sep->arg[1], "findable" ) == 0 ) { char errbuf[MYSQL_ERRMSG_SIZE];