Beispiel #1
0
 public override void PreSaveAndQuit()
 {
     RPControl.presence.details        = string.Format("In Main Menu");
     RPControl.presence.state          = null;
     RPControl.presence.largeImageKey  = string.Format("payload_test");
     RPControl.presence.largeImageText = string.Format("Terraria");
     RPControl.presence.smallImageKey  = null;
     RPControl.presence.smallImageText = null;
     RPControl.Update();
     UpdaterUnload();
 }
Beispiel #2
0
        public override void Load()
        {
            RPControl.Enable();
            RPControl.presence.details        = string.Format("In Main Menu");
            RPControl.presence.largeImageKey  = string.Format("payload_test");
            RPControl.presence.largeImageText = string.Format("Terraria");

            DateTime date    = DateTime.Now;
            DateTime epoch   = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
            long     timenow = Convert.ToInt64((date.ToUniversalTime() - epoch).TotalSeconds);

            RPControl.presence.startTimestamp = timenow;

            RPControl.Update();
        }
Beispiel #3
0
        public static void Update()
        {
            life = player.statLife;
            mana = player.statMana;
            def  = player.statDefense;

            zone1 = player.zone1;
            zone2 = player.zone2;
            zone3 = player.zone3;

            item = player.HeldItem;

            if (!dead)
            {
                RPControl.presence.state = string.Format("HP: {0} MP: {1} DEF: {2}", life, mana, def);
            }
            else
            {
                RPControl.presence.state = string.Format("Dead");
            }

            GetItemStat();

            bossNPC = Main.npc.Take(200).Where(npc => npc.active && (bossID.Contains(npc.type) || npc.boss)).LastOrDefault();

            if (bossNPC == null)
            {
                GetBiome();
            }
            else
            {
                GetBoss();
            }

            RPControl.Update();
        }
Beispiel #4
0
 public override void Unload()
 {
     RPControl.Disable();
 }