mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Cut down on some HP update spam
This increases the timer that mobs will send out updates (It could probably be increased more) This will also reset the timer every time SendHPUpdate is called to prevent sending like 3+ completely useless updates at once Also skip sending the update to the client if we're sending an OP_Damage with the damage since the client will apply this number
This commit is contained in:
+3
-2
@@ -115,7 +115,7 @@ NPC::NPC(const NPCType* d, Spawn2* in_respawn, const glm::vec4& position, int if
|
||||
knightattack_timer(1000),
|
||||
assist_timer(AIassistcheck_delay),
|
||||
qglobal_purge_timer(30000),
|
||||
sendhpupdate_timer(1000),
|
||||
sendhpupdate_timer(2000),
|
||||
enraged_timer(1000),
|
||||
taunt_timer(TauntReuseTime * 1000),
|
||||
m_SpawnPoint(position),
|
||||
@@ -650,7 +650,8 @@ bool NPC::Process()
|
||||
}
|
||||
}
|
||||
|
||||
if (sendhpupdate_timer.Check() && (IsTargeted() || (IsPet() && GetOwner() && GetOwner()->IsClient()))) {
|
||||
// we might actually want to reset in this check ... won't until issues arise at least :P
|
||||
if (sendhpupdate_timer.Check(false) && (IsTargeted() || (IsPet() && GetOwner() && GetOwner()->IsClient()))) {
|
||||
if(!IsFullHP || cur_hp<max_hp){
|
||||
SendHPUpdate();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user