diff --git a/docs/REVISIONS-56-SERIES.TXT b/docs/REVISIONS-56-SERIES.TXT index fad5884ca..5fa72b46e 100644 --- a/docs/REVISIONS-56-SERIES.TXT +++ b/docs/REVISIONS-56-SERIES.TXT @@ -628,4 +628,7 @@ Fixed: NPCs vendors not calculating skill train price correctly. [sphere_events_npcs.scp]: Fixed event 'e_trainer' showing wrong trainable skill list on vendor's context menu 09-06-2017, Coruja -Changed: Updated internal SQLite libs v3.19.2 to v3.19.3. \ No newline at end of file +Changed: Updated internal SQLite libs v3.19.2 to v3.19.3. + +09-06-2017, Ares +Added: f_onchar_login/f_onchar_logout functions (usually placed in sphere_serv_triggers.scp) are now called for clients login/-out at characters. This is independent from character definition or events to be more reliable. SRC is the character. \ No newline at end of file diff --git a/src/graysvr/CClient.cpp b/src/graysvr/CClient.cpp index fb785fad3..286c678f7 100644 --- a/src/graysvr/CClient.cpp +++ b/src/graysvr/CClient.cpp @@ -129,6 +129,9 @@ void CClient::CharDisconnect() return; Announce(false); + CScriptTriggerArgs LogoutArgs; + m_pChar->r_Call("f_onchar_logout", m_pChar, &LogoutArgs); + bool bCanInstaLogOut = CanInstantLogOut(); int iLingerTime = g_Cfg.m_iClientLingerTime; diff --git a/src/graysvr/CClientMsg.cpp b/src/graysvr/CClientMsg.cpp index 98a672ad2..4afd96990 100644 --- a/src/graysvr/CClientMsg.cpp +++ b/src/graysvr/CClientMsg.cpp @@ -3674,6 +3674,8 @@ BYTE CClient::Setup_Start(CChar *pChar) // Send character startup stuff to playe m_pAccount->m_TagDefs.DeleteKey("LastLogged"); Announce(true); // announce you to the world + CScriptTriggerArgs LoginArgs; + m_pChar->r_Call("f_onchar_login", m_pChar, &LoginArgs); // Don't login on the water, bring us to nearest shore (unless I can swim) if ( !IsPriv(PRIV_GM) && !m_pChar->Char_GetDef()->Can(CAN_C_SWIM) && m_pChar->IsSwimming() )