Created
July 14, 2017 13:59
-
-
Save Qofar/397e0863ab1781be9048afeb0efb78b2 to your computer and use it in GitHub Desktop.
戦闘開始カウントでEndEncounterするPlugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Advanced_Combat_Tracker; | |
using System.Windows.Forms; | |
// 戦闘開始カウントでEndEncounterするPlugin | |
namespace ACTv3Plugins | |
{ | |
public class EndEncounterByCountdown : IActPluginV1 | |
{ | |
// "00:0139:戦闘開始まで5秒! (xxx xxx)" | |
// "00:0039:戦闘開始まで5秒!" | |
const string COUNTDOWN_SYSTEM_MESSAGE = "39:戦闘開始まで5秒!"; | |
Label lblStatus; | |
public void InitPlugin(TabPage pluginScreenSpace, Label pluginStatusText) | |
{ | |
ActGlobals.oFormActMain.OnLogLineRead += OnLogLineRead; | |
lblStatus = pluginStatusText; | |
lblStatus.Text = "Plugin Started"; | |
} | |
public void DeInitPlugin() | |
{ | |
ActGlobals.oFormActMain.OnLogLineRead -= OnLogLineRead; | |
lblStatus.Text = "Plugin Exited"; | |
} | |
private void OnLogLineRead(bool isImport, LogLineEventArgs logInfo) | |
{ | |
if (isImport) return; | |
if (logInfo.logLine.IndexOf(COUNTDOWN_SYSTEM_MESSAGE) != -1) | |
{ | |
ActGlobals.oFormActMain.ActCommands("end"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment