Renamed MON_DATA_SPECIES2 to MON_DATA_SPECIES_OR_EGG for clarification

This commit is contained in:
Eduardo Quezada 2023-02-24 07:53:02 -03:00
parent f209a5a66c
commit 079ca8ab29
28 changed files with 128 additions and 128 deletions

View File

@ -70,7 +70,7 @@ enum {
MON_DATA_SPATK,
MON_DATA_SPDEF,
MON_DATA_MAIL,
MON_DATA_SPECIES2,
MON_DATA_SPECIES_OR_EGG,
MON_DATA_IVS,
MON_DATA_CHAMPION_RIBBON,
MON_DATA_WINNING_RIBBON,

View File

@ -1329,8 +1329,8 @@ static void Cmd_count_usable_party_mons(void)
{
if (i != battlerOnField1 && i != battlerOnField2
&& GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
{
AI_THINKING_STRUCT->funcResult++;
}

View File

@ -86,9 +86,9 @@ static bool8 ShouldSwitchIfWonderGuard(void)
{
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[gActiveBattler])
continue;
@ -184,9 +184,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[battlerIn1])
continue;
@ -382,9 +382,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u8 flags, u8 moduloPercent)
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[battlerIn1])
continue;
@ -488,9 +488,9 @@ static bool8 ShouldSwitch(void)
{
if (GetMonData(&party[i], MON_DATA_HP) == 0)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
if (i == gBattlerPartyIndexes[battlerIn1])
continue;
@ -823,8 +823,8 @@ static bool8 ShouldUseItem(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
{
validMons++;
}

View File

@ -592,8 +592,8 @@ static void SetBattlePartyIds(void)
if (GET_BATTLER_SIDE2(i) == B_SIDE_PLAYER)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG))
{
gBattlerPartyIndexes[i] = j;
@ -603,8 +603,8 @@ static void SetBattlePartyIds(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG))
{
gBattlerPartyIndexes[i] = j;
@ -618,7 +618,7 @@ static void SetBattlePartyIds(void)
{
if (GetMonData(&gPlayerParty[j], MON_DATA_HP) != 0
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES) != SPECIES_NONE // Probably a typo by Game Freak. The rest use SPECIES2.
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gPlayerParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gPlayerParty[j], MON_DATA_IS_EGG)
&& gBattlerPartyIndexes[i - 2] != j)
{
@ -629,8 +629,8 @@ static void SetBattlePartyIds(void)
else
{
if (GetMonData(&gEnemyParty[j], MON_DATA_HP) != 0
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&gEnemyParty[j], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&gEnemyParty[j], MON_DATA_IS_EGG)
&& gBattlerPartyIndexes[i - 2] != j)
{

View File

@ -712,33 +712,33 @@ static void CB2_InitBattleInternal(void)
gBattleCommunication[MULTIUSE_STATE] = 0;
}
#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \
for ((i) = 0; (i) < PARTY_SIZE; (i)++) \
{ \
u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES2); \
u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \
u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \
\
if (species == SPECIES_NONE) \
continue; \
\
/* Is healthy mon? */ \
if (species != SPECIES_EGG && hp != 0 && status == 0) \
(flags) |= 1 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is Egg or statused? */ \
if (hp != 0 && (species == SPECIES_EGG || status != 0)) \
(flags) |= 2 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is fainted? */ \
if (species != SPECIES_EGG && hp == 0) \
(flags) |= 3 << (i) * 2; \
#define BUFFER_PARTY_VS_SCREEN_STATUS(party, flags, i) \
for ((i) = 0; (i) < PARTY_SIZE; (i)++) \
{ \
u16 species = GetMonData(&(party)[(i)], MON_DATA_SPECIES_OR_EGG); \
u16 hp = GetMonData(&(party)[(i)], MON_DATA_HP); \
u32 status = GetMonData(&(party)[(i)], MON_DATA_STATUS); \
\
if (species == SPECIES_NONE) \
continue; \
\
/* Is healthy mon? */ \
if (species != SPECIES_EGG && hp != 0 && status == 0) \
(flags) |= 1 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is Egg or statused? */ \
if (hp != 0 && (species == SPECIES_EGG || status != 0)) \
(flags) |= 2 << (i) * 2; \
\
if (species == SPECIES_NONE) /* Redundant */ \
continue; \
\
/* Is fainted? */ \
if (species != SPECIES_EGG && hp == 0) \
(flags) |= 3 << (i) * 2; \
}
// For Vs Screen at link battle start
@ -3502,8 +3502,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gEnemyParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@ -3520,8 +3520,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;
@ -3546,8 +3546,8 @@ static void BattleIntroDrawPartySummaryScreens(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatus[i].hp = HP_EMPTY_SLOT;
hpStatus[i].status = 0;

View File

@ -5682,8 +5682,8 @@ static void Cmd_drawpartystatussummary(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_NONE
|| GetMonData(&party[i], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE
|| GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
{
hpStatuses[i].hp = 0xFFFF;
hpStatuses[i].status = 0;
@ -8331,7 +8331,7 @@ static void Cmd_healpartystatus(void)
for (i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG);
u8 abilityNum = GetMonData(&party[i], MON_DATA_ABILITY_NUM);
if (species != SPECIES_NONE && species != SPECIES_EGG)
@ -8877,8 +8877,8 @@ static void Cmd_trydobeatup(void)
for (;gBattleCommunication[0] < PARTY_SIZE; gBattleCommunication[0]++)
{
if (GetMonData(&party[gBattleCommunication[0]], MON_DATA_HP)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2)
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[gBattleCommunication[0]], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& !GetMonData(&party[gBattleCommunication[0]], MON_DATA_STATUS))
break;
}
@ -9396,9 +9396,9 @@ static void Cmd_assistattackselect(void)
{
if (monId == gBattlerPartyIndexes[gBattlerAttacker])
continue;
if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_NONE)
if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
continue;
if (GetMonData(&party[monId], MON_DATA_SPECIES2) == SPECIES_EGG)
if (GetMonData(&party[monId], MON_DATA_SPECIES_OR_EGG) == SPECIES_EGG)
continue;
for (moveId = 0; moveId < MAX_MON_MOVES; moveId++)
@ -9564,7 +9564,7 @@ static void Cmd_pickup(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))
@ -9587,7 +9587,7 @@ static void Cmd_pickup(void)
{
for (i = 0; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
heldItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
if (GetMonData(&gPlayerParty[i], MON_DATA_ABILITY_NUM))

View File

@ -724,7 +724,7 @@ static u16 GetSumOfPlayerPartyLevel(u8 numMons)
for (i = 0; i < PARTY_SIZE; i++)
{
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_EGG && species != SPECIES_NONE && GetMonData(&gPlayerParty[i], MON_DATA_HP) != 0)
{

View File

@ -3271,7 +3271,7 @@ s32 GetHighestLevelInPlayerParty(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES, NULL)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG)
{
s32 level = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL, NULL);
if (level > highestLevel)

View File

@ -2278,8 +2278,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE);
@ -2318,8 +2318,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId * MULTI_PARTY_SIZE; i < playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId * MULTI_PARTY_SIZE + MULTI_PARTY_SIZE);
@ -2336,8 +2336,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = playerId; i < playerId + MULTI_PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG)
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG)
break;
}
return (i == playerId + 3);
@ -2365,8 +2365,8 @@ bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&party[i], MON_DATA_HP) != 0
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES2) != SPECIES_EGG
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_NONE
&& GetMonData(&party[i], MON_DATA_SPECIES_OR_EGG) != SPECIES_EGG
&& i != partyIdBattlerOn1 && i != partyIdBattlerOn2
&& i != *(gBattleStruct->monToSwitchIntoId + flankId) && i != playerId[gBattleStruct->monToSwitchIntoId])
break;

View File

@ -93,11 +93,11 @@ bool8 CheckRelicanthWailord(void)
{
// Emerald change: why did they flip it?
// First comes Wailord
if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2, 0) == SPECIES_WAILORD)
if (GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG, 0) == SPECIES_WAILORD)
{
CalculatePlayerPartyCount();
// Last comes Relicanth
if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES2, 0) == SPECIES_RELICANTH)
if (GetMonData(&gPlayerParty[gPlayerPartyCount - 1], MON_DATA_SPECIES_OR_EGG, 0) == SPECIES_RELICANTH)
return TRUE;
}
return FALSE;

View File

@ -2906,7 +2906,7 @@ void IsDodrioInParty(void)
for (i = 0; i < PARTY_SIZE; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2) == SPECIES_DODRIO)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG) == SPECIES_DODRIO)
{
gSpecialVar_Result = TRUE;
return;

View File

@ -19,7 +19,7 @@
static bool32 IsMonValidSpecies(struct Pokemon *pokemon)
{
u16 species = GetMonData(pokemon, MON_DATA_SPECIES2);
u16 species = GetMonData(pokemon, MON_DATA_SPECIES_OR_EGG);
if (species == SPECIES_NONE || species == SPECIES_EGG)
return FALSE;

View File

@ -1442,7 +1442,7 @@ bool8 IsStarterInParty(void)
u8 partyCount = CalculatePlayerPartyCount();
for (i = 0; i < partyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) == starter)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) == starter)
return TRUE;
}
return FALSE;
@ -1535,8 +1535,8 @@ u8 GetLeadMonIndex(void)
u8 partyCount = CalculatePlayerPartyCount();
for (i = 0; i < partyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_NONE)
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE)
return i;
}
return 0;
@ -1544,7 +1544,7 @@ u8 GetLeadMonIndex(void)
u16 ScriptGetPartyMonSpecies(void)
{
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES2, NULL);
return GetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_SPECIES_OR_EGG, NULL);
}
// Removed for Emerald

View File

@ -2044,7 +2044,7 @@ static void CheckPartyIneligibility(void)
numEligibleMons = 0;
do
{
u16 species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES_OR_EGG);
u16 heldItem = GetMonData(&gPlayerParty[monId], MON_DATA_HELD_ITEM);
u8 level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
u16 hp = GetMonData(&gPlayerParty[monId], MON_DATA_HP);

View File

@ -445,7 +445,7 @@ static void Task_Hof_InitMonData(u8 taskId)
u8 nick[POKEMON_NAME_LENGTH + 2];
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES))
{
sHofMonPtr->mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
sHofMonPtr->mon[i].species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
sHofMonPtr->mon[i].tid = GetMonData(&gPlayerParty[i], MON_DATA_OT_ID);
sHofMonPtr->mon[i].personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
sHofMonPtr->mon[i].lvl = GetMonData(&gPlayerParty[i], MON_DATA_LEVEL);

View File

@ -1072,7 +1072,7 @@ void GetConditionMenuMonGfx(void *tilesDst, void *palDst, u16 boxId, u16 monId,
if (partyId != numMons)
{
u16 species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL);
u16 species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES_OR_EGG, NULL);
u32 trainerId = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL);
u32 personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);

View File

@ -319,7 +319,7 @@ bool8 MEScrCmd_givepokemon(struct ScriptContext *ctx)
void *mailPtr = (void *)(data + sizeof(struct Pokemon));
pokemon = *(struct Pokemon *)pokemonPtr;
species = GetMonData(&pokemon, MON_DATA_SPECIES2);
species = GetMonData(&pokemon, MON_DATA_SPECIES_OR_EGG);
if (species == SPECIES_EGG)
StringCopyN(gStringVar1, gText_EggNickname, POKEMON_NAME_LENGTH + 1);

View File

@ -3593,7 +3593,7 @@ static void CursorCb_Store(u8 taskId)
// Register mon for the Trading Board in Union Room
static void CursorCb_Register(u8 taskId)
{
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL);
@ -3620,7 +3620,7 @@ static void CursorCb_Register(u8 taskId)
static void CursorCb_Trade1(u8 taskId)
{
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES2);
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL);
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal);
@ -3934,7 +3934,7 @@ static void CreatePartyMonIconSprite(struct Pokemon *mon, struct PartyMenuBox *m
if (IsMultiBattle() == TRUE && gMain.inBattle)
handleDeoxys = (sMultiBattlePartnersPartyMask[slot] ^ handleDeoxys) ? TRUE : FALSE;
species2 = GetMonData(mon, MON_DATA_SPECIES2);
species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
CreatePartyMonIconSpriteParameterized(species2, GetMonData(mon, MON_DATA_PERSONALITY), menuBox, 1, handleDeoxys);
UpdatePartyMonHPBar(menuBox->monSpriteId, mon);
}

View File

@ -725,14 +725,14 @@ static bool8 LoadMonAndSceneGfx(struct Pokemon *mon)
{
case 0:
// Load mon gfx
species = GetMonData(mon, MON_DATA_SPECIES2);
species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
HandleLoadSpecialPokePic_2(&gMonFrontPicTable[species], gMonSpritesGfxPtr->sprites.ptr[B_POSITION_OPPONENT_LEFT], species, personality);
sPokeblockFeed->loadGfxState++;
break;
case 1:
// Load mon palette
species = GetMonData(mon, MON_DATA_SPECIES2);
species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
trainerId = GetMonData(mon, MON_DATA_OT_ID);
palette = GetMonSpritePalStructFromOtIdPersonality(species, trainerId, personality);
@ -907,7 +907,7 @@ static void Task_FadeOutPokeblockFeed(u8 taskId)
static u8 CreateMonSprite(struct Pokemon *mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2);
u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
u8 spriteId = CreateSprite(&gMultiuseSpriteTemplate, MON_X, MON_Y, 2);
sPokeblockFeed->species = species;

View File

@ -3960,7 +3960,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
case MON_DATA_EVENT_LEGAL:
retVal = substruct3->eventLegal;
break;
case MON_DATA_SPECIES2:
case MON_DATA_SPECIES_OR_EGG:
retVal = substruct0->species;
if (substruct0->species && (substruct3->isEgg || boxMon->isBadEgg))
retVal = SPECIES_EGG;
@ -4087,7 +4087,7 @@ void SetMonData(struct Pokemon *mon, s32 field, const void *dataArg)
case MON_DATA_MAIL:
SET8(mon->mail);
break;
case MON_DATA_SPECIES2:
case MON_DATA_SPECIES_OR_EGG:
break;
default:
SetBoxMonData(&mon->box, field, data);
@ -4464,9 +4464,9 @@ u8 GetMonsStateToDoubles(void)
for (i = 0; i < gPlayerPartyCount; i++)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_EGG
if (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_EGG
&& GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL) != SPECIES_NONE)
&& GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL) != SPECIES_NONE)
aliveCount++;
}
@ -4480,7 +4480,7 @@ u8 GetMonsStateToDoubles_2(void)
for (i = 0; i < PARTY_SIZE; i++)
{
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2, NULL);
u32 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG, NULL);
if (species != SPECIES_EGG && species != SPECIES_NONE
&& GetMonData(&gPlayerParty[i], MON_DATA_HP, NULL) != 0)
aliveCount++;
@ -5872,7 +5872,7 @@ void AdjustFriendship(struct Pokemon *mon, u8 event)
if (ShouldSkipFriendshipChange())
return;
species = GetMonData(mon, MON_DATA_SPECIES2, 0);
species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0);
heldItem = GetMonData(mon, MON_DATA_HELD_ITEM, 0);
if (heldItem == ITEM_ENIGMA_BERRY)
@ -6183,7 +6183,7 @@ bool8 TryIncrementMonLevel(struct Pokemon *mon)
u32 CanMonLearnTMHM(struct Pokemon *mon, u8 tm)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0);
if (species == SPECIES_EGG)
{
return 0;
@ -6273,7 +6273,7 @@ u8 GetNumberOfRelearnableMoves(struct Pokemon *mon)
u16 learnedMoves[MAX_MON_MOVES];
u16 moves[MAX_LEVEL_UP_MOVES];
u8 numMoves = 0;
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0);
u8 level = GetMonData(mon, MON_DATA_LEVEL, 0);
int i, j, k;
@ -6442,7 +6442,7 @@ static void Task_PlayMapChosenOrBattleBGM(u8 taskId)
const u32 *GetMonFrontSpritePal(struct Pokemon *mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0);
u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0);
u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0);
return GetMonSpritePalFromSpeciesAndPersonality(species, otId, personality);
@ -6464,7 +6464,7 @@ const u32 *GetMonSpritePalFromSpeciesAndPersonality(u16 species, u32 otId, u32 p
const struct CompressedSpritePalette *GetMonSpritePalStruct(struct Pokemon *mon)
{
u16 species = GetMonData(mon, MON_DATA_SPECIES2, 0);
u16 species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG, 0);
u32 otId = GetMonData(mon, MON_DATA_OT_ID, 0);
u32 personality = GetMonData(mon, MON_DATA_PERSONALITY, 0);
return GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);

View File

@ -2354,7 +2354,7 @@ void IsPokemonJumpSpeciesInParty(void)
{
if (GetMonData(&gPlayerParty[i], MON_DATA_SANITY_HAS_SPECIES))
{
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (IsSpeciesAllowedInPokemonJump(species))
{
gSpecialVar_Result = TRUE;

View File

@ -4430,7 +4430,7 @@ static u8 GetMonIconPriorityByCursorPos(void)
static void CreateMovingMonIcon(void)
{
u32 personality = GetMonData(&sStorage->movingMon, MON_DATA_PERSONALITY);
u16 species = GetMonData(&sStorage->movingMon, MON_DATA_SPECIES2);
u16 species = GetMonData(&sStorage->movingMon, MON_DATA_SPECIES_OR_EGG);
u8 priority = GetMonIconPriorityByCursorPos();
sStorage->movingMonSprite = CreateMonIconSprite(species, personality, 0, 0, priority, 7);
@ -4452,7 +4452,7 @@ static void InitBoxMonSprites(u8 boxId)
{
for (j = 0; j < IN_BOX_COLUMNS; j++)
{
species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2);
species = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{
personality = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY);
@ -4480,7 +4480,7 @@ static void InitBoxMonSprites(u8 boxId)
static void CreateBoxMonIconAtPos(u8 boxPosition)
{
u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES2);
u16 species = GetCurrentBoxMonData(boxPosition, MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{
@ -4714,7 +4714,7 @@ static void GetIncomingBoxMonData(u8 boxId)
{
for (j = 0; j < IN_BOX_COLUMNS; j++)
{
sStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES2);
sStorage->boxSpecies[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_SPECIES_OR_EGG);
if (sStorage->boxSpecies[boxPosition] != SPECIES_NONE)
sStorage->boxPersonalities[boxPosition] = GetBoxMonDataAt(boxId, boxPosition, MON_DATA_PERSONALITY);
boxPosition++;
@ -4742,14 +4742,14 @@ static void SetBoxMonIconObjMode(u8 boxPosition, u8 objMode)
static void CreatePartyMonsSprites(bool8 visible)
{
u16 i, count;
u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[0], MON_DATA_SPECIES_OR_EGG);
u32 personality = GetMonData(&gPlayerParty[0], MON_DATA_PERSONALITY);
sStorage->partySprites[0] = CreateMonIconSprite(species, personality, 104, 64, 1, 12);
count = 1;
for (i = 1; i < PARTY_SIZE; i++)
{
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{
personality = GetMonData(&gPlayerParty[i], MON_DATA_PERSONALITY);
@ -6867,7 +6867,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode)
{
struct Pokemon *mon = (struct Pokemon *)pokemon;
sStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES2);
sStorage->displayMonSpecies = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
if (sStorage->displayMonSpecies != SPECIES_NONE)
{
sanityIsBadEgg = GetMonData(mon, MON_DATA_SANITY_IS_BAD_EGG);
@ -6890,7 +6890,7 @@ static void SetDisplayMonData(void *pokemon, u8 mode)
{
struct BoxPokemon *boxMon = (struct BoxPokemon *)pokemon;
sStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES2);
sStorage->displayMonSpecies = GetBoxMonData(pokemon, MON_DATA_SPECIES_OR_EGG);
if (sStorage->displayMonSpecies != SPECIES_NONE)
{
u32 otId = GetBoxMonData(boxMon, MON_DATA_OT_ID);
@ -8438,7 +8438,7 @@ static void MultiMove_DeselectRow(u8 row, u8 minColumn, u8 maxColumn)
static void MultiMove_SetIconToBg(u8 x, u8 y)
{
u8 position = x + (IN_BOX_COLUMNS * y);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG);
u32 personality = GetCurrentBoxMonData(position, MON_DATA_PERSONALITY);
if (species != SPECIES_NONE)
@ -8463,7 +8463,7 @@ static void MultiMove_SetIconToBg(u8 x, u8 y)
static void MultiMove_ClearIconFromBg(u8 x, u8 y)
{
u8 position = x + (IN_BOX_COLUMNS * y);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES2);
u16 species = GetCurrentBoxMonData(position, MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE)
{

View File

@ -1384,7 +1384,7 @@ static bool8 ExtractMonDataToSummaryStruct(struct Pokemon *mon)
{
case 0:
sum->species = GetMonData(mon, MON_DATA_SPECIES);
sum->species2 = GetMonData(mon, MON_DATA_SPECIES2);
sum->species2 = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
sum->exp = GetMonData(mon, MON_DATA_EXP);
sum->level = GetMonData(mon, MON_DATA_LEVEL);
sum->abilityNum = GetMonData(mon, MON_DATA_ABILITY_NUM);

View File

@ -531,7 +531,7 @@ static void ConditionGraphDrawMonPic(s16 listId, u8 loadId)
boxId = monListPtr->monData[listId].boxId;
monId = monListPtr->monData[listId].monId;
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL);
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES_OR_EGG, NULL);
tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL);
personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);
LoadSpecialPokePic(&gMonFrontPicTable[species], menu->monPicGfx[loadId], species, personality, TRUE);

View File

@ -1144,7 +1144,7 @@ static void InitRouletteTableData(void)
for (i = 0; i < PARTY_SIZE; i++)
{
switch (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2))
switch (GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG))
{
case SPECIES_SHROOMISH:
sRoulette->partySpeciesFlags |= HAS_SHROOMISH;

View File

@ -118,7 +118,7 @@ static bool8 CheckPartyMonHasHeldItem(u16 item)
for(i = 0; i < PARTY_SIZE; i++)
{
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES2);
u16 species = GetMonData(&gPlayerParty[i], MON_DATA_SPECIES_OR_EGG);
if (species != SPECIES_NONE && species != SPECIES_EGG && GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM) == item)
return TRUE;
}

View File

@ -564,7 +564,7 @@ static void CB2_CreateTradeMenu(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++)
{
struct Pokemon *mon = &gPlayerParty[i];
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2),
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG),
SpriteCB_MonIcon,
(sTradeMonSpriteCoords[i][0] * 8) + 14,
(sTradeMonSpriteCoords[i][1] * 8) - 12,
@ -576,7 +576,7 @@ static void CB2_CreateTradeMenu(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++)
{
struct Pokemon *mon = &gEnemyParty[i];
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL),
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL),
SpriteCB_MonIcon,
(sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14,
(sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12,
@ -755,7 +755,7 @@ static void CB2_ReturnToTradeMenu(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PLAYER]; i++)
{
struct Pokemon *mon = &gPlayerParty[i];
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL),
sTradeMenu->partySpriteIds[TRADE_PLAYER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL),
SpriteCB_MonIcon,
(sTradeMonSpriteCoords[i][0] * 8) + 14,
(sTradeMonSpriteCoords[i][1] * 8) - 12,
@ -767,7 +767,7 @@ static void CB2_ReturnToTradeMenu(void)
for (i = 0; i < sTradeMenu->partyCounts[TRADE_PARTNER]; i++)
{
struct Pokemon *mon = &gEnemyParty[i];
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES2, NULL),
sTradeMenu->partySpriteIds[TRADE_PARTNER][i] = CreateMonIcon(GetMonData(mon, MON_DATA_SPECIES_OR_EGG, NULL),
SpriteCB_MonIcon,
(sTradeMonSpriteCoords[i + PARTY_SIZE][0] * 8) + 14,
(sTradeMonSpriteCoords[i + PARTY_SIZE][1] * 8) - 12,
@ -2395,7 +2395,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int
for (i = 0; i < partyCount; i++)
{
species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES2);
species2[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES_OR_EGG);
species[i] = GetMonData(&playerParty[i], MON_DATA_SPECIES);
}
@ -2593,7 +2593,7 @@ int CanSpinTradeMon(struct Pokemon *mon, u16 monIdx)
// Make Eggs not count for numMonsLeft
for (i = 0; i < gPlayerPartyCount; i++)
{
speciesArray[i] = GetMonData(&mon[i], MON_DATA_SPECIES2);
speciesArray[i] = GetMonData(&mon[i], MON_DATA_SPECIES_OR_EGG);
if (speciesArray[i] == SPECIES_EGG)
speciesArray[i] = SPECIES_NONE;
}
@ -2803,7 +2803,7 @@ static void LoadTradeMonPic(u8 whichParty, u8 state)
switch (state)
{
case 0:
species = GetMonData(mon, MON_DATA_SPECIES2);
species = GetMonData(mon, MON_DATA_SPECIES_OR_EGG);
personality = GetMonData(mon, MON_DATA_PERSONALITY);
if (whichParty == TRADE_PLAYER)

View File

@ -4176,7 +4176,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;
}
@ -4186,7 +4186,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 (gSpeciesInfo[species].types[0] == type || gSpeciesInfo[species].types[1] == type)
return UR_TRADE_MATCH;
}
@ -4319,7 +4319,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++;
}
@ -4348,7 +4348,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)
@ -4359,7 +4359,7 @@ static bool32 RegisterTradeMonAndGetIsEgg(u32 monId, struct UnionRoomTrade *trad
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);
}
@ -4390,7 +4390,7 @@ static u32 GetPartyPositionOfRegisteredMon(struct UnionRoomTrade *trade, u8 mult
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;