本文整理汇总了C++中CDPCacheSrvr::SendHdr方法的典型用法代码示例。如果您正苦于以下问题:C++ CDPCacheSrvr::SendHdr方法的具体用法?C++ CDPCacheSrvr::SendHdr怎么用?C++ CDPCacheSrvr::SendHdr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDPCacheSrvr
的用法示例。
在下文中一共展示了CDPCacheSrvr::SendHdr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRemoveConnection
void CDPLoginSrvr::OnRemoveConnection( DPID dpid )
{
if( s_dpid == dpid )
{
g_DPCacheSrvr.SendHdr( PACKETTYPE_DESTROY_ALLPLAYERS, DPID_ALLPLAYERS, DPID_ALLPLAYERS );
s_dpid = 0xFFFFFFFF;
g_PlayerMng.Free();
}
}
示例2: OnTimer
void OnTimer( WORD wTimerID )
{
if( wTimerID == TIMER_ID_DEFAULT )
{
g_GameTimer.Compute();
#ifdef __EVE_NEWYEAR
static BOOL s_bCountdown = FALSE;
CTime tmCur = CTime::GetCurrentTime();
if( ::GetLanguage() == LANG_GER || ::GetLanguage() == LANG_FRE )
{
if( !s_bCountdown && tmCur > CTime( 2009, 12, 31, 22, 58, 59 ) && tmCur < CTime( 2009, 12, 31, 23, 0, 0 ) )
{
s_bCountdown = TRUE;
g_DPCacheSrvr.SendHdr( PACKETTYPE_NEWYEAR, DPID_ALLPLAYERS, DPID_ALLPLAYERS );
}
if( tmCur > CTime( 2009, 12, 31, 23, 0, 0 ) )
s_bCountdown = FALSE;
}
else
{
if( !s_bCountdown && tmCur > CTime( 2009, 12, 31, 23, 58, 59 ) && tmCur < CTime( 2010, 1, 1, 0, 0, 0 ) )
{
s_bCountdown = TRUE;
g_DPCacheSrvr.SendHdr( PACKETTYPE_NEWYEAR, DPID_ALLPLAYERS, DPID_ALLPLAYERS );
}
if( tmCur > CTime( 2010, 1, 1, 0, 0, 0 ) )
s_bCountdown = FALSE;
}
#endif // __EVE_NEWYEAR
return;
}
#if !defined(__INTERNALSERVER)
if( wTimerID == TIMER_ID_WANTED ) // 현상금 처리
{
g_dpCoreSrvr.SendCWWantedList(); // 현상금 리스트를 보낸다.
return;
}
#endif // __INTERNALSERVER
#ifdef __EVENT0913
if( wTimerID == TIMER_ID_EVENT0913 )
{
CTime tmCurr = CTime::GetCurrentTime();
BOOL bEventTime = ( tmCurr.GetHour() >= 17 && tmCurr.GetHour() < 18 ) || ( tmCurr.GetHour() >= 22 && tmCurr.GetHour() < 23 );
if( bEventTime && !s_bEvent0913 ) // 이벤트 시간 - 이벤트 설정되어 있지 않으면,
{
g_dpCoreSrvr.SendEvent0913( s_bEvent0913 = TRUE );
}
else if( !bEventTime && s_bEvent0913 ) // 이벤트 시간이 아닌데 이벤트 설정되어 있으면,
{
g_dpCoreSrvr.SendEvent0913( s_bEvent0913 = FALSE );
}
}
#endif // __EVENT0913
#ifdef __EVENT1206
if( wTimerID == TIMER_ID_EVENT1206 )
{
CTime tmCurr = CTime::GetCurrentTime();
BOOL bEventTime;
if( s_bTest )
{
bEventTime = ( tmCurr.GetHour() % 2 == 0 ); // even
}
else
{
bEventTime = ( tmCurr >= CTime( 2005, 12, 10, 19, 0, 0 ) && tmCurr < CTime( 2005, 12, 10, 22, 0, 0 ) )
|| ( tmCurr >= CTime( 2005, 12, 11, 19, 0, 0 ) && tmCurr < CTime( 2005, 12, 11, 22, 0, 0 ) );
}
if( bEventTime && !s_bEvent1206 ) // 이벤트 시간 - 이벤트 설정되어 있지 않으면,
{
g_dpCoreSrvr.SendEvent1206( s_bEvent1206 = TRUE );
}
else if( !bEventTime && s_bEvent1206 ) // 이벤트 시간이 아닌데 이벤트 설정되어 있으면,
{
g_dpCoreSrvr.SendEvent1206( s_bEvent1206 = FALSE );
}
}
#endif // __EVENT1206
if( wTimerID == TIMER_ID_EVENT )
{
BOOL f = FALSE;
CTime tmCurr = CTime::GetCurrentTime();
BOOL bXmas;
if( s_bTest )
{
bXmas = tmCurr < CTime( 2005, 12, 26, 10, 0, 0 );
}
else
{
bXmas = ( tmCurr >= CTime( 2005, 12, 23, 0, 0, 0 ) && tmCurr < CTime( 2005, 12, 27, 9, 0, 0 ) );
}
BOOL bNewYear;
if( s_bTest )
{
//.........这里部分代码省略.........