mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-14 13:54:43 +01:00
refactor: move game_server utils into global utils
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import betterproto
|
||||
import random
|
||||
from game_server.net.session import Session
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetOpenworldEndlessDataReq,
|
||||
GetOpenworldEndlessDataRsp
|
||||
)
|
||||
from utils.time import get_unix_in_seconds
|
||||
from lib.proto import GetOpenworldEndlessDataReq, GetOpenworldEndlessDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetOpenworldEndlessDataReq) -> betterproto.Message:
|
||||
|
||||
async def handle(
|
||||
session: Session, msg: GetOpenworldEndlessDataReq
|
||||
) -> betterproto.Message:
|
||||
return GetOpenworldEndlessDataRsp(
|
||||
retcode=0,
|
||||
begin_time=0,
|
||||
@@ -15,5 +15,5 @@ async def handle(session: Session, msg: GetOpenworldEndlessDataReq) -> betterpro
|
||||
close_time=int(get_unix_in_seconds() + 3600 * 24 * 7 + 1200),
|
||||
random_seed=random.randint(1, 1000000),
|
||||
hard_level=msg.level,
|
||||
type=msg.type
|
||||
type=msg.type,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user