From a06d5fab89c5685d1baa83f30a90b203b68d99ed Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 28 Mar 2017 15:49:13 -0500 Subject: [PATCH] [Performance] Adjust HP marquee call checks --- zone/attack.cpp | 2 +- zone/client.cpp | 3 --- zone/mob.cpp | 3 ++- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/zone/attack.cpp b/zone/attack.cpp index 5cd5aebae..3a77e81ab 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -3300,7 +3300,7 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const SetHP(GetHP() - damage); - if (IsClient()) + if (IsClient() && RuleB(Character, MarqueeHPUpdates)) this->CastToClient()->SendHPUpdateMarquee(); if(HasDied()) { diff --git a/zone/client.cpp b/zone/client.cpp index 94dd43878..1c3bf7854 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8659,9 +8659,6 @@ void Client::QuestReward(Mob* target, uint32 copper, uint32 silver, uint32 gold, } void Client::SendHPUpdateMarquee(){ - if (!RuleB(Character, MarqueeHPUpdates)) - return; - if (!this || !this->IsClient() || !this->cur_hp || !this->max_hp) return; diff --git a/zone/mob.cpp b/zone/mob.cpp index 9bde2cc0e..651f2f97d 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -1381,7 +1381,8 @@ void Mob::SendHPUpdate(bool skip_self) // send to self - we need the actual hps here if(IsClient() && (!skip_self || dospam)) { - this->CastToClient()->SendHPUpdateMarquee(); + if (RuleB(Character, MarqueeHPUpdates)) + this->CastToClient()->SendHPUpdateMarquee(); auto hp_app2 = new EQApplicationPacket(OP_HPUpdate, sizeof(SpawnHPUpdate_Struct)); SpawnHPUpdate_Struct* ds = (SpawnHPUpdate_Struct*)hp_app2->pBuffer;