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.
This commit is contained in:
+3
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user