mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2025-12-14 05:44:34 +01:00
Initial commit
This commit is contained in:
36
game_server/packet/handlers/GetCustomHeadDataReq.py
Normal file
36
game_server/packet/handlers/GetCustomHeadDataReq.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.custom_head_data import CustomHeadData
|
||||
from lib.proto import (
|
||||
GetCustomHeadDataReq,
|
||||
GetCustomHeadDataRsp,
|
||||
CustomHead
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetCustomHeadDataReq) -> betterproto.Message:
|
||||
custom_head : CustomHead = [
|
||||
CustomHead(
|
||||
id=custom.headID
|
||||
)
|
||||
for custom in ResourceManager.instance().values(CustomHeadData)
|
||||
]
|
||||
|
||||
for i in range(161087,161091):
|
||||
custom_head.append(
|
||||
CustomHead(
|
||||
id=i
|
||||
)
|
||||
)
|
||||
|
||||
for i in range(162199,162213):
|
||||
custom_head.append(
|
||||
CustomHead(
|
||||
id=i
|
||||
)
|
||||
)
|
||||
|
||||
return GetCustomHeadDataRsp(
|
||||
retcode=0,
|
||||
custom_head_list=custom_head
|
||||
)
|
||||
Reference in New Issue
Block a user