summaryrefslogtreecommitdiff
path: root/src/trade.c
diff options
context:
space:
mode:
authorDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-06-03 12:45:59 -0400
committerDeokishisu <6993375+Deokishisu@users.noreply.github.com>2021-06-03 12:45:59 -0400
commit8e4320cc211da9d0ccd14a2b9c220cf85c05aeef (patch)
treedd73557d5f392e337696200898f5e86e56833917 /src/trade.c
parent753b19d0ea79b9637c0eb08b3f1b04b543fe90a0 (diff)
Sync LinkPlayer Struct with pokeemerald
In pokefirered, the `LinkPlayer` struct used an 11-byte name field and puts extra link-related info in the last three bytes. pokeemerald separates these last three bytes into their own fields. This commit replicates how pokeemerald handles those fields. Also renamed `IntlConvertLinkPlayerName` to pokeemerald's `ConvertLinkPlayerName` because I was there and noticed it.
Diffstat (limited to 'src/trade.c')
-rw-r--r--src/trade.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/trade.c b/src/trade.c
index 656cba37b..4893f5724 100644
--- a/src/trade.c
+++ b/src/trade.c
@@ -2623,7 +2623,7 @@ static u32 TestWhetherSelectedMonCanBeTraded(struct Pokemon * party, int partyCo
if ((player->version & 0xFF) != VERSION_RUBY &&
(player->version & 0xFF) != VERSION_SAPPHIRE)
{
- if ((player->name[10] & 0xF) == 0)
+ if ((player->progressFlagsCopy & 0xF) == 0)
{
if (species2[cursorPos] == SPECIES_EGG)
{
@@ -2697,11 +2697,11 @@ s32 Trade_CalcLinkPlayerCompatibilityParam(void)
if (val > 0)
{
- if (gLinkPlayers[GetMultiplayerId()].name[10] & 0xF0)
+ if (gLinkPlayers[GetMultiplayerId()].progressFlagsCopy & 0xF0)
{
if (val == 2)
{
- if (gLinkPlayers[GetMultiplayerId() ^ 1].name[10] & 0xF0)
+ if (gLinkPlayers[GetMultiplayerId() ^ 1].progressFlagsCopy & 0xF0)
{
return 0;
}