diff options
| author | ccrs <ccrs@users.noreply.github.com> | 2025-10-10 17:57:28 +0200 |
|---|---|---|
| committer | ccrs <ccrs@users.noreply.github.com> | 2025-10-10 17:57:28 +0200 |
| commit | 5d2735d5d060a405569a2b7aa1abeb5218e3f0a2 (patch) | |
| tree | 2b0ccaf78c3bd0774a1b257e2bb25d02b0f62c66 /src | |
| parent | 417bb39e4628aaf54d74419843f792f596c18e26 (diff) | |
Scripts/Misc: use the new SetAggressiveStateAfter AI method on another script
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Miscellaneous/CommonHelpers.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp | 20 |
2 files changed, 4 insertions, 18 deletions
diff --git a/src/server/game/Miscellaneous/CommonHelpers.cpp b/src/server/game/Miscellaneous/CommonHelpers.cpp index c00d4dc65f4..dbe86ef3309 100644 --- a/src/server/game/Miscellaneous/CommonHelpers.cpp +++ b/src/server/game/Miscellaneous/CommonHelpers.cpp @@ -356,6 +356,8 @@ bool Trinity::Helpers::Events::SetAggresiveStateEvent::Execute(uint64 /*time*/, if (_owner->IsAIEnabled()) _owner->AI()->AttackStart(currentVictim); } + else if (_owner->IsAIEnabled()) + _owner->AI()->DoZoneInCombat(); } return true; } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 995b690d721..2f5c545b106 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -108,23 +108,6 @@ enum Misc SUMMON_MINIBOSSES_GROUP = 1 }; -class WormAttackEvent : public BasicEvent -{ -public: - WormAttackEvent(TempSummon* owner) : BasicEvent(), _owner(owner) { } - - bool Execute(uint64 /*eventTime*/, uint32 /*diff*/) override - { - _owner->SetReactState(REACT_AGGRESSIVE); - _owner->SetTempSummonType(TEMPSUMMON_CORPSE_DESPAWN); - _owner->AI()->DoZoneInCombat(); - return true; - } - -private: - TempSummon* _owner; -}; - class OrbFinalPositionEvent : public BasicEvent { public: @@ -466,7 +449,8 @@ struct boss_massive_jormungar : public PalehoofMinionsBossAI { if (summon->GetEntry() == NPC_JORMUNGAR_WORM) { - summon->m_Events.AddEvent(new WormAttackEvent(summon->ToTempSummon()), summon->m_Events.CalculateTime(2s)); + summon->ToTempSummon()->SetTempSummonType(TEMPSUMMON_CORPSE_DESPAWN); + SetAggressiveStateAfter(2s, summon, true); summon->GetMotionMaster()->MoveRandom(5.0f); } } |
