Takeoff relic & lightcone
This commit is contained in:
16
game_server/handlers/TakeOffEquipmentCsReq.py
Normal file
16
game_server/handlers/TakeOffEquipmentCsReq.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import betterproto
|
||||
from game_server.net.session import PlayerSession
|
||||
from rail_proto.lib import (
|
||||
TakeOffEquipmentCsReq,
|
||||
TakeOffEquipmentScRsp
|
||||
)
|
||||
|
||||
async def handle(session: PlayerSession, msg: TakeOffEquipmentCsReq) -> betterproto.Message | None:
|
||||
avatar_data = session.player.avatar_manager.get(msg.avatar_id)
|
||||
if not avatar_data: return None
|
||||
item_data = session.player.inventory_manager.get(avatar_data.lightcone_id)
|
||||
if not item_data: return None
|
||||
avatar_data.lightcone_id = 0
|
||||
item_data.equip_avatar = 0
|
||||
session.pending_notify(session.player.PlayerSyncProto())
|
||||
return TakeOffEquipmentScRsp()
|
||||
Reference in New Issue
Block a user