forked from Dniel97/artemis
idz: Add requests, fix load_config_b
This commit is contained in:
parent
d8c3ed5c01
commit
26c4bcb466
@ -37,3 +37,11 @@ from .update_provisional_store_rank import IDZHandlerUpdateProvisionalStoreRank
|
||||
from .load_reward_table import IDZHandlerLoadRewardTable
|
||||
|
||||
from .save_topic import IDZHandlerSaveTopic
|
||||
|
||||
from .save_time_attack import IDZHandlerSaveTimeAttack
|
||||
|
||||
from .unlock_profile import IDZHandlerUnlockProfile
|
||||
|
||||
from .update_team_points import IDZHandleUpdateTeamPoints
|
||||
|
||||
from .update_ui_report import IDZHandleUpdateUIReport
|
||||
|
@ -24,7 +24,7 @@ class IDZHandlerLoadConfigA(IDZHandlerBase):
|
||||
return ret
|
||||
|
||||
class IDZHandlerLoadConfigB(IDZHandlerBase):
|
||||
cmd_codes = [0x00a0] * IDZConstants.NUM_VERS
|
||||
cmd_codes = [0x00ab, 0x00ab, 0x00a0, 0x00a0]
|
||||
rsp_codes = [0x00ac, 0x00ac, 0x00a1, 0x00a1]
|
||||
name = "load_config_b"
|
||||
|
||||
|
22
titles/idz/handlers/save_time_attack.py
Normal file
22
titles/idz/handlers/save_time_attack.py
Normal file
@ -0,0 +1,22 @@
|
||||
import struct
|
||||
|
||||
from .base import IDZHandlerBase
|
||||
from core.config import CoreConfig
|
||||
from ..config import IDZConfig
|
||||
from ..const import IDZConstants
|
||||
|
||||
class IDZHandlerSaveTimeAttack(IDZHandlerBase):
|
||||
cmd_codes = [0x00CD, 0x0136, 0x0136, 0x0136]
|
||||
rsp_codes = [0x00ce, 0x00ce, 0x00cd, 0x00cd]
|
||||
name = "save_time_attack"
|
||||
|
||||
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
|
||||
super().__init__(core_cfg, game_cfg, version)
|
||||
self.size = 0x00b0
|
||||
|
||||
if self.version > IDZConstants.VER_IDZ_130:
|
||||
self.size = 0x00f0
|
||||
|
||||
def handle(self, data: bytes) -> bytearray:
|
||||
ret = super().handle(data)
|
||||
return ret
|
20
titles/idz/handlers/unlock_profile.py
Normal file
20
titles/idz/handlers/unlock_profile.py
Normal file
@ -0,0 +1,20 @@
|
||||
import struct
|
||||
|
||||
from .base import IDZHandlerBase
|
||||
from core.config import CoreConfig
|
||||
from ..config import IDZConfig
|
||||
from ..const import IDZConstants
|
||||
|
||||
class IDZHandlerUnlockProfile(IDZHandlerBase):
|
||||
cmd_codes = [0x006f, 0x006f, 0x006b, 0x006b]
|
||||
rsp_codes = [0x0070, 0x0070, 0x006c, 0x006c]
|
||||
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
|
||||
|
||||
def handle(self, data: bytes) -> bytearray:
|
||||
ret = super().handle(data)
|
||||
struct.pack_into("<H", ret, 0x4, 1)
|
||||
return ret
|
17
titles/idz/handlers/update_team_points.py
Normal file
17
titles/idz/handlers/update_team_points.py
Normal file
@ -0,0 +1,17 @@
|
||||
import struct
|
||||
|
||||
from .base import IDZHandlerBase
|
||||
from core.config import CoreConfig
|
||||
from ..config import IDZConfig
|
||||
from ..const import IDZConstants
|
||||
|
||||
class IDZHandleUpdateTeamPoints(IDZHandlerBase):
|
||||
cmd_codes = [0x0081, 0x0081, 0x007b, 0x007b]
|
||||
name = "unlock_profile"
|
||||
|
||||
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
|
||||
super().__init__(core_cfg, game_cfg, version)
|
||||
|
||||
def handle(self, data: bytes) -> bytearray:
|
||||
ret = super().handle(data)
|
||||
return ret
|
17
titles/idz/handlers/update_ui_report.py
Normal file
17
titles/idz/handlers/update_ui_report.py
Normal file
@ -0,0 +1,17 @@
|
||||
import struct
|
||||
|
||||
from .base import IDZHandlerBase
|
||||
from core.config import CoreConfig
|
||||
from ..config import IDZConfig
|
||||
from ..const import IDZConstants
|
||||
|
||||
class IDZHandleUpdateUIReport(IDZHandlerBase):
|
||||
cmd_codes = [0x0084, 0x0084, 0x007e, 0x007e]
|
||||
name = "update_ui_report"
|
||||
|
||||
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
|
||||
super().__init__(core_cfg, game_cfg, version)
|
||||
|
||||
def handle(self, data: bytes) -> bytearray:
|
||||
ret = super().handle(data)
|
||||
return ret
|
17
titles/idz/handlers/update_user_log.py
Normal file
17
titles/idz/handlers/update_user_log.py
Normal file
@ -0,0 +1,17 @@
|
||||
import struct
|
||||
|
||||
from .base import IDZHandlerBase
|
||||
from core.config import CoreConfig
|
||||
from ..config import IDZConfig
|
||||
from ..const import IDZConstants
|
||||
|
||||
class IDZHandleUpdateUserLog(IDZHandlerBase):
|
||||
cmd_codes = [0x00bd, 0x00bd, 0x00ab, 0x00b3]
|
||||
name = "update_user_log"
|
||||
|
||||
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
|
||||
super().__init__(core_cfg, game_cfg, version)
|
||||
|
||||
def handle(self, data: bytes) -> bytearray:
|
||||
ret = super().handle(data)
|
||||
return ret
|
Loading…
Reference in New Issue
Block a user