本文整理汇总了C++中CUser::GetPos方法的典型用法代码示例。如果您正苦于以下问题:C++ CUser::GetPos方法的具体用法?C++ CUser::GetPos怎么用?C++ CUser::GetPos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::GetPos方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReplaceLodestar
void CParty::ReplaceLodestar( const CRect &rect )
{
// locked
CUser* pUser;
for( int i = 0; i < m_nSizeofMember; i ++ ) // 극단원 모두에게 듀얼 해제를 세팅하고 클라에도 알림.
{
pUser = g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
if( IsValidObj( pUser ) )
{
CWorld* pWorld = pUser->GetWorld();
if( pWorld )
{
POINT point = { (int)pUser->GetPos().x, (int)pUser->GetPos().z };
if( rect.PtInRect( point ) )
{
PRegionElem pRgnElem = NULL;
if( pWorld->GetID() != pWorld->m_dwIdWorldRevival && pWorld->m_dwIdWorldRevival != 0 )
pRgnElem = g_WorldMng.GetRevivalPos( pWorld->m_dwIdWorldRevival, pWorld->m_szKeyRevival );
if( !pRgnElem ) // Find near revival pos
pRgnElem = g_WorldMng.GetNearRevivalPos( pWorld->GetID(), pUser->GetPos() );
if( pRgnElem )
pUser->REPLACE( g_uIdofMulti, pRgnElem->m_dwWorldId, pRgnElem->m_vPos, REPLACE_NORMAL, nRevivalLayer );
}
}
}
}
}
示例2: DoUsePartyReCall
void CParty::DoUsePartyReCall( u_long uPartyId, u_long uLeaderid, int nSkill )
{
CUser* pMember = NULL;
int i;
CUser* pUser = NULL;
pUser = g_UserMng.GetUserByPlayerID( uLeaderid );
if( !IsValidObj( (CObj*)pUser ) )
return;
for( i = 0; i < m_nSizeofMember; i ++ ) // 단장(0)에게는 보낼필요 없다.
{
pMember = g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
if( IsValidObj( (CObj*)pMember ) )
{
if(pMember->m_idPlayer != pUser->m_idPlayer)
#ifdef __LAYER_1015
g_DPCoreClient.SendSummonPlayer( pUser->m_idPlayer, pUser->GetWorld()->GetID(), pUser->GetPos(), pMember->m_idPlayer, pUser->GetLayer() );
#else // __LAYER_1015
g_DPCoreClient.SendSummonPlayer( pUser->m_idPlayer, pUser->GetWorld()->GetID(), pUser->GetPos(), pMember->m_idPlayer );
#endif // __LAYER_1015
}
}
}
示例3: Process
//.........这里部分代码省略.........
RemovePartyQuest( pElem->nId );
}
break;
default:
break;
}
}
else
// 아직 열시미 잡고있는중이다~
{
switch( pElem->nProcess )
{
case PQP_WORMON:
{
TRACE( "PQP_WORMON - p\n" );
if( ++pElem->nCount < 10 )
continue;
CRect rect;
rect.SetRect( pProp->x1, pProp->y2, pProp->x2, pProp->y1 );
BOOL bsurvivor = FALSE; // is survivor exists?
if( pParty )
{
CUser* pUser;
for( int k = 0 ; k < pParty->GetSizeofMember() ; k++ )
{
u_long idPlayer = pParty->GetPlayerId( k );
pUser = (CUser*)prj.GetUserByID( idPlayer );
if( IsValidObj( pUser ) )
{
POINT point = { (int)pUser->GetPos().x, (int)pUser->GetPos().z };
if( rect.PtInRect( point ) && pUser->IsLive() )
{
bsurvivor = TRUE;
break;
}
else
{
pUser->AddQuestTextTime( 0, 0, 0xffffffff );
}
}
}
for( int k = 0 ; k < pParty->GetSizeofMember() ; k++ )
{
u_long idPlayer = pParty->GetPlayerId( k );
pUser = (CUser*)prj.GetUserByID( idPlayer );
if( IsValidObj( pUser ) )
{
POINT point = { (int)pUser->GetPos().x, (int)pUser->GetPos().z };
if( !rect.PtInRect( point ) )
{
pUser->AddQuestTextTime( 0, 0, 0xffffffff );
}
}
}
}
if( !bsurvivor )
{
// if( pParty )
// {
示例4: DoUsePartySkill
void CParty::DoUsePartySkill( u_long uPartyId, u_long uLeaderid, int nSkill )
{
#ifdef __WORLDSERVER
CUser* pMember = NULL;
int i;
if( IsLeader( uLeaderid ) && m_nKindTroup == 1 )
{
ItemProp* pItemProp = prj.GetPartySkill( nSkill );
if( pItemProp )
{
#ifndef __PARTYDEBUG
if( int( GetLevel() - pItemProp->dwReqDisLV ) >= 0 )
#endif // __PARTYDEBUG
{
#ifndef __PARTYDEBUG
#if __VER >= 12 // __JHMA_VER12_1 //12차 극단유료아이템
CUser *pLeadertmp = g_UserMng.GetUserByPlayerID( m_aMember[0].m_uPlayerId ); // 리더의 포인터
if( IsValidObj( pLeadertmp ) == FALSE )
return;
int nHasCashSkill = 0,nFPoint = 0;
if( pLeadertmp->HasBuff( BUFF_ITEM2, II_SYS_SYS_SCR_PARTYSKILLUP01 )
|| pLeadertmp->HasBuff( BUFF_ITEM2, II_SYS_SYS_SCR_PARTYSKILLUP02 )
|| pLeadertmp->HasBuff( BUFF_ITEM2, II_SYS_SYS_SCR_PARTYSKILLUP01_01 ) )
{
if( nSkill == ST_LINKATTACK
|| nSkill == ST_FORTUNECIRCLE
|| nSkill == ST_STRETCHING
|| nSkill == ST_GIFTBOX )
nHasCashSkill = 1;
}
DWORD dwSkillTime = pItemProp->dwSkillTime;
int nRemovePoint = pItemProp->dwExp;
nFPoint = int( GetPoint() - pItemProp->dwExp);
#if __VER >= 12 // __LORD
// 군주의 극단
// 군주가 극단장 으로써 극단스킬 사용 시,
// 지속시간 4배 증가(소모 포인트는 동일)
if( CSLord::Instance()->IsLord( uLeaderid ) )
dwSkillTime *= 4;
#endif // __LORD
if( nFPoint >= 0 )
#else
if( int( GetPoint() - pItemProp->dwExp) >= 0 )
#endif // //12차 극단유료아이템
#endif // __PARTYDEBUG
{
switch( nSkill )
{
case ST_CALL:
{
g_DPCoreClient.SendRemovePartyPoint( uPartyId, pItemProp->dwExp );
CUser *pLeader = g_UserMng.GetUserByPlayerID( m_aMember[0].m_uPlayerId ); // 리더의 포인터
if( IsValidObj( pLeader ) == FALSE )
break;
// 단장 중심으로 모여달라는 표시
for( i = 0; i < m_nSizeofMember; i ++ ) // 단장(0)에게는 보낼필요 없다.
{
pMember = g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
// 단장 어라운드 지역에 있는 사람에게만 보낸다
if( IsValidObj( (CObj*)pMember ) )
pMember->AddPartySkillCall( pLeader->GetPos() ); // 각 멤버들에게 단장이 좌표를 전송함.
}
}
break;
case ST_BLITZ:
{
CUser *pLeader = g_UserMng.GetUserByPlayerID( m_aMember[0].m_uPlayerId ); // 리더의 포인터
if( IsValidObj( pLeader ) == FALSE )
break;
if( pLeader->m_idSetTarget != NULL_ID )
{
CMover *pT = prj.GetMover( pLeader->m_idSetTarget );
if( pT && !pT->IsPlayer() )
{
g_DPCoreClient.SendRemovePartyPoint( uPartyId, pItemProp->dwExp );
// 단장이 타겟으로 집중공격 표시
for( i = 0; i < m_nSizeofMember; i ++ )
{
pMember = g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
if( IsValidObj( (CObj*)pMember ) )
{
if( m_nModeTime[PARTY_GIFTBOX_MODE] || m_nModeTime[PARTY_FORTUNECIRCLE_MODE] )
{
pMember->AddPartySkillBlitz( pLeader->m_idSetTarget ); // 각 멤버들에게 단장타겟으로 잡은 무버의 아이디를 보냄.
}
else
{
if( pLeader->IsNearPC( pMember ) )
pMember->AddPartySkillBlitz( pLeader->m_idSetTarget ); // 각 멤버들에게 단장타겟으로 잡은 무버의 아이디를 보냄.
}
}
}
}
else
//.........这里部分代码省略.........