From 1e3eef2edb18ccceaab7cf09b51e73d12e0fee7d Mon Sep 17 00:00:00 2001 From: blinkysc Date: Sat, 14 Feb 2026 18:56:14 -0600 Subject: [PATCH] fix(Core/Combat): Update to new ThreatManager API Replace removed GetThreatList() with GetSortedThreatList() and getTarget() with GetVictim() to match AzerothCore's ported heap-based threat system. --- src/mod_zone_difficulty_handler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mod_zone_difficulty_handler.cpp b/src/mod_zone_difficulty_handler.cpp index c6ded0c4..891ecaee 100644 --- a/src/mod_zone_difficulty_handler.cpp +++ b/src/mod_zone_difficulty_handler.cpp @@ -825,11 +825,9 @@ void ZoneDifficulty::MythicmodeEvent(Unit* unit, uint32 entry, uint32 key) if (mythicAI.Target == TARGET_PLAYER_DISTANCE) { - auto const& threatlist = unit->GetThreatMgr().GetThreatList(); - - for (auto itr = threatlist.begin(); itr != threatlist.end(); ++itr) + for (ThreatReference const* ref : unit->GetThreatMgr().GetSortedThreatList()) { - Unit* target = (*itr)->getTarget(); + Unit* target = ref->GetVictim(); if (!unit->IsWithinDist(target, mythicAI.TargetArg)) continue;