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

C++ AddSpellToCast函数代码示例

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

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



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

示例1: UpdateAI

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

        DoSpecialThings(diff, DO_COMBAT_N_SPEED, 200.0f, 1.6f);

        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EVENT_HEAL:
                {
                    AddSpellToCast(SPELL_HEAL, CAST_SELF);
                    events.ScheduleEvent(eventId, urand(10000, 35000));
                    break;
                }
                case EVENT_SHIELD:
                {
                    AddSpellToCast(SPELL_GREATER_PW_SHIELD, CAST_SELF);
                    AddSpellToCast(SPELL_PRAYEROFHEALING, CAST_SELF);
                    events.ScheduleEvent(eventId, urand(30000, 40000));
                    break;
                }
            }
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Lbniese,项目名称:L4G_Core,代码行数:32,代码来源:boss_high_king_maulgar.cpp


示例2: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        if (ShadowfuryTimer < diff)
        {
            if (me->IsWithinMeleeRange(me->getVictim()) && roll_chance_f(15))
            {
                AddSpellToCast(SPELL_SHADOW_FURY, CAST_NULL);
                ShadowfuryTimer = 5000;
            }
            ShadowfuryTimer = 1500;
        }
        else
            ShadowfuryTimer -= diff;

        if (DarkstrikeTimer < diff)
        {
            if (!me->IsNonMeleeSpellCasted(false))
            {
                //If we are within range melee the target
                if (me->IsWithinMeleeRange(me->getVictim()))
                    AddSpellToCast(SPELL_DARK_STRIKE, CAST_TANK);
            }
            DarkstrikeTimer = 1000;
        }
        else
            DarkstrikeTimer -= diff;

        CastNextSpellIfAnyAndReady();
    }
开发者ID:Xadras,项目名称:looking4group-core,代码行数:32,代码来源:boss_eredar_twins.cpp


示例3: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if(!me->isInCombat())
            if(yelltimer < diff)
            {
                me->Yell(RAND(YELL_OOC1,YELL_OOC2,YELL_OOC3,YELL_OOC4,YELL_OOC5,YELL_OOC6),0,0);
                yelltimer = urand(60000,120000);
            }
            else
                yelltimer -=diff;

        if(!UpdateVictim())
            return;

        if(hamstringtimer < diff)
        {
            AddSpellToCast(SPELL_HAMSTRING);
            hamstringtimer = 9000;
        }
        else
            hamstringtimer -= diff;

        if(headcracktimer < diff)
        {
            AddSpellToCast(SPELL_HEAD_CRACK,CAST_RANDOM);
            headcracktimer = urand(20000,25000);
        }
        else
            headcracktimer -= diff;

        DoMeleeAttackIfReady();
        CastNextSpellIfAnyAndReady(diff);
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:33,代码来源:slave_pens_trash.cpp


示例4: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat())
        {
            if(OOCTimer < diff)
            {
                HandleOffCombatEffects();
                OOCTimer = 10000;
            }
            else
                OOCTimer -= diff;
        }

        if(!UpdateVictim())
            return;

        if(Drink_Timer < diff)
        {
            AddSpellToCast(SPELL_DRINK_FEL_INFUSION, CAST_SELF);
            Drink_Timer = HeroicMode?urand(10000, 18000):urand(15000, 25000);
        }
        else
            Drink_Timer -= diff;

        if(Wretched_Strike_Timer < diff)
        {
            AddSpellToCast(m_creature->getVictim(), SPELL_WRETCHED_STRIKE);
            Wretched_Strike_Timer = urand(7000, 16000);
        }
        else
            Wretched_Strike_Timer -= diff;

        CastNextSpellIfAnyAndReady(diff);
        DoMeleeAttackIfReady();
    }
开发者ID:ekzobam,项目名称:HGCore,代码行数:35,代码来源:magisters_terrace_trash.cpp


示例5: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        if (CheckTimer < diff)
        {
            if (!m_creature->IsWithinDistInMap(&wLoc, 20.0f))
                EnterEvadeMode();

            me->SetSpeed(MOVE_WALK, 1.5f, true);
            me->SetSpeed(MOVE_RUN, 1.5f, true);

            CheckTimer = 2000;
        }
        else
            CheckTimer -= diff;

        if (chargeTimer < diff)
        {
            Unit * target = SelectUnit(SELECT_TARGET_RANDOM, 0, 25.0f, true, 0, 8.0f);

            if (target)
                AddSpellToCast(target, AV_VO_CHARGE);

            chargeTimer = urand(7500, 20000);
        }
        else
            chargeTimer -= diff;

        if (cleaveTimer < diff)
        {
            AddSpellToCast(AV_VO_CLEAVE, CAST_TANK);
            cleaveTimer = urand(5000, 10000);
        }
        else
            cleaveTimer -= diff;

        if (demoShoutTimer < diff)
        {
            AddSpellToCast(AV_VO_DEMOSHOUT, CAST_NULL);
            demoShoutTimer = urand(14000, 25000);
        }
        else
            demoShoutTimer -= diff;

        if (whirlwindTimer < diff)
        {
            AddSpellToCast(AV_VO_WHIRLWIND, CAST_SELF);
            whirlwindTimer = urand(9000, 13000);
        }
        else
            whirlwindTimer -= diff;


        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Blumfield,项目名称:ptc2,代码行数:58,代码来源:boss_vanndar.cpp


示例6: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        DoSpecialThings(diff, DO_EVERYTHING);

        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EVENT_CORRUPTED_MIND:
                {
                    AddSpellToCast(SPELL_CORRUPTED_MIND, CAST_NULL);
                    events.ScheduleEvent(EVENT_CORRUPTED_MIND, 62000);
                    break;
                }
                case EVENT_POISON_AURA:
                {
                    AddSpellToCast(SPELL_POISON_AURA, CAST_NULL);
                    events.ScheduleEvent(EVENT_POISON_AURA, 12000);
                    break;
                }
                case EVENT_INEVITABLE_DOOM_5MIN:
                {
                    inevitableTimer = 15000;
                    break;
                }
                case EVENT_INEVITABLE_DOOM:
                {
                    AddSpellToCast(SPELL_INEVITABLE_DOOM, CAST_NULL);
                    events.ScheduleEvent(EVENT_INEVITABLE_DOOM, inevitableTimer);
                    break;
                }
                case EVENT_REMOVE_CURSE:
                {
                    AddSpellToCast(SPELL_REMOVE_CURSE, CAST_SELF);
                    events.ScheduleEvent(EVENT_REMOVE_CURSE, 30000);
                    break;
                }
                case EVENT_SUMMON_SPORE:
                {
                    for (uint8 i = 0; i < 3; ++i)
                        m_creature->SummonCreature(16286, SporesLocations[i][0], SporesLocations[i][1], SporesLocations[i][2], 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
                    break;
                }
                default:
                    break;
            }
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Blumfield,项目名称:ptc2,代码行数:55,代码来源:boss_loatheb.cpp


示例7: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (TransitionTimer)
        {
            if (TransitionTimer <= diff)
            {
                if(Unit* Muru = me->GetUnit(pInstance->GetData64(DATA_MURU)))
                {
                    Muru->SetVisibility(VISIBILITY_OFF);
                    Muru->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
                }
                me->SetRooted(false);
                AttackStart(me->getVictim());
                DoCast(me, SPELL_NEGATIVE_ENERGY_PERIODIC_E);
                TransitionTimer = 0;
            }
            else
                TransitionTimer -= diff;
            return;
        }

        if (!UpdateVictim())
            return;

        DoSpecialThings(diff, DO_COMBAT_N_EVADE, 100.0f);

        if (EnrageTimer < diff)
        {
            AddSpellToCast(me, SPELL_ENRAGE);
            EnrageTimer = 60000;
        }
        else
            EnrageTimer -= diff;

        if (DarknessTimer < diff)
        {
            if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true))
                AddSpellToCast(target, SPELL_DARKNESS);
            DarknessTimer = 15000;
        }
        else
            DarknessTimer -= diff;

        if (BlackHole < diff)
        {
            if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true, me->getVictimGUID(), 10.0))
                AddSpellToCast(target, SPELL_BLACK_HOLE);
            BlackHole = urand(15000, 18000);
        }
        else
            BlackHole -= diff;

        DoMeleeAttackIfReady();
        CastNextSpellIfAnyAndReady();
    }
开发者ID:Xadras,项目名称:looking4group-core,代码行数:55,代码来源:boss_muru.cpp


示例8: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EMBERSEER_EVENT_GROWING:
                {
                    me->CastSpell(me, SPELL_GROWING, true);
                    break;
                }
                case EMBERSEER_EVENT_TRANSFORM:
                {
                    DoScriptText(-2100023, me);
                    DoScriptText(-2100024, me);
                    me->CastSpell(me, SPELL_TRANSFORM, true);
                    me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
                    me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE);
                    events.SetPhase(2);
                    events.ScheduleEvent(EMBERSEER_EVENT_FIRENOVA, 6000, 0, 2);
                    events.ScheduleEvent(EMBERSEER_EVENT_FLAMEBUFFET, 3000, 0, 2);
                    events.ScheduleEvent(EMBERSEER_EVENT_PYROBLAST, 14000, 0, 2);
                    break;
                }
                case EMBERSEER_EVENT_FIRENOVA:
                {
                    AddSpellToCast(SPELL_FIRENOVA, CAST_SELF);
                    events.ScheduleEvent(EMBERSEER_EVENT_FIRENOVA, 6000, 0, 2);
                    break;
                }
                case EMBERSEER_EVENT_FLAMEBUFFET:
                {
                    AddSpellToCast(SPELL_FLAMEBUFFET, CAST_TANK);
                    events.ScheduleEvent(EMBERSEER_EVENT_FLAMEBUFFET, 3000, 0, 2);
                    break;
                }
                case EMBERSEER_EVENT_PYROBLAST:
                {
                    AddSpellToCast(SPELL_PYROBLAST, CAST_RANDOM);
                    events.ScheduleEvent(EMBERSEER_EVENT_PYROBLAST, 14000, 0, 2);
                    break;
                }
            }
        }

        if (!UpdateVictim())
        {
            return;
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:ekzobam,项目名称:HGCore,代码行数:54,代码来源:boss_pyroguard_emberseer.cpp


示例9: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if(!UpdateVictim())
        {
            //UpdateAIOOC(diff);  // not working in 100%
            return;
        }

        if(Shout_Timer < diff)
        {
            AddSpellToCast(SPELL_FRIGHTENING_SHOUT, CAST_TANK);
            Shout_Timer = urand(30000, 40000);
        }
        else
            Shout_Timer -= diff;

        if(Knockback_Timer < diff)
        {
            AddSpellToCast(SPELL_KNOCKBACK, CAST_TANK);
            Knockback_Timer = urand(10000, 15000);
        }
        else
            Knockback_Timer -= diff;

        if(Execute_Timer < diff)
        {
            if(me->getVictim()->GetHealth() * 5 <= me->getVictim()->GetMaxHealth()) // below 20%
            {
                AddSpellToCast(SPELL_EXECUTE, CAST_TANK);
                Execute_Timer = 30000;
            }
        }
        else
            Execute_Timer -= diff;

        if(Cleave_Timer < diff)
        {
            AddSpellToCast(SPELL_MORTAL_CLEAVE, CAST_TANK);
            Cleave_Timer = urand(3000, 6000);
        }
        else
            Cleave_Timer -= diff;

        if(!Frenzy_Casted && HealthBelowPct(50))
        {
            AddSpellToCast(SPELL_FRENZY, CAST_SELF);
            Frenzy_Casted = true;
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:52,代码来源:serpent_shrine_trash.cpp


示例10: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        DoSpecialThings(diff, DO_EVERYTHING, 60.0f);

        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
            case EVENT_BLAU_MARK:
            {
                AddSpellToCast(SPELL_MARK_OF_BLAUMEUX, CAST_NULL);
                events.ScheduleEvent(EVENT_BLAU_MARK, 12000);
                break;
            }
            case EVENT_BLAU_VOID_ZONE:
            {
                if (Unit * tmpUnit = SelectUnit(SELECT_TARGET_RANDOM, 0, 45.0f))
                    AddSpellToCast(tmpUnit, SPELL_VOID_ZONE);
                events.ScheduleEvent(EVENT_BLAU_VOID_ZONE, 12000);
                break;
            }
            default:
                break;
            }
        }

        // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds
        if (!ShieldWall1)
        {
            if (HealthBelowPct(50))
            {
                AddSpellToCast(SPELL_SHIELDWALL, CAST_SELF);
                ShieldWall1 = true;
            }
        }
        else
        {
            if (!ShieldWall2 && HealthBelowPct(20))
            {
                AddSpellToCast(SPELL_SHIELDWALL, CAST_SELF);
                ShieldWall2 = true;
            }
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:mynew4,项目名称:looking4group-core,代码行数:51,代码来源:boss_four_horsemen.cpp


示例11: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim() )
            return;

        if (checkTimer < diff)
        {
            if (!me->IsWithinDistInMap(&pos, 105.0f))
            {
                EnterEvadeMode();
                return;
            }
            checkTimer = 3000;
        }
        else
            checkTimer -= diff;

        if (Rage_Timer < diff)
        {
            Creature* distiller = GetClosestCreatureWithEntry(me, 17954, 100);

            if (distiller)
            {
                float x, y, z;
                distiller->GetNearPoint(x, y, z, INTERACTION_DISTANCE);
                me->GetMotionMaster()->MovePoint(1, x, y, z);
                CurrentDistiller = distiller->GetGUID();
            }

            Rage_Timer = 15000+rand()%15000;
        }else Rage_Timer -= diff;

        //Reflection_Timer
        if (Reflection_Timer < diff)
        {
            AddSpellToCast(me, SPELL_SPELL_REFLECTION);
            Reflection_Timer = 15000+rand()%10000;
        }else Reflection_Timer -= diff;

        //Impale_Timer
        if (Impale_Timer < diff)
        {
            if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))
                AddSpellToCast(target,SPELL_IMPALE);

            Impale_Timer = 7500+rand()%5000;
        }else Impale_Timer -= diff;

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Blumfield,项目名称:ptc2,代码行数:51,代码来源:boss_warlord_kalithresh.cpp


示例12: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if(!UpdateVictim())
            return;

        if(HealingWard_Timer < diff)
        {
            AddSpellToCast(m_creature, SPELL_HEALING_WARD);
            HealingWard_Timer = 30000;
        }
        else
            HealingWard_Timer -= diff;

        if(NovaTotem_Timer < diff)
        {
            AddSpellToCast(m_creature, SPELL_CORRUPTED_NOVA_TOTEM);
            NovaTotem_Timer = 45000;
        }
        else
            NovaTotem_Timer -= diff;

        if(LightningBolt_Timer < diff)
        {
            if (HeroicMode)
                AddCustomSpellToCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT,142,0,0);
            else
            AddCustomSpellToCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT,175,0,0);
            LightningBolt_Timer = 10000;
        }
        else
            LightningBolt_Timer -= diff;

        if(EarthGrab_Timer < diff)
        {
            AddSpellToCast(m_creature, SPELL_EARTHGRAB_TOTEM);
            EarthGrab_Timer = 30000;
        }
        else
            EarthGrab_Timer -= diff;

        if(StoneSkin_Timer < diff)
        {
            AddSpellToCast(m_creature, SPELL_STONESKIN_TOTEM);
            StoneSkin_Timer = 60000;
        }
        else
            StoneSkin_Timer -= diff;

        CastNextSpellIfAnyAndReady(diff);
        DoMeleeAttackIfReady();
    }
开发者ID:Blumfield,项目名称:ptc2,代码行数:51,代码来源:boss_mennu_the_betrayer.cpp


示例13: DoMeleeAttackIfReady

    void DoMeleeAttackIfReady()
    {
        if (me->hasUnitState(UNIT_STAT_CASTING) || m_submerged || m_rotating  || RotType)
            return;

        //Make sure our attack is ready and we aren't currently casting before checking distance
        if (me->isAttackReady())
        {
            //If we are within range melee the target
            if (me->IsWithinMeleeRange(me->getVictim()))
            {
                me->AttackerStateUpdate(me->getVictim());
                me->resetAttackTimer();
            }
            else
            {
                if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 0, 5.0f, true))
                {
                    me->AttackerStateUpdate(pTarget);
                    me->resetAttackTimer();
                }
                else
                {
                    if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0, 100.0f, true, 0, 5.0f))
                        AddSpellToCast(pTarget, SPELL_WATERBOLT);
                    else
                        EnterEvadeMode();
                }
            }
        }
    }
开发者ID:Xadras,项目名称:looking4group-core,代码行数:31,代码来源:boss_lurker_below.cpp


示例14: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        //AmnenarsWrath_Timer
        if (AmnenarsWrath_Timer <= diff)
        {
            AddSpellToCast(me->getVictim(),SPELL_AMNENNARSWRATH);
            AmnenarsWrath_Timer = 12000;
        }
        else
            AmnenarsWrath_Timer -= diff;

        //FrostBolt_Timer
        if (FrostBolt_Timer <= diff)
        {
            Unit *pTarget = NULL;
            pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
            if (pTarget)
                AddSpellToCast(pTarget,SPELL_FROSTBOLT);

            FrostBolt_Timer = 8000;
        }
        else
            FrostBolt_Timer -= diff;

        if (!Spectrals && me->GetHealth()*100 / me->GetMaxHealth() < 50)
        {
            DoYell(SAY_1, LANG_UNIVERSAL, NULL);
            DoPlaySoundToSet(me, SOUND_SUMMON);

            Unit *pTarget = NULL;
            pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);

            if (pTarget)
            {
                SummonSpectrals(pTarget);
                SummonSpectrals(pTarget);
                SummonSpectrals(pTarget);
            }
            Spectrals = true;
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:47,代码来源:boss_amnennar_the_coldbringer.cpp


示例15: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        DoSpecialThings(diff, DO_EVERYTHING, 120.0f);

        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EVENT_IMPALE:
                {
                    //Cast Impale on a random target
                    //Do NOT cast it when we are afflicted by locust swarm
                    if (!m_creature->HasAura(SPELL_LOCUSTSWARM,1))
                        AddSpellToCast(SPELL_IMPALE, CAST_RANDOM);

                    events.ScheduleEvent(EVENT_IMPALE, 15000);
                    break;
                }
                case EVENT_SWARM:
                {
                    AddSpellToCast(SPELL_LOCUSTSWARM, CAST_SELF);
                    events.ScheduleEvent(EVENT_SWARM, 90000);
                    break;
                }
                case EVENT_SUMMON:
                {
                    AddSpellToCast(SPELL_SUMMONGUARD, CAST_SELF);
                    events.ScheduleEvent(EVENT_SUMMON, 45000);
                    break;
                }
                default:
                    break;
            }
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:42,代码来源:boss_anubrekhan.cpp


示例16: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
        {
            if(check_Timer < diff)
            {
                if (!m_creature->IsNonMeleeSpellCasted(false))
                    if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100, m_creature))
                    {
                        uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature);
                        if(Unit *channeled = Unit::GetUnit(*m_creature, channeler))
                            DoCast(channeled,SPELL_CHANNELING);
                    }
                check_Timer = 5000;
            }
            else
                check_Timer -= diff;

            return;
        }

        if (MarkOfShadow_Timer < diff)
        {
            if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0))
                AddSpellToCast(target,SPELL_MARK_OF_SHADOW);

            MarkOfShadow_Timer = 15000+rand()%5000;
        }
        else
            MarkOfShadow_Timer -=diff;

        if (ShadowBolt_Timer < diff)
        {
            AddSpellToCast(me->getVictim(), SPELL_SHADOW_BOLT);
            ShadowBolt_Timer = urand(5000, 6000);
        }
        else
            ShadowBolt_Timer -=diff;

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:42,代码来源:boss_kelidan_the_breaker.cpp


示例17: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        DoSpecialThings(diff, DO_COMBAT_N_EVADE, 100.0f);

        events.Update(diff);

        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EVENT_UNBALANCING_STRIKE:
                {
                    AddSpellToCast(SPELL_UNBALANCINGSTRIKE, CAST_TANK);
                    events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, 30000);
                    break;
                }
                case EVENT_DISTRUPTING_SHOUT:
                {
                    AddSpellToCast(SPELL_DISRUPTINGSHOUT, CAST_NULL);
                    events.ScheduleEvent(EVENT_DISTRUPTING_SHOUT, 25000);
                    break;
                }
                case EVENT_COMMAND_SOUND:
                {
                    DoPlaySoundToSet(m_creature, RAND(SOUND_COMMND1, SOUND_COMMND2, SOUND_COMMND3, SOUND_COMMND4, SOUND_COMMND5));
                    events.ScheduleEvent(EVENT_COMMAND_SOUND, 40000);
                    break;
                }
                default:
                    break;
            }
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Blumfield,项目名称:ptc2,代码行数:39,代码来源:boss_razuvious.cpp


示例18: UpdateAI

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

        DoSpecialThings(diff, DO_COMBAT_N_SPEED, 200.0f, 1.6f);

        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EVENT_POLYMORPH:
                {
                    AddSpellToCast(SPELL_GREATER_POLYMORPH, CAST_TANK);
                    events.ScheduleEvent(eventId, urand(10000, 20000));
                    break;
                }
                case EVENT_ARCANE_SHOCK:
                {
                    AddSpellToCast(SPELL_ARCANE_SHOCK);
                    events.ScheduleEvent(eventId, urand(15000, 20000));
                    break;
                }
                case EVENT_ARCANE_EXPLO:
                {
                    AddSpellToCast(SPELL_ARCANE_EXPLOSION, CAST_SELF);
                    events.ScheduleEvent(eventId, 30000);
                    break;
                }
            }
        }

        CheckCasterNoMovementInRange(diff, 42.0f);
        CastNextSpellIfAnyAndReady(diff);
        DoMeleeAttackIfReady();
    }
开发者ID:Looking4Group,项目名称:L4G_Core,代码行数:38,代码来源:boss_high_king_maulgar.cpp


示例19: UpdateAI

    void UpdateAI(const uint32 diff)
    {
        if (!UpdateVictim())
            return;

        DoSpecialThings(diff, DO_EVERYTHING, 120.0f);

        events.Update(diff);
        while (uint32 eventId = events.ExecuteEvent())
        {
            switch (eventId)
            {
                case EVENT_POISONBOLT_VOLLEY:
                {
                    AddSpellToCast(SPELL_POISONBOLT_VOLLEY, CAST_NULL);
                    events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, 11000);
                    break;
                }
                case EVENT_RAIN_OF_FIRE:
                {
                    AddSpellToCast(SPELL_RAIN_OF_FIRE, CAST_RANDOM);
                    events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 16000);
                    break;
                }
                case EVENT_ENRAGE:
                {
                    AddSpellToCast(SPELL_ENRAGE, CAST_SELF);
                    events.ScheduleEvent(EVENT_ENRAGE, 61000);
                    break;
                }
                default:
                    break;
            }
        }

        CastNextSpellIfAnyAndReady();
        DoMeleeAttackIfReady();
    }
开发者ID:Dolmero,项目名称:L4G_Core,代码行数:38,代码来源:boss_faerlina.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ AddSpiritGuide函数代码示例发布时间:2022-05-30
下一篇:
C++ AddSpellScripts函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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