mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
Document MON_DATA_10
This commit is contained in:
parent
106a89eace
commit
438c5432aa
@ -14,7 +14,7 @@
|
||||
#define MON_DATA_OT_NAME 7
|
||||
#define MON_DATA_MARKINGS 8
|
||||
#define MON_DATA_CHECKSUM 9
|
||||
#define MON_DATA_10 10
|
||||
#define MON_DATA_ENCRYPT_SEPARATOR 10
|
||||
#define MON_DATA_SPECIES 11
|
||||
#define MON_DATA_HELD_ITEM 12
|
||||
#define MON_DATA_MOVE1 13
|
||||
|
@ -556,7 +556,7 @@ static void CreateShedinja(u16 preEvoSpecies, struct Pokemon* mon)
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_NICKNAME, (gSpeciesNames[gEvolutionTable[preEvoSpecies][1].targetSpecies]));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_HELD_ITEM, (&data));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_MARKINGS, (&data));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_10, (&data));
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], MON_DATA_ENCRYPT_SEPARATOR, (&data));
|
||||
|
||||
for (i = MON_DATA_COOL_RIBBON; i < MON_DATA_COOL_RIBBON + 5; i++)
|
||||
SetMonData(&gPlayerParty[gPlayerPartyCount], i, (&data));
|
||||
|
@ -3642,7 +3642,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
struct PokemonSubstruct2 *substruct2 = NULL;
|
||||
struct PokemonSubstruct3 *substruct3 = NULL;
|
||||
|
||||
if (field > MON_DATA_10)
|
||||
// Any field greater than MON_DATA_ENCRYPT_SEPARATOR is encrypted and must be treated as such
|
||||
if (field > MON_DATA_ENCRYPT_SEPARATOR)
|
||||
{
|
||||
substruct0 = &(GetSubstruct(boxMon, boxMon->personality, 0)->type0);
|
||||
substruct1 = &(GetSubstruct(boxMon, boxMon->personality, 1)->type1);
|
||||
@ -3736,7 +3737,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
case MON_DATA_CHECKSUM:
|
||||
retVal = boxMon->checksum;
|
||||
break;
|
||||
case MON_DATA_10:
|
||||
case MON_DATA_ENCRYPT_SEPARATOR:
|
||||
retVal = boxMon->unknown;
|
||||
break;
|
||||
case MON_DATA_SPECIES:
|
||||
@ -3977,7 +3978,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
break;
|
||||
}
|
||||
|
||||
if (field > MON_DATA_10)
|
||||
if (field > MON_DATA_ENCRYPT_SEPARATOR)
|
||||
EncryptBoxMon(boxMon);
|
||||
|
||||
return retVal;
|
||||
@ -4040,7 +4041,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
struct PokemonSubstruct2 *substruct2 = NULL;
|
||||
struct PokemonSubstruct3 *substruct3 = NULL;
|
||||
|
||||
if (field > MON_DATA_10)
|
||||
if (field > MON_DATA_ENCRYPT_SEPARATOR)
|
||||
{
|
||||
substruct0 = &(GetSubstruct(boxMon, boxMon->personality, 0)->type0);
|
||||
substruct1 = &(GetSubstruct(boxMon, boxMon->personality, 1)->type1);
|
||||
@ -4099,7 +4100,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
case MON_DATA_CHECKSUM:
|
||||
SET16(boxMon->checksum);
|
||||
break;
|
||||
case MON_DATA_10:
|
||||
case MON_DATA_ENCRYPT_SEPARATOR:
|
||||
SET16(boxMon->unknown);
|
||||
break;
|
||||
case MON_DATA_SPECIES:
|
||||
@ -4295,7 +4296,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
break;
|
||||
}
|
||||
|
||||
if (field > MON_DATA_10)
|
||||
if (field > MON_DATA_ENCRYPT_SEPARATOR)
|
||||
{
|
||||
boxMon->checksum = CalculateBoxMonChecksum(boxMon);
|
||||
EncryptBoxMon(boxMon);
|
||||
|
Loading…
x
Reference in New Issue
Block a user