Exemplo n.º 1
0
        public Dicts InitializeMobSheet(string mobName, MobAsociatedDrops data)
        {
            Dicts d = new Dicts(true);

            interaction.InsertValue(new ExcelCellAddress(1, 1), "Spreadsheet for enemy: " + interaction.currentSheet.Name);
            interaction.InsertValue(new ExcelCellAddress(1, 4), "Num killed:");
            interaction.InsertValue(new ExcelCellAddress(1, 5), 0);

            Dictionary <string, string[]> itemEntries = Program.gameRecognizer.enemyHandling.mobDrops.GetDropsForMob(mobName);

            ExcelCellAddress startAddr = new ExcelCellAddress("A2");

            foreach (string key in itemEntries.Keys)
            {
                interaction.currentSheet.Cells[startAddr.Address].Value = key;

                for (int i = 0; i < itemEntries[key].Length; i++)
                {
                    int _offset = i + 1;
                    ExcelCellAddress itemName    = new ExcelCellAddress(startAddr.Row + _offset, startAddr.Column);
                    ExcelCellAddress yangVal     = new ExcelCellAddress(startAddr.Row + _offset, startAddr.Column + 1);
                    ExcelCellAddress totalDroped = new ExcelCellAddress(startAddr.Row + _offset, startAddr.Column + 2);
                    interaction.InsertValue(itemName, itemEntries[key][i]);
                    d.addresses.Add(itemEntries[key][i], totalDroped);
                    interaction.InsertValue(yangVal, DefinitionParser.instance.currentGrammarFile.GetYangValue(itemEntries[key][i]));
                    interaction.InsertValue(totalDroped, 0);
                }
                startAddr = new ExcelCellAddress(2, startAddr.Column + 4);
            }
            interaction.Save();
            return(d);
        }
Exemplo n.º 2
0
 public void CleanUp()
 {
     state    = EnemyState.NO_ENEMY;
     mobDrops = null;
     stack.Clear();
     GameRecognizer.OnModifierRecognized -= EnemyTargetingModifierRecognized;
     evnt.Dispose();
     masterMobRecognizer.SpeechRecognized -= MasterMobRecognizer_SpeechRecognized;
     masterMobRecognizer.Dispose();
 }
Exemplo n.º 3
0
 public EnemyHandling()
 {
     GameRecognizer.OnModifierRecognized += EnemyTargetingModifierRecognized;
     mobDrops            = new MobAsociatedDrops();
     stack               = new DropOutStack <ItemInsertion>(Configuration.undoHistoryLength);
     evnt                = new ManualResetEventSlim(false);
     masterMobRecognizer = new SpeechRecognitionEngine();
     masterMobRecognizer.SetInputToDefaultAudioDevice();
     masterMobRecognizer.SpeechRecognized += MasterMobRecognizer_SpeechRecognized;
     masterMobRecognizer.LoadGrammar(new Grammar(new Choices(Program.controlCommands.getRemoveTargetCommand)));
 }