本文整理汇总了C++中CDPCacheSrvr::SendWarEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ CDPCacheSrvr::SendWarEnd方法的具体用法?C++ CDPCacheSrvr::SendWarEnd怎么用?C++ CDPCacheSrvr::SendWarEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDPCacheSrvr
的用法示例。
在下文中一共展示了CDPCacheSrvr::SendWarEnd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Result
//.........这里部分代码省略.........
for( map<u_long, CGuildMember*>::iterator i = pWin->m_mapPMember.begin();
i != pWin->m_mapPMember.end(); ++i )
{
#ifdef __CORESERVER
CPlayer* pPlayer = g_PlayerMng.GetPlayer( i->second->m_idPlayer );
if( pPlayer ) pPlayer->m_idWar = 0;
#endif // __CORESERVER
#ifdef __WORLDSERVER
CUser* pUser = g_UserMng.GetUserByPlayerID( i->second->m_idPlayer );
if( IsValidObj( pUser ) )
{
pUser->m_idWar = 0;
g_UserMng.AddSetWar( pUser, 0 );
pUser->SetPKTargetLimit( 10 );
}
#endif // __WORLDSERVER
}
for( i = pLose->m_mapPMember.begin(); i != pLose->m_mapPMember.end(); ++i )
{
#ifdef __CORESERVER
CPlayer* pPlayer = g_PlayerMng.GetPlayer( i->second->m_idPlayer );
if( pPlayer ) pPlayer->m_idWar = 0;
#endif // __CORESERVER
#ifdef __WORLDSERVER
CUser* pUser = g_UserMng.GetUserByPlayerID( i->second->m_idPlayer );
if( IsValidObj( pUser ) )
{
pUser->m_idWar = 0;
g_UserMng.AddSetWar( pUser, 0 );
pUser->SetPKTargetLimit( 10 );
}
#endif // __WORLDSERVER
}
#ifdef __CORESERVER
g_dpCoreSrvr.SendWarEnd( pWar->m_idWar, pDecl->m_nWinPoint, pAcpt->m_nWinPoint, nType );
g_DPCacheSrvr.SendWarEnd( pWar->m_idWar, pDecl->m_nWinPoint, pAcpt->m_nWinPoint, nType );
int nDBType = nType;
switch( nType )
{
case WR_DECL_AB:
case WR_DECL_DD:
nDBType = WR_DECL_GN;
break;
case WR_ACPT_AB:
case WR_ACPT_DD:
nDBType = WR_ACPT_GN;
break;
}
g_dpDatabaseClient.SendWarEnd( pWar->m_idWar, pDecl->m_idGuild, pAcpt->m_idGuild, pDecl->m_nWinPoint, pAcpt->m_nWinPoint, nDBType, pWar->m_time, pDecl->m_nWinPoint, pAcpt->m_nWinPoint, nWinPointDecl, nWinPoint );
#endif // __CORESERVER
#ifdef __CLIENT
char lpString[1024] = { 0, };
switch ( nType )
{
case WR_DECL_GN:
case WR_ACPT_GN:
{
sprintf( lpString, prj.GetText( TID_GAME_GUILDWARWIN ), pDecl->m_szGuild, pAcpt->m_szGuild, pWin->m_szGuild, prj.GetText( TID_GAME_GUILDWARWIN_MASTER ) );
g_WndMng.PutString( lpString , NULL, prj.GetTextColor( TID_GAME_GUILDWARWIN ) );
break;
}
case WR_DECL_SR:
case WR_ACPT_SR:
{
sprintf( lpString, prj.GetText( TID_GAME_GUILDWARWIN ), pDecl->m_szGuild, pAcpt->m_szGuild, pWin->m_szGuild, prj.GetText( TID_GAME_GUILDWARWIN_GIVEUP ) );
g_WndMng.PutString( lpString , NULL, prj.GetTextColor( TID_GAME_GUILDWARWIN ) );
break;
}
case WR_DECL_AB:
case WR_ACPT_AB:
{
sprintf( lpString, prj.GetText( TID_GAME_GUILDWARWIN ), pDecl->m_szGuild, pAcpt->m_szGuild, pWin->m_szGuild, prj.GetText( TID_GAME_GUILDWARWIN_TIMEUP ) );
g_WndMng.PutString( lpString , NULL, prj.GetTextColor( TID_GAME_GUILDWARWIN ) );
break;
}
case WR_ACPT_DD:
case WR_DECL_DD:
{
sprintf( lpString, prj.GetText( TID_GAME_GUILDWARWIN ), pDecl->m_szGuild, pAcpt->m_szGuild, pWin->m_szGuild, prj.GetText( TID_GAME_GUILDWARWIN_KILLNUM ) );
g_WndMng.PutString( lpString , NULL, prj.GetTextColor( TID_GAME_GUILDWARWIN ) );
break;
}
case WR_TRUCE:
{
char lpString[1024] = { 0, };
sprintf( lpString, prj.GetText( TID_GAME_GUILDWARPEACE ), pDecl->m_szGuild, pAcpt->m_szGuild );
g_WndMng.PutString( lpString , NULL, prj.GetTextColor( TID_GAME_GUILDWARPEACE ) );
break;
}
case WR_DRAW:
{
char lpString[1024] = { 0, };
sprintf( lpString, prj.GetText( TID_GAME_GUILDWARDRAW ), pDecl->m_szGuild, pAcpt->m_szGuild );
g_WndMng.PutString( lpString , NULL, prj.GetTextColor( TID_GAME_GUILDWARDRAW ) );
break;
}
}
#endif // __CLIENT
RemoveWar( pWar->m_idWar );
}