本文整理汇总了C++中LPCHARACTER::IsMonster方法的典型用法代码示例。如果您正苦于以下问题:C++ LPCHARACTER::IsMonster方法的具体用法?C++ LPCHARACTER::IsMonster怎么用?C++ LPCHARACTER::IsMonster使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPCHARACTER
的用法示例。
在下文中一共展示了LPCHARACTER::IsMonster方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
void operator () (LPENTITY ent)
{
if (ent->IsType(ENTITY_CHARACTER))
{
LPCHARACTER ch = (LPCHARACTER) ent;
if (ch->IsMonster())
{
return;
}
if (sx <= ch->GetX() && ch->GetX() <= ex
&& sy <= ch->GetY() && ch->GetY() <= ey)
{
bIn = true;
}
}
}
示例2: OnDragonDead
void CDragonLairManager::OnDragonDead(LPCHARACTER pDragon, DWORD KillerGuildID)
{
if (NULL == pDragon)
return;
if (false == pDragon->IsMonster())
return;
boost::unordered_map<DWORD, CDragonLair*>::iterator iter = LairMap_.find( KillerGuildID );
if (LairMap_.end() == iter)
{
return;
}
LPSECTREE_MAP pMap = SECTREE_MANAGER::instance().GetMap( pDragon->GetMapIndex() );
if (NULL == iter->second || NULL == pMap)
{
LairMap_.erase( iter );
return;
}
iter->second->OnDragonDead( pDragon );
// ѕЦµй ґЩ БэАё·О єёі»°н ёК ѕшѕЦ±в
tag_DragonLair_Collapse_EventInfo* info;
info = AllocEventInfo<tag_DragonLair_Collapse_EventInfo>();
info->step = 0;
info->pLair = iter->second;
info->InstanceMapIndex = pDragon->GetMapIndex();
event_create(DragonLair_Collapse_Event, info, PASSES_PER_SEC(10));
LairMap_.erase( iter );
}
示例3: 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;
}