mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-15 14:24:34 +01:00
refactor: move game_server utils into global utils
This commit is contained in:
@@ -1,22 +1,15 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetBuffEffectReq,
|
||||
GetBuffEffectRsp,
|
||||
BuffEffect
|
||||
)
|
||||
from utils.time import get_unix_in_seconds
|
||||
from lib.proto import GetBuffEffectReq, GetBuffEffectRsp, BuffEffect
|
||||
|
||||
|
||||
async def handle(session: Session, msg: GetBuffEffectReq) -> betterproto.Message:
|
||||
return GetBuffEffectRsp(
|
||||
retcode=0,
|
||||
effect_list=[
|
||||
BuffEffect(
|
||||
effect_id=i,
|
||||
end_time=int(get_unix_in_seconds()+3600*24*7)
|
||||
)
|
||||
BuffEffect(effect_id=i, end_time=int(get_unix_in_seconds() + 3600 * 24 * 7))
|
||||
for i in msg.effect_id_list
|
||||
],
|
||||
aura_effect_list=msg.effect_id_list[:]
|
||||
aura_effect_list=msg.effect_id_list[:],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user