Exemple #1
0
void CPlayer::OnReactive(uint32_t nSessionID )
{
    LOGFMTD("uid = %d reactive with session id = %d", GetUserUID(), nSessionID) ;
    m_nSessionID = nSessionID ;
    SetState(ePlayerState_Online) ;
    m_nDisconnectTime = 0 ;

    for ( int i = ePlayerComponent_None; i < ePlayerComponent_Max ; ++i )
    {
        IPlayerComponent* p = m_vAllComponents[i] ;
        if ( p )
        {
            p->OnReactive(nSessionID);
        }
    }
    m_tTimerSave.reset() ;
    m_tTimerSave.start() ;
}
Exemple #2
0
void CPlayer::OnReactive(uint32_t nSessionID )
{
	m_nSessionID = nSessionID ;
	SetState(ePlayerState_Online) ;
	m_nDisconnectTime = 0 ;
	
	if ( m_pTimerSave )
	{
		m_pTimerSave->Reset();
		m_pTimerSave->Start();
	}


	for ( int i = ePlayerComponent_None; i < ePlayerComponent_Max ; ++i )
	{
		IPlayerComponent* p = m_vAllComponents[i] ;
		if ( p )
		{
			p->OnReactive(nSessionID);
		}
	}
}