From e61d5fb02ca3acacba208f60477d056c0c0a5516 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 21 Jun 2020 15:48:23 +0100 Subject: [PATCH] Implement missing handle `epf_medal_check` Fixes bug where system defender stamps were unattainable. Handler itself is pretty useless. --- houdini/handlers/play/epf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/houdini/handlers/play/epf.py b/houdini/handlers/play/epf.py index cadce9e..c74b8fb 100644 --- a/houdini/handlers/play/epf.py +++ b/houdini/handlers/play/epf.py @@ -140,3 +140,14 @@ async def handle_epf_grant_reward(p, medals: int): await p.update(career_medals=p.career_medals + medals, agent_medals=p.agent_medals + medals).apply() await p.send_xt('epfgr', p.career_medals, p.agent_medals) + + +@handlers.handler(XTPacket('epfsf', ext='z')) +async def handle_epf_medal_check(p, stamp_id: int): + if not p.agent_status: + await p.send_xt('epfsf', 'naa') + + if stamp_id not in p.stamps: + await p.send_xt('epfsf', 'nem', stamp_id) + else: + await p.send_xt('epfsf', 'ahm')