当前位置: 首页>>代码示例>>C++>>正文


C++ instance_gundrak::SetLessRabiAchievementCriteria方法代码示例

本文整理汇总了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();
    }
开发者ID:AwkwardDev,项目名称:mangos-d3,代码行数:61,代码来源:boss_moorabi.cpp


注:本文中的instance_gundrak::SetLessRabiAchievementCriteria方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。