Exemplo n.º 1
0
    public static string version = "2.0.18"; // Must match version in Version.txt

    public void Initialize()
    {
        isLaunched = true;

        AutoEquipSettings.Load();

        if (AutoUpdater.CheckUpdate(version))
        {
            Logger.Log("New version downloaded, restarting, please wait");
            ToolBox.Restart();
            return;
        }

        Logger.Log($"Launching version {version} on client {WoWVersion}");

        AutoDetectMyClassSpec();
        LoadWantedItemTypesList();
        WAECharacterSheet.RecordKnownSkills();

        detectionPulse.DoWork += BackGroundPulse;
        detectionPulse.RunWorkerAsync();

        EventsLua.AttachEventLua("CHARACTER_POINTS_CHANGED", e => AutoDetectMyClassSpec());
        EventsLua.AttachEventLua("SKILL_LINES_CHANGED", e => WAECharacterSheet.RecordKnownSkills());
        EventsLua.AttachEventLua("QUEST_COMPLETE", e => WAEQuest.QuestRewardGossipOpen = true);
        EventsLuaWithArgs.OnEventsLuaStringWithArgs          += OnLuaEventsWithArgs;
        wManager.Events.OthersEvents.OnSelectQuestRewardItem += WAEQuest.SelectReward;

        LUASetup();
    }
Exemplo n.º 2
0
 public static bool Load()
 {
     try
     {
         if (File.Exists(AdviserFilePathAndName("AutoEquipSettings", ObjectManager.Me.Name + "." + Usefuls.RealmName)))
         {
             CurrentSettings = Load <AutoEquipSettings>(AdviserFilePathAndName("AutoEquipSettings", ObjectManager.Me.Name + "." + Usefuls.RealmName));
             return(true);
         }
         CurrentSettings = new AutoEquipSettings();
     }
     catch (Exception e)
     {
         Logger.LogError("AutoEquipSettings > Load(): " + e);
     }
     return(false);
 }
Exemplo n.º 3
0
 public void Settings()
 {
     AutoEquipSettings.Load();
     AutoEquipSettings.CurrentSettings.ShowConfiguration();
     AutoEquipSettings.CurrentSettings.Save();
 }