16 lines
488 B
Python
16 lines
488 B
Python
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
|
|
) |