mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Fixed deleting PC mon by placing another one on top with B (#3360)
This commit is contained in:
parent
7b3f72f5ff
commit
977860f834
@ -678,6 +678,7 @@ static void InitSummaryScreenData(void);
|
|||||||
static void SetSelectionAfterSummaryScreen(void);
|
static void SetSelectionAfterSummaryScreen(void);
|
||||||
static void SetMonMarkings(u8);
|
static void SetMonMarkings(u8);
|
||||||
static bool8 IsRemovingLastPartyMon(void);
|
static bool8 IsRemovingLastPartyMon(void);
|
||||||
|
static bool8 CanPlaceMon(void);
|
||||||
static bool8 CanShiftMon(void);
|
static bool8 CanShiftMon(void);
|
||||||
static bool8 IsMonBeingMoved(void);
|
static bool8 IsMonBeingMoved(void);
|
||||||
static void TryRefreshDisplayMon(void);
|
static void TryRefreshDisplayMon(void);
|
||||||
@ -3690,8 +3691,15 @@ static void Task_OnBPressed(u8 taskId)
|
|||||||
PrintMessage(MSG_HOLDING_POKE);
|
PrintMessage(MSG_HOLDING_POKE);
|
||||||
sStorage->state = 1;
|
sStorage->state = 1;
|
||||||
#else
|
#else
|
||||||
PlaySE(SE_SELECT);
|
if (CanPlaceMon())
|
||||||
SetPokeStorageTask(Task_PlaceMon);
|
{
|
||||||
|
PlaySE(SE_SELECT);
|
||||||
|
SetPokeStorageTask(Task_PlaceMon);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetPokeStorageTask(Task_PokeStorageMain);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (IsMovingItem())
|
else if (IsMovingItem())
|
||||||
@ -6826,6 +6834,20 @@ static bool8 IsRemovingLastPartyMon(void)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool8 CanPlaceMon(void)
|
||||||
|
{
|
||||||
|
if (sIsMonBeingMoved)
|
||||||
|
{
|
||||||
|
if (sCursorArea == CURSOR_AREA_IN_PARTY && GetMonData(&gPlayerParty[sCursorPosition], MON_DATA_SPECIES) == SPECIES_NONE)
|
||||||
|
return TRUE;
|
||||||
|
else if (sCursorArea == CURSOR_AREA_IN_BOX && GetBoxMonDataAt(StorageGetCurrentBox(), sCursorPosition, MON_DATA_SPECIES_OR_EGG) == SPECIES_NONE)
|
||||||
|
return TRUE;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static bool8 CanShiftMon(void)
|
static bool8 CanShiftMon(void)
|
||||||
{
|
{
|
||||||
if (sIsMonBeingMoved)
|
if (sIsMonBeingMoved)
|
||||||
|
Loading…
Reference in New Issue
Block a user