init
This commit is contained in:
16
game_server/handlers/GetAvatarDataCsReq.py
Normal file
16
game_server/handlers/GetAvatarDataCsReq.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from rail_proto.lib import (
|
||||
GetAvatarDataCsReq,
|
||||
GetAvatarDataScRsp,
|
||||
Avatar
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: GetAvatarDataCsReq) -> betterproto.Message:
|
||||
avatars: list[Avatar] = []
|
||||
for avatar_id,avatar in session.player.avatar_mananger.items():
|
||||
avatars.append(avatar.ToProto())
|
||||
return GetAvatarDataScRsp(
|
||||
retcode=0,
|
||||
avatar_list=avatars
|
||||
)
|
||||
Reference in New Issue
Block a user