2023-04-23 17:26:44 +00:00
|
|
|
import struct
|
|
|
|
|
|
|
|
from .base import IDZHandlerBase
|
|
|
|
from core.config import CoreConfig
|
|
|
|
from ..config import IDZConfig
|
|
|
|
from ..const import IDZConstants
|
|
|
|
|
2023-04-24 01:04:52 +00:00
|
|
|
|
2023-04-23 17:26:44 +00:00
|
|
|
class IDZHandlerSaveTimeAttack(IDZHandlerBase):
|
|
|
|
cmd_codes = [0x00CD, 0x0136, 0x0136, 0x0136]
|
2023-04-24 01:04:52 +00:00
|
|
|
rsp_codes = [0x00CE, 0x00CE, 0x00CD, 0x00CD]
|
2023-04-23 17:26:44 +00:00
|
|
|
name = "save_time_attack"
|
|
|
|
|
|
|
|
def __init__(self, core_cfg: CoreConfig, game_cfg: IDZConfig, version: int) -> None:
|
|
|
|
super().__init__(core_cfg, game_cfg, version)
|
2023-04-24 01:04:52 +00:00
|
|
|
self.size = 0x00B0
|
2023-04-23 17:26:44 +00:00
|
|
|
|
|
|
|
if self.version > IDZConstants.VER_IDZ_130:
|
2023-04-24 01:04:52 +00:00
|
|
|
self.size = 0x00F0
|
|
|
|
|
2023-04-23 17:26:44 +00:00
|
|
|
def handle(self, data: bytes) -> bytearray:
|
|
|
|
ret = super().handle(data)
|
2023-04-24 01:04:52 +00:00
|
|
|
return ret
|