aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2017-07-21 22:59:59 +0200
committerTreeston <treeston.mmoc@gmail.com>2017-07-21 23:00:14 +0200
commit331e463de83e4ea13935773f992b32733272d263 (patch)
tree0f0a83f2a5ceda963507461e44f1b41ed351c940 /src/server/scripts/Outland
parent1f6355431214ef1dcf99574070d63942c3a17bb5 (diff)
Core/PlayerAI: Some adjustments:
- Add a 2 second delay before the AI begins using spells. This should provide opportunity for counterplay before that rogue activates cloak and goes on an unstoppable rampage among your healers. (Sorry, guys.) - Stopped the AI from attacking invalid targets under some conditions. It should now properly leash back and follow the charmer if we try to select an invalid target. - Stopped the AI from constantly re-creating the follow movement generator (and thus spamming movesplines).
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
index 7f9111cfffb..62a81af385c 100644
--- a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/boss_blackheart_the_inciter.cpp
@@ -57,26 +57,6 @@ enum Events
class BlackheartCharmedPlayerAI : public SimpleCharmedPlayerAI
{
using SimpleCharmedPlayerAI::SimpleCharmedPlayerAI;
- Unit* SelectAttackTarget() const override
- {
- if (Unit* charmer = me->GetCharmer())
- {
- std::list<Player*> targets;
- for (ThreatReference const* ref : charmer->GetThreatManager().GetUnsortedThreatList())
- {
- if (Player* victim = ref->GetVictim()->ToPlayer())
- if (me->IsValidAttackTarget(victim))
- targets.push_back(victim);
- }
- if (targets.empty())
- return nullptr;
-
- auto it = targets.begin();
- std::advance(it, urand(0, targets.size() - 1));
- return *it;
- }
- return nullptr;
- }
void OnCharmed(bool apply) override
{
SimpleCharmedPlayerAI::OnCharmed(apply);