|
25 | 25 | using FFXIVClientStructs.FFXIV.Component.GUI; |
26 | 26 | using Lumina.Excel.Sheets; |
27 | 27 | using Lumina.Text.ReadOnly; |
| 28 | +using System; |
| 29 | + |
28 | 30 | //using OtterGui.Text.EndObjects; |
29 | 31 | using System.Text.RegularExpressions; |
30 | 32 | using CharaData = (string Name, ushort World); |
@@ -903,7 +905,7 @@ public static bool IsItemSellableByHardList(Number item, Number quantity) |
903 | 905 |
|
904 | 906 | internal static void ExtraLog(string s) |
905 | 907 | { |
906 | | - if(C.ExtraDebug) PluginLog.Debug(s); |
| 908 | + if(C.ExtraDebug) DebugLog(s); |
907 | 909 | } |
908 | 910 |
|
909 | 911 | internal static bool ContainsAllItems<T>(this IEnumerable<T> a, IEnumerable<T> b) |
@@ -1272,12 +1274,14 @@ internal static bool TrySelectSpecificEntry(Func<string, bool> inputTextTest, Fu |
1272 | 1274 | { |
1273 | 1275 | if(TryGetAddonByName<AddonSelectString>("SelectString", out var addon) && IsAddonReady(&addon->AtkUnitBase)) |
1274 | 1276 | { |
| 1277 | + InternalLog.Debug($"Entries: {new AddonMaster.SelectString(addon).Entries.Select(x => x.Text).Print("\n")}"); |
1275 | 1278 | if(new AddonMaster.SelectString(addon).Entries.TryGetFirst(x => inputTextTest(x.Text), out var entry)) |
1276 | 1279 | { |
| 1280 | + InternalLog.Debug($"Entry found: {entry}"); |
1277 | 1281 | if((Throttler?.Invoke() ?? GenericThrottle)) |
1278 | 1282 | { |
1279 | 1283 | entry.Select(); |
1280 | | - DebugLog($"TrySelectSpecificEntry: selecting {entry}"); |
| 1284 | + InternalLog.Debug($"TrySelectSpecificEntry: selecting {entry}"); |
1281 | 1285 | return true; |
1282 | 1286 | } |
1283 | 1287 | } |
@@ -1310,6 +1314,24 @@ internal static void TryNotify(string s) |
1310 | 1314 | } |
1311 | 1315 | } |
1312 | 1316 |
|
| 1317 | + public static int GenerateRandomDelay() |
| 1318 | + { |
| 1319 | + var roll = System.Random.Shared.NextSingle(); |
| 1320 | + |
| 1321 | + if(roll < 0.6f) |
| 1322 | + { |
| 1323 | + return System.Random.Shared.Next(300, 350); |
| 1324 | + } |
| 1325 | + else if(roll < 0.9f) |
| 1326 | + { |
| 1327 | + return System.Random.Shared.Next(350, 400); |
| 1328 | + } |
| 1329 | + else |
| 1330 | + { |
| 1331 | + return System.Random.Shared.Next(400, 500); |
| 1332 | + } |
| 1333 | + } |
| 1334 | + |
1313 | 1335 | internal static float GetValidInteractionDistance(IGameObject bell) |
1314 | 1336 | { |
1315 | 1337 | if(bell.ObjectKind == ObjectKind.Housing) |
|
0 commit comments