本文整理汇总了C++中CUser::GetWorld方法的典型用法代码示例。如果您正苦于以下问题:C++ CUser::GetWorld方法的具体用法?C++ CUser::GetWorld怎么用?C++ CUser::GetWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CUser
的用法示例。
在下文中一共展示了CUser::GetWorld方法的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: __CreateItem
void __CreateItem( DWORD dwIdMover, int v1, int v2 )
#endif // __JEFF_11
{
CUser* pUser = prj.GetUser( dwIdMover );
ItemProp* pItemProp = prj.GetItemProp( v1 );
if( pItemProp )
pUser->AddDefinedText( TID_EVE_REAPITEM, "\"%s\"", pItemProp->szName );
CItemElem itemElem;
itemElem.m_dwItemId = v1;
itemElem.m_nItemNum = v2;
#ifdef __JEFF_11
itemElem.SetAbilityOption( v3 );
#endif // __JEFF_11
#if __VER >= 13 // __CHIPI_QUESTITEM_FLAG
itemElem.SetFlag( v4 );
#endif // __CHIPI_QUESTITEM_FLAG
if( pUser->CreateItem( &itemElem ) )
{
LogItemInfo aLogItem;
aLogItem.Action = "Q";
aLogItem.SendName = pUser->GetName();
aLogItem.RecvName = "QUEST";
aLogItem.WorldId = pUser->GetWorld()->GetID();
aLogItem.Gold = aLogItem.Gold2 = pUser->GetGold();
g_DPSrvr.OnLogItem( aLogItem, &itemElem, itemElem.m_nItemNum );
}
}
示例3: __GetWorld
CWorld* __GetWorld( int nPcId, int nSrcId, int nCaller )
{
CWorld* pWorld = NULL;
if( nCaller == WES_DIALOG )
{
CUser* pUser = prj.GetUser( nPcId );
pWorld = pUser->GetWorld();
}
else
if( nCaller == WES_WORLD )
pWorld = g_WorldMng.GetWorld( nSrcId );
return pWorld;
}
示例4: 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
}
}
}