From 0a34809bb3cb36312746428d1e3c1db7b039be76 Mon Sep 17 00:00:00 2001 From: splose Date: Sun, 21 Nov 2021 10:15:36 -0500 Subject: [PATCH] [Bug Fix] - Monk AA Spirit of Master Wu (#1775) * Monk AA Spirit of Master Wu sends message even if it grants 0 extra attacks. * fomatting + put if statement in wrong place.. oops. * Need to push something to set up my Tortoise Github Auth * test * test * test * test * test * requested changes * Update special_attacks.cpp Co-authored-by: Kinglykrab <89047260+Kinglykrab@users.noreply.github.com> --- zone/special_attacks.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/zone/special_attacks.cpp b/zone/special_attacks.cpp index d29206db0..6f99acc9e 100644 --- a/zone/special_attacks.cpp +++ b/zone/special_attacks.cpp @@ -403,10 +403,16 @@ void Client::OPCombatAbility(const CombatAbility_Struct *ca_atk) } wuchance /= 4; } - // They didn't add a string ID for this. - std::string msg = StringFormat("The spirit of Master Wu fills you! You gain %d additional attack(s).", extra); - // live uses 400 here -- not sure if it's the best for all clients though - SendColoredText(400, msg); + if (extra) { + SendColoredText( + 400, + fmt::format( + "The spirit of Master Wu fills you! You gain {} additional attack{}.", + extra, + extra != 1 ? "s" : "" + ) + ); + } auto classic = RuleB(Combat, ClassicMasterWu); while (extra) { MonkSpecialAttack(GetTarget(), (classic ? MonkSPA[zone->random.Int(0, 4)] : ca_atk->m_skill));