From 6f5aee90980c471df74965ebfb6ebb150dcfbfc0 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Wed, 24 May 2017 23:36:21 +0900 Subject: [PATCH] =?UTF-8?q?=E6=B8=9B=E7=AE=97=E3=82=AB=E3=82=A6=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=8F=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inferno/InfernoScripts/InfernoCore/InfernoScript.cs | 2 +- Inferno/InfernoScripts/Parupunte/ParupunteCore.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Inferno/InfernoScripts/InfernoCore/InfernoScript.cs b/Inferno/InfernoScripts/InfernoCore/InfernoScript.cs index 6bf88db3..7f709553 100644 --- a/Inferno/InfernoScripts/InfernoCore/InfernoScript.cs +++ b/Inferno/InfernoScripts/InfernoCore/InfernoScript.cs @@ -318,7 +318,7 @@ protected InfernoScript() { foreach (var c in _counterList) { - c.Update(Interval); + c.Update(100); } //完了状態にあるタイマを全て削除 _counterList.RemoveAll(x => x.IsCompleted); diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs index 8757dfcd..538d71d4 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs @@ -116,9 +116,10 @@ protected override void Setup() OnRecievedInfernoEvent .OfType() + .Where(c => IsonoMethod(c.Command, true)) .ThrottleFirst(TimeSpan.FromSeconds(5), InfernoScriptScheduler) .Retry() - .Subscribe(); + .Subscribe(c => IsonoMethod(c.Command, false)); #endregion EventHook @@ -156,13 +157,13 @@ protected override void Setup() } - private bool IsonoMethod(string command) + private bool IsonoMethod(string command, bool isDryRun) { var c = command; if (c.Contains("とまれ")) { - ParupunteStop(); + if (isDryRun) ParupunteStop(); return true; } @@ -170,13 +171,13 @@ private bool IsonoMethod(string command) if (c.Contains("ぱるぷんて")) { - ParupunteStart(ChooseParupounteScript()); + if (isDryRun) ParupunteStart(ChooseParupounteScript()); return true; } var result = IsonoParupunteScripts.Keys.FirstOrDefault(x => command.Contains(x)); if (string.IsNullOrEmpty(result) || !IsonoParupunteScripts.ContainsKey(result)) return false; - ParupunteStart(IsonoParupunteScripts[result]); + if (isDryRun) ParupunteStart(IsonoParupunteScripts[result]); return true; }