本文整理汇总了C++中LPCHARACTER::IsHorseRiding方法的典型用法代码示例。如果您正苦于以下问题:C++ LPCHARACTER::IsHorseRiding方法的具体用法?C++ LPCHARACTER::IsHorseRiding怎么用?C++ LPCHARACTER::IsHorseRiding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPCHARACTER
的用法示例。
在下文中一共展示了LPCHARACTER::IsHorseRiding方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: horse_is_riding
//
// "horse" Lua functions
//
int horse_is_riding(lua_State* L)
{
LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr();
if (ch->IsHorseRiding())
lua_pushnumber(L, 1);
else
lua_pushnumber(L, 0);
return 1;
}
示例2: CanAttack
bool CPVPManager::CanAttack(LPCHARACTER pkChr, LPCHARACTER pkVictim)
{
switch (pkVictim->GetCharType())
{
case CHAR_TYPE_NPC:
case CHAR_TYPE_WARP:
case CHAR_TYPE_GOTO:
return false;
}
if (pkChr == pkVictim) // 내가 날 칠라고 하네 -_-
return false;
if (pkVictim->IsNPC() && pkChr->IsNPC() && !pkChr->IsGuardNPC())
return false;
if( true == pkChr->IsHorseRiding() )
{
if( pkChr->GetHorseLevel() > 0 && 1 == pkChr->GetHorseGrade() )
return false;
}
else
{
switch( pkChr->GetMountVnum() )
{
case 0:
case 20030:
case 20110:
case 20111:
case 20112:
case 20113:
case 20114:
case 20115:
case 20116:
case 20117:
case 20118:
//신규 탈것 고급
case 20205:
case 20206:
case 20207:
case 20208:
case 20209:
case 20210:
case 20211:
case 20212:
case 20119: // 라마단 흑마
case 20219: // 라마단 흑마 클론 (할로윈용)
case 20220: // 크리스마스 탈것
case 20221: // 전갑 백웅
case 20222: // 전갑 팬더
case 20120:
case 20121:
case 20122:
case 20123:
case 20124:
case 20125:
case 20214: // 난폭한 전갑순순록
case 20215: // 용맹한 전갑순순록
case 20217: // 난폭한 전갑암순록
case 20218: // 용맹한 전갑암순록
case 20224: // 난폭한 전갑석룡자
case 20225: // 용맹한 전갑석룡자
case 20226: // 유니콘
case 20227:
break;
default:
return false;
}
}
if (pkVictim->IsNPC() || pkChr->IsNPC())
{
return true;
}
if (pkVictim->IsObserverMode() || pkChr->IsObserverMode())
return false;
{
BYTE bMapEmpire = SECTREE_MANAGER::instance().GetEmpireFromMapIndex(pkChr->GetMapIndex());
if ( pkChr->GetPKMode() == PK_MODE_PROTECT && pkChr->GetEmpire() == bMapEmpire ||
pkVictim->GetPKMode() == PK_MODE_PROTECT && pkVictim->GetEmpire() == bMapEmpire )
{
return false;
}
}
if (pkChr->GetEmpire() != pkVictim->GetEmpire())
{
if ( LC_IsYMIR() == true || LC_IsKorea() == true )
{
if ( pkChr->GetPKMode() == PK_MODE_PROTECT || pkVictim->GetPKMode() == PK_MODE_PROTECT )
{
return false;
}
}
return true;
//.........这里部分代码省略.........