aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2018-08-27 19:08:17 +0200
committerShauren <shauren.trinity@gmail.com>2021-10-23 02:14:04 +0200
commit392a644dc8562ea54b9c185a2776fceb1006e2cd (patch)
treeeec4d04885e582c39f0b88ea1cf0d87b4bb1015a /src/server/scripts
parent395f58d651c7c370522ead6ba9a3c684d91e3a66 (diff)
Core/Threat: Threat system adjustments:
* Online states are now re-evaluated before victim update instead of continuously. Closes #22226. Tagging #21501. * Victim update now happens every 1s as opposed to every server tick unless current target goes away. * Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance). * Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target. (cherry picked from commit 5cea572a9ad524c6f28ff8519bee61d1ff4357d0)
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp3
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp5
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
index 4b7373cdf55..43f0220df27 100644
--- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
+++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_hadronox.cpp
@@ -295,9 +295,6 @@ public:
void UpdateAI(uint32 diff) override
{
- if (!_lastPlayerCombatState && me->IsEngaged())
- me->GetThreatManager().UpdateOnlineStates(false, true);
-
if (!UpdateVictim())
return;
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
index 14d1c985e8c..ad6203dd864 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_faction_champions.cpp
@@ -610,7 +610,10 @@ struct boss_faction_championsAI : public BossAI
{
for (ThreatReference* ref : me->GetThreatManager().GetModifiableThreatList())
if (Player* victim = ref->GetVictim()->ToPlayer())
- ref->SetThreat(1000000.0f * CalculateThreat(me->GetDistance2d(victim), victim->GetArmor(), victim->GetHealth()));
+ {
+ ref->ScaleThreat(0.0f);
+ ref->AddThreat(1000000.0f * CalculateThreat(me->GetDistance2d(victim), victim->GetArmor(), victim->GetHealth()));
+ }
}
void UpdatePower()
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index 2e4a561dc56..b9aafbedd2d 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -600,7 +600,7 @@ class boss_algalon_the_observer : public CreatureScript
//! for creatures that start combat in REACT_PASSIVE and UNIT_FLAG_NOT_SELECTABLE
//! causing them to immediately evade
if (!me->GetThreatManager().IsThreatListEmpty())
- AttackStart(me->GetThreatManager().SelectVictim());
+ AttackStart(me->GetThreatManager().GetCurrentVictim());
for (uint32 i = 0; i < LIVING_CONSTELLATION_COUNT; ++i)
if (Creature* summon = DoSummon(NPC_LIVING_CONSTELLATION, ConstellationPos[i], 0, TEMPSUMMON_DEAD_DESPAWN))
summon->SetReactState(REACT_PASSIVE);