init
This commit is contained in:
16
game_server/handlers/GetAllLineupDataCsReq.py
Normal file
16
game_server/handlers/GetAllLineupDataCsReq.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from rail_proto.lib import (
|
||||
GetAllLineupDataCsReq,
|
||||
GetAllLineupDataScRsp,
|
||||
LineupInfo
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: GetAllLineupDataCsReq) -> betterproto.Message:
|
||||
lineups: list[LineupInfo] = []
|
||||
for index,lineup in session.player.lineup_manager.items():
|
||||
lineups.append(lineup.ToProto())
|
||||
return GetAllLineupDataScRsp(
|
||||
retcode=0,
|
||||
lineup_list=lineups
|
||||
)
|
||||
Reference in New Issue
Block a user