diff --git "a/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/MainWindow.xaml.cs" "b/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/MainWindow.xaml.cs" index 2f5cbe5..347cc8c 100644 --- "a/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/MainWindow.xaml.cs" +++ "b/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/MainWindow.xaml.cs" @@ -144,9 +144,9 @@ private void OnWork(object sender, DoWorkEventArgs e) StatusChange(nStatus); status = nStatus; } - - var localplayer = Scanner.ReadIntPtr(Data.ActorTable); - if (localplayer == IntPtr.Zero || !Data.IsGathering) + + var localPlayer = Scanner.ReadIntPtr(Data.ActorTable); + if (localPlayer == IntPtr.Zero) { Reset(); Status.End(); @@ -156,10 +156,12 @@ private void OnWork(object sender, DoWorkEventArgs e) continue; } - var buffTablePtr = localplayer + Data.UiStatusEffects; - BuffCheck(buffTablePtr); + if (!Data.IsGathering) Fish.Reset(); OceanFishingZoneCheck(); WeatherCheck(Data.WeatherPtr); + var buffTablePtr = localPlayer + Data.UiStatusEffects; + BuffCheck(buffTablePtr); + if (Fish.State == FishingState.Casting) Fish.Update(); if (Status.IsActive) Status.Update(); diff --git "a/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/Fish.cs" "b/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/Fish.cs" index f955543..7678a4c 100644 --- "a/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/Fish.cs" +++ "b/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/Fish.cs" @@ -73,7 +73,7 @@ public void Reset() //起身后,界面重置。 State = FishingState.None; Update(); - } + } public void Update() { diff --git "a/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/SigScanner.cs" "b/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/SigScanner.cs" index b511cb4..1fabd87 100644 --- "a/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/SigScanner.cs" +++ "b/\346\270\224\344\272\272\347\232\204\347\233\264\346\204\237/Models/SigScanner.cs" @@ -201,8 +201,7 @@ public IntPtr ScanText(string signature) var scanSize = textSectionBytes.Count - bytes.Length; for (var i = 0; i < scanSize; i++) { - if (firstByte != 0xFFFF) - i = textSectionBytes.IndexOf((byte)firstByte, i); + if (firstByte != 0xFFFF && (i = textSectionBytes.IndexOf((byte)firstByte, i)) == -1) break; var found = true; @@ -215,7 +214,6 @@ public IntPtr ScanText(string signature) found = false; break; } - if (!found) continue; scanRet = TextSectionBase + i;