Esempio n. 1
0
 public PetChooser(IPluginProperties pluginProperties, IPetLua petLua, IPetJournal petJournal)
 {
     _petLua = petLua;
     _pluginProperties = pluginProperties;
     _petJournal = petJournal;
 }
Esempio n. 2
0
        public override void Initialize()
        {
            if (WasInitialized)
                return;
            battleCount = 0;
            _petLua = PetLua.Instance;
            _pluginSettings = new PluginSettings();
            _pluginProperties = _pluginSettings as IPluginProperties;
            _petJournal = new PetJournal(_pluginProperties, _petLua);
            _petChooser = new PetChooser(_pluginProperties, _petLua, _petJournal);
            _petLoader = new PetLoader(_petLua);
            _petReport = new PetReport();
            _zoneTable = new ZoneList();

            _lastEnemyLevel = 0;
            CurrentProfileLevel = 0;

            MyPets.updateMyPets();      // some healing behavior may need to know the current state

            Moved = false;
            Selected = false;
            AnimationActive = false;
            LoadSuccess = true;        // no failures detected yet

            rand = new Random();
            ReactionTime = rand.NextDouble() * 1000 + 500;
            Logger.Write(string.Format("Reaction time set about {0:F1} msec" , ReactionTime));

            numPetsOwnedOnStart = _petLua.GetNumPetsOwned();
            isSlotAvailableOnStart = ! _petLua.IsSlotLocked(1);
            Logger.WriteDebug("Owned on start: " + numPetsOwnedOnStart + ", slot available: " + isSlotAvailableOnStart);

            if( !string.IsNullOrEmpty(PluginSettings.Instance.LastProfile) )
                LoadProfile(PluginSettings.Instance.LastProfile);

            // will fight everything. Is "nothing" better?

            WasInitialized = true;
        }
Esempio n. 3
0
 public PetChooser(IPluginProperties pluginProperties, IPetLua petLua, IPetJournal petJournal)
 {
     _petLua           = petLua;
     _pluginProperties = pluginProperties;
     _petJournal       = petJournal;
 }