Initial commit

This commit is contained in:
Naruse
2024-11-07 23:25:15 +08:00
commit e8e5f3a1a7
246 changed files with 27356 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
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
)
async def handle(session: Session, msg: GetOpenworldEndlessDataReq) -> betterproto.Message:
return GetOpenworldEndlessDataRsp(
retcode=0,
begin_time=0,
end_time=int(get_unix_in_seconds() + 3600 * 24 * 7),
close_time=int(get_unix_in_seconds() + 3600 * 24 * 7 + 1200),
random_seed=random.randint(1, 1000000),
hard_level=msg.level,
type=msg.type
)