本文整理汇总了C++中LPCHARACTER::IsAffectFlag方法的典型用法代码示例。如果您正苦于以下问题:C++ LPCHARACTER::IsAffectFlag方法的具体用法?C++ LPCHARACTER::IsAffectFlag怎么用?C++ LPCHARACTER::IsAffectFlag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPCHARACTER
的用法示例。
在下文中一共展示了LPCHARACTER::IsAffectFlag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NormalAttackAffect
void NormalAttackAffect(LPCHARACTER pkAttacker, LPCHARACTER pkVictim)
{
// 독 공격은 특이하므로 특수 처리
if (pkAttacker->GetPoint(POINT_POISON_PCT) && !pkVictim->IsAffectFlag(AFF_POISON))
{
if (number(1, 100) <= pkAttacker->GetPoint(POINT_POISON_PCT))
pkVictim->AttackedByPoison(pkAttacker);
}
int iStunDuration = 2;
if (pkAttacker->IsPC() && !pkVictim->IsPC())
iStunDuration = 4;
AttackAffect(pkAttacker, pkVictim, POINT_STUN_PCT, IMMUNE_STUN, AFFECT_STUN, POINT_NONE, 0, AFF_STUN, iStunDuration, "STUN");
AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW, AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20, "SLOW");
}
示例2: operator
bool operator () (LPENTITY ent)
{
if (!ent->IsType(ENTITY_CHARACTER))
return false;
LPCHARACTER pkChr = (LPCHARACTER) ent;
if (pkChr->IsBuilding() &&
(pkChr->IsAffectFlag(AFF_BUILDING_CONSTRUCTION_SMALL) ||
pkChr->IsAffectFlag(AFF_BUILDING_CONSTRUCTION_LARGE) ||
pkChr->IsAffectFlag(AFF_BUILDING_UPGRADE)))
{
m_pkChrBuilding = pkChr;
}
if (pkChr->IsNPC())
{
if ( !pkChr->IsMonster() || !m_pkChr->IsAttackMob() || m_pkChr->IsAggressive() )
return false;
}
if (pkChr->IsDead())
return false;
if (pkChr->IsAffectFlag(AFF_EUNHYUNG) ||
pkChr->IsAffectFlag(AFF_INVISIBILITY) ||
pkChr->IsAffectFlag(AFF_REVIVE_INVISIBLE))
return false;
if (pkChr->IsAffectFlag(AFF_TERROR) && m_pkChr->IsImmune(IMMUNE_TERROR) == false ) // 공포 처리
{
if ( pkChr->GetLevel() >= m_pkChr->GetLevel() )
return false;
}
if ( m_pkChr->IsNoAttackShinsu() )
{
if ( pkChr->GetEmpire() == 1 )
return false;
}
if ( m_pkChr->IsNoAttackChunjo() )
{
if ( pkChr->GetEmpire() == 2 )
return false;
}
if ( m_pkChr->IsNoAttackJinno() )
{
if ( pkChr->GetEmpire() == 3 )
return false;
}
int iDistance = DISTANCE_APPROX(m_lx - pkChr->GetX(), m_ly - pkChr->GetY());
if (iDistance < m_iMinDistance && iDistance <= m_iMaxDistance)
{
m_pkChrVictim = pkChr;
m_iMinDistance = iDistance;
}
return true;
}