本文整理汇总了C++中instance_ahnkahet::GetJedogaEventControllersList方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_ahnkahet::GetJedogaEventControllersList方法的具体用法?C++ instance_ahnkahet::GetJedogaEventControllersList怎么用?C++ instance_ahnkahet::GetJedogaEventControllersList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_ahnkahet
的用法示例。
在下文中一共展示了instance_ahnkahet::GetJedogaEventControllersList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (m_uiVisualTimer)
{
if (m_uiVisualTimer <= uiDiff)
{
GuidList lControllersList;
if (m_pInstance)
m_pInstance->GetJedogaEventControllersList(lControllersList);
for (GuidList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr))
pTemp->CastSpell(m_creature, SPELL_BEAM_VISUAL, false);
}
if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_VISUAL) == CAST_OK)
m_uiVisualTimer = 0;
}
else
m_uiVisualTimer -= uiDiff;
}
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Don't use abilities while sacrificing
if (m_bIsSacrificing)
return;
// Note: this was changed in 3.3.2 and now it does this only once
if (m_creature->GetHealthPercent() < 50.0f && !m_bSacrifice)
{
SetCombatMovement(false);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->GetMotionMaster()->MovePoint(POINT_ID_SACRIFICE, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
m_bSacrifice = true;
m_bIsSacrificing = true;
}
if (m_uiThundershockTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_THUNDERSHOCK : SPELL_THUNDERSHOCK_H);
m_uiThundershockTimer = 40000;
}
else
m_uiThundershockTimer -= uiDiff;
if (m_uiLightningBoltTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_LIGHTNING_BOLT : SPELL_LIGHTNING_BOLT_H);
m_uiLightningBoltTimer = 7000;
}
else
m_uiLightningBoltTimer -= uiDiff;
if (m_uiCycloneStrikeTimer < uiDiff)
{
DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CYCLONE_STRIKE : SPELL_CYCLONE_STRIKE_H);
m_uiCycloneStrikeTimer = 15000;
}
else
m_uiCycloneStrikeTimer -= uiDiff;
DoMeleeAttackIfReady();
}