diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2017-12-31 03:23:42 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-04-16 20:22:13 +0200 |
| commit | bce43de7f3fba618c370f2aba327d23dd30d1cdd (patch) | |
| tree | 85b786bfa8f5103aaafa0ec01e93b337c29d4a15 /src/server/scripts/Outland/TempestKeep | |
| parent | 8eb3c61f1aea5610cf68fb622f41850d2b934c51 (diff) | |
Core/AI: Some more refactoring prep for #19930. CreatureAI::EnterCombat is now called CreatureAI::JustEngagedWith. There's also two new methods on UnitAI, though they're never invoked right now.
(cherry picked from commit 6113b9dec2e0081c36c36c2974a28ed0693bc601)
Diffstat (limited to 'src/server/scripts/Outland/TempestKeep')
20 files changed, 46 insertions, 46 deletions
diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 185247c7225..07ce00a4a63 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -171,9 +171,9 @@ class boss_alar : public CreatureScript me->setActive(false); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); me->SetDisableGravity(true); // after enterevademode will be set walk movement me->setActive(true); } @@ -510,7 +510,7 @@ class npc_ember_of_alar : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { DoZoneInCombat(); } @@ -574,7 +574,7 @@ class npc_flame_patch_alar : public CreatureScript { npc_flame_patch_alarAI(Creature* creature) : ScriptedAI(creature) { } void Reset() override { } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } void AttackStart(Unit* /*who*/) override { } void MoveInLineOfSight(Unit* /*who*/) override { } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 1e1129b2f7f..f7874b392f7 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -169,10 +169,10 @@ class boss_high_astromancer_solarian : public CreatureScript _JustDied(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); - _EnterCombat(); + _JustEngagedWith(); } void SummonMinion(uint32 entry, float x, float y, float z) @@ -448,7 +448,7 @@ class npc_solarium_priest : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } void UpdateAI(uint32 diff) override { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 4af6ba9dbce..d6e88a17fab 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -905,7 +905,7 @@ class boss_thaladred_the_darkener : public CreatureScript advisorbase_ai::Reset(); } - void EnterCombat(Unit* who) override + void JustEngagedWith(Unit* who) override { Talk(SAY_THALADRED_AGGRO); AddThreat(who, 5000000.0f); @@ -1003,7 +1003,7 @@ class boss_lord_sanguinar : public CreatureScript advisorbase_ai::Reset(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_SANGUINAR_AGGRO); } @@ -1099,7 +1099,7 @@ class boss_grand_astromancer_capernian : public CreatureScript } } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_CAPERNIAN_AGGRO); } @@ -1206,7 +1206,7 @@ class boss_master_engineer_telonicus : public CreatureScript advisorbase_ai::JustDied(killer); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_TELONICUS_AGGRO); } @@ -1283,7 +1283,7 @@ class npc_kael_flamestrike : public CreatureScript void MoveInLineOfSight(Unit* /*who*/) override { } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } void UpdateAI(uint32 diff) override { diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index 2a1592b6a6c..b17aba9fcab 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -79,10 +79,10 @@ class boss_void_reaver : public CreatureScript _JustDied(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_POUNDING, 15000); events.ScheduleEvent(EVENT_ARCANE_ORB, 3000); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp index 7d1a4c484fd..b9eedc85432 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp @@ -65,7 +65,7 @@ class npc_crystalcore_devastator : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { } diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp index 99dc00ef239..8b8c9e1302a 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_gyrokill.cpp @@ -65,9 +65,9 @@ class boss_gatewatcher_gyrokill : public CreatureScript Talk(SAY_DEATH); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 10000); events.ScheduleEvent(EVENT_SAW_BLADE, 20000); events.ScheduleEvent(EVENT_SHADOW_POWER, 25000); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index 996ee8568e5..a820969383b 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -61,9 +61,9 @@ class boss_gatewatcher_iron_hand : public CreatureScript { boss_gatewatcher_iron_handAI(Creature* creature) : BossAI(creature, DATA_GATEWATCHER_IRON_HAND) { } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 55000); events.ScheduleEvent(EVENT_JACKHAMMER, 45000); events.ScheduleEvent(EVENT_SHADOW_POWER, 25000); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp index 9820ba7d654..62f5dc423f7 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp @@ -75,9 +75,9 @@ class boss_mechano_lord_capacitus : public CreatureScript { boss_mechano_lord_capacitusAI(Creature* creature) : BossAI(creature, DATA_MECHANOLORD_CAPACITUS) { } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); Talk(YELL_AGGRO); events.ScheduleEvent(EVENT_HEADCRACK, 10 * IN_MILLISECONDS); events.ScheduleEvent(EVENT_REFLECTIVE_DAMAGE_SHIELD, 15 * IN_MILLISECONDS); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index a3d1fa9ee55..18e8efcd220 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -68,9 +68,9 @@ class boss_nethermancer_sepethrea : public CreatureScript { boss_nethermancer_sepethreaAI(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) { } - void EnterCombat(Unit* who) override + void JustEngagedWith(Unit* who) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_FROST_ATTACK, urand(7000, 10000)); events.ScheduleEvent(EVENT_ARCANE_BLAST, urand(12000, 18000)); events.ScheduleEvent(EVENT_DRAGONS_BREATH, urand(18000, 22000)); @@ -183,7 +183,7 @@ class npc_ragin_flames : public CreatureScript me->SetSpeedRate(MOVE_RUN, DUNGEON_MODE(0.5f, 0.7f)); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { } diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index 095e7c74067..0fae05c2766 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -75,9 +75,9 @@ class boss_pathaleon_the_calculator : public CreatureScript { boss_pathaleon_the_calculatorAI(Creature* creature) : BossAI(creature, DATA_PATHALEON_THE_CALCULATOR) { } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_SUMMON, 30000); events.ScheduleEvent(EVENT_MANA_TAP, urand(12000, 20000)); events.ScheduleEvent(EVENT_ARCANE_TORRENT, urand(16000, 25000)); @@ -198,7 +198,7 @@ class npc_nether_wraith : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } void UpdateAI(uint32 diff) override { diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index eafd1f679f4..cc7397d6f26 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -325,11 +325,11 @@ class npc_warden_mellichar : public CreatureScript float attackRadius = me->GetAttackDistance(who)/10; if (me->IsWithinDistInMap(who, attackRadius) && me->IsWithinLOSInMap(who)) - EnterCombat(who); + JustEngagedWith(who); } } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(YELL_INTRO1); DoCast(me, SPELL_BUBBLE_VISUAL); @@ -545,7 +545,7 @@ class npc_zerekethvoidzone : public CreatureScript DoCast(me, SPELL_VOID_ZONE_DAMAGE); } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } }; CreatureAI* GetAI(Creature* creature) const override diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp index 382e7ddcd18..012fb80566d 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp @@ -84,9 +84,9 @@ class boss_dalliah_the_doomsayer : public CreatureScript soccothrates->AI()->SetData(1, 1); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, urand(1000, 4000)); events.ScheduleEvent(EVENT_WHIRLWIND, urand(7000, 9000)); if (IsHeroic()) diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index 068e0b02211..9b840bf3c6c 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -112,7 +112,7 @@ class boss_harbinger_skyriss : public CreatureScript ScriptedAI::MoveInLineOfSight(who); } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } void JustDied(Unit* /*killer*/) override { @@ -289,7 +289,7 @@ class boss_harbinger_skyriss_illusion : public CreatureScript me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE); } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } }; CreatureAI* GetAI(Creature* creature) const override diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp index c9b191a659b..ae670817e9f 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp @@ -111,9 +111,9 @@ class boss_wrath_scryer_soccothrates : public CreatureScript dalliah->AI()->SetData(1, 1); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_FELFIRE_SHOCK, urand(12000, 14000)); events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(11000, 12000)); events.ScheduleEvent(EVENT_ME_FIRST, 6000); diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp index 766ee14d41f..f9b7b01f267 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp @@ -61,9 +61,9 @@ class boss_zereketh_the_unbound : public CreatureScript Talk(SAY_DEATH); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); events.ScheduleEvent(EVENT_VOID_ZONE, urand (6000, 10000)); events.ScheduleEvent(EVENT_SHADOW_NOVA, urand (6000, 10000)); events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, urand(12000, 20000)); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp index 9a5f4ee09fa..3551cd1e7d4 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_commander_sarannis.cpp @@ -67,9 +67,9 @@ class boss_commander_sarannis : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); Talk(SAY_AGGRO); events.ScheduleEvent(EVENT_ARCANE_RESONANCE, 42700); events.ScheduleEvent(EVENT_ARCANE_DEVASTATION, 15200); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index 6dc3ee02f5b..88c1cdbc2f5 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -92,7 +92,7 @@ class boss_high_botanist_freywinn : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); } diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp index a836162b5b6..7d18b01133a 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp @@ -164,7 +164,7 @@ class boss_laj : public CreatureScript CanSummon = false; } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { } diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp index f210444fd9f..20647f08ae1 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_thorngrin_the_tender.cpp @@ -68,9 +68,9 @@ class boss_thorngrin_the_tender : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { - _EnterCombat(); + _JustEngagedWith(); Talk(SAY_AGGRO); events.ScheduleEvent(EVENT_SACRIFICE, 5700); events.ScheduleEvent(EVENT_HELLFIRE, IsHeroic() ? urand(17400, 19300) : 18000); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index f09f2007262..455360570ca 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -92,7 +92,7 @@ class npc_warp_splinter_treant : public CreatureScript Initialize(); } - void EnterCombat(Unit* /*who*/) override { } + void JustEngagedWith(Unit* /*who*/) override { } void MoveInLineOfSight(Unit* /*who*/) override { } @@ -171,7 +171,7 @@ class boss_warp_splinter : public CreatureScript me->SetSpeedRate(MOVE_RUN, 0.7f); } - void EnterCombat(Unit* /*who*/) override + void JustEngagedWith(Unit* /*who*/) override { Talk(SAY_AGGRO); } |
