本文整理汇总了C++中CMover::ClearDuel方法的典型用法代码示例。如果您正苦于以下问题:C++ CMover::ClearDuel方法的具体用法?C++ CMover::ClearDuel怎么用?C++ CMover::ClearDuel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMover
的用法示例。
在下文中一共展示了CMover::ClearDuel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
//.........这里部分代码省略.........
#if __VER >= 10 // __METEONYKER_0608
#ifdef __WORLDSERVER
#if __VER >= 12 // __NEW_ITEMCREATEMON_SERVER
if( pAttacker->IsPlayer() && CCreateMonster::GetInstance()->IsAttackAble( static_cast<CUser*>(pAttacker), pMover ) )
#endif // __NEW_ITEMCREATEMON_SERVER
#endif // __WORLDSERVER
pMover->PostAIMsg( AIMSG_DAMAGE, pAttacker->GetId(), nDamage );
#endif // __METEONYKER_0608
return nDamage;
}
break;
// HP가 0이 된 순간 호출
case OBJMSG_DIE:
{
if( IsSit() ) // 앉아있는상태였으면 해제
ResetState( OBJSTA_MOVE_ALL );
ClearState(); // 죽을땐 다른 동작 하고 있던거 다 클리어 시켜버리자.
m_vDelta.x = m_vDelta.z = 0; // 죽었으면 델타값 클리어.
pMover->RemoveInvisible();
#ifdef __WORLDSERVER
pMover->PostAIMsg( AIMSG_DIE, nParam2 );
#endif
CMover *pAttacker = (CMover *)nParam2;
if( pAttacker )
{
if( pMover->IsPlayer() && pAttacker->IsPlayer() ) // 죽은놈과 죽인놈이 플레이어고
{
#ifdef __WORLDSERVER
if( pMover->m_nDuel == 1 && pMover->m_idDuelOther == pAttacker->GetId() ) // 둘이 듀얼중이었으면
{
pMover->ClearDuel();
pAttacker->ClearDuel();
((CUser*)pMover)->AddSetDuel( pMover );
((CUser*)pAttacker)->AddSetDuel( pAttacker );
}
else if( pMover->m_nDuel == 2 && pMover->m_idDuelParty == pAttacker->m_idparty )
{
pMover->m_nDuelState = 300;
CMover *pMember;
CParty* pParty = g_PartyMng.GetParty( pMover->m_idparty );
if( pParty )
{
int i; for( i = 0; i < pParty->m_nSizeofMember; i ++ )
{
pMember = (CMover *)g_UserMng.GetUserByPlayerID( pParty->m_aMember[i].m_uPlayerId );
if( IsValidObj( pMember ) )
((CUser*)pMember)->AddSetDuel( pMover );
}
}
CParty* pParty2 = g_PartyMng.GetParty( pMover->m_idDuelParty );
if( pParty2 )
{
int i; for( i = 0; i < pParty2->m_nSizeofMember; i ++ )
{
pMember = (CMover *)g_UserMng.GetUserByPlayerID( pParty2->m_aMember[i].m_uPlayerId );
if( IsValidObj( pMember ) )
((CUser*)pMember)->AddSetDuel( pMover );
}
}
}
#endif // __WORLDSERVER