init
This commit is contained in:
18
game_server/handlers/ReplaceLineupCsReq.py
Normal file
18
game_server/handlers/ReplaceLineupCsReq.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from rail_proto.lib import (
|
||||
ReplaceLineupCsReq,
|
||||
ReplaceLineupScRsp,
|
||||
SyncLineupNotify
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: ReplaceLineupCsReq) -> betterproto.Message:
|
||||
lineup = session.player.lineup_manager.get(msg.index)
|
||||
lineup.avatar_list = [avatar.id for avatar in msg.lineup_slot_list]
|
||||
await session.notify(
|
||||
SyncLineupNotify(
|
||||
lineup=lineup.ToProto()
|
||||
)
|
||||
)
|
||||
#lineup.save_lineup()
|
||||
return ReplaceLineupScRsp(retcode=0)
|
||||
Reference in New Issue
Block a user