• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ instance_naxxramas类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中instance_naxxramas的典型用法代码示例。如果您正苦于以下问题:C++ instance_naxxramas类的具体用法?C++ instance_naxxramas怎么用?C++ instance_naxxramas使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了instance_naxxramas类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetOtherAdd

 Creature* GetOtherAdd()                                 // For Stalagg returns pFeugen, for Feugen returns pStalagg
 {
     switch (m_creature->GetEntry())
     {
         case NPC_FEUGEN:  return m_pInstance->GetSingleCreatureFromStorage(NPC_STALAGG);
         case NPC_STALAGG: return m_pInstance->GetSingleCreatureFromStorage(NPC_FEUGEN);
         default:
             return NULL;
     }
 }
开发者ID:Tafuna,项目名称:scriptdev2-tbc,代码行数:10,代码来源:boss_thaddius.cpp


示例2: Aggro

    void Aggro(Unit* /*pWho*/)
    {
        if (!m_pInstance)
            return;

        m_pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS);

        // Make immune
        m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, true);

        m_pInstance->SetGothTriggers();
        PrepareSummonPlaces();
    }
开发者ID:Phatcat,项目名称:mangos,代码行数:13,代码来源:boss_gothik.cpp


示例3: Aggro

    void Aggro(Unit* pWho)
    {
        m_creature->SetInCombatWithZone();

        DoScriptText(SAY_SPEECH_1, m_creature);

        if (!m_pInstance)
            return;

        m_pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS);

        m_pInstance->SetGothTriggers();
    }
开发者ID:eviljared,项目名称:diamondcore,代码行数:13,代码来源:boss_gothik.cpp


示例4: SpellHit

    // Widow's Embrace prevents frenzy and poison bolt, if it removes frenzy, next frenzy is sceduled in 60s
    // It is likely that this _should_ be handled with some dummy aura(s) - but couldn't find any
    void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpellEntry) override
    {
        // Check if we hit with Widow's Embrave
        if (pSpellEntry->Id == SPELL_WIDOWS_EMBRACE || pSpellEntry->Id == SPELL_WIDOWS_EMBRACE_H)
        {
            bool bIsFrenzyRemove = false;

            // If we remove the Frenzy, the Enrage Timer is reseted to 60s
            if (m_creature->HasAura(m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H))
            {
                m_uiEnrageTimer = 60000;
                m_creature->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H);

                bIsFrenzyRemove = true;
            }

            // Achievement 'Momma said Knock you out': If we removed OR delayed the frenzy, the criteria is failed
            if ((bIsFrenzyRemove || m_uiEnrageTimer < 30000) && m_pInstance)
                m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_KNOCK_YOU_OUT, false);

            // In any case we prevent Frenzy and Poison Bolt Volley for Widow's Embrace Duration (30s)
            // We do this be setting the timers to at least bigger than 30s
            m_uiEnrageTimer = std::max(m_uiEnrageTimer, (uint32)30000);
            m_uiPoisonBoltVolleyTimer = std::max(m_uiPoisonBoltVolleyTimer, urand(33000, 38000));
        }
    }
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:28,代码来源:boss_faerlina.cpp


示例5: SummonIntroCreatures

    void SummonIntroCreatures(uint32 packId)
    {
        if (!m_pInstance)
            return;

        float fAngle = GetLocationAngle(packId + 1);

        float fX, fY, fZ;
        m_pInstance->GetChamberCenterCoords(fX, fY, fZ);

        fX += M_F_RANGE * cos(fAngle);
        fY += M_F_RANGE * sin(fAngle);
        fZ += M_F_HEIGHT;

        MaNGOS::NormalizeMapCoord(fX);
        MaNGOS::NormalizeMapCoord(fY);

        uint32 uiNpcEntry = NPC_SOUL_WEAVER;

        for (uint8 uiI = 0; uiI < 14; ++uiI)
        {
            if (uiI > 0)
            {
                if (uiI < 4)
                    uiNpcEntry = NPC_UNSTOPPABLE_ABOM;
                else
                    uiNpcEntry = NPC_SOLDIER_FROZEN;
            }

            float fNewX, fNewY, fNewZ;
            m_creature->GetRandomPoint(fX, fY, fZ, 12.0f, fNewX, fNewY, fNewZ);

            m_creature->SummonCreature(uiNpcEntry, fNewX, fNewY, fNewZ, fAngle + M_PI_F, TEMPSPAWN_CORPSE_DESPAWN, 5000);
        }
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:35,代码来源:boss_kelthuzad.cpp


示例6: MoveInLineOfSight

    void MoveInLineOfSight(Unit* pWho) override
    {
        if (m_pInstance && m_pInstance->GetData(TYPE_KELTHUZAD) != IN_PROGRESS)
            return;

        ScriptedAI::MoveInLineOfSight(pWho);
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:7,代码来源:boss_kelthuzad.cpp


示例7: SummonAdds

    void SummonAdds(bool bRightSide, uint32 uiSummonEntry)
    {
        std::list<Creature*> lSummonList;
        m_pInstance->GetGothSummonPointCreatures(lSummonList, bRightSide);

        if (lSummonList.empty())
            return;

        uint8 uiCount = 2;

        switch(uiSummonEntry)
        {
        case NPC_UNREL_TRAINEE:
            lSummonList.sort(ObjectDistanceOrder(m_creature));
            break;
        case NPC_UNREL_DEATH_KNIGHT:
        case NPC_UNREL_RIDER:
            uiCount = 1;
            lSummonList.sort(ObjectDistanceOrderReversed(m_creature));
            break;
        }

        for(std::list<Creature*>::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr)
        {
            if (uiCount == 0)
                break;

            m_creature->SummonCreature(uiSummonEntry, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
            --uiCount;
        }
    }
开发者ID:eviljared,项目名称:diamondcore,代码行数:31,代码来源:boss_gothik.cpp


示例8: JustReachedHome

 void JustReachedHome() override
 {
     if (m_pInstance)
     {
         m_pInstance->SetData(TYPE_MAEXXNA, FAIL);
     }
 }
开发者ID:lucasdnd,项目名称:mangoszero-bots-test,代码行数:7,代码来源:boss_maexxna.cpp


示例9: JustReachedHome

    void JustReachedHome() override
    {
        if (m_pInstance)
            m_pInstance->SetData(TYPE_GLUTH, FAIL);

        DoCastSpellIfCan(m_creature, SPELL_DOUBLE_ATTACK, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
    }
开发者ID:Phatcat,项目名称:mangos-wotlk,代码行数:7,代码来源:boss_gluth.cpp


示例10: JustDied

    void JustDied(Unit* /*pKiller*/) override
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_FAERLINA, DONE);
    }
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:7,代码来源:boss_faerlina.cpp


示例11: JustDied

    void JustDied(Unit* /*pKiller*/)
    {
        DoScriptText(SAY_DEATH, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_GOTHIK, DONE);
    }
开发者ID:Phatcat,项目名称:mangos,代码行数:7,代码来源:boss_gothik.cpp


示例12: Aggro

    void Aggro(Unit* /*pWho*/) override
    {
        DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROST_AURA : SPELL_FROST_AURA_H);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS);
    }
开发者ID:AwkwardDev,项目名称:mangos-d3,代码行数:7,代码来源:boss_sapphiron.cpp


示例13: Aggro

    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_PATCHWERK, IN_PROGRESS);
    }
开发者ID:ROKB,项目名称:scriptdev2-classic,代码行数:7,代码来源:boss_patchwerk.cpp


示例14: JustDied

 void JustDied(Unit* /*pKiller*/) override
 {
     if (m_pInstance)
     {
         m_pInstance->SetData(TYPE_MAEXXNA, DONE);
     }
 }
开发者ID:lucasdnd,项目名称:mangoszero-bots-test,代码行数:7,代码来源:boss_maexxna.cpp


示例15: Aggro

 void Aggro(Unit* /*pWho*/) override
 {
     if (m_pInstance)
     {
         m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS);
     }
 }
开发者ID:lucasdnd,项目名称:mangoszero-bots-test,代码行数:7,代码来源:boss_maexxna.cpp


示例16: JustDied

    void JustDied(Unit* /*pKiller*/) override
    {
        DoScriptText(SAY_DEATH, m_creature);
        DespawnAdds();

        if (m_pInstance)
            m_pInstance->SetData(TYPE_KELTHUZAD, DONE);
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:8,代码来源:boss_kelthuzad.cpp


示例17: ProcessCentralDoor

 void ProcessCentralDoor()
 {
     if (IsCentralDoorClosed())
     {
         m_pInstance->SetData(TYPE_GOTHIK, SPECIAL);
         DoScriptText(EMOTE_GATE, m_creature);
     }
 }
开发者ID:Phatcat,项目名称:mangos,代码行数:8,代码来源:boss_gothik.cpp


示例18: JustReachedHome

    void JustReachedHome() override
    {
        DespawnIntroCreatures();
        DespawnAdds();

        if (m_pInstance)
            m_pInstance->SetData(TYPE_KELTHUZAD, NOT_STARTED);
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:8,代码来源:boss_kelthuzad.cpp


示例19: SetupChain

    bool SetupChain()
    {
        // Check, if instance_ script failed or encounter finished
        if (!m_pInstance || m_pInstance->GetData(TYPE_THADDIUS) == DONE)
            return true;

        GameObject* pNoxTeslaFeugen  = m_pInstance->GetSingleGameObjectFromStorage(GO_CONS_NOX_TESLA_FEUGEN);
        GameObject* pNoxTeslaStalagg = m_pInstance->GetSingleGameObjectFromStorage(GO_CONS_NOX_TESLA_STALAGG);

        // Try again, till Tesla GOs are spawned
        if (!pNoxTeslaFeugen || !pNoxTeslaStalagg)
            return false;

        m_bToFeugen = m_creature->GetDistanceOrder(pNoxTeslaFeugen, pNoxTeslaStalagg);

        return DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN) == CAST_OK;
    }
开发者ID:MantisLord,项目名称:mangos-tbc,代码行数:17,代码来源:boss_thaddius.cpp


示例20: Aggro

    void Aggro(Unit* /*pWho*/) override
    {

        DoScriptText(SAY_AGGRO_1, m_creature);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_FAERLINA, IN_PROGRESS);
    }
开发者ID:killerwife,项目名称:mangos-tbc,代码行数:8,代码来源:boss_faerlina.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ instance_onyxias_lair类代码示例发布时间:2022-05-31
下一篇:
C++ instance_karazhan类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap