init
This commit is contained in:
28
game_server/handlers/PlayerLoginFinishCsReq.py
Normal file
28
game_server/handlers/PlayerLoginFinishCsReq.py
Normal file
@@ -0,0 +1,28 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from rail_proto.lib import (
|
||||
PlayerLoginFinishCsReq,
|
||||
PlayerLoginFinishScRsp,
|
||||
ContentPackageSyncDataScNotify,
|
||||
ContentPackageData,
|
||||
ContentPackageInfo,
|
||||
ContentPackageStatus
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: PlayerLoginFinishCsReq) -> betterproto.Message:
|
||||
content = [200001,200002,200003,150017,150015]
|
||||
await session.notify(
|
||||
ContentPackageSyncDataScNotify(
|
||||
data=ContentPackageData(
|
||||
cur_content_id=0,
|
||||
content_package_list=[
|
||||
ContentPackageInfo(
|
||||
content_id=id,
|
||||
status=ContentPackageStatus.ContentPackageStatus_Finished.value
|
||||
) for id in content
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
session.active = True
|
||||
return PlayerLoginFinishScRsp(retcode=0)
|
||||
Reference in New Issue
Block a user