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:
Michael Cook (mackal)
2015-06-06 17:46:53 -04:00
parent 03bc245318
commit 42a5ddcf77
9 changed files with 35 additions and 28 deletions
+1 -1
View File
@@ -3693,7 +3693,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons
//send an HP update if we are hurt
if(GetHP() < GetMaxHP())
SendHPUpdate();
SendHPUpdate(!iBuffTic); // the OP_Damage actually updates the client in these cases, so we skill them
} //end `if damage was done`
//send damage packet...