sao: gasha medal shop handler classes

This commit is contained in:
Hay1tsme 2023-11-14 13:20:05 -05:00
parent 0003ca4412
commit 1ba14da90c
2 changed files with 23 additions and 0 deletions

View File

@ -3194,3 +3194,21 @@ class GetMYuiMedalShopItemsResponse(SaoBaseResponse):
self.header.length = len(ret)
return super().make() + ret
class GetMGashaMedalShopsRequest(SaoBaseRequest):
def __init__(self, header: SaoRequestHeader, data: bytes) -> None:
super().__init__(header, data)
self.dummy = decode_byte(data, 0)
class GetMGashaMedalShopsResponse(SaoBaseResponse):
def __init__(self, cmd_id: int) -> None:
super().__init__(cmd_id)
self.result = 1 # byte
self.data_list: List[GashaMedalShop] = []
def make(self) -> bytes:
ret = encode_byte(self.result)
ret += encode_arr_cls(self.data_list)
self.header.length = len(ret)
return super().make() + ret

View File

@ -803,3 +803,8 @@ class YuiMedalShopItemData(BaseHelper):
ret += encode_int(self.property4_value1)
ret += encode_int(self.property4_value2)
return ret
class GashaMedalShop(BaseHelper):
def __init__(self, data: bytes, offset: int) -> None:
super().__init__(data, offset)