本文整理汇总了C++中LPCHARACTER::GetSectree方法的典型用法代码示例。如果您正苦于以下问题:C++ LPCHARACTER::GetSectree方法的具体用法?C++ LPCHARACTER::GetSectree怎么用?C++ LPCHARACTER::GetSectree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPCHARACTER
的用法示例。
在下文中一共展示了LPCHARACTER::GetSectree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindVictim
LPCHARACTER FindVictim(LPCHARACTER pkChr, int iMaxDistance)
{
FuncFindMobVictim f(pkChr, iMaxDistance);
if (pkChr->GetSectree() != NULL) {
pkChr->GetSectree()->ForEachAround(f);
}
return f.GetVictim();
}
示例2: battle_is_attackable
bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim)
{
// 상대방이 죽었으면 중단한다.
if (victim->IsDead())
return false;
// 안전지대면 중단
{
SECTREE *sectree = NULL;
sectree = ch->GetSectree();
if (sectree && sectree->IsAttr(ch->GetX(), ch->GetY(), ATTR_BANPK))
return false;
sectree = victim->GetSectree();
if (sectree && sectree->IsAttr(victim->GetX(), victim->GetY(), ATTR_BANPK))
return false;
}
// 내가 죽었으면 중단한다.
if (ch->IsStun() || ch->IsDead())
return false;
if (ch->IsPC() && victim->IsPC())
{
CGuild* g1 = ch->GetGuild();
CGuild* g2 = victim->GetGuild();
if (g1 && g2)
{
if (g1->UnderWar(g2->GetID()))
return true;
}
}
if (IS_CASTLE_MAP(ch->GetMapIndex()) && false==castle_can_attack(ch, victim))
return false;
if (CArenaManager::instance().CanAttack(ch, victim) == true)
return true;
return CPVPManager::instance().CanAttack(ch, victim);
}