本文整理汇总了C++中CCharacter::IsInPeaceZone方法的典型用法代码示例。如果您正苦于以下问题:C++ CCharacter::IsInPeaceZone方法的具体用法?C++ CCharacter::IsInPeaceZone怎么用?C++ CCharacter::IsInPeaceZone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCharacter
的用法示例。
在下文中一共展示了CCharacter::IsInPeaceZone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_Attack
//.........这里部分代码省略.........
}
listMultiTarget.insert(tch->m_index);
ret = ProcAttack(ch, tch, ch->GetAttackType(NULL), NULL, 0);
}
if (ret == -1 || tch->m_index == -1) // ProcAttack()안에서 Character 객체가 소멸된 경우도 포함
{
tch = NULL;
continue ;
}
//공격 발동형 스킬 추가
if( pc->m_optionAttSkillList.count() > 0 )
{
//공격 할 시에 적에게 스킬 적용
void* pos = pc->m_optionAttSkillList.GetHeadPosition();
bool bApply = false;
while (pos)
{
CSkill* skill = pc->m_passiveSkillList.GetNext(pos);
if (skill && skill->m_proto)
{
int rand = GetRandom(1, 10000);
if( rand < skill->m_optionSkillProb )
{
ApplySkill(ch, tch, skill, -1, bApply);
if(bApply == false)
{
GAMELOG << init("EVENT_PCBANG_2NDS SKILL FAILED (LOGIN) ", pc ) << end;// 스킬 적용 실패
}
}
}
}
}
if (area->m_zone->IsPersonalDungeon() == false)
{
tch = NULL;
continue;
}
if (packet->multicount && !DEAD(ch))
{
int multitarget = packet->list[packet->multicount].index;
--packet->multicount;
tch = area->FindCharInCell(ch, multitarget, (MSG_CHAR_TYPE)packet->tCharType);
if (tch == NULL)
{
continue;
}
if (GetDistance(ch, tch) > ch->m_attackRange * 2)
{
tch = NULL;
continue;
}
std::set<int>::iterator it = listMultiTarget.find(tch->m_index);
if (it != listMultiTarget.end())
{
GAMELOG << init("HACK ATTACK MULTI TARGET", pc)
<< "ZONE" << delim
<< pc->m_pZone->m_index << delim
<< "TARGET" << delim
<< packet->tCharType << delim
<< multitarget
<< end;
if (pc->m_desc->IncreaseHackCount(1))
return ;
tch = NULL;
}
}
else
{
tch = NULL;
continue;
}
if (packet->multicount <= 0)
{
tch = NULL;
continue;
}
} // end while
if (bAttackedPet && !ch->IsInPeaceZone(true))
pc->m_pulseLastAttackSkill = gserver->m_pulse;
#ifdef EVENT_SEARCHFRIEND_TIME
// 공격시 이벤트 시간 갱신 검사
if (gserver->m_bSearchFriendEvent && (pc->m_nEventSearchFriendListCount >= 1)
&& (pc->m_bEventSearchFriendSelect == true) && (pc->m_nTimeEventSearchFriend <= 216000)
&& bAttacked && !ch->IsInPeaceZone(true))
pc->m_pulseEventSearchFriend = gserver->m_pulse;
#endif // #ifdef EVENT_SEARCHFRIEND_TIME
}