mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-11 18:02:23 +00:00
Added npc_types.assistradius, defaults to npc_types.aggroradius if set to 0
This commit is contained in:
parent
65e36e02fb
commit
300799fdc8
@ -1,5 +1,8 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 11/18/2013 ==
|
||||||
|
demonstar55: Added assistradius to npc_types, defaults to aggroradius if set to 0 (old behaviour)
|
||||||
|
|
||||||
== 11/17/2013 ==
|
== 11/17/2013 ==
|
||||||
Sorvani: fixed leash and tether special abilities to use the specified range correctly.
|
Sorvani: fixed leash and tether special abilities to use the specified range correctly.
|
||||||
demonstar55: Rewrote the Mob::_GetMovementSpeed fix an issue that arose from the change on 11/11
|
demonstar55: Rewrote the Mob::_GetMovementSpeed fix an issue that arose from the change on 11/11
|
||||||
|
|||||||
1
utils/sql/git/required/2013_11_18_AssistRadius.sql
Normal file
1
utils/sql/git/required/2013_11_18_AssistRadius.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `npc_types` ADD `assistradius` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `aggroradius`;
|
||||||
@ -6647,6 +6647,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
c->Message(0, "#npcedit Mindmg - Sets an NPCs minimum damage");
|
c->Message(0, "#npcedit Mindmg - Sets an NPCs minimum damage");
|
||||||
c->Message(0, "#npcedit Maxdmg - Sets an NPCs maximum damage");
|
c->Message(0, "#npcedit Maxdmg - Sets an NPCs maximum damage");
|
||||||
c->Message(0, "#npcedit Aggroradius - Sets an NPCs aggro radius");
|
c->Message(0, "#npcedit Aggroradius - Sets an NPCs aggro radius");
|
||||||
|
c->Message(0, "#npcedit Assistradius - Sets an NPCs assist radius");
|
||||||
c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction");
|
c->Message(0, "#npcedit Social - Set to 1 if an NPC should assist others on its faction");
|
||||||
c->Message(0, "#npcedit Runspeed - Sets an NPCs run speed");
|
c->Message(0, "#npcedit Runspeed - Sets an NPCs run speed");
|
||||||
c->Message(0, "#npcedit MR - Sets an NPCs magic resistance");
|
c->Message(0, "#npcedit MR - Sets an NPCs magic resistance");
|
||||||
@ -6853,6 +6854,15 @@ void command_npcedit(Client *c, const Seperator *sep)
|
|||||||
c->LogSQL(query);
|
c->LogSQL(query);
|
||||||
safe_delete_array(query);
|
safe_delete_array(query);
|
||||||
}
|
}
|
||||||
|
else if ( strcasecmp( sep->arg[1], "assistradius" ) == 0 )
|
||||||
|
{
|
||||||
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
char *query = 0;
|
||||||
|
c->Message(15,"NPCID %u now has an assist radius of %i",c->GetTarget()->CastToNPC()->GetNPCTypeID(),atoi(sep->arg[2]));
|
||||||
|
database.RunQuery(query, MakeAnyLenString(&query, "update npc_types set assistradius=%i where id=%i",atoi(sep->argplus[2]),c->GetTarget()->CastToNPC()->GetNPCTypeID()), errbuf);
|
||||||
|
c->LogSQL(query);
|
||||||
|
safe_delete_array(query);
|
||||||
|
}
|
||||||
else if ( strcasecmp( sep->arg[1], "social" ) == 0 )
|
else if ( strcasecmp( sep->arg[1], "social" ) == 0 )
|
||||||
{
|
{
|
||||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||||
|
|||||||
@ -148,7 +148,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, float x, float y, float z, float
|
|||||||
logging_enabled = NPC_DEFAULT_LOGGING_ENABLED;
|
logging_enabled = NPC_DEFAULT_LOGGING_ENABLED;
|
||||||
|
|
||||||
pAggroRange = d->aggroradius;
|
pAggroRange = d->aggroradius;
|
||||||
pAssistRange = GetAggroRange();
|
pAssistRange = d->assistradius;
|
||||||
findable = d->findable;
|
findable = d->findable;
|
||||||
trackable = d->trackable;
|
trackable = d->trackable;
|
||||||
|
|
||||||
|
|||||||
@ -1046,6 +1046,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
|||||||
"npc_types.hp_regen_rate,"
|
"npc_types.hp_regen_rate,"
|
||||||
"npc_types.mana_regen_rate,"
|
"npc_types.mana_regen_rate,"
|
||||||
"npc_types.aggroradius,"
|
"npc_types.aggroradius,"
|
||||||
|
"npc_types.assistradius,"
|
||||||
"npc_types.bodytype,"
|
"npc_types.bodytype,"
|
||||||
"npc_types.npc_faction_id,"
|
"npc_types.npc_faction_id,"
|
||||||
"npc_types.face,"
|
"npc_types.face,"
|
||||||
@ -1145,6 +1146,9 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
|||||||
// set defaultvalue for aggroradius
|
// set defaultvalue for aggroradius
|
||||||
if (tmpNPCType->aggroradius <= 0)
|
if (tmpNPCType->aggroradius <= 0)
|
||||||
tmpNPCType->aggroradius = 70;
|
tmpNPCType->aggroradius = 70;
|
||||||
|
tmpNPCType->assistradius = (int32)atoi(row[r++]);
|
||||||
|
if (tmpNPCType->assistradius <= 0)
|
||||||
|
tmpNPCType->assistradius = tmpNPCType->aggroradius;
|
||||||
|
|
||||||
if (row[r] && strlen(row[r]))
|
if (row[r] && strlen(row[r]))
|
||||||
tmpNPCType->bodytype = (uint8)atoi(row[r]);
|
tmpNPCType->bodytype = (uint8)atoi(row[r]);
|
||||||
|
|||||||
@ -97,6 +97,7 @@ struct NPCType
|
|||||||
int32 hp_regen;
|
int32 hp_regen;
|
||||||
int32 mana_regen;
|
int32 mana_regen;
|
||||||
int32 aggroradius; // added for AI improvement - neotokyo
|
int32 aggroradius; // added for AI improvement - neotokyo
|
||||||
|
int32 assistradius; // assist radius, defaults to aggroradis if not set
|
||||||
uint8 see_invis; // See Invis flag added
|
uint8 see_invis; // See Invis flag added
|
||||||
bool see_invis_undead; // See Invis vs. Undead flag added
|
bool see_invis_undead; // See Invis vs. Undead flag added
|
||||||
bool see_hide;
|
bool see_hide;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user