init
This commit is contained in:
21
game_server/handlers/GetPlayerBoardDataCsReq.py
Normal file
21
game_server/handlers/GetPlayerBoardDataCsReq.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.player_icon_config import PlayerIconConfig
|
||||
from rail_proto.lib import (
|
||||
GetPlayerBoardDataCsReq,
|
||||
GetPlayerBoardDataScRsp,
|
||||
HeadIconData
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: GetPlayerBoardDataCsReq) -> betterproto.Message:
|
||||
return GetPlayerBoardDataScRsp(
|
||||
retcode=0,
|
||||
current_head_icon_id=session.player.data.head_icon,
|
||||
unlocked_head_icon_list=[
|
||||
HeadIconData(
|
||||
id=icon.ID
|
||||
)
|
||||
for icon in ResourceManager.instance().values(PlayerIconConfig)
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user