mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
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:
@@ -108,7 +108,25 @@ public:
|
|||||||
|
|
||||||
bool CanAIAttack(Unit const* target) const override
|
bool CanAIAttack(Unit const* target) const override
|
||||||
{
|
{
|
||||||
return !(target->GetTypeId() == TYPEID_UNIT && !secondPhase) && !target->HasAura(SPELL_CONFLAGRATION);
|
if (target->GetTypeId() == TYPEID_UNIT && !secondPhase)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
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_CONFLAGRATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*victim*/) override
|
void EnterCombat(Unit* /*victim*/) override
|
||||||
@@ -244,9 +262,6 @@ public:
|
|||||||
break;
|
break;
|
||||||
case EVENT_CONFLAGRATION:
|
case EVENT_CONFLAGRATION:
|
||||||
DoCastVictim(SPELL_CONFLAGRATION);
|
DoCastVictim(SPELL_CONFLAGRATION);
|
||||||
if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION))
|
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
|
||||||
me->TauntApply(target);
|
|
||||||
events.ScheduleEvent(EVENT_CONFLAGRATION, 30000);
|
events.ScheduleEvent(EVENT_CONFLAGRATION, 30000);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class spell_gahzranka_slam : public SpellScript
|
|||||||
{
|
{
|
||||||
if (Unit* caster = GetCaster())
|
if (Unit* caster = GetCaster())
|
||||||
{
|
{
|
||||||
_wipeThreat = targets.size() < caster->GetThreatMgr().GetThreatListSize();;
|
_wipeThreat = targets.size() < caster->GetThreatMgr().GetThreatListSize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,8 +80,18 @@ struct boss_hazzarah : public BossAI
|
|||||||
|
|
||||||
bool CanAIAttack(Unit const* target) const override
|
bool CanAIAttack(Unit const* target) const override
|
||||||
{
|
{
|
||||||
if (me->GetThreatMgr().GetThreatListSize() > 1 && me->GetThreatMgr().GetOnlineContainer().getMostHated()->getTarget() == target)
|
if (me->GetThreatMgr().GetThreatListSize() > 1)
|
||||||
return !target->HasAura(SPELL_SLEEP);
|
{
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,8 +154,18 @@ struct boss_jindo : public BossAI
|
|||||||
|
|
||||||
bool CanAIAttack(Unit const* target) const override
|
bool CanAIAttack(Unit const* target) const override
|
||||||
{
|
{
|
||||||
if (me->GetThreatMgr().GetThreatListSize() > 1 && me->GetThreatMgr().GetOnlineContainer().getMostHated()->getTarget() == target)
|
if (me->GetThreatMgr().GetThreatListSize() > 1)
|
||||||
return !target->HasAura(SPELL_HEX);
|
{
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,8 +85,18 @@ public:
|
|||||||
|
|
||||||
bool CanAIAttack(Unit const* target) const override
|
bool CanAIAttack(Unit const* target) const override
|
||||||
{
|
{
|
||||||
if (me->GetThreatMgr().GetThreatListSize() > 1 && me->GetThreatMgr().GetOnlineContainer().getMostHated()->getTarget() == target)
|
if (me->GetThreatMgr().GetThreatListSize() > 1)
|
||||||
return !target->HasAura(SPELL_GOUGE);
|
{
|
||||||
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user