本文整理汇总了C++中CNpc::GetNpcKind方法的典型用法代码示例。如果您正苦于以下问题:C++ CNpc::GetNpcKind方法的具体用法?C++ CNpc::GetNpcKind怎么用?C++ CNpc::GetNpcKind使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CNpc
的用法示例。
在下文中一共展示了CNpc::GetNpcKind方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExcuteAction
BOOL CAction::ExcuteAction(CHero* pOperator)
{
switch(m_ActionKind) {
case eActionKind_Skill:
{
// 100617 ShinJS 서버에서 스킬이 제거된 후 발동시킨다.
if( HERO->GetCurrentSkill() > 0 )
return FALSE;
cActiveSkillInfo* pNextSkill = (cActiveSkillInfo*)m_pActionInfo;
// 080904 LYW --- SkillManager : 공성전 중 사용할 수 없는 스킬 체크.
if( SIEGEWARFAREMGR->Is_CastleMap() == FALSE &&
SIEGEWARFAREMGR->IsSiegeWarfareZone() &&
SIEGEWARFAREMGR->GetState() > eSiegeWarfare_State_Before )
{
if( SIEGEWARFAREMGR->IsFobiddenSkill(pNextSkill->GetIndex()) )
{
WINDOWMGR->MsgBox( MBI_SKILL_SIEGEWAR_FORBIDDENSKILL, MBT_OK, CHATMGR->GetChatMsg(358) ) ;
return TRUE;
}
}
if(pNextSkill->IsInRange(*pOperator, m_ActionTarget))
{
SKILLMGR->ExcuteSkillSYN(pOperator,&m_ActionTarget,pNextSkill);
}
else
{ // 실패
SKILLMGR->ExcuteSkillSYN(pOperator,&m_ActionTarget,TRUE);
}
}
break;
case eActionKind_Skill_RealExecute:
{
// 080904 LYW --- SkillManager : 공성전 중 사용할 수 없는 스킬 체크.
if( SIEGEWARFAREMGR->Is_CastleMap() == FALSE &&
SIEGEWARFAREMGR->IsSiegeWarfareZone() &&
SIEGEWARFAREMGR->GetState() > eSiegeWarfare_State_Before )
{
if( SIEGEWARFAREMGR->IsFobiddenSkill( ((cSkillInfo*)m_pActionInfo)->GetIndex()) )
{
WINDOWMGR->MsgBox( MBI_SKILL_SIEGEWAR_FORBIDDENSKILL, MBT_OK, CHATMGR->GetChatMsg(358) ) ;
return TRUE;
}
}
SKILLMGR->RealExcuteSkillSYN(pOperator,&m_ActionTarget,(cSkillInfo*)m_pActionInfo);
}
break;
case eActionKind_TalkToNpc:
{
// 조합/인챈트/강화/분해 중인 경우 불가
{
cDialog* mixDialog = WINDOWMGR->GetWindowForID( ITMD_MIXDLG );
cDialog* enchantDialog = WINDOWMGR->GetWindowForID( ITD_UPGRADEDLG );
cDialog* reinforceDialog = WINDOWMGR->GetWindowForID( ITR_REINFORCEDLG );
cDialog* dissoloveDialog = WINDOWMGR->GetWindowForID( DIS_DISSOLUTIONDLG );
ASSERT( mixDialog && enchantDialog && reinforceDialog && dissoloveDialog );
const BOOL isOpen = mixDialog->IsActive() ||
enchantDialog->IsActive() ||
reinforceDialog->IsActive() ||
dissoloveDialog->IsActive();
if( isOpen )
{
CHATMGR->AddMsg( CTC_SYSMSG, CHATMGR->GetChatMsg( 1104 ) );
break;
}
}
CNpc* pNpc = (CNpc*)OBJECTMGR->GetObject( m_ActionTarget.GetTargetID() );
if( pNpc == NULL ) break;
if((pNpc->GetNpcJob() == BOMUL_ROLE) && (pNpc->GetState() == eObjectState_Die))
{
CHATMGR->AddMsg(CTC_SYSMSG, CHATMGR->GetChatMsg(918));
break;
}
// 080922 LYW --- CAction : 루쉔 깃발.
else if( pNpc->GetNpcJob() == SIEGEFLAGROLE_RUSHEN || pNpc->GetNpcJob() == SIEGEFLAGROLE_ZEVYN )
{
MSG_WORD msg ;
msg.Category = MP_SIEGEWARFARE ;
msg.Protocol = MP_SIEGEWARFARE_CHECK_FLAGUSE_SYN ;
msg.dwObjectID = HEROID ;
msg.wData = pNpc->GetNpcKind() ;
NETWORK->Send( &msg, sizeof(MSG_WORD) ) ;
//WINDOWMGR->MsgBox(MBI_SIEGEWARFLAG, MBT_YESNO, CHATMGR->GetChatMsg(1686)) ;
break;
}
//.........这里部分代码省略.........