示例#1
0
 private static void NewAvalonSiphonMarkersActivated(NPC npc)
 {
     npc.UnitFlags &= ~UnitFlags.SelectableNotAttackable;
     npc.AddMessage(() =>
     {
         npc.SpellCast.TriggerSelf(SpellId.VisualFlash);
     });
 }
        public override NPC Summon(SpellCast cast, ref Vector3 targetLoc, NPCEntry entry)
        {
            NPC npc = base.Summon(cast, ref targetLoc, entry);

            if (cast.CasterChar != null)
            {
                cast.CasterChar.Summon = EntityId.Zero;
                npc.Summoner           = null;
                npc.Master             = cast.CasterChar;
                npc.AddMessage(() => cast.CasterChar.Possess(0, npc, true, false));
            }

            return(npc);
        }
 private static void UnworthyInitiateActivated(NPC npc)
 {
     npc.StandState = StandState.Kneeling;
     npc.AddMessage(
         () =>
     {
         var nearest = npc.GetNearbyNPC(NPCId.UnworthyInitiateAnchor, 7);
         if (nearest == null)
         {
             return;
         }
         nearest.SpellCast.Trigger(SpellId.ChainedPeasantChest, npc);
     });
 }