private void ReplyWithZ3Results(PokeTradeDetail <PK8> detail, PK8 result) { detail.SendNotification(this, "Calculating your seed(s)..."); if (result.IsShiny) { Connection.Log("The Pokemon is already shiny!"); // Do not bother checking for next shiny frame detail.SendNotification(this, "This Pokemon is already shiny! Raid seed calculation was not done."); detail.TradeFinished(this, result); return; } var ec = result.EncryptionConstant; var pid = result.PID; var IVs = result.IVs.Length == 0 ? GetBlankIVTemplate() : PKX.ReorderSpeedLast((int[])result.IVs.Clone()); if (Hub.Config.ShowAllZ3Results) { var matches = Z3Search.GetAllSeeds(ec, pid, IVs); foreach (var match in matches) { var msg = match.ToString(); detail.SendNotification(this, msg); } } else { var match = Z3Search.GetFirstSeed(ec, pid, IVs); var msg = match.ToString(); detail.SendNotification(this, msg); } }
public void CalculateAndNotify(T pkm, PokeTradeDetail <T> detail, SeedCheckSettings settings, PokeTradeBot bot) { var ec = pkm.EncryptionConstant; var pid = pkm.PID; var IVs = pkm.IVs.Length == 0 ? GetBlankIVTemplate() : PKX.ReorderSpeedLast((int[])pkm.IVs.Clone()); var name = SpeciesName.GetSpeciesName(pkm.Species, 2); var ot = pkm.OT_Name; var abilityNo = pkm.AbilityNumber; var ability = pkm.Ability; var gender = pkm.GetSaneGender(); var nature = pkm.Nature; if (settings.ShowAllZ3Results) { var matches = Z3Search.GetAllSeeds(ec, pid, IVs, name, ot, gender, abilityNo, ability, nature); foreach (var match in matches) { var lump = new PokeTradeSummary("Calculated Seed:", match); detail.SendNotification(bot, lump); } } else { var match = Z3Search.GetFirstSeed(ec, pid, IVs, name, ot, gender, abilityNo, ability, nature); var lump = new PokeTradeSummary("Calculated Seed:", match); detail.SendNotification(bot, lump); } }
public void CalculateAndNotify(T pkm, PokeTradeDetail <T> detail, SeedCheckSettings settings, PokeTradeBot bot) { var ec = pkm.EncryptionConstant; var pid = pkm.PID; var IVs = pkm.IVs.Length == 0 ? GetBlankIVTemplate() : PKX.ReorderSpeedLast((int[])pkm.IVs.Clone()); if (settings.ShowAllZ3Results) { var matches = Z3Search.GetAllSeeds(ec, pid, IVs); foreach (var match in matches) { var lump = new PokeTradeSummary("Calculated Seed:", match); detail.SendNotification(bot, lump); } } else { var match = Z3Search.GetFirstSeed(ec, pid, IVs); var lump = new PokeTradeSummary("Calculated Seed:", match); detail.SendNotification(bot, lump); } }
private void ReplyWithZ3Results(PokeTradeDetail <PK8> detail, PK8 result) { detail.SendNotification(this, "Calculating your seed(s)..."); if (result.IsShiny) { Connection.Log("The Pokémon is already shiny!"); // Do not bother checking for next shiny frame detail.SendNotification(this, "This Pokémon is already shiny! Raid seed calculation was not done."); if (DumpSetting.Dump && !string.IsNullOrEmpty(DumpSetting.DumpFolder)) { DumpPokemon(DumpSetting.DumpFolder, "seed", result); } detail.TradeFinished(this, result); return; } var ec = result.EncryptionConstant; var pid = result.PID; var IVs = result.IVs.Length == 0 ? GetBlankIVTemplate() : PKX.ReorderSpeedLast((int[])result.IVs.Clone()); if (Hub.Config.Dudu.ShowAllZ3Results) { var matches = Z3Search.GetAllSeeds(ec, pid, IVs); foreach (var match in matches) { var lump = new PokeTradeSummary("Calculated Seed:", match); detail.SendNotification(this, lump); } } else { var match = Z3Search.GetFirstSeed(ec, pid, IVs); var lump = new PokeTradeSummary("Calculated Seed:", match); detail.SendNotification(this, lump); } Connection.Log("Seed calculation completed."); }