Skip to content

Commit

Permalink
Merge pull request #192 from BuffelSaft/purge-mail
Browse files Browse the repository at this point in the history
Dummy out some mail functions
  • Loading branch information
BuffelSaft authored Sep 3, 2021
2 parents 7b04ef0 + 5548bf8 commit 8aa18f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
16 changes: 0 additions & 16 deletions src/mail_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,22 +161,6 @@ u8 TakeMailFromMon2(struct Pokemon *mon)
u8 newHeldItem[2];
u8 newMailId;

newHeldItem[0] = ITEM_NONE;
newHeldItem[1] = ITEM_NONE << 8;
newMailId = MAIL_NONE;

for (i = PARTY_SIZE; i < MAIL_COUNT; i++)
{
if (gSaveBlock1Ptr->mail[i].itemId == ITEM_NONE)
{
memcpy(&gSaveBlock1Ptr->mail[i], &gSaveBlock1Ptr->mail[GetMonData(mon, MON_DATA_MAIL)], sizeof(struct MailStruct));
gSaveBlock1Ptr->mail[GetMonData(mon, MON_DATA_MAIL)].itemId = ITEM_NONE;
SetMonData(mon, MON_DATA_MAIL, &newMailId);
SetMonData(mon, MON_DATA_HELD_ITEM, newHeldItem);
return i;
}
}

return MAIL_NONE;
}

Expand Down
9 changes: 1 addition & 8 deletions src/player_pc.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,14 +662,7 @@ static void ItemStorage_EraseMainMenu(u8 taskId)

static u8 GetMailboxMailCount(void)
{
u8 mailInPC, i;

// Count mail in PC (by first skipping over mail in party)
for (mailInPC = 0, i = PARTY_SIZE; i < MAIL_COUNT; i++)
if (gSaveBlock1Ptr->mail[i].itemId != ITEM_NONE)
mailInPC++;

return mailInPC;
return 0;
}

static void Mailbox_CompactMailList(void)
Expand Down

0 comments on commit 8aa18f2

Please sign in to comment.