mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +00:00
Add NPC Max Aggro Distance to zone table
This commit is contained in:
+1
-1
@@ -1194,7 +1194,7 @@ void Mob::AI_Process() {
|
||||
// NPCs will forget people after 10 mins of not interacting with them or out of range
|
||||
// both of these maybe zone specific, hardcoded for now
|
||||
if (hate_list_cleanup_timer.Check()) {
|
||||
hate_list.RemoveStaleEntries(600000, 600.0f);
|
||||
hate_list.RemoveStaleEntries(600000, static_cast<float>(zone->newzone_data.NPCAggroMaxDist));
|
||||
if (hate_list.IsHateListEmpty()) {
|
||||
AI_Event_NoLongerEngaged();
|
||||
zone->DelAggroMob();
|
||||
|
||||
+3
-1
@@ -146,7 +146,8 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
"gravity, " // 56
|
||||
"fast_regen_hp, " // 57
|
||||
"fast_regen_mana, " // 58
|
||||
"fast_regen_endurance " // 59
|
||||
"fast_regen_endurance, " // 59
|
||||
"npc_max_aggro_dist " // 60
|
||||
"FROM zone WHERE zoneidnumber = %i AND version = %i",
|
||||
zoneid, instance_id);
|
||||
auto results = QueryDatabase(query);
|
||||
@@ -194,6 +195,7 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
|
||||
zone_data->FastRegenHP = atoi(row[57]);
|
||||
zone_data->FastRegenMana = atoi(row[58]);
|
||||
zone_data->FastRegenEndurance = atoi(row[59]);
|
||||
zone_data->NPCAggroMaxDist = atoi(row[60]);
|
||||
|
||||
int bindable = 0;
|
||||
bindable = atoi(row[31]);
|
||||
|
||||
Reference in New Issue
Block a user