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


C++ SummonAdds函数代码示例

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


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

示例1: UpdateAI

        void UpdateAI (const uint32 diff)
        {
            //Return since we have no target
            if (!UpdateVictim())
                return;

            //MightyBlow_Timer
            if (MightyBlow_Timer <= diff)
            {
                DoCast(me->getVictim(), SPELL_MIGHTYBLOW);
                MightyBlow_Timer = 18000;
            }
            else
                MightyBlow_Timer -= diff;

            //HamString_Timer
            if (HamString_Timer <= diff)
            {
                DoCast(me->getVictim(), SPELL_HAMSTRING);
                HamString_Timer = 15000;
            }
            else
                HamString_Timer -= diff;

            //Cleave_Timer
            if (Cleave_Timer <= diff)
            {
                DoCast(me->getVictim(), SPELL_CLEAVE);
                Cleave_Timer = 9000;
            }
            else
                Cleave_Timer -= diff;

            //Adds_Timer
            if (HealthBelowPct(21))
            {
                if (Adds_Timer <= diff)
                {
                    // summon 3 Adds every 25s
                    SummonAdds(me->getVictim());
                    SummonAdds(me->getVictim());
                    SummonAdds(me->getVictim());

                    Adds_Timer = 25000;
                }
                else
                    Adds_Timer -= diff;
            }

            //Summon Medics
            if (!Medics && HealthBelowPct(21))
            {
                SummonMedics(me->getVictim());
                SummonMedics(me->getVictim());
                Medics = true;
            }

            DoMeleeAttackIfReady();
        }
开发者ID:814077430,项目名称:ArkCORE,代码行数:59,代码来源:boss_general_angerforge.cpp

示例2: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (Invisible && Invisible_Timer < diff)
        {
            //Become visible again
            m_creature->setFaction(14);
            m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
            //Noxxion model
            m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11172);
            Invisible = false;
            //m_creature->m_canMove = true;
        } else if (Invisible)
        {
            Invisible_Timer -= diff;
            //Do nothing while invisible
            return;
        }

        //Return since we have no target
        if (!UpdateVictim() )
            return;

        //ToxicVolley_Timer
        if (ToxicVolley_Timer < diff)
        {
            DoCast(m_creature->getVictim(),SPELL_TOXICVOLLEY);
            ToxicVolley_Timer = 9000;
        }else ToxicVolley_Timer -= diff;

        //Uppercut_Timer
        if (Uppercut_Timer < diff)
        {
            DoCast(m_creature->getVictim(),SPELL_UPPERCUT);
            Uppercut_Timer = 12000;
        }else Uppercut_Timer -= diff;

        //Adds_Timer
        if (!Invisible && Adds_Timer < diff)
        {
            //Inturrupt any spell casting
            //m_creature->m_canMove = true;
            m_creature->InterruptNonMeleeSpells(false);
            m_creature->setFaction(35);
            m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
            // Invisible Model
            m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686);
            SummonAdds(m_creature->getVictim());
            SummonAdds(m_creature->getVictim());
            SummonAdds(m_creature->getVictim());
            SummonAdds(m_creature->getVictim());
            SummonAdds(m_creature->getVictim());
            Invisible = true;
            Invisible_Timer = 15000;

            Adds_Timer = 40000;
        }else Adds_Timer -= diff;

        DoMeleeAttackIfReady();
    }
开发者ID:adan830,项目名称:QuaDCore,代码行数:59,代码来源:boss_noxxion.cpp

示例3: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        //Return since we have no target
        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())
            return;

        //MightyBlow_Timer
        if (MightyBlow_Timer < diff)
        {
            DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW);
            MightyBlow_Timer = 18000;
        }else MightyBlow_Timer -= diff;

        //HamString_Timer
        if (HamString_Timer < diff)
        {
            DoCast(m_creature->getVictim(),SPELL_HAMSTRING);
            HamString_Timer = 15000;
        }else HamString_Timer -= diff;

        //Cleave_Timer
        if (Cleave_Timer < diff)
        {
            DoCast(m_creature->getVictim(),SPELL_CLEAVE);
            Cleave_Timer = 9000;
        }else Cleave_Timer -= diff;

        //Adds_Timer
        if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21)
        {
            if (Adds_Timer < diff)
            {
                // summon 3 Adds every 25s
                SummonAdds(m_creature->getVictim());
                SummonAdds(m_creature->getVictim());
                SummonAdds(m_creature->getVictim());

                Adds_Timer = 25000;
            } else Adds_Timer -= diff;
        }

        //Summon Medics
        if (!Medics && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21)
        {
            SummonMedics(m_creature->getVictim());
            SummonMedics(m_creature->getVictim());
            Medics = true;
        }

        DoMeleeAttackIfReady();
    }
开发者ID:bobazrh,项目名称:Bobaz-RH,代码行数:51,代码来源:boss_general_angerforge.cpp

示例4: InitializeAI

 void InitializeAI() override
 {
     if (!me->isDead())
     {
         Reset();
         SummonAdds();
     }
 }
开发者ID:AwkwardDev,项目名称:RE,代码行数:8,代码来源:boss_razuvious.cpp

示例5: SetData

 void SetData(uint32 uiData, uint32 uiValue)
 {
     if (uiData == 1)
     {
         uiBossRandom = uiValue;
         SummonAdds();
     }
 }
开发者ID:Archives,项目名称:ro_core,代码行数:8,代码来源:zuldrak.cpp

示例6: UpdateAI

 void UpdateAI(const uint32 diff)
 {
     switch (phase)
     {
     case 0: // circle around the platform
         return;
         break;
     case 1: // go to the middle and begin the fight
         if (check <= diff)
         {
             if (!me->IsWithinDist3d(VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 5))
             {
                 me->GetMotionMaster()->Clear();
                 me->GetMotionMaster()->MovePoint(0, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2]);
                 check = 1000;
             }
             else
             {
                 SummonAdds();
                 phase = 2;
                 return;
             }
         }
         else
             check -= diff;
         break;
     default: // adds do the job now
         if (check <= diff)
         {
             Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
             Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
             if ((Nazan && Nazan->isAlive()) || (Vazruden && Vazruden->isAlive()))
             {
                 if ((Nazan && Nazan->GetVictim()) || (Vazruden && Vazruden->GetVictim()))
                     return;
                 else
                 {
                     UnsummonAdds();
                     EnterEvadeMode();
                     return;
                 }
             }
             else if (!lootSpawned)
             {
                 me->SummonGameObject(DUNGEON_MODE(ENTRY_REINFORCED_FEL_IRON_CHEST, ENTRY_REINFORCED_FEL_IRON_CHEST_H), VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, 0, 0, 0, 0, 0);
                 me->SetLootRecipient(NULL); // don't think this is necessary..
                 //me->Kill(me);
                 lootSpawned = true;
             }
             check = 2000;
         }
         else
             check -= diff;
         break;
     }
 }
开发者ID:P-Kito,项目名称:InfinityCore,代码行数:56,代码来源:boss_vazruden_the_herald.cpp

示例7: UpdateAI

 void UpdateAI(const uint32 diff)
 {
     switch (phase)
     {
     case 0: // circle around the platform
         return;
         break;
     case 1: // go to the middle and begin the fight
         if (check <= diff)
         {
             if (me->GetDistance(VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2]) > 5)
             {
                 me->GetMotionMaster()->Clear();
                 me->GetMotionMaster()->MovePoint(0, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2]);
                 check = 1000;
             }
             else
             {
                 SummonAdds();
                 phase = 2;
                 return;
             }
         }
         else check -= diff;
         break;
     default: // adds do the job now
         if (check <= diff)
         {
             Creature* Nazan = Unit::GetCreature(*me, NazanGUID);
             Creature* Vazruden = Unit::GetCreature(*me, VazrudenGUID);
             if ((Nazan && Nazan->IsAlive()) || (Vazruden && Vazruden->IsAlive()))
             {
                 if ((Nazan && Nazan->getVictim()) || (Vazruden && Vazruden->getVictim()))
                     return;
                 else
                 {
                     Reset();
                     EnterEvadeMode();
                     return;
                 }
             }
             else
             {
                 me->SummonGameObject(ENTRY_REINFORCED_FEL_IRON_CHEST, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 0, 0, 0, 0, 0, 0);
                 me->SetLootRecipient(NULL);
                 me->DealDamage(me, me->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
                 if (pInstance)
                     pInstance->SetData(DATA_VAZRUDEN, DONE);
             }
             check = 2000;
         }
         else check -= diff;
         break;
     }
 }
开发者ID:Zaffy,项目名称:OregonCore,代码行数:55,代码来源:boss_vazruden_the_herald.cpp

示例8: UpdateAI

 void UpdateAI(uint32 diff) override
 {
     switch (phase)
     {
     case 0: // circle around the platform
         return;
         break;
     case 1: // go to the middle and begin the fight
         if (check <= diff)
         {
             if (!me->IsWithinDist3d(VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2], 5))
             {
                 me->GetMotionMaster()->Clear();
                 me->GetMotionMaster()->MovePoint(0, VazrudenMiddle[0], VazrudenMiddle[1], VazrudenMiddle[2]);
                 check = 1000;
             }
             else
             {
                 SummonAdds();
                 phase = 2;
                 return;
             }
         }
         else
             check -= diff;
         break;
     default: // adds do the job now
         if (check <= diff)
         {
             Creature* Nazan = ObjectAccessor::GetCreature(*me, NazanGUID);
             Creature* Vazruden = ObjectAccessor::GetCreature(*me, VazrudenGUID);
             if ((Nazan && Nazan->IsAlive()) || (Vazruden && Vazruden->IsAlive()))
             {
                 if ((Nazan && Nazan->GetVictim()) || (Vazruden && Vazruden->GetVictim()))
                     return;
                 else
                 {
                     UnsummonAdds();
                     EnterEvadeMode();
                     return;
                 }
             }
             check = 2000;
         }
         else
             check -= diff;
         break;
     }
 }
开发者ID:Abrek,项目名称:My-WoDCore-6.x.x,代码行数:49,代码来源:boss_vazruden_the_herald.cpp

示例9: InitializeAI

 void InitializeAI() override
 {
     BossAI::InitializeAI();
     SummonAdds();
 }
开发者ID:Declipe,项目名称:ElunaTrinityWotlk,代码行数:5,代码来源:boss_krikthir_the_gatewatcher.cpp

示例10: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        //Return since we have no target
        if (!m_creature->SelectHostilTarget())
            return;

        //Check if we have a current target
        if( m_creature->getVictim() && m_creature->isAlive())
        {
            
            //MightyBlow_Timer
            if (MightyBlow_Timer < diff)
            {
                //Cast
                DoCast(m_creature->getVictim(),SPELL_MIGHTYBLOW);

                //18 seconds
                MightyBlow_Timer = 18000;
            }else MightyBlow_Timer -= diff;

            //HamString_Timer
            if (HamString_Timer < diff)
            {
                //Cast
                DoCast(m_creature->getVictim(),SPELL_HAMSTRING);

                //15 seconds
                HamString_Timer = 15000;
            }else HamString_Timer -= diff;

            //Cleave_Timer
            if (Cleave_Timer < diff)
            {
                //Cast
                DoCast(m_creature->getVictim(),SPELL_CLEAVE);

                //45 seconds
                Cleave_Timer = 9000;
            }else Cleave_Timer -= diff;

            //Adds_Timer
            if ( m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21 )
            {
                if (Adds_Timer < diff)
                {
                  // summon 3 Adds every 25s  
                  SummonAdds(m_creature->getVictim());
                  SummonAdds(m_creature->getVictim());
                  SummonAdds(m_creature->getVictim());

                  //25 seconds until we should cast this agian
                  Adds_Timer = 25000;
                } else Adds_Timer -= diff;
            }

            //Summon Medics
            if ( !Medics && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 21 )
            {
                //Cast
                SummonMedics(m_creature->getVictim());
                SummonMedics(m_creature->getVictim());
                Medics = true;
            }

            //If we are within range melee the target
            if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
            {
                //Make sure our attack is ready and we arn't currently casting
                if( m_creature->isAttackReady() && !m_creature->m_currentSpell)
                {
                    m_creature->AttackerStateUpdate(m_creature->getVictim());
                    m_creature->resetAttackTimer();
                }
            }
        }
    }
开发者ID:ujentus,项目名称:MyTestRepository,代码行数:76,代码来源:sc_boss_general_angerforge.cpp

示例11: UpdateAI

        void UpdateAI(uint32 diff) override
        {
            if (Invisible && InvisibleTimer <= diff)
            {
                //Become visible again
                me->SetFaction(FACTION_MONSTER);
                me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                //Noxxion model
                me->SetDisplayId(11172);
                Invisible = false;
                //me->m_canMove = true;
            }
            else if (Invisible)
            {
                InvisibleTimer -= diff;
                //Do nothing while invisible
                return;
            }

            //Return since we have no target
            if (!UpdateVictim())
                return;

            //ToxicVolleyTimer
            if (ToxicVolleyTimer <= diff)
            {
                DoCastVictim(SPELL_TOXICVOLLEY);
                ToxicVolleyTimer = 9000;
            }
            else ToxicVolleyTimer -= diff;

            //UppercutTimer
            if (UppercutTimer <= diff)
            {
                DoCastVictim(SPELL_UPPERCUT);
                UppercutTimer = 12000;
            }
            else UppercutTimer -= diff;

            //AddsTimer
            if (!Invisible && AddsTimer <= diff)
            {
                //Interrupt any spell casting
                //me->m_canMove = true;
                me->InterruptNonMeleeSpells(false);
                me->SetFaction(FACTION_FRIENDLY);
                me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                // Invisible Model
                me->SetDisplayId(11686);
                SummonAdds(me->GetVictim());
                SummonAdds(me->GetVictim());
                SummonAdds(me->GetVictim());
                SummonAdds(me->GetVictim());
                SummonAdds(me->GetVictim());
                Invisible = true;
                InvisibleTimer = 15000;

                AddsTimer = 40000;
            }
            else AddsTimer -= diff;

            DoMeleeAttackIfReady();
        }
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:63,代码来源:boss_noxxion.cpp

示例12: UpdateAI


//.........这里部分代码省略.........
                    uint8 i = 0;
                    for (std::list<Unit*>::const_iterator itr = pTargets.begin(); itr != pTargets.end();)
                    {
                        if (me->HasInArc(M_PI, *itr))
                        {
                            DoCast(*itr, SPELL_FLAMEBUFFET, true);
                            ++i;
                        }
                        if (++itr == pTargets.end() || i == RAID_MODE(3,9))
                        {
                            AttackStart(*--itr);
                            break;
                        }
			if (!i)
			return;
                    }
                    FlameBuffetTimer = 25000;
                } else FlameBuffetTimer -= diff;
		
		if (FlameBreathTimer <= diff)
		{
                DoScriptText(EMOTE_BREATH, me);
                DoCastVictim(SPELL_FLAMEBREATH);
                FlameBreathTimer = 15000;
		} else FlameBreathTimer -= diff;
	  }
	  DoMeleeAttackIfReady();
        }
        else if (Phase == 1)
        {
	     if (bFly)
	     {
		FlyPhase(Phase, diff);
		SummonAddsTimer = 8000;
		bFly = false;
	     }
	     
	     Creature* pSpellHitt;
		pSpellHitt = NULL;
    
	     if (pSpellHitt = me->FindNearestCreature(NPC_VISUAL_HITT, 5.0f, true))
	     {
	            me->GetMotionMaster()->MoveTargetedHome();
		    me->SetFlying(false);
		    me->SendMovementFlagUpdate();
		    IsFlying = false;
		    bFlyPhase1 = true;
		    bFlyPhaseTimer = 35000;
		    bFly = false;
		    InitialSpawn = false;
		    me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
		    StunTimer = 2000;
		}
		 if (!bFly && bFlyPhase1 && !IsFlying && StunTimer <= diff)
		    {
		    DoCast(me,SPELL_STUN);
		    StunTimer = 2000;
		    } else StunTimer -= diff;
	     
	     if (bFlyPhase1 && bFlyPhaseTimer <= diff)
		    {
		    me->RemoveAllAuras();
		    me->SetReactState(REACT_AGGRESSIVE);
		    me->SendMovementFlagUpdate();
		    DoScriptText(EMOTE_BREATH, me);
		    DoCastVictim(SPELL_FLAMEBREATH);
开发者ID:Asandru,项目名称:Script-Land,代码行数:67,代码来源:boss_razorscale.cpp

示例13: JustReachedHome

 void JustReachedHome() override
 {
     _JustReachedHome();
     SummonAdds();
     me->GetMotionMaster()->Initialize();
 }
开发者ID:AwkwardDev,项目名称:RE,代码行数:6,代码来源:boss_razuvious.cpp

示例14: UpdateAI

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

        switch(m_uiPhase)
        {
            case PHASE_SPEECH:
            {
                if (m_uiSpeechTimer < uiDiff)
                {
                    m_uiSpeechTimer = 5000;
                    ++m_uiSpeechCount;

                    switch(m_uiSpeechCount)
                    {
                        case 1: DoScriptText(SAY_SPEECH_2, m_creature); break;
                        case 2: DoScriptText(SAY_SPEECH_3, m_creature); break;
                        case 3: DoScriptText(SAY_SPEECH_4, m_creature); break;
                        case 4: m_uiPhase = PHASE_BALCONY; break;
                    }
                }
                else
                    m_uiSpeechTimer -= uiDiff;

                break;
            }
            case PHASE_BALCONY:
            {
                if (m_uiSummonTimer < uiDiff)
                {
                    if (m_uiSummonCount >= MAX_WAVES)
                    {
                        DoScriptText(SAY_TELEPORT, m_creature);
                        DoScriptText(EMOTE_TO_FRAY, m_creature);
                        DoCastSpellIfCan(m_creature, SPELL_TELEPORT_RIGHT);
                        m_uiPhase = PHASE_GROUND;
                        return;
                    }

                    // npc, npc, npc, timer
                    static uint32 const auiSummonData[MAX_WAVES][4] =
                    {
                        {NPC_UNREL_TRAINEE, 0, 0, 20000},
                        {NPC_UNREL_TRAINEE, 0, 0, 20000},
                        {NPC_UNREL_TRAINEE, 0, 0, 10000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 15000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 15000},
                        {NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_TRAINEE, 0, 10000},
                        {NPC_UNREL_RIDER, 0, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 5000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 15000},
                        {NPC_UNREL_TRAINEE, NPC_UNREL_RIDER, 0, 10000},
                        {NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_DEATH_KNIGHT, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 10000},
                        {NPC_UNREL_RIDER, 0, 0, 5000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 5000},
                        {NPC_UNREL_TRAINEE, 0, 0, 20000},
                        {NPC_UNREL_RIDER, NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_TRAINEE, 15000},
                        {NPC_UNREL_TRAINEE, 0, 0, 30000},
                    };

                    SummonAdds(true, auiSummonData[m_uiSummonCount][0]);

                    if (auiSummonData[m_uiSummonCount][1])
                        SummonAdds(true, auiSummonData[m_uiSummonCount][1]);

                    if (auiSummonData[m_uiSummonCount][2])
                        SummonAdds(true, auiSummonData[m_uiSummonCount][2]);

                    m_uiSummonTimer = auiSummonData[m_uiSummonCount][3];

                    ++m_uiSummonCount;
                }
                else
                    m_uiSummonTimer -= uiDiff;

                break;
            }
            case PHASE_GROUND:
            case PHASE_END:
            {
                if (m_uiPhase == PHASE_GROUND)
                {
                    if (m_creature->GetHealthPercent() < 30.0f)
                    {
                        if (m_pInstance->IsInRightSideGothArea(m_creature))
                        {
                            DoScriptText(EMOTE_GATE, m_creature);
                            m_pInstance->SetData(TYPE_GOTHIK, SPECIAL);
                            m_uiPhase = PHASE_END;
                            m_uiShadowboltTimer = 2000;
                            return;
                        }
                    }

                    if (m_uiTeleportTimer < uiDiff)
                    {
//.........这里部分代码省略.........
开发者ID:Asandru,项目名称:Script-Land,代码行数:101,代码来源:boss_gothik.cpp

示例15: UpdateAI

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

        switch(m_uiPhase)
        {
            case PHASE_SPEECH:
            {
                if (m_uiSpeechTimer < uiDiff)
                {
                    m_uiSpeechTimer = 5000;
                    ++m_uiSpeechCount;

                    switch(m_uiSpeechCount)
                    {
                        case 1: DoScriptText(SAY_SPEECH_2, m_creature); break;
                        case 2: DoScriptText(SAY_SPEECH_3, m_creature); break;
                        case 3: DoScriptText(SAY_SPEECH_4, m_creature); break;
                        case 4: m_uiPhase = PHASE_BALCONY; break;
                    }
                }
                else
                    m_uiSpeechTimer -= uiDiff;

                break;
            }
            case PHASE_BALCONY:
            {
                if (m_uiSummonTimer < uiDiff)
                {
                    if (m_uiSummonCount >= MAX_WAVES)
                    {
                        DoScriptText(SAY_TELEPORT, m_creature);
                        DoScriptText(EMOTE_TO_FRAY, m_creature);
                        DoCastSpellIfCan(m_creature, SPELL_TELEPORT_RIGHT);
                        m_creature->GetMotionMaster()->Clear();
                        m_uiPhase = PHASE_GROUND;
                        return;
                    }

                    // npc, npc, npc, timer
                    static uint32 const auiSummonData[MAX_WAVES][4] =
                    {
                        {NPC_UNREL_TRAINEE, 0, 0, 20000},
                        {NPC_UNREL_TRAINEE, 0, 0, 20000},
                        {NPC_UNREL_TRAINEE, 0, 0, 10000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 15000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 15000},
                        {NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_TRAINEE, 0, 10000},
                        {NPC_UNREL_RIDER, 0, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 5000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 15000},
                        {NPC_UNREL_TRAINEE, NPC_UNREL_RIDER, 0, 10000},
                        {NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_DEATH_KNIGHT, 0, 10000},
                        {NPC_UNREL_TRAINEE, 0, 0, 10000},
                        {NPC_UNREL_RIDER, 0, 0, 5000},
                        {NPC_UNREL_DEATH_KNIGHT, 0, 0, 5000},
                        {NPC_UNREL_TRAINEE, 0, 0, 20000},
                        {NPC_UNREL_RIDER, NPC_UNREL_DEATH_KNIGHT, NPC_UNREL_TRAINEE, 15000},
                        {NPC_UNREL_TRAINEE, 0, 0, 30000},
                    };

                    SummonAdds(true, auiSummonData[m_uiSummonCount][0]);

                    if (auiSummonData[m_uiSummonCount][1])
                        SummonAdds(true, auiSummonData[m_uiSummonCount][1]);

                    if (auiSummonData[m_uiSummonCount][2])
                        SummonAdds(true, auiSummonData[m_uiSummonCount][2]);

                    m_uiSummonTimer = auiSummonData[m_uiSummonCount][3];

                    ++m_uiSummonCount;
                }
                else
                    m_uiSummonTimer -= uiDiff;

                break;
            }
            case PHASE_GROUND:
            case PHASE_END:
            {	
                if (m_uiPhase == PHASE_GROUND)
                {
                    if (m_creature->GetHealthPercent() < 30.0f)
                    {
                        DoScriptText(EMOTE_GATE, m_creature);
                        m_pInstance->SetData(TYPE_GOTHIK, SPECIAL);
                        m_uiPhase = PHASE_END;
                        m_uiShadowboltTimer = 2000;
                        // all out of combat summons from Death Side storm the raid at once
                        for (std::list<uint64>::iterator itr = m_pInstance->lGothikDeathAdds.begin(); itr != m_pInstance->lGothikDeathAdds.end(); itr++)
                            if (Creature* pCreature = m_pInstance->instance->GetCreature(*itr) )
                                if (pCreature->isAlive() && !pCreature->getVictim() )
                                    pCreature->AI()->AttackStart(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0) );
                        // all out of combat summons from Live Side storm the raid at once
                        for (std::list<uint64>::iterator itr = m_pInstance->lGothikLiveAdds.begin(); itr != m_pInstance->lGothikLiveAdds.end(); itr++)
//.........这里部分代码省略.........
开发者ID:Omeprazol,项目名称:mangos,代码行数:101,代码来源:boss_gothik.cpp


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