From 7eb095cdb4e9bfcbad871e64d5fbf45c1fc86040 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Tue, 14 Nov 2023 21:18:22 -0500 Subject: [PATCH] soa: fix get_m_gasha_medal_shops --- titles/sao/base.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/titles/sao/base.py b/titles/sao/base.py index 3cec6d2..6a1637c 100644 --- a/titles/sao/base.py +++ b/titles/sao/base.py @@ -891,7 +891,7 @@ class SaoBase: tmp.interval_hour = int(shop['IntervalHour']) tmp.sort = int(shop['Sort']) - tmp.sales_end_date = datetime(2100, 1, 1, 0, 0, 0, 0) # always open + tmp.sales_end_date = datetime(2121, 1, 1, 0, 0, 0, 0) # always open resp.data_list.append(tmp) self.logger.debug(f"Load {len(resp.data_list)} Yui Medal Shops") @@ -929,19 +929,23 @@ class SaoBase: def handle_d5fc(self, header: SaoRequestHeader, request: bytes) -> bytes: # master_data/get_m_gasha_medal_shops - req = GetMGashaMedalShopsRequest(header.cmd + 1).make() + req = GetMGashaMedalShopsRequest(header, request) resp = GetMGashaMedalShopsResponse(header.cmd + 1) shops = self.load_data_csv("GashaMedalShops") for shop in shops: tmp = GashaMedalShop.from_args(shop['GashaMedalShopId'], shop['Name'], shop['GashaMedalId'], shop['UseGashaMedalNum'], shop['PurchaseLimit']) - tmp.sales_end_date = datetime(2100, 1, 1, 0, 0, 0, 0) # always open + tmp.sales_end_date = datetime(2121, 1, 1, 0, 0, 0, 0) # always open resp.data_list.append(tmp) self.logger.debug(f"Load {len(resp.data_list)} Gasha Medal Shops") return resp.make() + def handle_d5fe(self, header: SaoRequestHeader, request: bytes) -> bytes: + # master_data/get_m_gasha_medal_shop_items + return SaoNoopResponse(header.cmd + 1) + def handle_d604(self, header: SaoRequestHeader, request: bytes) -> bytes: # master_data_2/get_m_res_earn_campaign_shops req = GetMResEarnCampaignShopsRequest(header, request) @@ -957,9 +961,13 @@ class SaoBase: tmp.purchase_limit = shop['PurchaseLimit'] tmp.get_application_point = shop['GetApplicationPoint'] - tmp.sales_end_date = datetime(2100, 1, 1, 0, 0, 0, 0) # always open + tmp.sales_end_date = datetime(2121, 1, 1, 0, 0, 0, 0) # always open resp.data_list.append(tmp) self.logger.debug(f"Load {len(resp.data_list)} Res Earn Campaign Shops") return resp.make() + + def handle_d606(self, header: SaoRequestHeader, request: bytes) -> bytes: + # master_data_2/get_m_res_earn_campaign_shop_items + return SaoNoopResponse(header.cmd + 1) \ No newline at end of file