summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repeated-Field-Medicine-Use.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/Repeated-Field-Medicine-Use.md b/Repeated-Field-Medicine-Use.md
index 8a14a46..312715e 100644
--- a/Repeated-Field-Medicine-Use.md
+++ b/Repeated-Field-Medicine-Use.md
@@ -69,4 +69,12 @@ You may also want to use this for Rare Candies, so all you have to do is find `P
gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
else
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
+```
+
+And finally, when using a Rare Candy on a Level 100 Pokémon it would normally go back to the Bag menu. To avoid that, we search for `ItemUseCB_RareCandy` and replace `gTasks[taskId].func = task;` with:
+```c
+ if (gPartyMenu.menuType == PARTY_MENU_TYPE_FIELD)
+ gTasks[taskId].func = Task_ReturnToChooseMonAfterText;
+ else
+ gTasks[taskId].func = task;
``` \ No newline at end of file