Sync pokemon.c
This commit is contained in:
+7
-7
@@ -4002,7 +4002,7 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species)
|
||||
{
|
||||
for (i = 0; i < gPlayerPartyCount; i++)
|
||||
{
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
|
||||
if (species == SPECIES_EGG)
|
||||
return UR_TRADE_MATCH;
|
||||
}
|
||||
@@ -4012,8 +4012,8 @@ static s32 IsRequestedTradeInPlayerParty(u32 type, u32 species)
|
||||
{
|
||||
for (i = 0; i < gPlayerPartyCount; i++)
|
||||
{
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
if (gBaseStats[species].type1 == type || gBaseStats[species].type2 == type)
|
||||
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
|
||||
if (gSpeciesInfo[species].types[0] == type || gSpeciesInfo[species].types[1] == type)
|
||||
return UR_TRADE_MATCH;
|
||||
}
|
||||
return UR_TRADE_NOTYPE;
|
||||
@@ -4145,7 +4145,7 @@ static bool32 HasAtLeastTwoMonsOfLevel30OrLower(void)
|
||||
for (i = 0; i < gPlayerPartyCount; i++)
|
||||
{
|
||||
if (GetMonData(&gPlayerParty[i], MON_DATA_LEVEL) <= UNION_ROOM_MAX_LEVEL
|
||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) != SPECIES_EGG)
|
||||
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -4174,7 +4174,7 @@ void Script_ResetUnionRoomTrade(void)
|
||||
|
||||
static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * trade)
|
||||
{
|
||||
trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2);
|
||||
trade->playerSpecies = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG);
|
||||
trade->playerLevel = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
trade->playerPersonality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY);
|
||||
if (trade->playerSpecies == SPECIES_EGG)
|
||||
@@ -4185,7 +4185,7 @@ static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade * tra
|
||||
|
||||
static void RegisterTradeMon(u32 monId, struct UnionRoomTrade * trade)
|
||||
{
|
||||
trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2);
|
||||
trade->species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG);
|
||||
trade->level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
trade->personality = GetMonData(&gPlayerParty[monId], MON_DATA_PERSONALITY);
|
||||
}
|
||||
@@ -4217,7 +4217,7 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade * trade, u8 mul
|
||||
cur_personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
|
||||
if (cur_personality != personality)
|
||||
continue;
|
||||
cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
|
||||
cur_species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
|
||||
if (cur_species != species)
|
||||
continue;
|
||||
response = i;
|
||||
|
||||
Reference in New Issue
Block a user