mirror of
https://gitea.tendokyu.moe/Hay1tsme/artemis.git
synced 2026-02-16 04:37:29 +08:00
Add support for initial d zero
This commit is contained in:
23
titles/idz/handlers/discover_profile.py
Normal file
23
titles/idz/handlers/discover_profile.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import struct
|
||||
from typing import Tuple, List, Dict
|
||||
|
||||
from .base import IDZHandlerBase
|
||||
from core.config import CoreConfig
|
||||
from ..config import IDZConfig
|
||||
|
||||
class IDZHandlerDiscoverProfile(IDZHandlerBase):
|
||||
cmd_codes = [0x006b, 0x0067]
|
||||
rsp_codes = [0x006c, 0x0068, 0x0068,0x0068]
|
||||
name = "discover_profile"
|
||||
|
||||
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
|
||||
super().__init__(core_cfg, game_cfg, version)
|
||||
self.size = 0x0010
|
||||
|
||||
def handle(self, data: bytes) -> bytearray:
|
||||
ret = super().handle(data)
|
||||
user_id = struct.unpack_from("<I", data, 0x04)[0]
|
||||
profile = None
|
||||
|
||||
struct.pack_into("<H", ret, 0x04, int(profile is not None))
|
||||
return ret
|
||||
Reference in New Issue
Block a user