mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Re-add variable client aggro scanning timers missing from merge
This commit is contained in:
parent
fac75b6f16
commit
474f59e269
@ -4580,6 +4580,33 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
rewind_timer.Start(30000, true);
|
||||
}
|
||||
|
||||
/* Handle client aggro scanning timers NPCs */
|
||||
is_client_moving = (ppu->y_pos == m_Position.y && ppu->x_pos == m_Position.x) ? false : true;
|
||||
|
||||
if (is_client_moving) {
|
||||
Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration());
|
||||
if (client_scan_npc_aggro_timer.GetDuration() > 1000) {
|
||||
|
||||
npc_close_scan_timer.Disable();
|
||||
npc_close_scan_timer.Start(500);
|
||||
|
||||
client_scan_npc_aggro_timer.Disable();
|
||||
client_scan_npc_aggro_timer.Start(500);
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
Log(Logs::Detail, Logs::Normal, "ClientUpdate: Client is NOT moving - scan timer is: %u", client_scan_npc_aggro_timer.GetDuration());
|
||||
if (client_scan_npc_aggro_timer.GetDuration() < 1000) {
|
||||
|
||||
npc_close_scan_timer.Disable();
|
||||
npc_close_scan_timer.Start(6000);
|
||||
|
||||
client_scan_npc_aggro_timer.Disable();
|
||||
client_scan_npc_aggro_timer.Start(3000);
|
||||
}
|
||||
}
|
||||
|
||||
// Outgoing client packet
|
||||
float tmpheading = EQ19toFloat(ppu->heading);
|
||||
/* The clients send an update at best every 1.3 seconds
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user