Compare to ITEM_HM01 and not ITEM_TM50 (#634)
* Compare to ITEM_HM01 and not ITEM_TM50 While both compile to the same output when doing test functions in https://cexplore.karathan.at/, shinny pointed in the discord that, if you expand TMs, using ITEM_TM50 would break things. This was the previous behaviour but was changed by cbt when documented the party menu. This was pointed out but HunarPG in the pokefirered Discord channel. * Use ITEM_HM01 instead.
This commit is contained in:
+3
-3
@@ -4291,7 +4291,7 @@ static void CB2_UseItem(void)
|
||||
{
|
||||
GiveMoveToMon(&gPlayerParty[gPartyMenu.slotId], ItemIdToBattleMoveId(gSpecialVar_ItemId));
|
||||
AdjustFriendship(&gPlayerParty[gPartyMenu.slotId], FRIENDSHIP_EVENT_LEARN_TMHM);
|
||||
if (gSpecialVar_ItemId <= ITEM_TM50)
|
||||
if (gSpecialVar_ItemId < ITEM_HM01)
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
SetMainCallback2(gPartyMenu.exitCallback);
|
||||
}
|
||||
@@ -4311,7 +4311,7 @@ static void CB2_UseTMHMAfterForgettingMove(void)
|
||||
SetMonMoveSlot(mon, ItemIdToBattleMoveId(gSpecialVar_ItemId), moveIdx);
|
||||
AdjustFriendship(mon, FRIENDSHIP_EVENT_LEARN_TMHM);
|
||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, mon, gSpecialVar_ItemId, move);
|
||||
if (gSpecialVar_ItemId <= ITEM_TM50)
|
||||
if (gSpecialVar_ItemId < ITEM_HM01)
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
SetMainCallback2(gPartyMenu.exitCallback);
|
||||
}
|
||||
@@ -4815,7 +4815,7 @@ static void Task_LearnedMove(u8 taskId)
|
||||
if (learnMoveMethod == LEARN_VIA_TMHM)
|
||||
{
|
||||
AdjustFriendship(mon, FRIENDSHIP_EVENT_LEARN_TMHM);
|
||||
if (item <= ITEM_TM50)
|
||||
if (item < ITEM_HM01)
|
||||
RemoveBagItem(item, 1);
|
||||
}
|
||||
GetMonNickname(mon, gStringVar1);
|
||||
|
||||
Reference in New Issue
Block a user