1
0
mirror of synced 2024-12-12 22:11:06 +01:00
artemis/titles/idz/handlers/unlock_profile.py

22 lines
640 B
Python
Raw Normal View History

2023-04-23 19:26:44 +02:00
import struct
from .base import IDZHandlerBase
from core.config import CoreConfig
from ..config import IDZConfig
from ..const import IDZConstants
2023-04-23 19:26:44 +02:00
class IDZHandlerUnlockProfile(IDZHandlerBase):
cmd_codes = [0x006F, 0x006F, 0x006B, 0x006B]
rsp_codes = [0x0070, 0x0070, 0x006C, 0x006C]
2023-04-23 19:26:44 +02:00
name = "unlock_profile"
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
super().__init__(core_cfg, game_cfg, version)
self.size = 0x0010
2023-04-23 19:26:44 +02:00
def handle(self, data: bytes) -> bytearray:
ret = super().handle(data)
2023-04-23 19:26:44 +02:00
struct.pack_into("<H", ret, 0x4, 1)
return ret