Skip to content

Commit

Permalink
trade: do dolphin deed after a completed trade
Browse files Browse the repository at this point in the history
Signed-off-by: Kris Bahnsen <Kris@KBEmbedded.com>
  • Loading branch information
kbembedded committed May 22, 2024
1 parent 7e5b99c commit 9359890
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions views/trade.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@
#include <furi.h>
#include <furi_hal.h>

#include <dolphin/dolphin.h>

#include <gui/elements.h>
#include <gui/view.h>
#include <pokemon_icons.h>
Expand Down Expand Up @@ -311,6 +313,10 @@ static void pokemon_plist_recreate_callback(void* context, uint32_t arg) {
UNUSED(arg);
struct trade_ctx* trade = context;

/* Award some XP to the dolphin after a completed trade. This needs to
* happen outside of an ISR context, so we slap it here.
*/
dolphin_deed(DolphinDeedPluginGameWin);
plist_create(&(trade->patch_list), trade->pdata);
}

Expand Down

0 comments on commit 9359890

Please sign in to comment.