From 5597c0b354f881994a75878731c3a02183e9c970 Mon Sep 17 00:00:00 2001
From: asmrobot <asmrobot@hotmail.com>
Date: Wed, 16 Oct 2019 00:58:07 +0000
Subject: [PATCH] format project
---
src/RichCreator/Maps/Lindong/LindongMap.cs | 58 ++++++++++++++++++----------------------------------------
1 files changed, 18 insertions(+), 40 deletions(-)
diff --git a/src/RichCreator/Maps/Lindong/LindongMap.cs b/src/RichCreator/Maps/Lindong/LindongMap.cs
index 4e0c17e..39ae69b 100644
--- a/src/RichCreator/Maps/Lindong/LindongMap.cs
+++ b/src/RichCreator/Maps/Lindong/LindongMap.cs
@@ -181,7 +181,7 @@
private Int32 runningStep = RunningStep.None;
- public override bool Start(ZTRectangle gameRect, CancellationToken cancelToken,Int32 runningStep)
+ public override ZTResult Start(ZTRectangle gameRect, CancellationToken cancelToken,Int32 runningStep)
{
this.runningStep = runningStep;
this.GameRect = gameRect;
@@ -194,22 +194,22 @@
{
if (!MoveToSunan())
{
- return false;
+ return ZTResult.Failed;
}
if (!MoveToShikongzhimen())
{
- return false;
+ return ZTResult.Failed;
}
if (!MoveToChoiceTaskPage())
{
- return false;
+ return ZTResult.Failed;
}
if (!IntoTaskRoom())
{
- return false;
+ return ZTResult.Failed;
}
G.Instance.InfoWriter("成功进入副本");
@@ -220,13 +220,13 @@
//重复刷,直到疲劳值不够了
if (this.cancellationToken.IsCancellationRequested)
{
- return false;
+ return ZTResult.Cancel;
}
- bool killResult = true;
+
DateTime startHouse = DateTime.Now;
- killResult = KillMonster();
- if (killResult)
+ ZTResult killResult = KillMonster();
+ if (killResult==ZTResult.Success)
{
//捡东西
G.Instance.InputControl.PressKey(RandomUtils.KeyPressDuration, HIDCode.V);
@@ -250,7 +250,7 @@
if (pilaozhi <= 0)
{
ExitToTown();
- return true;
+ return ZTResult.Success;
}
ReplayGame();
@@ -258,10 +258,9 @@
}
else
{
- break;
+ return killResult;
}
}
- return false;
}
/// <summary>
@@ -289,9 +288,8 @@
/// 刷房间
/// </summary>
/// <returns></returns>
- private bool KillMonster()
+ private ZTResult KillMonster()
{
- Int32 result = 0;
bool ret = false;
@@ -305,7 +303,7 @@
if (!findResult)
{
G.Instance.InfoWriter("未找到进入凛冬的文字");
- return false;
+ return ZTResult.Failed;
}
G.Instance.InfoWriter("进入凛冬");
@@ -330,7 +328,7 @@
if (!ret)
{
G.Instance.InfoWriter("未找到人物所在房间");
- break;
+ return ZTResult.Failed;
}
G.Instance.InfoWriter("进入房间->" + houseIndex.ToString());
@@ -338,16 +336,16 @@
DateTime roomStartTime = DateTime.Now;
KillMonsterStateMachine kmsm = new KillMonsterStateMachine(Houses[houseIndex], this.MinimapPoint, this.GameRect, preHouseIndex,this.runningStep);
- result = kmsm.Start(cancellationToken, 5 * 60 * 1000);
+ ZTResult smresult = kmsm.Work(cancellationToken, 5 * 60 * 1000);
Int32 roomTotalSecond = (Int32)(DateTime.Now - roomStartTime).TotalSeconds;
G.Instance.InfoWriter("房间刷完,用时:" + (roomTotalSecond / 60) + "分" + (roomTotalSecond % 60) + "秒");
runningStep = RunningStep.None;
- if (result == JobResult.Success)
+ if (smresult == ZTResult.Success)
{
if (houseIndex == 15)
{
//所有房间刷完
- return true;
+ return ZTResult.Success;
}
//刷其它房间
@@ -355,11 +353,9 @@
}
else
{
- break;
+ return smresult;
}
}
-
- return false;
}
/// <summary>
@@ -396,24 +392,6 @@
return DnfCVHelper.IsInSaiLiYaHouse(this.GameRect);
});
return result;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
}
/// <summary>
--
Gitblit v1.9.3