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

C++ instance_sunwell_plateau类代码示例

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

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



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

示例1: JustReachedHome

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

            // Reset the corrupt Sunwell aura
            if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER))
                pKiljaedenController->CastSpell(pKiljaedenController, SPELL_ANVEENA_DRAIN, true);

            // Respawn Anveena if necessary
            if (Creature* pAnveena = m_pInstance->GetSingleCreatureFromStorage(NPC_ANVEENA))
            {
                if (!pAnveena->isAlive())
                    pAnveena->Respawn();
            }

            // Despawn Kalec if already summoned
            if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS, true))
                pKalec->ForcedDespawn();
        }

        // Despawn on wipe
        m_creature->ForcedDespawn();
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:25,代码来源:boss_kiljaeden.cpp


示例2: DamageTaken

    void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage, DamageEffectType /*damagetype*/) override
    {
        if (uiDamage > m_creature->GetHealth())
        {
            uiDamage = 0;

            if (m_bIsBanished)
                return;

            // banish Sathrovarr and eject the players
            if (DoCastSpellIfCan(m_creature, SPELL_BANISH, CAST_TRIGGERED) == CAST_OK)
                m_bIsBanished = true;

            if (!m_pInstance)
                return;

            if (Creature* pKalecgos = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_DRAGON))
            {
                if (boss_kalecgosAI* pKalecgosAI = dynamic_cast<boss_kalecgosAI*>(pKalecgos->AI()))
                    pKalecgosAI->m_bIsUncorrupted = true;
            }

            m_pInstance->DoEjectSpectralPlayers();
        }
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:25,代码来源:boss_kalecgos.cpp


示例3: JustReachedHome

 void JustReachedHome() override
 {
     if (m_pInstance)
     {
         m_pInstance->DoEjectSpectralPlayers();
         m_pInstance->SetData(TYPE_KALECGOS, FAIL);
     }
 }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:8,代码来源:boss_kalecgos.cpp


示例4: JustDied

 void JustDied(Unit* /*pKiller*/) override
 {
     if (m_pInstance)
     {
         m_pInstance->DoEjectSpectralPlayers();
         m_pInstance->SetData(TYPE_KALECGOS, FAIL);
     }
 }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:8,代码来源:boss_kalecgos.cpp


示例5: JustDidDialogueStep

    void JustDidDialogueStep(int32 iEntry)
    {
        if (!m_pInstance)
            return;

        switch (iEntry)
        {
            case NPC_KALECGOS:
                if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS))
                {
                    pKalec->CastSpell(pKalec, SPELL_KALEC_TELEPORT, true);
                    pKalec->SetLevitate(false);
                }
                m_creature->SummonCreature(NPC_CORE_ENTROPIUS, m_creature->GetPositionX(), m_creature->GetPositionY(), 85.0f, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
                break;
            case NPC_BOSS_PORTAL:
                // ToDo: summon soldiers to the right
                m_creature->SummonCreature(NPC_BOSS_PORTAL, aOutroLocations[0].m_fX, aOutroLocations[0].m_fY, aOutroLocations[0].m_fZ, aOutroLocations[0].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0);
                break;
            case POINT_SUMMON_SOLDIERS:
                // ToDo: summon soldiers to the left
                break;
            case NPC_VELEN:
                m_creature->SummonCreature(NPC_VELEN, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ, aOutroLocations[1].m_fO, TEMPSUMMON_CORPSE_DESPAWN, 0);
                break;
            case NPC_LIADRIN:
                m_creature->SummonCreature(NPC_LIADRIN, aOutroLocations[2].m_fX, aOutroLocations[2].m_fY, aOutroLocations[2].m_fZ, aOutroLocations[2].m_fO, TEMPSUMMON_TIMED_DESPAWN, 4*MINUTE*IN_MILLISECONDS);
                break;
            case SPELL_CALL_ENTROPIUS:
                if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN))
                    pVelen->CastSpell(pVelen, SPELL_CALL_ENTROPIUS, false);
                // Set point id = 1 for movement event
                if (Creature* pEntropius = m_creature->GetMap()->GetCreature(m_EntropiusGuid))
                {
                    pEntropius->SetWalk(false);
                    pEntropius->GetMotionMaster()->MovePoint(1, m_creature->GetPositionX(), m_creature->GetPositionY(), 35.0f);
                }
                break;
            case POINT_MOVE_LIADRIN:
                if (Creature* pLiadrin = m_pInstance->GetSingleCreatureFromStorage(NPC_LIADRIN))
                    pLiadrin->GetMotionMaster()->MovePoint(0, aOutroLocations[4].m_fX, aOutroLocations[4].m_fY, aOutroLocations[4].m_fZ);
                break;
            case SPELL_BLAZE_TO_LIGHT:
                if (Creature* pEntropius = m_creature->GetMap()->GetCreature(m_EntropiusGuid))
                {
                    pEntropius->CastSpell(pEntropius, SPELL_BLAZE_TO_LIGHT, true);
                    pEntropius->RemoveAurasDueToSpell(SPELL_ENTROPIUS_BODY);
                    pEntropius->SetWalk(true);
                    pEntropius->GetMotionMaster()->MovePoint(2, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
                }
                break;
            case POINT_EVENT_EXIT:
                // Set point id = 1 for the despawn event
                if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN))
                    pVelen->GetMotionMaster()->MovePoint(1, aOutroLocations[1].m_fX, aOutroLocations[1].m_fY, aOutroLocations[1].m_fZ);
                break;
        }
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:58,代码来源:boss_kiljaeden.cpp


示例6: JustDied

    void JustDied(Unit* pKiller)
    {
        if (m_pInstance)
        {
            m_pInstance->SetData(TYPE_KILJAEDEN, DONE);

            // Start the outro
            if (Creature* pKiljaedenController = m_pInstance->GetSingleCreatureFromStorage(NPC_KILJAEDEN_CONTROLLER))
            {
                if (npc_kiljaeden_controllerAI* pControllerAI = dynamic_cast<npc_kiljaeden_controllerAI*>(pKiljaedenController->AI()))
                    pControllerAI->DoStartOutroDialogue();
            }
        }
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:14,代码来源:boss_kiljaeden.cpp


示例7: JustReachedHome

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

            // respawn muru
            if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU))
                pMuru->Respawn();
        }

        // despawn boss and summons for reset
        DespawnSummonedCreatures();
        m_creature->ForcedDespawn();
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:15,代码来源:boss_muru.cpp


示例8: Aggro

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

        if (m_pInstance)
            m_pInstance->SetData(TYPE_KALECGOS, IN_PROGRESS);
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:7,代码来源:boss_kalecgos.cpp


示例9: JustDied

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

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


示例10: Aggro

    void Aggro(Unit* pWho)
    {
        if (m_pInstance)
            m_pInstance->SetData(TYPE_KILJAEDEN, IN_PROGRESS);

        DoScriptText(SAY_EMERGE, m_creature);
        DoCastSpellIfCan(m_creature, SPELL_BIRTH);
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:8,代码来源:boss_kiljaeden.cpp


示例11: JustDied

    void JustDied(Unit* pKiller)
    {
        if (m_pInstance)
            m_pInstance->SetData(TYPE_MURU, DONE);

        // Despawn summoned creatures
        DespawnSummonedCreatures();
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:8,代码来源:boss_muru.cpp


示例12: JustDied

    void JustDied(Unit* /*pKiller*/) override
    {
        if (m_pInstance)
        { m_pInstance->SetData(TYPE_MURU, DONE); }
#if defined (CLASSIC) || defined (TBC)
        // Despawn summoned creatures
        DespawnSummonedCreatures();
#endif
    }
开发者ID:kelemeto76,项目名称:ScriptDev3,代码行数:9,代码来源:boss_muru.cpp


示例13: Aggro

    void Aggro(Unit* pWho) override
    {
        DoCastSpellIfCan(m_creature, SPELL_NOXIOUS_FUMES);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_FELMYST, IN_PROGRESS);

        float fGroundZ = m_creature->GetMap()->GetHeight(m_creature->GetPhaseMask(), m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
        m_creature->GetMotionMaster()->MovePoint(PHASE_TRANSITION, pWho->GetPositionX(), pWho->GetPositionY(), fGroundZ, false);
        m_creature->HandleEmote(EMOTE_ONESHOT_LAND);
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:11,代码来源:boss_felmyst.cpp


示例14: JustSummoned

 void JustSummoned(Creature* pSummoned) override
 {
     if (pSummoned->GetEntry() == NPC_VOID_SENTINEL)
     {
         // Attack Muru's target
         if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU))
         {
             if (Unit* pTarget = pMuru->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
             { pSummoned->AI()->AttackStart(pTarget); }
         }
     }
 }
开发者ID:kelemeto76,项目名称:ScriptDev3,代码行数:12,代码来源:boss_muru.cpp


示例15: MovementInform

    void MovementInform(uint32 uiMotionType, uint32 uiPointId) override
    {
        if (uiMotionType != POINT_MOTION_TYPE)
            return;

        if (uiPointId)
        {
            if (m_pInstance)
                m_pInstance->SetData(TYPE_KALECGOS, DONE);

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


示例16: JustReachedHome

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

            // respawn muru
#if defined (CLASSIC) || defined (TBC)
            if (Creature* pMuru = m_pInstance->GetSingleCreatureFromStorage(NPC_MURU))
            { pMuru->Respawn(); }
#endif
#if defined (WOTLK)
            m_creature->SummonCreature(NPC_MURU, afMuruSpawnLoc[0], afMuruSpawnLoc[1], afMuruSpawnLoc[2], afMuruSpawnLoc[3], TEMPSUMMON_DEAD_DESPAWN, 0, true);
#endif
        }

        // despawn boss and summons for reset
#if defined (CLASSIC) || defined (TBC)
        DespawnSummonedCreatures();
#endif
        m_creature->ForcedDespawn();
    }
开发者ID:kelemeto76,项目名称:ScriptDev3,代码行数:22,代码来源:boss_muru.cpp


示例17: DoStartOutro

    void DoStartOutro()
    {
        if (!m_pInstance)
            return;

        // Bring Sathrovarr in the normal realm and kill him
        if (Creature* pSathrovarr = m_pInstance->GetSingleCreatureFromStorage(NPC_SATHROVARR))
        {
            // The teleport spell doesn't work right for this, so we need to teleport him manually
            pSathrovarr->NearTeleportTo(1704.34f, 928.17f, 53.08f, 0);
            pSathrovarr->DealDamage(pSathrovarr, pSathrovarr->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
        }

        if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS_HUMAN))
            pKalec->ForcedDespawn();

        EnterEvadeMode();
        m_creature->SetFactionTemporary(35, TEMPFACTION_RESTORE_RESPAWN);
        m_creature->GetMotionMaster()->MoveIdle();
        DoScriptText(SAY_GOOD_PLRWIN, m_creature);
        m_uiExitTimer = 10000;
    }
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:22,代码来源:boss_kalecgos.cpp


示例18: SummonedMovementInform

    void SummonedMovementInform(Creature* pSummoned, uint32 uiType, uint32 uiPointId)
    {
        if (uiType != POINT_MOTION_TYPE)
            return;

        if (uiPointId == 1)
        {
            if (pSummoned->GetEntry() == NPC_CORE_ENTROPIUS)
            {
                // Interrupt Velen's casting when entropius has reached the ground
                if (Creature* pVelen = m_pInstance->GetSingleCreatureFromStorage(NPC_VELEN))
                    pVelen->InterruptNonMeleeSpells(false);
            }
            else if (pSummoned->GetEntry() == NPC_VELEN)
            {
                // Cast teleport and despawn Velen, the portal and Kalec; Liadrin will despawn on timer
                pSummoned->CastSpell(pSummoned, SPELL_TELEPORT_VISUAL, true);
                pSummoned->ForcedDespawn(1000);

                // Note: portal should despawn only after all the soldiers have reached this point and "teleported" outside
                if (Creature* pPortal = m_creature->GetMap()->GetCreature(m_PortalGuid))
                    pPortal->ForcedDespawn(5000);

                if (Creature* pKalec = m_pInstance->GetSingleCreatureFromStorage(NPC_KALECGOS))
                    pKalec->ForcedDespawn(1000);
            }
        }
        else if (uiPointId == 2 && pSummoned->GetEntry() == NPC_CORE_ENTROPIUS)
        {
            // When the purified Muru reaches the ground the sunwell ignites and Muru despawns
            DoCastSpellIfCan(m_creature, SPELL_SUNWELL_IGNITION);

            if (Creature* pLiadrin = m_pInstance->GetSingleCreatureFromStorage(NPC_LIADRIN))
                pLiadrin->SetStandState(UNIT_STAND_STATE_KNEEL);

            pSummoned->ForcedDespawn();
        }
    }
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:38,代码来源:boss_kiljaeden.cpp


示例19: MoveInLineOfSight

    void MoveInLineOfSight(Unit* pWho) override
    {
        // !!! Workaround which ejects the players from the spectral realm !!!
        if (pWho->GetTypeId() == TYPEID_PLAYER && pWho->IsWithinLOSInMap(m_creature) && pWho->IsWithinDistInMap(m_creature, 75.0f))
        {
            if (!pWho->HasAura(SPELL_SPECTRAL_REALM_AURA))
            {
                pWho->CastSpell(pWho, SPELL_TELEPORT_NORMAL_REALM, TRIGGERED_OLD_TRIGGERED);
                pWho->CastSpell(pWho, SPELL_SPECTRAL_EXHAUSTION, TRIGGERED_OLD_TRIGGERED);

                if (m_pInstance)
                    m_pInstance->RemoveFromSpectralRealm(pWho->GetObjectGuid());
            }
        }

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


示例20: UpdateAI

    void UpdateAI(const uint32 uiDiff) override
    {
        if (m_uiMovementTimer)
        {
            if (m_uiMovementTimer <= uiDiff)
            {
                m_creature->SetLevitate(true);
                m_creature->GetMotionMaster()->MovePoint(PHASE_GROUND, m_creature->GetPositionX(), m_creature->GetPositionY(), 50.083f, false);
                m_uiMovementTimer = 0;
            }
            else
                m_uiMovementTimer -= uiDiff;
        }

        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
            return;

        if (m_uiBerserkTimer)
        {
            if (m_uiBerserkTimer <= uiDiff)
            {
                if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
                {
                    DoScriptText(SAY_BERSERK, m_creature);
                    m_uiBerserkTimer = 0;
                }
            }
            else
                m_uiBerserkTimer -= uiDiff;
        }

        switch (m_uiPhase)
        {
            case PHASE_GROUND:

                if (m_uiCleaveTimer < uiDiff)
                {
                    if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK)
                        m_uiCleaveTimer = urand(2000, 5000);
                }
                else
                    m_uiCleaveTimer -= uiDiff;

                if (m_uiCorrosionTimer < uiDiff)
                {
                    if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CORROSION) == CAST_OK)
                    {
                        DoScriptText(SAY_BREATH, m_creature);
                        m_uiCorrosionTimer = 30000;
                    }
                }
                else
                    m_uiCorrosionTimer -= uiDiff;

                if (m_uiGasNovaTimer < uiDiff)
                {
                    if (DoCastSpellIfCan(m_creature, SPELL_GAS_NOVA) == CAST_OK)
                        m_uiGasNovaTimer = 23000;
                }
                else
                    m_uiGasNovaTimer -= uiDiff;

                if (m_uiEncapsulateTimer < uiDiff)
                {
                    if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
                    {
                        if (DoCastSpellIfCan(pTarget, SPELL_ENCAPSULATE_CHANNEL) == CAST_OK)
                            m_uiEncapsulateTimer = urand(30000, 40000);
                    }
                }
                else
                    m_uiEncapsulateTimer -= uiDiff;

                if (m_uiFlyPhaseTimer < uiDiff)
                {
                    DoScriptText(SAY_TAKEOFF, m_creature);

                    SetCombatMovement(false);
                    m_creature->SetLevitate(true);
                    m_creature->GetMotionMaster()->MoveIdle();
                    m_creature->GetMotionMaster()->MovePoint(PHASE_AIR, m_creature->GetPositionX(), m_creature->GetPositionY(), 50.083f, false);

                    m_uiPhase = PHASE_TRANSITION;
                    m_uiSubPhase = SUBPHASE_VAPOR;
                    m_uiDemonicVaporTimer = 1000;
                    m_uiDemonicVaporCount = 0;
                    m_uiFlyPhaseTimer = 60000;
                }
                else
                    m_uiFlyPhaseTimer -= uiDiff;

                DoMeleeAttackIfReady();

                break;
            case PHASE_AIR:

                switch (m_uiSubPhase)
                {
                    case SUBPHASE_VAPOR:

//.........这里部分代码省略.........
开发者ID:conan513,项目名称:mangos-wotlk,代码行数:101,代码来源:boss_felmyst.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ instance_trial_of_the_crusader类代码示例发布时间:2022-05-31
下一篇:
C++ instance_ruins_of_ahnqiraj类代码示例发布时间: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