本文整理汇总了C++中CMover::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ CMover::GetName方法的具体用法?C++ CMover::GetName怎么用?C++ CMover::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMover
的用法示例。
在下文中一共展示了CMover::GetName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnDraw
void CWndPartyQuick::OnDraw( C2DRender* p2DRender )
{
// 파티 정보 출력
//Static control
int nMax = g_Party.m_nSizeofMember;
int i;
CRect rect;
SetActiveMember(nMax);
for(i=0; i<nMax; i++)
{
LPWNDCTRL lpWndCtrl = GetWndCtrl( StaticID[i] );
rect = lpWndCtrl->rect;
CMover* pObjMember = prj.GetUserByID( g_Party.m_aMember[i].m_uPlayerId );
CString strMember;
if(m_pFocusMember == pObjMember)
p2DRender->RenderFillRect( rect, 0x60ffff00 );
// 상태에 따라 색 변경
DWORD dwColor = 0xff000000;
u_long nLeadMember = g_Party.m_aMember[i].m_uPlayerId;
if( IsValidObj(pObjMember) )
{
if( pObjMember->GetHitPoint() == 0 )
dwColor = 0xffff0000; // 죽은놈
else if( ((FLOAT)pObjMember->GetHitPoint()) / ((FLOAT)pObjMember->GetMaxHitPoint()) <.1f )
dwColor = 0xffffff00; // HP 10% 이하인놈
if(g_Party.IsLeader(nLeadMember)) //Leader Color Set
{
dwColor = 0xff1fb72d; //굵게 해야함...
#if __VER >= 10 // __LEGEND
if(pObjMember->IsMaster())
strMember.Format( prj.GetText( TID_GAME_QUICK_MARK_MASTER ), pObjMember->GetLevel(), pObjMember->GetName() );
else if(pObjMember->IsHero())
#if __VER >= 15 // __HERO129_VER15 // 15차 히어로 레벨확장
strMember.Format( prj.GetText( TID_GAME_QUICK_MARK_HERO ), pObjMember->GetLevel(), pObjMember->GetName() );
#else // 15차 히어로 레벨확장
strMember.Format( prj.GetText( TID_GAME_QUICK_MARK_HERO_BEFORE ), pObjMember->GetName() );
#endif // 15차 히어로 레벨확장
else
strMember.Format( "%d. %s", pObjMember->GetLevel(), pObjMember->GetName() );
#else //__LEGEND
strMember.Format( "%d. %s", pObjMember->GetLevel(), pObjMember->GetName() );
#endif //__LEGEND
}
else
{
#if __VER >= 10 // __LEGEND
if(pObjMember->IsMaster())
示例2: DoDuelPartyCancel
//
// 극단 듀얼 해제
//
void CParty::DoDuelPartyCancel( CParty* pDuelParty )
{
#ifndef __CORESERVER
int i;
CMover *pMember;
for( i = 0; i < m_nSizeofMember; i ++ ) // 극단원 모두에게 듀얼 해제를 세팅하고 클라에도 알림.
{
#ifdef __WORLDSERVER
pMember = (CMover *)g_UserMng.GetUserByPlayerID( m_aMember[i].m_uPlayerId );
#else
#ifdef __CLIENT
pMember = prj.GetUserByID( m_aMember[i].m_uPlayerId );
#endif
#endif // worldserver
if( IsValidObj( pMember ) )
{
#ifdef __WORLDSERVER
if( pDuelParty )
((CUser *)pMember)->AddDuelPartyCancel( pDuelParty ); // 각 멤버들에게 듀얼이 취소되었다고 알림.
else
((CUser *)pMember)->AddDuelPartyCancel( NULL ); // 각 멤버들에게 듀얼이 취소되었다고 알림.
if( pMember->m_idDuelParty != m_idDuelParty )
Error( "CParty::DoDuelPartyCancel : 파티멤버 %s의 정보이상. %d %d", pMember->GetName(), pMember->m_idDuelParty, m_idDuelParty );
pMember->ClearDuelParty();
#endif // worldserver
}
}
m_idDuelParty = 0; // 파티 해제
#endif // __CORESERVER
}
示例3: _update_console
void _update_console( )
{
if( GetAsyncKeyState( VK_CONTROL ) & 0x80000 )
{
if( g_bKeyTable[ 'T' ] )
{
//test mail
CMover* pObj = (CMover*)g_WorldMng.Get()->GetObjFocus( );
if( pObj )
{
char* lpszTitle = "letter";
CString title;
char* lpszText = "난 알아요 이밤이 흐르고 흐르면 모든것이 떠나야만 한다는 이사실을 그 이유를 나는 알수가 알수가 있어욤 taeji boys ye";
for( int i = 0; i < 90; ++i )
{
title.Format( "%d 번째 편지", i );
g_DPlay.SendQueryPostMail( 1, 1, (char*)pObj->GetName(), 0,title.GetBuffer(0),lpszText );
}
}
//g_Console._bTestToggle = !g_Console._bTestToggle;
//g_Console.Log( "Toggle func - testing is %d", g_Console._bTestToggle );
//if( !g_WndMng.m_pWndGHBid )
//{
// g_WndMng.m_pWndGHBid = new CWndGuildHouseBid;
// g_WndMng.m_pWndGHBid->Initialize( );
//}else
// SAFE_DELETE( g_WndMng.m_pWndGHBid );
}
else if( g_bKeyTable[ 'Y' ] )
{
CMailBox* pMailBox = CMailBox::GetInstance();
int nMax = pMailBox->size();
CMailBox& mailbox = *pMailBox;
for( int i = 0; i < nMax; ++i )
{
CMail* pMail = mailbox[i];
if( pMail )
{
g_DPlay.SendQueryRemoveMail( pMail->m_nMail );
}
}
}
}
static DWORD sDelta = 0;
static DWORD sOld = timeGetTime( );
//
DWORD dwCur = timeGetTime( );
DWORD dwDt = dwCur - sOld;
sDelta += dwDt;
sOld = dwCur;
#ifdef __CON_AUTO_LOGIN
_update_auto_login( sDelta );
#endif
if( g_Console._bRandomMoving )
RandomMoving( dwDt );
// if( sDelta > 5000 )
// {
// ++debugIndex;
//
// while( 1 )
// {
// BOOL bOK = PlayMusic( debugIndex, 1 );
// if( bOK )
// {
// g_Console.Log( " Started music : %d ", debugIndex );
// break;
// }
//
// ++debugIndex;
// if( debugIndex > 270 )
// {
// debugIndex = 0;
// break;
// }
// }
// CWndChat* pWndChat = (CWndChat*) g_WndMng.GetApplet( APP_COMMUNICATION_CHAT );
// if( sDelta < 5100 && pWndChat )
// {
// int x = rand() % 10000;
// int z = rand() % 10000;
// CString str;
// str.Format( "%s %d %d %d", "/텔레 ", 1, x, z );
// pWndChat->m_wndEdit.AddString( str );
// pWndChat->OnChildNotify( EN_RETURN, WIDC_EDIT, 0 );
//
// g_Console.Log( "TELEPORTED to %d, %d", x, z );
//
//.........这里部分代码省略.........
示例4: OnDraw
void CWndPartyCtrl::OnDraw( C2DRender* p2DRender )
{
if( NULL == g_pPlayer )
return;
CPoint pt( 3, 3 );
// pt.y -= ( m_nFontHeight + 3 ) * m_wndScrollBar.GetScrollPos();
#if __VER < 11 // __CSC_VER11_4
CWndMessenger* pWndMessenger = (CWndMessenger*)GetWndBase( APP_MESSENGER_ );
#endif //__CSC_VER11_4
CWndWorld* pWndWorld = (CWndWorld*)g_WndMng.GetWndBase( APP_WORLD );
int nMax = g_Party.m_nSizeofMember;
// 눈에 보이는 갯수가 페이지라인수 보다 크면 보이는 갯수를 페이지라인수로 조정
if( nMax - m_wndScrollBar.GetScrollPos() > m_wndScrollBar.GetScrollPage() )
nMax = m_wndScrollBar.GetScrollPage() + m_wndScrollBar.GetScrollPos();
if( nMax < m_wndScrollBar.GetScrollPos() )
nMax = 0;
TEXTUREVERTEX2* pVertex = new TEXTUREVERTEX2[ 6 * 2 * nMax ];
TEXTUREVERTEX2* pVertices = pVertex;
for( int i = m_wndScrollBar.GetScrollPos(); i < nMax; i++ )
{
CMover* pObjMember = prj.GetUserByID( g_Party.m_aMember[i].m_uPlayerId );
CString strMember;
#if __VER >= 11 // __SYS_PLAYER_DATA
PlayerData* pPlayerData = CPlayerDataCenter::GetInstance()->GetPlayerData( g_Party.m_aMember[i].m_uPlayerId );
int nJob = pPlayerData->data.nJob;
int nSex = pPlayerData->data.nSex;
#else // __SYS_PLAYER_DATA
int nJob = g_Party.m_aMember[ i ].m_nJob;
int nSex = g_Party.m_aMember[ i ].m_nSex;
#endif // __SYS_PLAYER_DATA
// 상태에 따라 색 변경
DWORD dwColor = 0xff000000;
if( IsValidObj(pObjMember) )
{
if( pObjMember->GetHitPoint() == 0 )
dwColor = 0xffff0000; // 죽은놈
else
if( ((FLOAT)pObjMember->GetHitPoint()) / ((FLOAT)pObjMember->GetMaxHitPoint()) < 0.1f )
dwColor = 0xffffff00; // HP 10% 이하인 놈
strMember.Format( "%d %s", pObjMember->GetLevel(), pObjMember->GetName() );
}
else
{
dwColor = 0xff878787; // 디폴트는 주위에 없는 놈
if( g_Party.m_aMember[ i ].m_bRemove )
dwColor = 0xff000000; // 서버에 없는 놈
#if __VER >= 11 // __SYS_PLAYER_DATA
strMember.Format( "?? %s", pPlayerData->szPlayer );
#else // __SYS_PLAYER_DATA
strMember.Format( "?? %s", g_Party.m_aMember[ i ].m_szName );
#endif // __SYS_PLAYER_DATA
}
if( i == m_nCurSelect )
dwColor = 0xff6060ff;
int x = 0, nWidth = m_rectClient.Width() - 10;// - 1;
CRect rect( x, pt.y, x + nWidth, pt.y + m_nFontHeight );
rect.SetRect( x + 20, pt.y + 18, x + nWidth - 10, pt.y + 30 );
nWidth = pObjMember ? pObjMember->GetHitPointPercent( rect.Width() ) : 0;
CRect rectTemp = rect;
rectTemp.right = rectTemp.left + nWidth;
if( rect.right < rectTemp.right )
rectTemp.right = rect.right;
m_pTheme->RenderGauge( p2DRender, &rect, 0xffffffff, m_pVBGauge, &m_texGauEmptyNormal );
m_pTheme->RenderGauge( p2DRender, &rectTemp, 0x64ff0000, m_pVBGauge, &m_texGauFillNormal );
rect.SetRect( x + 3, pt.y, x + 3 + 32, pt.y + 6 + 32 );
p2DRender->TextOut( x + 20, pt.y + 3, strMember, dwColor );
if( MAX_EXPERT <= nJob )
{
#if __VER >= 10 // __LEGEND
if( MAX_PROFESSIONAL <= nJob && nJob < MAX_MASTER )
pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ), ( 70 + nJob - 16 ) + ( 8 * nSex ), &pVertices, 0xffffffff );
else if( MAX_MASTER <= nJob )
pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ), ( 70 + nJob - 24 ) + ( 8 * nSex ), &pVertices, 0xffffffff );
else
#endif //__LEGEND
pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ), ( 70 + nJob - 6 ) + ( 8 * nSex ), &pVertices, 0xffffffff );
}
else
{
pWndWorld->m_texMsgIcon.MakeVertex( p2DRender, CPoint( 2, pt.y ), 12 + nJob + ( 6 * nSex ), &pVertices, 0xffffffff );
}
pt.y += m_nFontHeight + 3;
}
pWndWorld->m_texMsgIcon.Render( m_pApp->m_pd3dDevice, pVertex, ( (int) pVertices - (int) pVertex ) / sizeof( TEXTUREVERTEX2 ) );
safe_delete_array( pVertex );
//.........这里部分代码省略.........
示例5: GetMover
BOOL CAIMonster2::BeginAttack()
{
CMover *pMover = GetMover();
OBJMSG dwMsg = OBJMSG_NONE;
DWORD dwItemID = 0;
MoverProp *pProp = pMover->GetProp();
// 추격하여 도착하면 선택되었던 공격방식을 적용시킨다.
switch( m_nAttackType )
{
case CAT_NORMAL: dwMsg = OBJMSG_ATK1; dwItemID = pProp->dwAtk1; break;
case CAT_NORMAL2: dwMsg = OBJMSG_ATK2; dwItemID = pProp->dwAtk1; break;
case CAT_QUAKEDOUBLE: dwMsg = OBJMSG_ATK3; dwItemID = pProp->dwAtk3; break;
case CAT_QUAKE_ONE: dwMsg = OBJMSG_ATK4; dwItemID = pProp->dwAtk2; break;
default:
ASSERT(0);
}
if( dwMsg == OBJMSG_NONE )
return FALSE;
if( m_idTarget == NULL_ID )
return FALSE;
// LPMODELELEM lpModelElem = prj.m_modelMng.GetModelElem( OT_MOVER, pMover->GetIndex() );
// if( lpModelElem == NULL )
// return FALSE;
// if( lpModelElem->m_nMax
dwMsg = OBJMSG_ATK1;
int nResult = pMover->DoAttackMelee( m_idTarget, dwMsg, dwItemID );
if( nResult )
{
CMover *pTarget = prj.GetMover( m_idTarget );
// 이벤트 메세지
// 보스몬스터가 유저에게 말을 한다.
switch( m_nAttackType )
{
case CAT_QUAKEDOUBLE:
{
if( pTarget )
{
g_UserMng.AddWorldShout( pMover->GetName(), prj.GetText(TID_GAME_BOSS_BIGMUSCLE_MSG_04),
pTarget->GetPos(), pTarget->GetWorld() );
}
}
break;
case CAT_QUAKE_ONE:
{
if( pTarget )
{
TCHAR szChar[128] = { 0 };
sprintf( szChar, prj.GetText(TID_GAME_BOSS_BIGMUSCLE_MSG_05), pTarget->GetName() );
g_UserMng.AddWorldShout( pMover->GetName(), szChar,
pTarget->GetPos(), pTarget->GetWorld() );
}
}
break;
}
return TRUE;
}
return FALSE;
}