init
This commit is contained in:
15
game_server/handlers/GetBagCsReq.py
Normal file
15
game_server/handlers/GetBagCsReq.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from rail_proto.lib import (
|
||||
GetBagCsReq,
|
||||
GetBagScRsp
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: GetBagCsReq) -> betterproto.Message:
|
||||
equipment = [equipment.ToProto() for unique_id,equipment in session.player.inventory_manager.items() if equipment.main_type == 1]
|
||||
relics = [relic.ToProto() for unique_id,relic in session.player.inventory_manager.items() if relic.main_type == 2]
|
||||
return GetBagScRsp(
|
||||
retcode=0,
|
||||
equipment_list=equipment,
|
||||
relic_list=relics
|
||||
)
|
||||
Reference in New Issue
Block a user