Trinitycore: [ICC] Blood Prince Council - Aggro Generation broke

Created on 5 May 2020  路  14Comments  路  Source: TrinityCore/TrinityCore

Description:

You can no longer generate aggro with spells/abilities on the "inactive" (not empowered) bosses in ICC on Blood Prince Council. Issue motsly happens since this huge notested Combat Rewrite. Any advice or hint to update the existing scripts would help! Thanks <3

Current behaviour:

You can no longer generate aggro with spells/abilities on the "inactive" (not empowered) bosses in ICC on Blood Prince Council. Issue motsly happens since this huge notested Combat Rewrite. Any advice or hint to update the existing scripts would help! Thanks <3

Expected behaviour:

You should be able to generate threat with abilities on the inactive bosses.
Steps to reproduce the problem:

  1. Go to Blood Prince Council
  2. Attack non empowered bosses
  3. See that they just walk around like crazy and cannot be tanked

Branch(es):

3.3.5

TC rev. hash/commit:

https://github.com/TrinityCore/TrinityCore/commit/000e49b79306f0191fe5a40f2c541934a8c7cf60

Operating system: Win10

Branch-3.3.5a Comp-Core Sub-Combat

All 14 comments

code is already there

void DamageTaken(Unit* attacker, uint32& damage) override
            {
                if (!_isEmpowered)
                {
                    AddThreat(attacker, float(damage));
                    damage = 0;
                }
            }

in BloodPrincesBossAI but does not seem to have an effect

okay this fixes the casts

diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index 6c7fcc1bdc..b9a00d3113 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -683,7 +683,10 @@ class boss_prince_keleseth_icc : public CreatureScript
                             events.Repeat(Seconds(10), Seconds(15));
                             break;
                         case EVENT_SHADOW_LANCE:
-                            _isEmpowered ? DoCastVictim(SPELL_EMPOWERED_SHADOW_LANCE) : DoCastVictim(SPELL_SHADOW_LANCE);
+                            if (Unit* target = SelectTarget(SELECT_TARGET_MAXTHREAT))
+                            {
+                                _isEmpowered ? DoCast(target, SPELL_EMPOWERED_SHADOW_LANCE) : DoCast(target, SPELL_SHADOW_LANCE);
+                            }                            
                             events.Repeat(Seconds(2));
                             break;
                         default:
@@ -755,7 +758,10 @@ class boss_prince_taldaram_icc : public CreatureScript
                             Talk(EMOTE_TALDARAM_BERSERK);
                             break;
                         case EVENT_GLITTERING_SPARKS:
-                            DoCastVictim(SPELL_GLITTERING_SPARKS);
+                            if (Unit* target = SelectTarget(SELECT_TARGET_MAXTHREAT))
+                            {
+                                DoCast(target, SPELL_GLITTERING_SPARKS);
+                            }
                             events.Repeat(Seconds(15), Seconds(50));
                             break;
                         case EVENT_CONJURE_FLAME:

and soem more

diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index b9a00d3113..2dd4f8d4a3 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -147,7 +147,8 @@ enum Events
     EVENT_BOMB_DESPAWN,
     EVENT_CONTINUE_FALLING,

-    EVENT_CHECK_AURA
+    EVENT_CHECK_AURA,
+    EVENT_ENGAGE_MELEE
 };

 enum Actions
@@ -640,6 +641,7 @@ class boss_prince_keleseth_icc : public CreatureScript
                 events.ScheduleEvent(EVENT_BERSERK, 10min);
                 events.ScheduleEvent(EVENT_SHADOW_RESONANCE, 10s, 15s);
                 events.ScheduleEvent(EVENT_SHADOW_LANCE, 2s);
+                events.ScheduleEvent(EVENT_ENGAGE_MELEE, 2s);

                 if (IsHeroic())
                 {
@@ -689,6 +691,12 @@ class boss_prince_keleseth_icc : public CreatureScript
                             }                            
                             events.Repeat(Seconds(2));
                             break;
+                        case EVENT_ENGAGE_MELEE:
+                            if (Unit* victim = SelectTarget(SELECT_TARGET_MAXTHREAT))
+                                if (!me->HasSpellFocus())
+                                    AttackStart(victim);
+                            events.Repeat(Seconds(2));
+                            break;
                         default:
                             break;
                     }
@@ -721,6 +729,7 @@ class boss_prince_taldaram_icc : public CreatureScript
                 events.ScheduleEvent(EVENT_BERSERK, 10min);
                 events.ScheduleEvent(EVENT_GLITTERING_SPARKS, 12s, 15s);
                 events.ScheduleEvent(EVENT_CONJURE_FLAME, 20s);
+                events.ScheduleEvent(EVENT_ENGAGE_MELEE, 2s);
                 if (IsHeroic())
                     DoCastSelf(SPELL_SHADOW_PRISON, true);
             }
@@ -777,6 +786,12 @@ class boss_prince_taldaram_icc : public CreatureScript
                             }
                             Talk(SAY_TALDARAM_SPECIAL);
                             break;
+                        case EVENT_ENGAGE_MELEE:
+                            if (Unit* victim = SelectTarget(SELECT_TARGET_MAXTHREAT))
+                                if (!me->HasSpellFocus())
+                                    AttackStart(victim);
+                            events.Repeat(Seconds(2));
+                            break;
                         default:
                             break;
                     }
@@ -809,6 +824,7 @@ class boss_prince_valanar_icc : public CreatureScript
                 events.ScheduleEvent(EVENT_BERSERK, 10min);
                 events.ScheduleEvent(EVENT_KINETIC_BOMB, 18s, 24s);
                 events.ScheduleEvent(EVENT_SHOCK_VORTEX, 15s, 20s);
+                events.ScheduleEvent(EVENT_ENGAGE_MELEE, 2s);
                 if (IsHeroic())
                     DoCastSelf(SPELL_SHADOW_PRISON, true);
             }
@@ -883,6 +899,12 @@ class boss_prince_valanar_icc : public CreatureScript
                                 events.Repeat(Seconds(18), Seconds(23));
                             }
                             break;
+                        case EVENT_ENGAGE_MELEE:
+                            if (Unit* victim = SelectTarget(SELECT_TARGET_MAXTHREAT))
+                                if (!me->HasSpellFocus())
+                                    AttackStart(victim);
+                            events.Repeat(Seconds(2));
+                            break;
                         default:
                             break;
                     }

this overrides the mechanic of bool CreatureAI::UpdateVictim() since that does not work on this boss (different threat mechanic)

SELECT_TARGET_MAXTHREAT != GetVictim

that hurts deep /updated

The code in DamageTaken probably does not have an effect because no damage is taken (it is absorbed). I think we probably should review threat generation for absorbed damage. Technically, full damage is "taken", so full threat should be generated, not just the taken damage threat.

wtf?

Combat rewrite wtf yes

Your finding (as well as the attempt to work around it) are all wrong.
Threat works correctly.
Targets are not switched because Prince Keleseth is spam casting Shadow Lance and this prevents targets from switching due to !me->HasSpellFocus() here https://github.com/TrinityCore/TrinityCore/blob/1fecbc6892b41bfe9d1e474d038c3b1f6e2dd125/src/server/game/AI/CreatureAI.cpp#L254

You would have noticed this if you only had fired up the debugger for even 5 minutes

Thanks! But why is it exactly wonky for those 3 bosses and not for other bosses like Ulduar Council or similar?

And:Not only Keleseth is affected by this, the other 2 bosses aswell.

I don't even think this HasSpellFocus() check should be there.

@Rushor I only can reproduce the issue with Keleseth, as @Shauren say, caused by Shadow Lance and focus.

I tried with:

                             events.Repeat(Seconds(10), Seconds(15));
                             break;
                         case EVENT_SHADOW_LANCE:
-                            _isEmpowered ? DoCastVictim(SPELL_EMPOWERED_SHADOW_LANCE) : DoCastVictim(SPELL_SHADOW_LANCE);
+                            _isEmpowered ? DoCastVictim(SPELL_EMPOWERED_SHADOW_LANCE, TRIGGERED_IGNORE_SET_FACING) : DoCastVictim(SPELL_SHADOW_LANCE, TRIGGERED_IGNORE_SET_FACING);
                             events.Repeat(Seconds(2));
                             break;
                         default:

and works, but if you do this, castbar packet isn't send to player, so what can be the fix here?
Can be valid @Rushor initial fix?:

                             events.Repeat(Seconds(10), Seconds(15));
                             break;
                         case EVENT_SHADOW_LANCE:
-                            _isEmpowered ? DoCastVictim(SPELL_EMPOWERED_SHADOW_LANCE) : DoCastVictim(SPELL_SHADOW_LANCE);
+                            if (Unit* target = SelectTarget(SELECT_TARGET_MAXTHREAT))
+                                _isEmpowered ? DoCast(target, SPELL_EMPOWERED_SHADOW_LANCE) : DoCast(target, SPELL_SHADOW_LANCE);
                             events.Repeat(Seconds(2));
                             break;
                         default:

A temp solution for this:

diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
index ceab2903e3..5d8e913b21 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_blood_prince_council.cpp
@@ -648,7 +648,7 @@ struct boss_prince_keleseth_icc : public BloodPrincesBossAI

         events.Update(diff);

-        if (me->HasUnitState(UNIT_STATE_CASTING))
+        if (me->HasUnitState(UNIT_STATE_CASTING) || me->HasSpellFocus())
             return;

         while (uint32 eventId = events.ExecuteEvent())

this can be closed after: 684910a230b2e8e780ad24bc0c4eece835bc249a

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jerbookins picture jerbookins  路  3Comments

Tatara902 picture Tatara902  路  3Comments

funjoker picture funjoker  路  3Comments

Rochet2 picture Rochet2  路  3Comments

Rushor picture Rushor  路  3Comments