aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms/ScarletMonastery
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2017-07-01 20:18:02 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-13 22:46:44 +0200
commit8be23fcbbdf26e8169defd761e61765f301bebe0 (patch)
tree6309b79f7dd617a8ddc801624dbbd4ed7ac22174 /src/server/scripts/EasternKingdoms/ScarletMonastery
parent2c99678118798279372f17d4bb5f5a88ac95c413 (diff)
[3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already. (cherry picked from commit e2a1ccd118d129b96e09ff1a15ed0adb1d4a3897)
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletMonastery')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp10
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp2
2 files changed, 2 insertions, 10 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 0fcb1d9be1d..3e5fb9884a5 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -604,14 +604,6 @@ public:
DoCast(me, SPELL_HEAD);
caster->GetMotionMaster()->Clear(false);
caster->GetMotionMaster()->MoveFollow(me, 6, float(urand(0, 5)));
- //DoResetThreat();//not sure if need
- ThreatContainer::StorageType threatlist = caster->getThreatManager().getThreatList();
- for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
- {
- Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
- if (unit && unit->IsAlive() && unit != caster)
- me->AddThreat(unit, caster->getThreatManager().getThreat(unit));
- }
}
}
@@ -861,7 +853,7 @@ public:
if (!who || !me->IsValidAttackTarget(who) || me->GetVictim())
return;
- me->AddThreat(who, 0.0f);
+ AddThreat(who, 0.0f);
if (sprouted)
DoStartMovement(who);
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
index 6d17e3742ff..fd0a8ec795f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
@@ -119,7 +119,7 @@ public:
//Sleep_Timer
if (Sleep_Timer <= diff)
{
- if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO, 0))
+ if (Unit* target = SelectTarget(SELECT_TARGET_MAXTHREAT, 0))
DoCast(target, SPELL_SLEEP);
Sleep_Timer = 30000;