16 lines
472 B
Python
16 lines
472 B
Python
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_manager.items():
|
|
avatars.append(avatar.ToProto())
|
|
return GetAvatarDataScRsp(
|
|
retcode=0,
|
|
avatar_list=avatars
|
|
) |