예제 #1
0
 public override void AI()
 {
     if ((Main.dayTime) && !ContrabandMerchant.IsNpcOnscreen(npc.Center))
     {
         if (Main.netMode == NetmodeID.SinglePlayer)
         {
             Main.NewText(npc.FullName + " has departed!", 50, 125, 255);
         }
         else
         {
             NetMessage.BroadcastChatMessage(NetworkText.FromLiteral(npc.FullName + " has departed!"), new Color(50, 125, 255));
         }
         npc.active  = false;
         npc.netSkip = -1;
         npc.life    = 0;
     }
 }
예제 #2
0
        public override void AI()
        {
            if (!ContrabandMerchant.IsNpcOnscreen(npc.Center) && !NPC.AnyNPCs(ModContent.NPCType <Draken>()))
            {
                if (Main.netMode == NetmodeID.SinglePlayer)
                {
                    Main.NewText(npc.FullName + " has left!", 50, 125, 255);
                }
                else
                {
                    NetMessage.BroadcastChatMessage(NetworkText.FromLiteral(npc.FullName + " has left!"), new Color(50, 125, 255));
                }
                npc.active  = false;
                npc.netSkip = -1;
                npc.life    = 0;
            }

            base.AI();
        }
        public override void AI()
        {
            if (itemRandomizer == 0)
            {
                UnifiedRandom rando = new UnifiedRandom(Main.worldName.GetHashCode() + npc.Center.GetHashCode());

                itemRandomizer = rando.Next();
            }
            if ((Main.dayTime) && !ContrabandMerchant.IsNpcOnscreen(npc.Center))
            {
                if (Main.netMode == NetmodeID.SinglePlayer)
                {
                    Main.NewText(npc.FullName + " has departed!", 50, 125, 255);
                }
                else
                {
                    NetMessage.BroadcastChatMessage(NetworkText.FromLiteral(npc.FullName + " has departed!"), new Color(50, 125, 255));
                }
                npc.active  = false;
                npc.netSkip = -1;
                npc.life    = 0;
            }
        }