From 4490a53ba07b1d5858bf6bdad192965ddbc4d657 Mon Sep 17 00:00:00 2001 From: Fryguy Date: Sun, 7 Jan 2024 16:02:17 -0500 Subject: [PATCH] [Bug Fix] Disciplines Getting Focuses Fix (#3884) * [Bug Fix] Discs Getting Focuses Fix Focus effects shouldn't extend discipline timers except for War Cries * Update to Logic --- common/spdat.h | 7 +++++++ zone/effects.cpp | 16 ++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/common/spdat.h b/common/spdat.h index 10c8f8103..6c12ae033 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -204,6 +204,13 @@ #define SPELL_GUIDE_HASTE 39854 #define SPELL_VAMPIRIC_EMBRACE 821 #define SPELL_VAMPIRIC_EMBRACE_OF_SHADOW 822 +#define SPELL_BATTLE_CRY 5027 +#define SPELL_WAR_CRY 5028 +#define SPELL_BATTLE_CRY_OF_DRAVEL 5029 +#define SPELL_WAR_CRY_OF_DRAVEL 5030 +#define SPELL_BATTLE_CRY_OF_THE_MASTRUQ 5031 +#define SPELL_ANCIENT_CRY_OF_CHAOS 5032 +#define SPELL_BLOODTHIRST 8476 // discipline IDs. #define DISC_UNHOLY_AURA 4520 diff --git a/zone/effects.cpp b/zone/effects.cpp index b1b126f75..ad0821ae9 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -592,6 +592,22 @@ int32 Mob::GetActSpellCost(uint16 spell_id, int32 cost) int32 Mob::GetActSpellDuration(uint16 spell_id, int32 duration) { + // focuses don't affect discipline duration (Except War Cries) + if ( + IsDiscipline(spell_id) && + ( + spell_id != SPELL_BATTLE_CRY && + spell_id != SPELL_WAR_CRY && + spell_id != SPELL_BATTLE_CRY_OF_DRAVEL && + spell_id != SPELL_WAR_CRY_OF_DRAVEL && + spell_id != SPELL_BATTLE_CRY_OF_THE_MASTRUQ && + spell_id != SPELL_ANCIENT_CRY_OF_CHAOS && + spell_id != SPELL_BLOODTHIRST + ) + ) { + return duration; + } + int increase = 100; increase += GetFocusEffect(focusSpellDuration, spell_id); int tic_inc = 0;