本文整理汇总了C++中CAnimation::GetCurrentMovementRate方法的典型用法代码示例。如果您正苦于以下问题:C++ CAnimation::GetCurrentMovementRate方法的具体用法?C++ CAnimation::GetCurrentMovementRate怎么用?C++ CAnimation::GetCurrentMovementRate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAnimation
的用法示例。
在下文中一共展示了CAnimation::GetCurrentMovementRate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DETOUR_EvaluateTrigger
BOOL DETOUR_CGameSprite::DETOUR_EvaluateTrigger(Trigger& t) {
if (0) IECString("DETOUR_CGameSprite::DETOUR_EvaluateTrigger");
Trigger tTemp = t;
CCreatureObject* pCre = NULL;
CGameSprite* pSprite = NULL;
Object oCriteria;
int nFindTargetResult = 0;
BOOL bResult = FALSE;
switch (tTemp.m_wOpcode) {
case TRIGGER_MOVEMENT_RATE:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
CAnimation* pAnim = pCre->m_animation.m_pAnimation;
if (pAnim == NULL) break;
unsigned char nMvt = pAnim->GetCurrentMovementRate();
bResult = (signed int)nMvt == tTemp.m_i;
}
break;
case TRIGGER_MOVEMENT_RATE_GT:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
CAnimation* pAnim = pCre->m_animation.m_pAnimation;
if (pAnim == NULL) break;
unsigned char nMvt = pAnim->GetCurrentMovementRate();
bResult = (signed int)nMvt > tTemp.m_i;
}
break;
case TRIGGER_MOVEMENT_RATE_LT:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
CAnimation* pAnim = pCre->m_animation.m_pAnimation;
if (pAnim == NULL) break;
unsigned char nMvt = pAnim->GetCurrentMovementRate();
bResult = (signed int)nMvt < tTemp.m_i;
}
break;
case TRIGGER_NUM_MIRRORIMAGES:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
unsigned char nImages = pCre->m_nMirrorImages;
bResult = (signed int)nImages == tTemp.m_i;
}
break;
case TRIGGER_NUM_MIRRORIMAGES_GT:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
unsigned char nImages = pCre->m_nMirrorImages;
bResult = (signed int)nImages > tTemp.m_i;
}
break;
case TRIGGER_NUM_MIRRORIMAGES_LT:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
unsigned char nImages = pCre->m_nMirrorImages;
bResult = (signed int)nImages < tTemp.m_i;
}
break;
case TRIGGER_BOUNCING_SPELL_LEVEL:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
if (tTemp.m_i < 0) break;
if (tTemp.m_i > 9) break;
bResult = pCre->GetDerivedStats().m_bBounceSplLvl[tTemp.m_i] || pCre->GetDerivedStats().m_BounceSplLvlDec[tTemp.m_i].m_bOn;
}
break;
case TRIGGER_NUM_BOUNCING_SPELL_LEVEL:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
if (tTemp.m_i < 0) break;
if (tTemp.m_i > 9) break;
unsigned int nNumBounce = 0;
if (pCre->GetDerivedStats().m_bBounceSplLvl[tTemp.m_i]) {
nNumBounce = UINT_MAX;
} else {
if (pCre->GetDerivedStats().m_BounceSplLvlDec[tTemp.m_i].m_bOn)
nNumBounce = pCre->GetDerivedStats().m_BounceSplLvlDec[tTemp.m_i].m_nCount;
}
bResult = nNumBounce == tTemp.m_i2;
}
break;
case TRIGGER_NUM_BOUNCING_SPELL_LEVEL_GT:
{
nFindTargetResult = FindTargetCreature(tTemp, &pCre);
if (pCre == NULL) break;
if (tTemp.m_i < 0) break;
if (tTemp.m_i > 9) break;
unsigned int nNumBounce = 0;
if (pCre->GetDerivedStats().m_bBounceSplLvl[tTemp.m_i]) {
nNumBounce = UINT_MAX;
} else {
//.........这里部分代码省略.........