mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 07:29:27 +02:00
fix(Core/Movement): AC has no MAX_GAMEOBJECT_TYPE sentinel + no sAreaTriggerStore DBC store
This commit is contained in:
parent
b97da5c741
commit
e92af1cc06
@ -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<GameobjectTypes>(go->GetGoType())))
|
||||
continue;
|
||||
|
||||
WorldPacket packet(CMSG_GAMEOBJ_USE);
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include <unordered_set>
|
||||
|
||||
#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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user