From e490bf8f34df8a44d70df54eca18248d70b65e94 Mon Sep 17 00:00:00 2001 From: sruon Date: Sat, 14 Feb 2026 04:29:11 -0700 Subject: [PATCH] ACTION entity lookup order change for trusts --- src/map/packets/c2s/0x01a_action.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/map/packets/c2s/0x01a_action.cpp b/src/map/packets/c2s/0x01a_action.cpp index 330a3fca14c..9da4f63b365 100644 --- a/src/map/packets/c2s/0x01a_action.cpp +++ b/src/map/packets/c2s/0x01a_action.cpp @@ -209,13 +209,19 @@ void GP_CLI_COMMAND_ACTION::process(MapSession* PSession, CCharEntity* PChar) co return; } - const CBaseEntity* PNpc = PChar->GetEntity(this->ActIndex, TYPE_NPC | TYPE_MOB); - + CBaseEntity* PNpc = PChar->GetEntity(this->ActIndex, TYPE_NPC | TYPE_MOB | TYPE_TRUST); if (!PNpc) { return; } + // Releasing a trust + if (auto* PTrust = dynamic_cast(PNpc)) + { + PChar->RemoveTrust(PTrust); + return; + } + // MONs are allowed to use doors, but nothing else if (PChar->m_PMonstrosity != nullptr && PNpc->look.size != 0x02 && @@ -233,12 +239,6 @@ void GP_CLI_COMMAND_ACTION::process(MapSession* PSession, CCharEntity* PChar) co PChar->m_charHistory.npcInteractions++; } - // Releasing a trust - if (auto* PTrust = dynamic_cast(PChar->GetEntity(this->ActIndex, TYPE_TRUST))) - { - PChar->RemoveTrust(PTrust); - } - if (!PChar->isNpcLocked()) { PChar->eventPreparation->reset();