mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/Movement): AC has no MAX_GAMEOBJECT_TYPE sentinel + no sAreaTriggerStore DBC store
This commit is contained in:
parent
fa3ffd13fa
commit
c61b311a1b
@ -2716,11 +2716,14 @@ bool MovementAction::HandleSpecialMovement(TravelPath& path)
|
|||||||
GameObject* go = botAI->GetGameObject(guid);
|
GameObject* go = botAI->GetGameObject(guid);
|
||||||
if (!go || go->GetEntry() != cur.entry)
|
if (!go || go->GetEntry() != cur.entry)
|
||||||
continue;
|
continue;
|
||||||
// MAX_GAMEOBJECT_TYPE accepts any type — reference uses
|
// AC's GetGameObjectIfCanInteractWith does a strict
|
||||||
// this rather than restricting to SPELLCASTER, so GOOBER
|
// type-equality check (no "any type" sentinel like the
|
||||||
// portals (which we accept at the goInfo->type check
|
// reference's MAX_GAMEOBJECT_TYPE). Pass the GO's
|
||||||
// above) aren't filtered out here.
|
// actual type so both SPELLCASTER and GOOBER portals
|
||||||
if (!bot->GetGameObjectIfCanInteractWith(guid, MAX_GAMEOBJECT_TYPE))
|
// (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;
|
continue;
|
||||||
|
|
||||||
WorldPacket packet(CMSG_GAMEOBJ_USE);
|
WorldPacket packet(CMSG_GAMEOBJ_USE);
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
|
|
||||||
#include "BudgetValues.h"
|
#include "BudgetValues.h"
|
||||||
#include "DBCStores.h"
|
|
||||||
#include "MapMgr.h"
|
#include "MapMgr.h"
|
||||||
#include "PathGenerator.h"
|
#include "PathGenerator.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
@ -758,14 +757,11 @@ bool TravelPath::UpcommingSpecialMovement(WorldPosition startPos,
|
|||||||
{
|
{
|
||||||
if (startP->entry)
|
if (startP->entry)
|
||||||
{
|
{
|
||||||
// Reference also verifies the DBC AreaTriggerEntry record
|
// Reference also checks an AreaTriggerEntry DBC store
|
||||||
// exists (cmangos sAreaTriggerStore.LookupEntry). AC's
|
// (sAreaTriggerStore). AC doesn't expose a separate DBC
|
||||||
// sAreaTriggerStore is the same DBC store. Skip the trigger
|
// store for area triggers — sObjectMgr->GetAreaTrigger is
|
||||||
// node if the DBC record is missing — likely a stale entry
|
// the loaded view of the same data, so it's the only
|
||||||
// in the baked dataset.
|
// existence check we need on this side.
|
||||||
if (!sAreaTriggerStore.LookupEntry(startP->entry))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
AreaTrigger const* at = sObjectMgr->GetAreaTrigger(startP->entry);
|
AreaTrigger const* at = sObjectMgr->GetAreaTrigger(startP->entry);
|
||||||
if (!at)
|
if (!at)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user