diff options
author | GriffinR <griffin.richards@comcast.net> | 2019-10-04 23:31:25 -0400 |
---|---|---|
committer | GriffinR <griffin.richards@comcast.net> | 2019-10-04 23:31:25 -0400 |
commit | dadb1cb9f14a19cf0e483d4b15122b9d9cfb4baa (patch) | |
tree | b482106e457c6c3c4f009a4f91dbb809b7641b96 /src/trade.c | |
parent | 6b556900f81b8f99920012f58060e4eccec70aed (diff) |
More trade/union room doc, incidental party_menu doc
Diffstat (limited to 'src/trade.c')
-rw-r--r-- | src/trade.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/trade.c b/src/trade.c index e5752bab1..33b09436a 100644 --- a/src/trade.c +++ b/src/trade.c @@ -2558,31 +2558,24 @@ int GetUnionRoomTradeMessageId(struct UnkLinkRfuStruct_02022B14Substruct a0, str return UR_TRADE_MSG_NONE; } -int sub_807A8D0(struct UnkLinkRfuStruct_02022B14Substruct a0, u16 species2, u16 species, u8 isObedientBitSet) +int CanRegisterMonForTradingBoard(struct UnkLinkRfuStruct_02022B14Substruct a0, u16 species2, u16 species, u8 isObedientBitSet) { - u8 unk = a0.hasNationalDex; + bool8 hasNationalDex = a0.hasNationalDex; if (IsDeoxysOrMewUntradable(species, isObedientBitSet)) - { - return 1; - } + return CANT_REGISTER_MON; - if (unk) - { - return 0; - } + if (hasNationalDex) + return CAN_REGISTER_MON; + // Eggs can only be traded if the player has the National Dex if (species2 == SPECIES_EGG) - { - return 2; - } + return CANT_REGISTER_EGG; if (IsSpeciesInHoennDex(species2)) - { - return 0; - } + return CAN_REGISTER_MON; - return 1; + return CANT_REGISTER_MON; } // r6/r7 flip. Ugh. |