From 9ecdf057db733434f9bd93c5c82c31ddbfab0095 Mon Sep 17 00:00:00 2001 From: Aeadoin <109764533+Aeadoin@users.noreply.github.com> Date: Sat, 11 Mar 2023 20:46:31 -0500 Subject: [PATCH] [Feature] Add Heroic Strikethrough & HP Regen Per Second to GM Entity Info (#3055) * [Feature] Add Heroic Strikethrough to GM Entity Info * [Feature] Add Heroic Strikethrough to GM Entity Info * typo --- zone/mob_info.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/zone/mob_info.cpp b/zone/mob_info.cpp index f30bc646f..69693a8b0 100644 --- a/zone/mob_info.cpp +++ b/zone/mob_info.cpp @@ -377,8 +377,17 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut scaling_modified = " *"; } - return Strings::Commify(std::to_string((int) npc->GetHPRegen())) + scaling_modified; + return Strings::Commify(std::to_string(npc->GetHPRegen())) + scaling_modified; } + + if (attribute == "hp_regen_per_second") { + if (mob->EntityVariableExists("modify_stat_hp_regen_per_second")) { + scaling_modified = " *"; + } + + return Strings::Commify(std::to_string(npc->GetHPRegenPerSecond())) + scaling_modified; + } + if (attribute == "attack_delay") { if (mob->EntityVariableExists("modify_stat_attack_delay")) { scaling_modified = " *"; @@ -401,9 +410,21 @@ inline std::string GetMobAttributeByString(Mob *mob, const std::string &attribut return Strings::Commify(std::to_string((int) npc->GetHealScale())) + scaling_modified; } if (attribute == "avoidance") { + if (mob->EntityVariableExists("modify_stat_avoidance")) { + scaling_modified = " *"; + } + return Strings::Commify(std::to_string(npc->GetAvoidanceRating())) + scaling_modified; } + if (attribute == "heroic_strikethrough") { + if (mob->EntityVariableExists("modify_stat_heroic_strikethrough")) { + scaling_modified = " *"; + } + + return Strings::Commify(std::to_string(npc->GetHeroicStrikethrough())) + scaling_modified; + } + npc->GetNPCEmote(npc->GetEmoteID(), 0); } @@ -725,10 +746,12 @@ void Mob::DisplayInfo(Mob *mob) "min_hit", "max_hit", "hp_regen", + "hp_regen_per_second", "attack_delay", "spell_scale", "heal_scale", "avoidance", + "heroic_strikethrough", }; window_text += WriteDisplayInfoSection(mob, "NPC Stats", npc_stats, 1, true);