fix(Core/Scripts): Fix boss scripts resetting during death/defeat RP after threat system port (#25185)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: Treeston <treeston.mmoc@gmail.com>
This commit is contained in:
blinkysc
2026-03-22 11:07:29 -05:00
committed by GitHub
parent 94faf55a86
commit d3f1be6d22
8 changed files with 34 additions and 11 deletions
@@ -472,7 +472,7 @@ void ScriptedAI::DoResetThreat(Unit* unit)
void ScriptedAI::DoResetThreatList()
{
if (!me->CanHaveThreatList() || me->GetThreatMgr().IsThreatListEmpty())
if (!me->CanHaveThreatList() || me->GetThreatMgr().IsThreatListEmpty(true))
{
LOG_ERROR("entities.unit.ai", "DoResetThreatList called for creature that either cannot have threat list or has empty threat list (me entry = {})", me->GetEntry());
return;
+1 -5
View File
@@ -11419,12 +11419,8 @@ Unit* Creature::SelectVictim()
Unit* target = nullptr;
// Taunt handling is now done inside ThreatManager via TauntState
if (CanHaveThreatList())
{
if (!m_threatManager.IsThreatListEmpty())
target = m_threatManager.GetCurrentVictim();
}
target = m_threatManager.GetCurrentVictim();
else if (!HasReactState(REACT_PASSIVE))
{
// we have player pet probably