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); } } }
public void SetVisualDummy(TempSummon summon) { _visualDummy = summon.GetGUID(); summon.GetPosition(out _x, out _y, out _z); }