From e92af1cc0631619e157ef01801f78a41d7414e97 Mon Sep 17 00:00:00 2001 From: bash Date: Sun, 31 May 2026 19:07:32 +0200 Subject: [PATCH] fix(Core/Movement): AC has no MAX_GAMEOBJECT_TYPE sentinel + no sAreaTriggerStore DBC store --- src/Ai/Base/Actions/MovementActions.cpp | 13 ++++++++----- src/Mgr/Travel/TravelNode.cpp | 14 +++++--------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/Ai/Base/Actions/MovementActions.cpp b/src/Ai/Base/Actions/MovementActions.cpp index 754adaef9..4edfad778 100644 --- a/src/Ai/Base/Actions/MovementActions.cpp +++ b/src/Ai/Base/Actions/MovementActions.cpp @@ -2716,11 +2716,14 @@ bool MovementAction::HandleSpecialMovement(TravelPath& path) GameObject* go = botAI->GetGameObject(guid); if (!go || go->GetEntry() != cur.entry) continue; - // MAX_GAMEOBJECT_TYPE accepts any type — reference uses - // this rather than restricting to SPELLCASTER, so GOOBER - // portals (which we accept at the goInfo->type check - // above) aren't filtered out here. - if (!bot->GetGameObjectIfCanInteractWith(guid, MAX_GAMEOBJECT_TYPE)) + // AC's GetGameObjectIfCanInteractWith does a strict + // type-equality check (no "any type" sentinel like the + // reference's MAX_GAMEOBJECT_TYPE). Pass the GO's + // actual type so both SPELLCASTER and GOOBER portals + // (accepted at the goInfo->type check above) pass the + // range + non-"Point" interactability gate here. + if (!bot->GetGameObjectIfCanInteractWith(guid, + static_cast(go->GetGoType()))) continue; WorldPacket packet(CMSG_GAMEOBJ_USE); diff --git a/src/Mgr/Travel/TravelNode.cpp b/src/Mgr/Travel/TravelNode.cpp index 91dfbfe49..011bd170f 100644 --- a/src/Mgr/Travel/TravelNode.cpp +++ b/src/Mgr/Travel/TravelNode.cpp @@ -12,7 +12,6 @@ #include #include "BudgetValues.h" -#include "DBCStores.h" #include "MapMgr.h" #include "PathGenerator.h" #include "Playerbots.h" @@ -758,14 +757,11 @@ bool TravelPath::UpcommingSpecialMovement(WorldPosition startPos, { if (startP->entry) { - // Reference also verifies the DBC AreaTriggerEntry record - // exists (cmangos sAreaTriggerStore.LookupEntry). AC's - // sAreaTriggerStore is the same DBC store. Skip the trigger - // node if the DBC record is missing — likely a stale entry - // in the baked dataset. - if (!sAreaTriggerStore.LookupEntry(startP->entry)) - return false; - + // Reference also checks an AreaTriggerEntry DBC store + // (sAreaTriggerStore). AC doesn't expose a separate DBC + // store for area triggers — sObjectMgr->GetAreaTrigger is + // the loaded view of the same data, so it's the only + // existence check we need on this side. AreaTrigger const* at = sObjectMgr->GetAreaTrigger(startP->entry); if (!at) return false;