当前位置: 首页>>代码示例>>C++>>正文


C++ CVehicle::GetObjectKind方法代码示例

本文整理汇总了C++中CVehicle::GetObjectKind方法的典型用法代码示例。如果您正苦于以下问题:C++ CVehicle::GetObjectKind方法的具体用法?C++ CVehicle::GetObjectKind怎么用?C++ CVehicle::GetObjectKind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CVehicle的用法示例。


在下文中一共展示了CVehicle::GetObjectKind方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ExcuteAction


//.........这里部分代码省略.........
			else if( DungeonMGR->IsDungeonEntranceNpc( pNpc->GetNpcJob() ) )
			{
				cMapMoveDialog* const pDlg = GAMEIN->GetMapMoveDlg() ;
   				if( pDlg )
				{
					pDlg->SetUseCase(eDungeon, pNpc->GetID()) ;
					if( pDlg->GetMapListCount() > 0 )
					{
   						pDlg->SetActive(TRUE) ;
					}
					else
					{
						pDlg->SetActive(FALSE) ;
						WINDOWMGR->MsgBox( MBI_NOTICE, MBT_OK, CHATMGR->GetChatMsg(2297) );
					}
				}
				break;
			}
  
  			// 080822 LYW --- CAction : 소환 된 npc인지 확인한다.
  			NPC_TOTALINFO* pTotalInfo = NULL ;
  			pTotalInfo = pNpc->GetNpcTotalInfo() ;
  
  			if( pTotalInfo )
  			{
  				if( NPCRECALLMGR->Check_RecallNpc(pTotalInfo->dwRecallNpcIdx) )
  				{
  					pNpc->OnClicked() ;
  					break;
  				}
  			}

            // 090227 ShinJS --- 이동NPC인 경우 이동전 준비중인지 확인한다
			if( pNpc->IsReadyToMove() )
			{
				CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg( 1907 ), pNpc->GetObjectName() );
				break;
			}

			MSG_DWORD2 msg;
			msg.Category = MP_NPC;
			msg.Protocol = MP_NPC_SPEECH_SYN;
			msg.dwObjectID = HERO->GetID();
			msg.dwData1 = m_ActionTarget.GetTargetID();	//NPC Idx
			msg.dwData2 = pNpc->GetNpcUniqueIdx();

			OBJECTSTATEMGR->StartObjectState(HERO, eObjectState_Deal);

			NETWORK->Send(&msg, sizeof(msg));
		
			pNpc->OnClicked();
		}
		break;
	case eActionKind_TalkToOwner:
//노점기능 정상화 될때까지 패치올리자.
//		CHATMGR->AddMsg( CTC_SYSMSG, "노점상 기능이 일시적으로 중단되었습니다. 이용에 불편을 드려 죄송합니다." );
		STREETSTALLMGR->EnterStreetStall( m_ActionTarget.GetTargetID() );
		break;
	case eActionKind_Move:
		MOVEMGR->SetHeroTarget( m_ActionTarget.GetTargetPosition(), TRUE);
		break;
	case eActionKind_EquipItem:
		{
			CItem* pItem = ITEMMGR->GetItem((DWORD)m_pActionInfo);		
			if(pItem == NULL)
				break;
			GAMEIN->GetInventoryDialog()->UseItem(pItem);
		}
		break;
	case eActionKind_VehicleGetOn:
		{
			CVehicle* pVehicle = (CVehicle*)OBJECTMGR->GetSelectedObject();
			if( !pVehicle || pVehicle->GetObjectKind() != eObjectKind_Vehicle )
			{
				// 잘못된 데이터가 선택된경우 팝업창을 닫는다
				CRidePopupMenuDlg* pDlg = GAMEIN->GetRidePopupMenuDlg();
				if( pDlg )
					pDlg->SetActive( FALSE );
				break;
			}
			else if(0 == pVehicle->CanGetOn(HERO))
			{
				break;
			}

			MSG_DWORD2 message;
			ZeroMemory( &message, sizeof( message ) );
			message.Category = MP_VEHICLE;
			message.Protocol = MP_VEHICLE_MOUNT_ASK_SYN;
			message.dwObjectID = HEROID;
			message.dwData1 = pVehicle->GetID();
			NETWORK->Send( &message, sizeof( message ) );
		}
	default:
		ASSERT(0);
		break;
	}

	return TRUE;
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:101,代码来源:CAction.cpp

示例2: ApplyShowdown

void CShowdownManager::ApplyShowdown()
{
	if( BATTLESYSTEM->GetBattle()->GetBattleKind() != eBATTLE_KIND_NONE || m_bIsShowdown )
	{
		//ºñ¹«¸¦ ÇÒ ¼ö ¾ø´Â »óÅÂÀÔ´Ï´Ù. confirm
		return;
	}
	if( HERO->IsPKMode() )
	{
		// 070215 LYW --- ShowdownManager : Modified message number.
		//CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(370) );
		CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(417) );
		return;
	}
	if( HERO->GetState() != eObjectState_None && HERO->GetState() != eObjectState_Move &&
		HERO->GetState() != eObjectState_Immortal )
	{
		// 070215 LYW --- ShowdownManager : Modified message number.
		//CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(370) );
		CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(417) );
		return;
	}

	CObject* pOpPlayer = OBJECTMGR->GetSelectedObject();

	if( pOpPlayer == NULL || pOpPlayer == HERO )
	{
		// 070215 LYW --- ShowdownManager : Modified message number.
		//CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(380) );
		CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(427) );
		return;
	}
	if( pOpPlayer->GetObjectKind() != eObjectKind_Player )
	{
		// 070215 LYW --- ShowdownManager : Modified message number.
		//CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(380) );
		CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(427) );
		return;
	}
	if( pOpPlayer->GetState() == eObjectState_Die || pOpPlayer->GetState() == eObjectState_Fishing)
	{
		// 070215 LYW --- ShowdownManager : Modified message number.
		//CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(368) );
		CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg(415) );
		return;
	}

	CPlayer* pTargetPlayer = (CPlayer*)pOpPlayer;

	// 090424 ShinJS --- 고정형 탈것에 탑승중인경우 실행하지 않는다(결투신청자)
	if( HERO->IsGetOnVehicle() )
	{
		CVehicle* pVehicle = (CVehicle*)OBJECTMGR->GetObject( HERO->GetVehicleID() );

		// 탑승중인 탈것이 고정형인 경우
		if( pVehicle && 
			pVehicle->GetObjectKind() == eObjectKind_Vehicle &&
			pVehicle->DoGetMoveSpeed() <= 0.0f )
		{
			CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg( 1839 ) );
			return;
		}
	}

	// 090424 ShinJS --- 고정형 탈것에 탑승중인경우 실행하지 않는다(결투대상자)
	if( pTargetPlayer->IsGetOnVehicle() )
	{
		CVehicle* pVehicle = (CVehicle*)OBJECTMGR->GetObject( pTargetPlayer->GetVehicleID() );

		// 탑승중인 탈것이 고정형인 경우
		if( pVehicle && 
			pVehicle->GetObjectKind() == eObjectKind_Vehicle &&
			pVehicle->DoGetMoveSpeed() <= 0.0f )
		{
			CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg( 1839 ) );
			return;
		}
	}

	SetShowdown( TRUE );
	HERO->DisableAutoAttack();			//°ø°Ý Ãë¼Ò
	HERO->SetNextAction(NULL);			//½ºÅ³ Ãë¼Ò
	MOVEMGR->HeroMoveStop();
//	HERO->SetState( eObjectState_BattleReady );
	OBJECTSTATEMGR->StartObjectState(HERO, eObjectState_BattleReady);
	

	
//---NETWORK MSG	
	MSG_DWORD msg;
	msg.Category	= MP_BATTLE;
	msg.Protocol	= MP_BATTLE_SHOWDOWN_APPLY_SYN;
	msg.dwObjectID	= gHeroID;
	msg.dwData		= pOpPlayer->GetID();
	NETWORK->Send( &msg, sizeof(MSG_DWORD) );
}
开发者ID:xianyinchen,项目名称:LUNAPlus,代码行数:96,代码来源:ShowdownManager.cpp


注:本文中的CVehicle::GetObjectKind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。