Ejemplo n.º 1
0
 public void triggerAutosplit(D2Player player)
 {
     if (player.newlyStarted && settings.doAutosplit && settings.triggerKeys != "")
     {
         KeyManager.sendKeys(settings.triggerKeys);
     }
 }
Ejemplo n.º 2
0
        public void writeFiles(D2Player player)
        {
            // todo: only write files if content changed
            if (!settings.createFiles)
            {
                return;
            }

            if (!Directory.Exists(settings.fileFolder))
            {
                Directory.CreateDirectory(settings.fileFolder);
            }

            File.WriteAllText(settings.fileFolder + "/name.txt", player.name);
            File.WriteAllText(settings.fileFolder + "/level.txt", player.lvl.ToString());
            File.WriteAllText(settings.fileFolder + "/strength.txt", player.strength.ToString());
            File.WriteAllText(settings.fileFolder + "/dexterity.txt", player.dexterity.ToString());
            File.WriteAllText(settings.fileFolder + "/vitality.txt", player.vitality.ToString());
            File.WriteAllText(settings.fileFolder + "/energy.txt", player.energy.ToString());
            File.WriteAllText(settings.fileFolder + "/fire_res.txt", player.calculatedFireRes.ToString());
            File.WriteAllText(settings.fileFolder + "/cold_res.txt", player.calculatedColdRes.ToString());
            File.WriteAllText(settings.fileFolder + "/light_res.txt", player.calculatedLightningRes.ToString());
            File.WriteAllText(settings.fileFolder + "/poison_res.txt", player.calculatedPoisonRes.ToString());
            File.WriteAllText(settings.fileFolder + "/gold.txt", (player.goldBody + player.goldStash).ToString());
            File.WriteAllText(settings.fileFolder + "/deaths.txt", player.deaths.ToString());
        }
Ejemplo n.º 3
0
        // const int ADDRESS_MODE = 0x44C658;
        // int[] OFFSETS_MODE = new int[] { 0x40, 0x210 };
        // const int ADDRESS_CHARACTER = 0x00498288;
        // int[] OFFSETS_CHARACTER = new int[] { 0x174, 0x5c, 0x48, 0x00 };

        // const int ADDRESS_DIFFICULTY = 0x42E1AC;
        // const int ADDRESS_NAME = 0x82E164;
        #endregion

        #region patch 1.14b adresses
        //int ADDRESS_CHARACTER = 0x0039DEFC;
        //int[] OFFSETS_MODE = new int[] { 0x10 };
        //int[] OFFSETS_PLAYER_STATS = new int[] { 0x5c, 0x48, 0x00 };
        //int[] OFFSETS_INVENTORY = new int[] { 0x60 };
        //int[] OFFSETS_NAME = new int[] { 0x14, 0x00 };

        //int ADDRESS_QUESTS = 0x003B8E54;
        //int[] OFFSETS_QUESTS = new int[] { 0x264, 0x450, 0x20, 0x00 };

        //int ADDRESS_DIFFICULTY = 0x00398694;
        //int ADDRESS_AREA = 0x0039B1C8;
        #endregion

        #region patch 1.14c adresses
        //int ADDRESS_CHARACTER = 0x0039CEFC;
        //int[] OFFSETS_MODE = new int[] { 0x10 };
        //int[] OFFSETS_PLAYER_STATS = new int[] { 0x5c, 0x48, 0x00 };
        //int[] OFFSETS_INVENTORY = new int[] { 0x60 };
        //int[] OFFSETS_NAME = new int[] { 0x14, 0x00 };

        //int ADDRESS_QUESTS = 0x003B7E54;
        //int[] OFFSETS_QUESTS = new int[] { 0x264, 0x450, 0x20, 0x00 };

        //int ADDRESS_DIFFICULTY = 0x00397694;
        //int ADDRESS_AREA = 0x0039A1C8;
        #endregion

        public D2DataReader(MainWindow main)
        {
            this.main = main;
            enc       = Encoding.GetEncoding("UTF-8");
            player    = new D2Player();
            setD2Version();
        }
Ejemplo n.º 4
0
 public void updateLabels(D2Player player)
 {
     nameLabel.Invoke(new Action(delegate() { nameLabel.Text = player.name; }));        // name
     lvlLabel.Invoke(new Action(delegate() { lvlLabel.Text = "LVL: " + player.lvl; })); // level
     strengthLabel.Invoke(new Action(delegate() { strengthLabel.Text = "STR: " + player.strength; }));
     dexterityLabel.Invoke(new Action(delegate() { dexterityLabel.Text = "DEX: " + player.dexterity; }));
     vitalityLabel.Invoke(new Action(delegate() { vitalityLabel.Text = "VIT: " + player.vitality; }));
     energyLabel.Invoke(new Action(delegate() { energyLabel.Text = "ENE: " + player.energy; }));
     fireResLabel.Invoke(new Action(delegate() { fireResLabel.Text = "FIRE: " + player.calculatedFireRes; }));
     coldResLabel.Invoke(new Action(delegate() { coldResLabel.Text = "COLD: " + player.calculatedColdRes; }));
     lightningResLabel.Invoke(new Action(delegate() { lightningResLabel.Text = "LIGH: " + player.calculatedLightningRes; }));
     poisonResLabel.Invoke(new Action(delegate() { poisonResLabel.Text = "POIS: " + player.calculatedPoisonRes; }));
     goldLabel.Invoke(new Action(delegate() { goldLabel.Text = "GOLD: " + (player.goldBody + player.goldStash); }));
     deathsLabel.Invoke(new Action(delegate() { deathsLabel.Text = "DEATHS: " + player.deaths; }));
 }