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


C++ instance_trial_of_the_crusader类代码示例

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


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

示例1: JustReachedHome

 void JustReachedHome() override
 {
     if (m_pInstance)
     {
         if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != FAIL)
             m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, FAIL);
     }
 }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:8,代码来源:boss_faction_champions.cpp

示例2: Aggro

    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(SAY_AGGRO, m_creature);
        DoCastSpellIfCan(m_creature, SPELL_SURGE_OF_LIGHT);

        if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != IN_PROGRESS)
            m_pInstance->SetData(TYPE_TWIN_VALKYR, IN_PROGRESS);
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:8,代码来源:boss_twin_valkyr.cpp

示例3: JustDied

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

        if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != DONE)
            m_pInstance->SetData(TYPE_TWIN_VALKYR, DONE);

        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_ESSENCE, CAST_TRIGGERED);
        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_TOUCH, CAST_TRIGGERED);
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:10,代码来源:boss_twin_valkyr.cpp

示例4: Aggro

 void Aggro(Unit* pWho) override
 {
     if (m_pInstance)
     {
         if (m_pInstance->GetData(TYPE_FACTION_CHAMPIONS) != IN_PROGRESS)
         {
             m_pInstance->SetData(TYPE_FACTION_CHAMPIONS, IN_PROGRESS);
             m_pInstance->DoSetCrusadersInCombat(pWho);
         }
     }
 }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:11,代码来源:boss_faction_champions.cpp

示例5: EnterEvadeMode

    void EnterEvadeMode() override
    {
        if (m_pInstance && m_pInstance->GetData(TYPE_TWIN_VALKYR) != FAIL)
            m_pInstance->SetData(TYPE_TWIN_VALKYR, FAIL);

        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_ESSENCE, CAST_TRIGGERED);
        DoCastSpellIfCan(m_creature, SPELL_CLEAR_VALKYR_TOUCH, CAST_TRIGGERED);

        // cleanup handled by creature linking
        m_creature->ForcedDespawn();
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:11,代码来源:boss_twin_valkyr.cpp

示例6: UpdateAI

    void UpdateAI(const uint32 uiDiff) override
    {
        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        if (m_uiTwinSpikeTimer < uiDiff)
        {
            if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_TWIN_SPIKE_DARK) == CAST_OK)
                m_uiTwinSpikeTimer = 10000;
        }
        else
            m_uiTwinSpikeTimer -= uiDiff;

        // heroic abilities
        if (m_pInstance && m_pInstance->IsHeroicDifficulty())
        {
            if (m_uiTouchTimer < uiDiff)
            {
                if (DoCastSpellIfCan(m_creature, SPELL_DARK_TOUCH) == CAST_OK)
                    m_uiTouchTimer = 20000;
            }
            else
                m_uiTouchTimer -= uiDiff;
        }

        DoMeleeAttackIfReady();
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:27,代码来源:boss_twin_valkyr.cpp

示例7: JustSummoned

    void JustSummoned(Creature* pSummoned) override
    {
        switch (pSummoned->GetEntry())
        {
            case NPC_GORMOK:     m_uiPhase = PHASE_GORMOK;  break;
            case NPC_DREADSCALE: m_uiPhase = PHASE_WORMS;   break;
            case NPC_ICEHOWL:    m_uiPhase = PHASE_ICEHOWL; break;
            case NPC_ACIDMAW:
                // Cast emerge and delayed set in combat?
                pSummoned->SetInCombatWithZone();
                m_aSummonedBossGuid[3] = pSummoned->GetObjectGuid();
                return;
        }

        m_aSummonedBossGuid[m_uiPhase] = pSummoned->GetObjectGuid();

        pSummoned->SetWalk(false);
        pSummoned->GetMotionMaster()->MovePoint(m_uiPhase, aMovePositions[m_uiPhase][0], aMovePositions[m_uiPhase][1], aMovePositions[m_uiPhase][2], false);

        // Next beasts are summoned only for heroic modes
        if (m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC || m_creature->GetMap()->GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
            m_uiNextBeastTimer = 150 * IN_MILLISECONDS;     // 2 min 30

        m_uiAttackDelayTimer = 10000;

        if (m_pInstance)
            m_pInstance->DoOpenMainGate(10000);
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:28,代码来源:boss_northrend_beasts.cpp

示例8: JustDied

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

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

示例9: KilledUnit

    void KilledUnit(Unit* pVictim) override
    {
        if (!m_pInstance)
            return;

        Creature* pSpeaker = m_pInstance->GetSingleCreatureFromStorage(m_pInstance->GetPlayerTeam() == ALLIANCE ? NPC_GARROSH : NPC_VARIAN);
        if (!pSpeaker)
            return;

        switch (urand(0, 3))
        {
            case 0: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_1 : SAY_VARIAN_PVP_H_SLAY_1, pSpeaker); break;
            case 1: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_2 : SAY_VARIAN_PVP_H_SLAY_2, pSpeaker); break;
            case 2: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_3 : SAY_VARIAN_PVP_H_SLAY_3, pSpeaker); break;
            case 3: DoScriptText(m_pInstance->GetPlayerTeam() == ALLIANCE ? SAY_GARROSH_PVP_A_SLAY_4 : SAY_VARIAN_PVP_H_SLAY_4, pSpeaker); break;
        }
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:17,代码来源:boss_faction_champions.cpp

示例10: DoSummonNextBeast

    // Only for Dreadscale and Icehowl
    void DoSummonNextBeast(uint32 uiBeastEntry)
    {
        if (uiBeastEntry == NPC_DREADSCALE)
        {
            if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A))
                DoScriptText(SAY_TIRION_BEAST_2, pTirion);

            m_creature->SummonCreature(NPC_DREADSCALE, aSpawnPositions[2][0], aSpawnPositions[2][1], aSpawnPositions[2][2], aSpawnPositions[2][3], TEMPSUMMON_DEAD_DESPAWN, 0);
        }
        else
        {
            if (Creature* pTirion = m_pInstance->GetSingleCreatureFromStorage(NPC_TIRION_A))
                DoScriptText(SAY_TIRION_BEAST_3, pTirion);

            m_creature->SummonCreature(NPC_ICEHOWL, aSpawnPositions[4][0], aSpawnPositions[4][1], aSpawnPositions[4][2], aSpawnPositions[4][3], TEMPSUMMON_DEAD_DESPAWN, 0);
        }
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:18,代码来源:boss_northrend_beasts.cpp

示例11: SummonedCreatureJustDied

    void SummonedCreatureJustDied(Creature* pSummoned) override
    {
        if (!m_pInstance)
            return;

        switch (pSummoned->GetEntry())
        {
            case NPC_GORMOK:
                if (m_uiPhase == PHASE_GORMOK)
                    DoSummonNextBeast(NPC_DREADSCALE);
                break;

            case NPC_DREADSCALE:
            case NPC_ACIDMAW:
                if (m_bFirstWormDied && m_uiPhase == PHASE_WORMS)
                {
                    DoSummonNextBeast(NPC_ICEHOWL);

                    // cast achiev spell if timer is still running
                    if (m_uiWormAchievTimer)
                    {
                        m_creature->CastSpell(m_creature, SPELL_JORMUNGAR_ACHIEV_CREDIT, TRIGGERED_OLD_TRIGGERED);
                        m_uiWormAchievTimer = 0;
                    }
                }
                else
                {
                    m_bFirstWormDied = true;

                    // jormungar brother enrages
                    if (Creature* pWorm = m_pInstance->GetSingleCreatureFromStorage(pSummoned->GetEntry() == NPC_ACIDMAW ? NPC_DREADSCALE : NPC_ACIDMAW))
                    {
                        pWorm->CastSpell(pWorm, SPELL_JORMUNGAR_ENRAGE, TRIGGERED_OLD_TRIGGERED);
                        DoScriptText(EMOTE_JORMUNGAR_ENRAGE, pWorm);
                        m_uiWormAchievTimer = 10000;
                    }
                }
                break;

            case NPC_ICEHOWL:
                m_pInstance->SetData(TYPE_NORTHREND_BEASTS, DONE);
                m_creature->ForcedDespawn();
                break;
        }
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:45,代码来源:boss_northrend_beasts.cpp

示例12: Aggro

 void Aggro(Unit* /*pWho*/) override
 {
     // trigger the controller combat
     if (m_pInstance)
     {
         if (Creature* pStalker = m_pInstance->GetSingleCreatureFromStorage(NPC_BEASTS_COMBAT_STALKER))
             pStalker->SetInCombatWithZone();
     }
 }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:9,代码来源:boss_northrend_beasts.cpp

示例13: EnterEvadeMode

    void EnterEvadeMode() override
    {
        if (m_pInstance)
            m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL);

        for (uint8 i = 0; i < 4; ++i)
        {
            if (Creature* pBoss = m_creature->GetMap()->GetCreature(m_aSummonedBossGuid[i]))
                pBoss->ForcedDespawn();
        }

        m_creature->ForcedDespawn();
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:13,代码来源:boss_northrend_beasts.cpp

示例14: Reset

    void Reset() override
    {
        // get the list of summoned stalkers and move to a randome one
        if (m_pInstance)
            m_pInstance->GetStalkersGUIDVector(m_vStalkersGuids);

        if (m_vStalkersGuids.empty())
            return;

        m_creature->SetWalk(false);
        if (Creature* pStalker = m_creature->GetMap()->GetCreature(m_vStalkersGuids[urand(0, m_vStalkersGuids.size() - 1)]))
            m_creature->GetMotionMaster()->MovePoint(1, pStalker->GetPositionX(), pStalker->GetPositionY(), pStalker->GetPositionZ());
    }
开发者ID:dvdvideo1234,项目名称:mangos-wotlk,代码行数:13,代码来源:boss_twin_valkyr.cpp

示例15: Aggro

    void Aggro(Unit* /*pWho*/) override
    {
        DoScriptText(SAY_AGGRO, m_creature);

        // Summon the spheres on random points
        for (uint8 i = 0; i < MAX_FROSTSPHERES; ++i)
        {
            if (Creature* pTemp = m_creature->SummonCreature(NPC_FROSTSPHERE, aFrostSphereSpawnPositions[i][0], aFrostSphereSpawnPositions[i][1], aFrostSphereSpawnPositions[i][2], 0, TEMPSUMMON_DEAD_DESPAWN, 0))
                m_vSpheresGuidVector[i] = pTemp->GetObjectGuid();
        }

        // It's not clear if these should be spawned by DB or summoned
        for (uint8 i = 0; i < MAX_BURROWS; ++i)
            m_creature->SummonCreature(NPC_BURROW, aBurrowSpawnPositions[i][0], aBurrowSpawnPositions[i][1], aBurrowSpawnPositions[i][2], aBurrowSpawnPositions[i][3], TEMPSUMMON_DEAD_DESPAWN, 0);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
    }
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:18,代码来源:boss_anubarak_trial.cpp


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