fix(Scripts/BlackwingLair): Razorgore the Untamed should not reset enco… (#13782)

* fix(Raids/BlackwingLair): Razorgore the Untamed should not reset encounter upon casting Conflagrate when soloing.

Fixes #13761

* Update.
This commit is contained in:
UltraNix
2022-12-06 13:47:08 +01:00
committed by GitHub
parent 67adf3c9b3
commit 08ff2f277b
5 changed files with 56 additions and 11 deletions

View File

@@ -130,7 +130,7 @@ class spell_gahzranka_slam : public SpellScript
{
if (Unit* caster = GetCaster())
{
_wipeThreat = targets.size() < caster->GetThreatMgr().GetThreatListSize();;
_wipeThreat = targets.size() < caster->GetThreatMgr().GetThreatListSize();
}
}

View File

@@ -80,8 +80,18 @@ struct boss_hazzarah : public BossAI
bool CanAIAttack(Unit const* target) const override
{
if (me->GetThreatMgr().GetThreatListSize() > 1 && me->GetThreatMgr().GetOnlineContainer().getMostHated()->getTarget() == target)
return !target->HasAura(SPELL_SLEEP);
if (me->GetThreatMgr().GetThreatListSize() > 1)
{
ThreatContainer::StorageType::const_iterator lastRef = me->GetThreatMgr().GetOnlineContainer().GetThreatList().end();
--lastRef;
if (Unit* lastTarget = (*lastRef)->getTarget())
{
if (lastTarget != target)
{
return !target->HasAura(SPELL_SLEEP);
}
}
}
return true;
}

View File

@@ -154,8 +154,18 @@ struct boss_jindo : public BossAI
bool CanAIAttack(Unit const* target) const override
{
if (me->GetThreatMgr().GetThreatListSize() > 1 && me->GetThreatMgr().GetOnlineContainer().getMostHated()->getTarget() == target)
return !target->HasAura(SPELL_HEX);
if (me->GetThreatMgr().GetThreatListSize() > 1)
{
ThreatContainer::StorageType::const_iterator lastRef = me->GetThreatMgr().GetOnlineContainer().GetThreatList().end();
--lastRef;
if (Unit* lastTarget = (*lastRef)->getTarget())
{
if (lastTarget != target)
{
return !target->HasAura(SPELL_HEX);
}
}
}
return true;
}

View File

@@ -85,8 +85,18 @@ public:
bool CanAIAttack(Unit const* target) const override
{
if (me->GetThreatMgr().GetThreatListSize() > 1 && me->GetThreatMgr().GetOnlineContainer().getMostHated()->getTarget() == target)
return !target->HasAura(SPELL_GOUGE);
if (me->GetThreatMgr().GetThreatListSize() > 1)
{
ThreatContainer::StorageType::const_iterator lastRef = me->GetThreatMgr().GetOnlineContainer().GetThreatList().end();
--lastRef;
if (Unit* lastTarget = (*lastRef)->getTarget())
{
if (lastTarget != target)
{
return !target->HasAura(SPELL_GOUGE);
}
}
}
return true;
}