Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
- Includes latest 7* Raid, Emboar.
  • Loading branch information
bdawg1989 committed Jun 14, 2024
1 parent bcba3be commit 4953988
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions SysBot.Pokemon.Discord/Commands/Bots/TradeModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ public async Task HideTradeAsync([Summary("Trade Code")] int code, [Summary("Sho
}
var ignoreAutoOT = content.Contains("OT:") || content.Contains("TID:") || content.Contains("SID:");
content = ReusableActions.StripCodeBlock(content);
content = ConvertMasterBall(content); // Temp fix for Ball: Master being unrecognized by the bot
var set = new ShowdownSet(content);
var template = AutoLegalityWrapper.GetTemplate(set);

Expand Down Expand Up @@ -517,6 +518,7 @@ public async Task TradeAsync([Summary("Trade Code")] int code, [Summary("Showdow

var ignoreAutoOT = content.Contains("OT:") || content.Contains("TID:") || content.Contains("SID:");
content = ReusableActions.StripCodeBlock(content);
content = ConvertMasterBall(content); // Temp fix for Ball: Master not being recognized by the bot
var set = new ShowdownSet(content);
var template = AutoLegalityWrapper.GetTemplate(set);

Expand Down Expand Up @@ -1382,6 +1384,19 @@ private async Task HideTradeAsyncAttach(int code, RequestSignificance sig, Socke
};
}

private string ConvertMasterBall(string content)
{
var lines = content.Split('\n');
for (int i = 0; i < lines.Length; i++)
{
if (lines[i].StartsWith("Ball:") && lines[i].Contains("Master"))
{
lines[i] = ".Ball=1";
}
}
return string.Join('\n', lines);
}

private async Task AddTradeToQueueAsync(int code, string trainerName, T? pk, RequestSignificance sig, SocketUser usr, bool isBatchTrade = false, int batchTradeNumber = 1, int totalBatchTrades = 1, bool isHiddenTrade = false, bool isMysteryEgg = false, List<Pictocodes>? lgcode = null, PokeTradeType tradeType = PokeTradeType.Specific, bool ignoreAutoOT = false, bool setEdited = false)
{
lgcode ??= TradeModule<T>.GenerateRandomPictocodes(3);
Expand Down
2 changes: 1 addition & 1 deletion SysBot.Pokemon/Helpers/TradeBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public static class TradeBot

public const string ConfigPath = "config.json";

public const string Version = "v2.8.8";
public const string Version = "v2.8.9";
}
}
Binary file modified SysBot.Pokemon/deps/PKHeX.Core.dll
Binary file not shown.

0 comments on commit 4953988

Please sign in to comment.