Unify scanning rules [skip ci]

This commit is contained in:
Akkadius 2019-12-29 20:46:40 -06:00
parent a5d41b02b7
commit 67562e3e42
4 changed files with 45 additions and 47 deletions

View File

@ -567,7 +567,6 @@ RULE_INT(Range, MobPositionUpdates, 600, "")
RULE_INT(Range, ClientPositionUpdates, 300, "")
RULE_INT(Range, ClientForceSpawnUpdateRange, 1000, "")
RULE_INT(Range, CriticalDamage, 80, "")
RULE_INT(Range, ClientNPCScan, 300, "")
RULE_INT(Range, MobCloseScanDistance, 600, "")
RULE_CATEGORY_END()

View File

@ -161,7 +161,7 @@ Client::Client(EQStreamInterface* ieqs)
m_AutoAttackTargetLocation(0.0f, 0.0f, 0.0f),
last_region_type(RegionTypeUnsupported),
m_dirtyautohaters(false),
npc_close_scan_timer(6000),
mob_close_scan_timer(6000),
hp_self_update_throttle_timer(300),
hp_other_update_throttle_timer(500),
position_update_timer(10000),

View File

@ -1523,7 +1523,7 @@ private:
Timer afk_toggle_timer;
Timer helm_toggle_timer;
Timer aggro_meter_timer;
Timer npc_close_scan_timer;
Timer mob_close_scan_timer;
Timer hp_self_update_throttle_timer; /* This is to prevent excessive packet sending under trains/fast combat */
Timer hp_other_update_throttle_timer; /* This is to keep clients from DOSing the server with macros that change client targets constantly */
Timer position_update_timer; /* Timer used when client hasn't updated within a 10 second window */

View File

@ -253,13 +253,12 @@ bool Client::Process() {
/**
* Scan close range mobs
*
* Used in aggro checks
*/
if (npc_close_scan_timer.Check()) {
if (mob_close_scan_timer.Check()) {
close_mobs.clear();
float scan_range = (RuleI(Range, ClientNPCScan) * RuleI(Range, ClientNPCScan));
float scan_range = RuleI(Range, MobCloseScanDistance) * RuleI(Range, MobCloseScanDistance);
auto &mob_list = entity_list.GetMobList();
for (auto itr : mob_list) {