1
0
mirror of synced 2024-12-18 16:25:53 +01:00
artemis/titles/idz/handlers/check_team_names.py

21 lines
611 B
Python
Raw Normal View History

2023-04-23 10:38:28 +02:00
import struct
from .base import IDZHandlerBase
from core.config import CoreConfig
from ..config import IDZConfig
2023-04-23 10:38:28 +02:00
class IDZHandlerCheckTeamName(IDZHandlerBase):
cmd_codes = [0x00A2, 0x00A2, 0x0097, 0x0097]
rsp_codes = [0x00A3, 0x00A3, 0x0098, 0x0098]
2023-04-23 10:38:28 +02:00
name = "check_team_name"
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 10:38:28 +02:00
def handle(self, data: bytes) -> bytearray:
ret = super().handle(data)
struct.pack_into("<I", ret, 0x4, 0x1)
return data