moved event handler to separate funtion

This commit is contained in:
Robin Müller 2022-03-03 19:57:22 +01:00
parent 9a487c7407
commit 07601b734e
2 changed files with 14 additions and 4 deletions

7
config/event_handler.py Normal file
View File

@ -0,0 +1,7 @@
import config.object_ids as obj_ids
def handle_event_packet(
object_id: bytes, event_id: int, param_1: int, param_2: int
) -> str:
return ""

View File

@ -103,10 +103,13 @@ class EiveHookObject(TmTcHookBase):
def handle_service_5_event(
object_id: bytes, event_id: int, param_1: int, param_2: int
) -> str:
if object_id == RW1_ID:
if event_id == 1:
return ""
return ""
from config.event_handler import handle_event_packet
return handle_event_packet(
object_id=object_id,
event_id=event_id,
param_1=param_1,
param_2=param_2
)
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):