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


C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid方法代码示例

本文整理汇总了C++中instance_ahnkahet::SelectJedogaSacrificeControllerGuid方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid方法的具体用法?C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid怎么用?C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在instance_ahnkahet的用法示例。


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

示例1: MovementInform

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

        switch (uiPointId)
        {
                // Prepare for combat
            case POINT_ID_PREPARE:

                m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                m_creature->RemoveAurasDueToSpell(SPELL_LIGHTNING_VISUAL);
                m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL);
                m_creature->SetLevitate(false);
                break;

                // Prepare for sacrifice lift off
            case POINT_ID_SACRIFICE:
                DoCastSpellIfCan(m_creature, SPELL_HOVER_FALL);
                m_creature->SetLevitate(true);
                m_creature->GetMotionMaster()->MovePoint(POINT_ID_LEVITATE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 10.0f);
                break;

                // Call a volunteer to sacrifice
            case POINT_ID_LEVITATE:
                if (Creature* pVolunteer = m_creature->GetMap()->GetCreature(SelectRandomVolunteer()))
                {
                    DoScriptText(urand(0, 1) ? SAY_CALL_SACRIFICE1 : SAY_CALL_SACRIFICE2, m_creature);
                    DoScriptText(SAY_VOLUNTEER_CHOOSEN, pVolunteer);

                    pVolunteer->RemoveAurasDueToSpell(SPELL_VOLUNTEER_SPHERE);
                    pVolunteer->SetStandState(UNIT_STAND_STATE_STAND);
                    pVolunteer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                    pVolunteer->CastSpell(pVolunteer, SPELL_PILLAR_LIGHTNING, false);
                    pVolunteer->SetWalk(true);
                    pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_SACRIFICE, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
                }

                // Set visual aura
                if (m_pInstance)
                {
                    if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid()))
                        pTemp->CastSpell(pTemp, SPELL_SACRIFICE_VISUAL, false);
                }
                break;

                // Resume combat
            case POINT_ID_COMBAT:
                m_creature->RemoveAurasDueToSpell(SPELL_HOVER_FALL);
                m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);

                m_bIsSacrificing = false;
                SetCombatMovement(true);
                m_creature->SetLevitate(false);
                if (m_creature->getVictim())
                    m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
                break;
        }
    }
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:59,代码来源:boss_jedoga.cpp

示例2: SummonedCreatureJustDied

    void SummonedCreatureJustDied(Creature* pSummoned) override
    {
        if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER)
        {
            m_lVolunteerGuidList.remove(pSummoned->GetObjectGuid());

            if (m_pInstance)
            {
                if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid()))
                    pTemp->RemoveAurasDueToSpell(SPELL_SACRIFICE_VISUAL);
            }

            m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
        }
    }
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:15,代码来源:boss_jedoga.cpp


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