Skip to content

Commit

Permalink
Logout trigger with npc (mountables)
Browse files Browse the repository at this point in the history
The logout trigger has been made to work for NPCs as well.
  • Loading branch information
canerksk committed Oct 12, 2024
1 parent 3c69721 commit 170f4eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game/chars/CChar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 170f4eb

Please sign in to comment.