Esempio n. 1
0
        void InitializeVisualStalker()
        {
            Aura aura = GetHitAura();

            if (aura != null)
            {
                WorldLocation dest = GetExplTargetDest();
                if (dest != null)
                {
                    int        duration = GetSpellInfo().CalcDuration(GetOriginalCaster());
                    TempSummon summon   = GetCaster().GetMap().SummonCreature(CreatureIds.HealingRainInvisibleStalker, dest, null, (uint)duration, GetOriginalCaster());
                    if (summon == null)
                    {
                        return;
                    }

                    summon.CastSpell(summon, SpellIds.HealingRainVisual, true);

                    var script = aura.GetScript <spell_sha_healing_rain_AuraScript>();
                    if (script != null)
                    {
                        script.SetVisualDummy(summon);
                    }
                }
            }
        }
Esempio n. 2
0
        // helper for summoning wave mobs
        void Summon(uint entry, Position pos)
        {
            TempSummon summon = me.SummonCreature(entry, pos, TempSummonType.CorpseTimedDespawn, 10000);

            if (summon)
            {
                summon.CastSpell(summon, SpellIds.TeleportVisual);
            }
        }
Esempio n. 3
0
            void ActivateCrystal()
            {
                // just to make things easier we'll get the gameobject from the map
                GameObject invoker = instance.GetGameObject(uiActivationCrystal[0]);

                if (!invoker)
                {
                    return;
                }

                SpellInfo spellInfoLightning = Global.SpellMgr.GetSpellInfo(SPELL_ARCANE_LIGHTNING);

                if (spellInfoLightning == null)
                {
                    return;
                }

                // the orb
                TempSummon trigger = invoker.SummonCreature(NPC_DEFENSE_SYSTEM, ArcaneSphere, TempSummonType.ManualDespawn, 0);

                if (!trigger)
                {
                    return;
                }

                // visuals
                trigger.CastSpell(trigger, spellInfoLightning, true, 0, 0, trigger.GetGUID());

                // Kill all mobs registered with SetData64(ADD_TRASH_MOB)
                foreach (var guid in trashMobs)
                {
                    Creature creature = instance.GetCreature(guid);
                    if (creature && creature.IsAlive())
                    {
                        trigger.Kill(creature);
                    }
                }
            }