public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) { AttackMissView = new AttackMissView(this); ACTTabControl = new ACTTabControl(this); pluginScreenSpace.Text = Assembly.GetExecutingAssembly().GetName().Name; pluginScreenSpace.Controls.Add(ACTTabControl); ACTTabControl.InitializeSettings(); Settings = new DataManager(this); Settings.Load(); ACTTabControl.Show(); String path = ResourceLocator.findResourcePath("resources/wav/miss.wav"); if (path != null) { soundPlayer = new SoundPlayer(path); } ActGlobals.oFormActMain.AfterCombatAction += AfterCombatAction; ActGlobals.oFormActMain.OnCombatStart += CombatStarted; ActGlobals.oFormActMain.OnLogLineRead += OnLogLineRead; }
private void AfterCombatAction(bool isImport, CombatActionEventArgs actionInfo) { if (CombatActionChecker.IsMySkill(actionInfo)) { if (actorId == null) { actorId = CombatActionChecker.GetActorId(actionInfo); } if (!CombatActionChecker.JudgeFlankOrRearSkill(actionInfo)) { AttackMissView.CountUp(actionInfo.theAttackType); if (soundPlayer != null && ACTTabControl.IsSoundEnable()) { soundPlayer.Play(); } } } }
private void OnLogLineRead(bool isImport, LogLineEventArgs logInfo) { String logLine = logInfo.logLine; // "[07:23:04.000] 15:FFFFFF" if (logLine.Length < 18) { return; } // 15: から始まるなら 戦闘スキル発動っぽい if (!logLine.Substring(15, 3).Equals("15:")) { return; } string[] lineDatas = logLine.Split(':'); if (lineDatas.Length < 16) { return; } if (!lineDatas[3].Equals(actorId)) { return; } if (!CombatActionChecker.JudgeFlankOrRearSkillForLog(lineDatas, actorId)) { AttackMissView.CountUp(lineDatas[6]); if (soundPlayer != null && ACTTabControl.IsSoundEnable()) { soundPlayer.Play(); } } }