本文整理汇总了C++中instance_gundrak::SetLessRabiAchievementCriteria方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_gundrak::SetLessRabiAchievementCriteria方法的具体用法?C++ instance_gundrak::SetLessRabiAchievementCriteria怎么用?C++ instance_gundrak::SetLessRabiAchievementCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_gundrak
的用法示例。
在下文中一共展示了instance_gundrak::SetLessRabiAchievementCriteria方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
if (m_creature->HasAura(SPELL_TRANSFORMATION) && !m_bMammothPhase)
{
DoScriptText(EMOTE_TRANSFORMED, m_creature);
m_bMammothPhase = true;
// Set the achievement to failed
if (m_pInstance)
m_pInstance->SetLessRabiAchievementCriteria(false);
}
if (m_uiRoarTimer < uiDiff)
{
DoCastSpellIfCan(m_creature->getVictim(), m_bMammothPhase ? SPELL_NUMBING_ROAR : SPELL_NUMBING_SHOUT);
m_uiRoarTimer = 20000;
}
else
m_uiRoarTimer -= uiDiff;
if (m_uiQuakeTimer < uiDiff)
{
DoScriptText(SAY_QUAKE, m_creature);
DoCastSpellIfCan(m_creature->getVictim(), m_bMammothPhase ? SPELL_QUAKE : SPELL_GROUND_TREMOR);
m_uiQuakeTimer = m_bMammothPhase ? 13000 : 18000;
}
else
m_uiQuakeTimer -= uiDiff;
if (m_uiStabTimer < uiDiff)
{
if (m_bMammothPhase)
DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_DETERMINED_GORE : SPELL_DETERMINED_GORE_H);
else
DoCastSpellIfCan(m_creature->getVictim(), SPELL_DETERMINED_STAB);
m_uiStabTimer = 7000;
}
else
m_uiStabTimer -= uiDiff;
// check only in troll phase
if (!m_bMammothPhase)
{
if (m_uiTransformationTimer < uiDiff)
{
DoScriptText(SAY_TRANSFORM, m_creature);
DoScriptText(EMOTE_TRANSFORM, m_creature);
DoCastSpellIfCan(m_creature, SPELL_TRANSFORMATION);
m_uiPreviousTimer *= 0.8;
m_uiTransformationTimer = m_uiPreviousTimer;
}
else
m_uiTransformationTimer -= uiDiff;
}
DoMeleeAttackIfReady();
}