diff options
Diffstat (limited to 'src/trade.c')
-rw-r--r-- | src/trade.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/trade.c b/src/trade.c index 37a63eb4b..e22180ae9 100644 --- a/src/trade.c +++ b/src/trade.c @@ -1199,7 +1199,7 @@ static void QueueLinkTradeData(void) { if (sTradeMenuData->playerLinkFlagChoseAction && sTradeMenuData->partnerLinkFlagChoseAction) { - if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE + if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_TRADE) { sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_BOTH_MONS_SELECTED; @@ -1208,7 +1208,7 @@ static void QueueLinkTradeData(void) QueueAction(QUEUE_DELAY_DATA, QUEUE_SEND_DATA); sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; } - else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE + else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_TRADE && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_CANCEL) { PrintTradeMessage(TRADE_MSG_CANCELED); @@ -1219,7 +1219,7 @@ static void QueueLinkTradeData(void) sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; } - else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL + else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_TRADE) { PrintTradeMessage(TRADE_MSG_FRIEND_WANTS_TO_TRADE); @@ -1230,7 +1230,7 @@ static void QueueLinkTradeData(void) sTradeMenuData->playerLinkFlagChoseAction = sTradeMenuData->partnerLinkFlagChoseAction = 0; sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_REDRAW_MAIN_MENU; } - else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL + else if (sTradeMenuData->playerLinkFlagChoseAction == WANTS_TO_CANCEL && sTradeMenuData->partnerLinkFlagChoseAction == WANTS_TO_CANCEL) { sTradeMenuData->linkData[0] = LINKCMD_CANCEL_TRADE; @@ -1244,7 +1244,7 @@ static void QueueLinkTradeData(void) if (sTradeMenuData->playerLinkFlagStatus && sTradeMenuData->partnerLinkFlagStatus) { - if (sTradeMenuData->playerLinkFlagStatus == INITIATE_TRADE + if (sTradeMenuData->playerLinkFlagStatus == INITIATE_TRADE && sTradeMenuData->partnerLinkFlagStatus == INITIATE_TRADE) { sTradeMenuData->linkData[0] = LINKCMD_START_TRADE; @@ -1255,7 +1255,7 @@ static void QueueLinkTradeData(void) sTradeMenuData->tradeMenuFunc = TRADEMENUFUNC_LINK_TRADE_FADE_OUT; } - if (sTradeMenuData->playerLinkFlagStatus == CANCEL_TRADE + if (sTradeMenuData->playerLinkFlagStatus == CANCEL_TRADE || sTradeMenuData->partnerLinkFlagStatus == CANCEL_TRADE) { PrintTradeMessage(TRADE_MSG_CANCELED); @@ -1464,10 +1464,10 @@ static void TradeMenuShowMonSummaryScreen(void) { // Player's party if (sTradeMenuData->cursorPosition < PARTY_SIZE) - ShowPokemonSummaryScreen(PSS_MODE_UNK1, gPlayerParty, sTradeMenuData->cursorPosition, sTradeMenuData->partyCounts[TRADE_PLAYER] - 1, CB2_ReturnToTradeMenu); + ShowPokemonSummaryScreen(PSS_MODE_LOCK_MOVES, gPlayerParty, sTradeMenuData->cursorPosition, sTradeMenuData->partyCounts[TRADE_PLAYER] - 1, CB2_ReturnToTradeMenu); // Partner's party else - ShowPokemonSummaryScreen(PSS_MODE_UNK1, gEnemyParty, sTradeMenuData->cursorPosition - PARTY_SIZE, sTradeMenuData->partyCounts[TRADE_PARTNER] - 1, CB2_ReturnToTradeMenu); + ShowPokemonSummaryScreen(PSS_MODE_LOCK_MOVES, gEnemyParty, sTradeMenuData->cursorPosition - PARTY_SIZE, sTradeMenuData->partyCounts[TRADE_PARTNER] - 1, CB2_ReturnToTradeMenu); FreeAllWindowBuffers(); } } @@ -1504,7 +1504,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player if (hasLiveMon) hasLiveMon = BOTH_MONS_VALID; - return hasLiveMon; //PLAYER_MON_INVALID or BOTH_MONS_VALID + return hasLiveMon; //PLAYER_MON_INVALID or BOTH_MONS_VALID } // Returns TRUE if the partner's selected mon is invalid, FALSE otherwise @@ -1841,10 +1841,10 @@ static void DrawTradeMenuParty(u8 whichParty) sTradeMenuData->drawPartyState[whichParty]++; break; case 4: - DrawTradeMenuPartyMonInfo(whichParty, partyIdx, - sTradeMenuPartyMonBoxDimensions[whichParty][0] + 4, - sTradeMenuPartyMonBoxDimensions[whichParty][1] + 1, - sTradeMenuPartyMonBoxDimensions[whichParty][0], + DrawTradeMenuPartyMonInfo(whichParty, partyIdx, + sTradeMenuPartyMonBoxDimensions[whichParty][0] + 4, + sTradeMenuPartyMonBoxDimensions[whichParty][1] + 1, + sTradeMenuPartyMonBoxDimensions[whichParty][0], sTradeMenuPartyMonBoxDimensions[whichParty][1]); sTradeMenuData->drawPartyState[whichParty]++; break; @@ -2028,7 +2028,7 @@ static void ResetTradeMenuPartyPositions(u8 whichParty) static void PrintNicknamesForTradeMenu(void) { rbox_fill_rectangle(1); - //PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); ? + //PrintPartyNicknamesForTradeMenu(TRADE_PLAYER); ? PrintPartyNicknamesForTradeMenu(TRADE_PARTNER); } @@ -4539,8 +4539,8 @@ static void CB2_TryFinishTrade(void) else { UpdateTradeFinishFlags(); - if (mpId == 0 - && sTradeData->playerLinkFlagFinishTrade == READY_FINISH_TRADE + if (mpId == 0 + && sTradeData->playerLinkFlagFinishTrade == READY_FINISH_TRADE && sTradeData->partnerLinkFlagFinishTrade == READY_FINISH_TRADE) { sTradeData->linkData[0] = LINKCMD_CONFIRM_FINISH_TRADE; |