mirror of
https://github.com/mm201/pkmn-classic-framework.git
synced 2026-04-25 08:04:27 -05:00
Fixed Colosseum searches returning 0 results.
This commit is contained in:
parent
bf494e6e1f
commit
f7e06a5b51
|
|
@ -200,12 +200,12 @@ namespace PkmnFoundations.GlobalTerminalService
|
|||
Console.Write("Searching for ");
|
||||
if (species != 0xffff)
|
||||
Console.Write("species {0}, ", species);
|
||||
if (meta != BattleVideoMetagames4.Latest30)
|
||||
Console.Write("{0}, ", meta);
|
||||
Console.Write("{0}", meta);
|
||||
if (country != 0xff)
|
||||
Console.Write("country {0}, ", country);
|
||||
Console.Write(", country {0}", country);
|
||||
if (region != 0xff)
|
||||
Console.Write("region {0}", region);
|
||||
Console.Write(", region {0}", region);
|
||||
Console.WriteLine(".");
|
||||
|
||||
BattleVideoHeader4[] results = DataAbstract.Instance.BattleVideoSearch4(species, meta, country, region, 30);
|
||||
response.Write(new byte[] { 0x00, 0x00 }, 0, 2); // result code (0 for OK)
|
||||
|
|
|
|||
|
|
@ -967,7 +967,22 @@ namespace PkmnFoundations.Data
|
|||
hasSearch = true;
|
||||
}
|
||||
|
||||
if (metagame != BattleVideoMetagames4.Latest30)
|
||||
if (metagame == BattleVideoMetagames4.SearchColosseumSingleNoRestrictions)
|
||||
metagame = BattleVideoMetagames4.ColosseumSingleNoRestrictions;
|
||||
if (metagame == BattleVideoMetagames4.SearchColosseumDoubleNoRestrictions)
|
||||
metagame = BattleVideoMetagames4.ColosseumDoubleNoRestrictions;
|
||||
|
||||
if (metagame == BattleVideoMetagames4.SearchColosseumSingleCupMatch)
|
||||
{
|
||||
where += (hasSearch ? " AND " : " WHERE ") + "Metagame BETWEEN 1 AND 6";
|
||||
hasSearch = true;
|
||||
}
|
||||
else if (metagame == BattleVideoMetagames4.SearchColosseumDoubleCupMatch)
|
||||
{
|
||||
where += (hasSearch ? " AND " : " WHERE ") + "Metagame BETWEEN 8 AND 13";
|
||||
hasSearch = true;
|
||||
}
|
||||
else if (metagame != BattleVideoMetagames4.SearchLatest30)
|
||||
{
|
||||
where += (hasSearch ? " AND " : " WHERE ") + "Metagame = @metagame";
|
||||
_params.Add(new MySqlParameter("@metagame", (byte)metagame));
|
||||
|
|
|
|||
|
|
@ -253,12 +253,22 @@ namespace PkmnFoundations.Structures
|
|||
|
||||
public enum BattleVideoMetagames4 : byte
|
||||
{
|
||||
Latest30 = 0xff,
|
||||
ColosseumSingleNoRestrictions = 0x00,
|
||||
ColosseumSingleStandardCup = 0x01,
|
||||
ColosseumSingleFancyCup = 0x02,
|
||||
ColosseumSingleLittleCup = 0x03,
|
||||
ColosseumSingleLightCup = 0x04,
|
||||
ColosseumSingleDoubleCup = 0x05,
|
||||
ColosseumSingleOtherCup = 0x06,
|
||||
|
||||
ColosseumDoubleNoRestrictions = 0x07,
|
||||
ColosseumDoubleStandardCup = 0x08,
|
||||
ColosseumDoubleFancyCup = 0x09,
|
||||
ColosseumDoubleLittleCup = 0x0a,
|
||||
ColosseumDoubleLightCup = 0x0b,
|
||||
ColosseumDoubleDoubleCup = 0x0c,
|
||||
ColosseumDoubleOtherCup = 0x0d,
|
||||
|
||||
ColosseumSingleNoRestrictions = 0xfa,
|
||||
ColosseumSingleCupMatch = 0xfb,
|
||||
ColosseumDoubleNoRestrictions = 0xfc,
|
||||
ColosseumDoubleCupMatch = 0xfd,
|
||||
ColosseumMulti = 0x0e,
|
||||
|
||||
BattleTowerSingle = 0x0f,
|
||||
|
|
@ -284,5 +294,11 @@ namespace PkmnFoundations.Structures
|
|||
BattleArcadeSingle = 0x1e,
|
||||
BattleArcadeDouble = 0x1f,
|
||||
BattleArcadeMulti = 0x20,
|
||||
|
||||
SearchColosseumSingleNoRestrictions = 0xfa,
|
||||
SearchColosseumSingleCupMatch = 0xfb,
|
||||
SearchColosseumDoubleNoRestrictions = 0xfc,
|
||||
SearchColosseumDoubleCupMatch = 0xfd,
|
||||
SearchLatest30 = 0xff,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user