From 170f4eb9d2cb3d00dda4681e67b82459e5e3c565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caner=20K=C4=B1l=C4=B1=C3=A7o=C4=9Flu?= Date: Sat, 12 Oct 2024 18:50:43 +0300 Subject: [PATCH] Logout trigger with npc (mountables) The logout trigger has been made to work for NPCs as well. --- src/game/chars/CChar.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/chars/CChar.cpp b/src/game/chars/CChar.cpp index ccbad9c39..de326a718 100644 --- a/src/game/chars/CChar.cpp +++ b/src/game/chars/CChar.cpp @@ -528,6 +528,11 @@ void CChar::SetDisconnected(CSector* pNewSector) GetClientActive()->GetNetState()->markReadClosed(); } + if (m_pNPC && IsTrigUsed(TRIGGER_LOGOUT)) + { + OnTrigger(CTRIG_LogOut, this, nullptr); + } + if (m_pPlayer) { m_pPlayer->_iTimeLastDisconnectedMs = CWorldGameTime::GetCurrentTime().GetTimeRaw();