mirror of
https://github.com/MikuLeaks/KianaBH3.git
synced 2026-02-06 18:16:28 +01:00
Initial commit
This commit is contained in:
10
game_server/packet/handlers/AddCustomAvatarTeamReq.py
Normal file
10
game_server/packet/handlers/AddCustomAvatarTeamReq.py
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
AddCustomAvatarTeamReq,
|
||||
AddCustomAvatarTeamRsp
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: AddCustomAvatarTeamReq) -> betterproto.Message:
|
||||
return AddCustomAvatarTeamRsp(retcode=0)
|
||||
7
game_server/packet/handlers/AddGoodfeelReq.py
Normal file
7
game_server/packet/handlers/AddGoodfeelReq.py
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import AddGoodfeelReq,AddGoodfeelRsp
|
||||
|
||||
async def handle(session: Session, msg: AddGoodfeelReq) -> betterproto.Message:
|
||||
return AddGoodfeelRsp(retcode=0)
|
||||
7
game_server/packet/handlers/ArkPlusActivityGetDataReq.py
Normal file
7
game_server/packet/handlers/ArkPlusActivityGetDataReq.py
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import ArkPlusActivityGetDataReq,ArkPlusActivityGetDataRsp
|
||||
|
||||
async def handle(session: Session, msg: ArkPlusActivityGetDataReq) -> betterproto.Message:
|
||||
return ArkPlusActivityGetDataRsp(retcode=0)
|
||||
60
game_server/packet/handlers/AvatarSubSkillLevelUpReq.py
Normal file
60
game_server/packet/handlers/AvatarSubSkillLevelUpReq.py
Normal file
@@ -0,0 +1,60 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.game.enum.data_type import DataType
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.avatar_sub_skill_data import AvatarSubSkillData
|
||||
from database import mongo
|
||||
from lib.proto import (
|
||||
AvatarSubSkillLevelUpReq,
|
||||
AvatarSubSkillLevelUpRsp,
|
||||
AvatarSubSkill,
|
||||
GetAvatarDataReq,
|
||||
GetEquipmentDataRsp,
|
||||
Material
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: AvatarSubSkillLevelUpReq) -> betterproto.Message:
|
||||
avatar_data = session.player.avatars.get(msg.avatar_id)
|
||||
if not avatar_data:
|
||||
return AvatarSubSkillLevelUpRsp(retcode=2)
|
||||
|
||||
skill_data = avatar_data.skill_lists.get(msg.skill_id)
|
||||
if not skill_data:
|
||||
return AvatarSubSkillLevelUpRsp(retcode=3)
|
||||
|
||||
sub_skill_data = ResourceManager.instance().find_by_index(AvatarSubSkillData, msg.sub_skill_id)
|
||||
if not sub_skill_data:
|
||||
return AvatarSubSkillLevelUpRsp(retcode=4)
|
||||
|
||||
sub_skill = skill_data.sub_skill_lists.get(msg.sub_skill_id)
|
||||
if not sub_skill:
|
||||
skill_data.sub_skill_lists[msg.sub_skill_id] = AvatarSubSkill(
|
||||
sub_skill_id=msg.sub_skill_id,
|
||||
level=0
|
||||
)
|
||||
|
||||
current_level = skill_data.sub_skill_lists[msg.sub_skill_id].level
|
||||
new_level = sub_skill_data.maxLv if msg.is_level_up_all else current_level + 1
|
||||
|
||||
if new_level > sub_skill_data.maxLv:
|
||||
return AvatarSubSkillLevelUpRsp(retcode=10)
|
||||
|
||||
skill_data.sub_skill_lists[msg.sub_skill_id] = AvatarSubSkill(
|
||||
sub_skill_id=msg.sub_skill_id,
|
||||
level=new_level
|
||||
)
|
||||
avatar_data.skill_lists[msg.skill_id] = skill_data
|
||||
|
||||
await session.process_packet(session.create_packet(GetAvatarDataReq(avatar_id_list=[msg.avatar_id])))
|
||||
|
||||
coin = session.player.inventory.material_items.get(100)
|
||||
if coin:
|
||||
session.pending_notify(
|
||||
GetEquipmentDataRsp(
|
||||
material_list=[Material(id=coin.item_id, num=coin.num)]
|
||||
)
|
||||
)
|
||||
|
||||
mongo.save(session, DataType.AVATAR, [msg.avatar_id])
|
||||
|
||||
return AvatarSubSkillLevelUpRsp(retcode=0)
|
||||
6
game_server/packet/handlers/BuffAssistGetActivityReq.py
Normal file
6
game_server/packet/handlers/BuffAssistGetActivityReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import BuffAssistGetActivityReq,BuffAssistGetActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: BuffAssistGetActivityReq) -> betterproto.Message:
|
||||
return BuffAssistGetActivityRsp(retcode=0)
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import BwWorldCampActivityGetDataReq, BwWorldCampActivityGetDataRsp
|
||||
|
||||
async def handle(session: Session, msg: BwWorldCampActivityGetDataReq) -> betterproto.Message:
|
||||
return BwWorldCampActivityGetDataRsp(retcode=0)
|
||||
37
game_server/packet/handlers/ChapterArkGetDataReq.py
Normal file
37
game_server/packet/handlers/ChapterArkGetDataReq.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
ChapterArkGetDataReq,
|
||||
ChapterArkGetDataRsp,
|
||||
ChapterArk,
|
||||
ChapterArkRoleInfo,
|
||||
ChapterArkSkillInfo,
|
||||
ChapterArkSupSkillInfo
|
||||
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: ChapterArkGetDataReq) -> betterproto.Message:
|
||||
avatar_lists = [1,2,3,4,5]
|
||||
return ChapterArkGetDataRsp(
|
||||
retcode=0,
|
||||
chapter_ark=ChapterArk(
|
||||
chapter_id=msg.chapter_id,
|
||||
avatar_list=avatar_lists,
|
||||
is_finish_opening=True,
|
||||
role_list=[
|
||||
ChapterArkRoleInfo(
|
||||
id=id,
|
||||
level=30
|
||||
)
|
||||
for id in avatar_lists
|
||||
],
|
||||
skill_list=[
|
||||
ChapterArkSkillInfo(
|
||||
id=i * 100 + j,
|
||||
level=3 if j > 3 else 1
|
||||
)
|
||||
for i in range(1, 6)
|
||||
for j in range(1, 13)
|
||||
]
|
||||
)
|
||||
)
|
||||
17
game_server/packet/handlers/ChapterBwWorldGetDataReq.py
Normal file
17
game_server/packet/handlers/ChapterBwWorldGetDataReq.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
ChapterBwWorldGetDataReq,
|
||||
ChapterBwWorldGetDataRsp,
|
||||
ChapterBwWorld,
|
||||
ChapterBwWorldRune,
|
||||
ChapterBwWorldTowerStage
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: ChapterBwWorldGetDataReq) -> betterproto.Message:
|
||||
return ChapterBwWorldGetDataRsp(
|
||||
retcode=0,
|
||||
chapter_bw_world=ChapterBwWorld(
|
||||
chapter_id=msg.chapter_id
|
||||
)
|
||||
)
|
||||
314
game_server/packet/handlers/ChapterGroupGetDataReq.py
Normal file
314
game_server/packet/handlers/ChapterGroupGetDataReq.py
Normal file
@@ -0,0 +1,314 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
ChapterGroupGetDataReq,
|
||||
ChapterGroupGetDataRsp,
|
||||
ChapterGroup,
|
||||
ChapterGroupSite,
|
||||
ChapterGroupSiteStatus
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: ChapterGroupGetDataReq) -> betterproto.Message:
|
||||
rsp = ChapterGroupGetDataRsp(
|
||||
retcode=0,
|
||||
is_all=True,
|
||||
chapter_group_list=[
|
||||
ChapterGroup(
|
||||
id=1,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=1,
|
||||
site_id=1,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=2,
|
||||
site_id=2,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=2,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=3,
|
||||
site_id=3,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=4,
|
||||
site_id=4,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=5,
|
||||
site_id=5,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=6,
|
||||
site_id=6,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=3,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=7,
|
||||
site_id=7,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=8,
|
||||
site_id=8,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=9,
|
||||
site_id=9,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=10,
|
||||
site_id=10,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=11,
|
||||
site_id=11,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=4,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=12,
|
||||
site_id=12,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=13,
|
||||
site_id=13,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=14,
|
||||
site_id=14,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=15,
|
||||
site_id=15,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=5,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=16,
|
||||
site_id=16,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=17,
|
||||
site_id=17,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=6,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=18,
|
||||
site_id=18,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=19,
|
||||
site_id=19,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=20,
|
||||
site_id=20,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=7,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=21,
|
||||
site_id=21,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=22,
|
||||
site_id=22,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=8,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=23,
|
||||
site_id=23,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=24,
|
||||
site_id=24,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=25,
|
||||
site_id=25,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=9,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=26,
|
||||
site_id=26,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=27,
|
||||
site_id=27,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=28,
|
||||
site_id=28,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=10,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=29,
|
||||
site_id=29,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=30,
|
||||
site_id=30,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=11,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=31,
|
||||
site_id=31,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=12,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=32,
|
||||
site_id=32,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=33,
|
||||
site_id=33,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=34,
|
||||
site_id=34,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_LOCKED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=13,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=36,
|
||||
site_id=36,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
),
|
||||
ChapterGroupSite(
|
||||
chapter_id=37,
|
||||
site_id=37,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=14,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=40,
|
||||
site_id=40,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=15,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=43,
|
||||
site_id=43,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=16,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=100,
|
||||
site_id=100,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=17,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=150,
|
||||
site_id=150,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
),
|
||||
ChapterGroup(
|
||||
id=18,
|
||||
site_list=[
|
||||
ChapterGroupSite(
|
||||
chapter_id=200,
|
||||
site_id=200,
|
||||
status=ChapterGroupSiteStatus.CHAPTER_GROUP_SITE_STATUS_FINISHED.value
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
return rsp
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import ChapterKnightRichManGetDataReq, ChapterKnightRichManGetDataRsp
|
||||
|
||||
async def handle(session: Session, msg: ChapterKnightRichManGetDataReq) -> betterproto.Message:
|
||||
return ChapterKnightRichManGetDataRsp(retcode=0,rich_man_id=101)
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import ChatworldBeastGetActivityReq, ChatworldBeastGetActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: ChatworldBeastGetActivityReq) -> betterproto.Message:
|
||||
return ChatworldBeastGetActivityRsp(retcode=0)
|
||||
@@ -0,0 +1,9 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import ChatworldGetActivityScheduleReq, ChatworldGetActivityScheduleRsp
|
||||
|
||||
async def handle(session: Session, msg: ChatworldGetActivityScheduleReq) -> betterproto.Message:
|
||||
return ChatworldGetActivityScheduleRsp(
|
||||
retcode=0,
|
||||
scene_id=111
|
||||
)
|
||||
6
game_server/packet/handlers/ChatworldGetPrayInfoReq.py
Normal file
6
game_server/packet/handlers/ChatworldGetPrayInfoReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import ChatworldGetPrayInfoReq, ChatworldGetPrayInfoRsp
|
||||
|
||||
async def handle(session: Session, msg: ChatworldGetPrayInfoReq) -> betterproto.Message:
|
||||
return ChatworldGetPrayInfoRsp(retcode=0)
|
||||
6
game_server/packet/handlers/ClientReportReq.py
Normal file
6
game_server/packet/handlers/ClientReportReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import ClientReportReq,ClientReportRsp
|
||||
|
||||
async def handle(session: Session, msg: ClientReportReq) -> betterproto.Message:
|
||||
return ClientReportRsp(retcode=0)
|
||||
42
game_server/packet/handlers/DelCustomAvatarTeamReq.py
Normal file
42
game_server/packet/handlers/DelCustomAvatarTeamReq.py
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.game.avatar.avatar_manager import AvatarTeamManager
|
||||
from game_server.game.enum.data_type import DataType
|
||||
from database import mongo
|
||||
from lib.proto import (
|
||||
DelCustomAvatarTeamReq,
|
||||
DelCustomAvatarTeamRsp,
|
||||
GetAvatarTeamDataRsp,
|
||||
CustomAvatarTeam
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: DelCustomAvatarTeamReq) -> betterproto.Message:
|
||||
|
||||
session.player.custom_avatar_team_list[msg.team_id] = AvatarTeamManager(
|
||||
team_id=msg.team_id,
|
||||
name=f"Team {msg.team_id}",
|
||||
avatar_id_list=[],
|
||||
elf_id_list=[],
|
||||
astral_mate_id=0,
|
||||
is_using_astra_mate=False
|
||||
)
|
||||
|
||||
await session.send(session.create_packet(GetAvatarTeamDataRsp(
|
||||
retcode=0,
|
||||
custom_avatar_team_list=[
|
||||
CustomAvatarTeam(
|
||||
team_id=team.team_id,
|
||||
name=team.name,
|
||||
avatar_id_list=team.avatar_id_list,
|
||||
elf_id_list=team.elf_id_list,
|
||||
astra_mate_id=team.astral_mate_id,
|
||||
is_using_astra_mate=team.is_using_astra_mate
|
||||
)
|
||||
for team_id,team in session.player.custom_avatar_team_list.items()
|
||||
]
|
||||
)))
|
||||
|
||||
mongo.save(session,DataType.PLAYER)
|
||||
|
||||
return DelCustomAvatarTeamRsp(retcode=0)
|
||||
52
game_server/packet/handlers/DressEquipmentReq.py
Normal file
52
game_server/packet/handlers/DressEquipmentReq.py
Normal file
@@ -0,0 +1,52 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.game.enum.data_type import DataType
|
||||
from database import mongo
|
||||
from lib.proto import (
|
||||
DressEquipmentReq,
|
||||
DressEquipmentRsp,
|
||||
EquipmentSlot,
|
||||
GetAvatarDataReq
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: DressEquipmentReq) -> betterproto.Message:
|
||||
avatar_data = session.player.avatars.get(msg.avatar_id)
|
||||
if avatar_data:
|
||||
replace_id = 0
|
||||
match msg.slot:
|
||||
case EquipmentSlot.EQUIPMENT_SLOT_WEAPON_1.value:
|
||||
if avatar_data.weapon_id > 0:
|
||||
replace_id = avatar_data.weapon_id
|
||||
replace_weapon = session.player.inventory.weapon_items.get(avatar_data.weapon_id)
|
||||
replace_weapon.equip_avatar_id = 0
|
||||
|
||||
avatar_data.weapon_id = msg.unique_id
|
||||
|
||||
weapon = session.player.inventory.weapon_items.get(msg.unique_id)
|
||||
weapon.equip_avatar_id = msg.avatar_id
|
||||
|
||||
mongo.save(session,DataType.WEAPON,[msg.unique_id,replace_id])
|
||||
case EquipmentSlot.EQUIPMENT_SLOT_STIGMATA_1.value | \
|
||||
EquipmentSlot.EQUIPMENT_SLOT_STIGMATA_2.value | \
|
||||
EquipmentSlot.EQUIPMENT_SLOT_STIGMATA_3.value:
|
||||
slot_num = msg.slot-1
|
||||
replace_id = avatar_data.stigmata_ids.get(slot_num,0)
|
||||
if replace_id > 0:
|
||||
replace_stigmata = session.player.inventory.stigmata_items.get(replace_id)
|
||||
replace_stigmata.equip_avatar_id = 0
|
||||
|
||||
|
||||
avatar_data.stigmata_ids[slot_num] = msg.unique_id
|
||||
|
||||
stigmata = session.player.inventory.stigmata_items.get(msg.unique_id)
|
||||
stigmata.equip_avatar_id = msg.avatar_id
|
||||
stigmata.slot_num = slot_num
|
||||
|
||||
mongo.save(session,DataType.STIGMATA,[msg.unique_id,replace_id])
|
||||
|
||||
await session.process_packet(session.create_packet(GetAvatarDataReq(avatar_id_list=[msg.avatar_id])))
|
||||
return DressEquipmentRsp(
|
||||
retcode=0,
|
||||
unique_id=msg.unique_id,
|
||||
slot=msg.slot
|
||||
)
|
||||
10
game_server/packet/handlers/EnterWorldChatroomReq.py
Normal file
10
game_server/packet/handlers/EnterWorldChatroomReq.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import EnterWorldChatroomReq, EnterWorldChatroomRsp
|
||||
|
||||
async def handle(session: Session, msg: EnterWorldChatroomReq) -> betterproto.Message:
|
||||
return EnterWorldChatroomRsp(
|
||||
retcode=0,
|
||||
chatroom_id=1,
|
||||
player_num=69
|
||||
)
|
||||
13
game_server/packet/handlers/FinishGuideReportReq.py
Normal file
13
game_server/packet/handlers/FinishGuideReportReq.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import FinishGuideReportReq,FinishGuideReportRsp
|
||||
|
||||
async def handle(session: Session, msg: FinishGuideReportReq) -> betterproto.Message:
|
||||
print(msg.guide_id_list)
|
||||
return FinishGuideReportRsp(
|
||||
retcode=0,
|
||||
guide_id_list=msg.guide_id_list,
|
||||
is_finish=True
|
||||
)
|
||||
|
||||
|
||||
22
game_server/packet/handlers/GeneralActivityGetMainInfoReq.py
Normal file
22
game_server/packet/handlers/GeneralActivityGetMainInfoReq.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GeneralActivityGetMainInfoReq,
|
||||
GeneralActivityGetMainInfoRsp,
|
||||
GeneralActivity,
|
||||
GeneralActivityBasicInfo
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GeneralActivityGetMainInfoReq) -> betterproto.Message:
|
||||
return GeneralActivityGetMainInfoRsp(
|
||||
retcode=0,
|
||||
activity_list=[
|
||||
GeneralActivity(
|
||||
general_basic_info=GeneralActivityBasicInfo(
|
||||
activity_id=50000001,
|
||||
schedule_id=412,
|
||||
series_activity_id=[50000001]
|
||||
)
|
||||
)
|
||||
]
|
||||
)
|
||||
40
game_server/packet/handlers/GeneralActivityGetScheduleReq.py
Normal file
40
game_server/packet/handlers/GeneralActivityGetScheduleReq.py
Normal file
@@ -0,0 +1,40 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.avatar_tutorial import AvatarTutorialData
|
||||
from game_server.resource.configdb.activity_tower import ActivityTowerData
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GeneralActivityGetScheduleReq,
|
||||
GeneralActivityGetScheduleRsp,
|
||||
GeneralActivityScheduleInfo
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GeneralActivityGetScheduleReq) -> betterproto.Message:
|
||||
|
||||
schedule_list = []
|
||||
|
||||
for tutorial in ResourceManager.instance().values(AvatarTutorialData):
|
||||
schedule_list.append(
|
||||
GeneralActivityScheduleInfo(
|
||||
activity_id=tutorial.ActivityID,
|
||||
settle_time=int(get_unix_in_seconds()+3600*24*7),
|
||||
end_time=int(get_unix_in_seconds()+3600*24*7),
|
||||
end_day_time=int(get_unix_in_seconds()+3600*24*7)
|
||||
)
|
||||
)
|
||||
|
||||
for tower in ResourceManager.instance().values(ActivityTowerData):
|
||||
schedule_list.append(
|
||||
GeneralActivityScheduleInfo(
|
||||
activity_id=tower.ActivityID,
|
||||
settle_time=int(get_unix_in_seconds()+3600*24*7),
|
||||
end_time=int(get_unix_in_seconds()+3600*24*7),
|
||||
end_day_time=int(get_unix_in_seconds()+3600*24*7)
|
||||
)
|
||||
)
|
||||
|
||||
return GeneralActivityGetScheduleRsp(
|
||||
retcode=0,
|
||||
schedule_list=schedule_list
|
||||
)
|
||||
9
game_server/packet/handlers/GetActivityMainDataReq.py
Normal file
9
game_server/packet/handlers/GetActivityMainDataReq.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetActivityMainDataReq,GetActivityMainDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetActivityMainDataReq) -> betterproto.Message:
|
||||
return GetActivityMainDataRsp(
|
||||
retcode=0,
|
||||
activity_module_type_list=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 72]
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetActivityRewardStatisticDataReq,
|
||||
GetActivityRewardStatisticDataRsp,
|
||||
ActivityRewardStatisticData,
|
||||
ActivityRewardStatisticItemData
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetActivityRewardStatisticDataReq) -> betterproto.Message:
|
||||
return GetActivityRewardStatisticDataRsp(
|
||||
retcode=0,
|
||||
activity_reward_data=ActivityRewardStatisticData(
|
||||
id=117,
|
||||
item_data_list=[
|
||||
ActivityRewardStatisticItemData(
|
||||
show_id=i
|
||||
)
|
||||
for i in range (506,509)
|
||||
]
|
||||
),
|
||||
id=117
|
||||
)
|
||||
6
game_server/packet/handlers/GetAdventureGroupReq.py
Normal file
6
game_server/packet/handlers/GetAdventureGroupReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetAdventureGroupReq, GetAdventureGroupRsp
|
||||
|
||||
async def handle(session: Session, msg: GetAdventureGroupReq) -> betterproto.Message:
|
||||
return GetAdventureGroupRsp(retcode=0)
|
||||
44
game_server/packet/handlers/GetAdventureStorySweepInfoReq.py
Normal file
44
game_server/packet/handlers/GetAdventureStorySweepInfoReq.py
Normal file
@@ -0,0 +1,44 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetAdventureStorySweepInfoReq,
|
||||
GetAdventureStorySweepInfoRsp,
|
||||
IslandStorySweepData
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetAdventureStorySweepInfoReq) -> betterproto.Message:
|
||||
return GetAdventureStorySweepInfoRsp(
|
||||
retcode=0,
|
||||
story_sweep_list=[
|
||||
IslandStorySweepData(
|
||||
avatar_id_list=[
|
||||
20401,
|
||||
20301,
|
||||
20201
|
||||
],
|
||||
is_finished=True,
|
||||
over_time=1719938652,
|
||||
sweep_id=282
|
||||
),
|
||||
IslandStorySweepData(
|
||||
avatar_id_list=[
|
||||
3701,
|
||||
3601,
|
||||
3501
|
||||
],
|
||||
is_finished=True,
|
||||
over_time=1719938654,
|
||||
sweep_id=282
|
||||
),
|
||||
IslandStorySweepData(
|
||||
avatar_id_list=[
|
||||
3301,
|
||||
3201,
|
||||
3101
|
||||
],
|
||||
is_finished=True,
|
||||
over_time=1719938655,
|
||||
sweep_id=282
|
||||
),
|
||||
]
|
||||
)
|
||||
20
game_server/packet/handlers/GetArmadaActivityListReq.py
Normal file
20
game_server/packet/handlers/GetArmadaActivityListReq.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetArmadaActivityListReq,
|
||||
GetArmadaActivityListRsp,
|
||||
ArmadaActivity,
|
||||
ArmadaActivityType
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetArmadaActivityListReq) -> betterproto.Message:
|
||||
return GetArmadaActivityListRsp(
|
||||
retcode=0,
|
||||
activity_list=[
|
||||
ArmadaActivity(
|
||||
begin_time=0,
|
||||
end_time=1880308800,
|
||||
type=ArmadaActivityType.ARMADA_ACTIVITY_ARMADA_STAGE_SCORE_ACTIVITY.value
|
||||
)
|
||||
]
|
||||
)
|
||||
6
game_server/packet/handlers/GetArmadaDataReq.py
Normal file
6
game_server/packet/handlers/GetArmadaDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetArmadaDataReq, GetArmadaDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetArmadaDataReq) -> betterproto.Message:
|
||||
return GetArmadaDataRsp(retcode=0)
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetArmadaStageScoreActivityReq, GetArmadaStageScoreActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetArmadaStageScoreActivityReq) -> betterproto.Message:
|
||||
return GetArmadaStageScoreActivityRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetAskAddFriendListReq.py
Normal file
6
game_server/packet/handlers/GetAskAddFriendListReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetAskAddFriendListReq, GetAskAddFriendListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetAskAddFriendListReq) -> betterproto.Message:
|
||||
return GetAskAddFriendListRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetAssistantFrozenListReq.py
Normal file
6
game_server/packet/handlers/GetAssistantFrozenListReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetAssistantFrozenListReq, GetAssistantFrozenListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetAssistantFrozenListReq) -> betterproto.Message:
|
||||
return GetAssistantFrozenListRsp(retcode=0)
|
||||
12
game_server/packet/handlers/GetAuthkeyReq.py
Normal file
12
game_server/packet/handlers/GetAuthkeyReq.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetAuthkeyReq,GetAuthkeyRsp
|
||||
|
||||
async def handle(session: Session, msg: GetAuthkeyReq) -> betterproto.Message:
|
||||
return GetAuthkeyRsp(
|
||||
retcode=0,
|
||||
auth_appid=msg.auth_appid,
|
||||
authkey="0",
|
||||
sign_type=2,
|
||||
authkey_ver=1
|
||||
)
|
||||
84
game_server/packet/handlers/GetAvatarDataReq.py
Normal file
84
game_server/packet/handlers/GetAvatarDataReq.py
Normal file
@@ -0,0 +1,84 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetAvatarDataReq,
|
||||
GetAvatarDataRsp,
|
||||
Avatar,
|
||||
AvatarSkill,
|
||||
AvatarSubSkill
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetAvatarDataReq) -> betterproto.Message:
|
||||
rsp = GetAvatarDataRsp(retcode=0)
|
||||
if len(msg.avatar_id_list) == 1 and int(msg.avatar_id_list[0]) == 0 :
|
||||
rsp.is_all = True
|
||||
rsp.avatar_list=[
|
||||
Avatar(
|
||||
avatar_id=avatar.avatar_id,
|
||||
star=avatar.star,
|
||||
level=avatar.level,
|
||||
exp=avatar.exp,
|
||||
fragment=avatar.fragment,
|
||||
weapon_unique_id=avatar.weapon_id,
|
||||
stigmata_unique_id_1=avatar.stigmata_ids.get(1,0),
|
||||
stigmata_unique_id_2=avatar.stigmata_ids.get(2,0),
|
||||
stigmata_unique_id_3=avatar.stigmata_ids.get(3,0),
|
||||
skill_list=[
|
||||
AvatarSkill(
|
||||
skill_id=skill_id,
|
||||
sub_skill_list=[
|
||||
AvatarSubSkill(
|
||||
sub_skill_id=sub_skill.sub_skill_id,
|
||||
level=sub_skill.level
|
||||
)
|
||||
for sub_id, sub_skill in skill.sub_skill_lists.items()
|
||||
]
|
||||
)
|
||||
for skill_id,skill in avatar.skill_lists.items()
|
||||
],
|
||||
touch_goodfeel=avatar.touch_good_feel,
|
||||
today_has_add_goodfeel=avatar.today_has_add_good_feel,
|
||||
dress_list=avatar.dress_lists,
|
||||
dress_id=avatar.dress_id,
|
||||
sub_star=avatar.sub_star
|
||||
)
|
||||
for id, avatar in session.player.avatars.items()
|
||||
]
|
||||
else:
|
||||
avatar_list = []
|
||||
for id in msg.avatar_id_list:
|
||||
avatar = session.player.avatars.get(id)
|
||||
avatar_list.append(
|
||||
Avatar(
|
||||
avatar_id=avatar.avatar_id,
|
||||
star=avatar.star,
|
||||
level=avatar.level,
|
||||
exp=avatar.exp,
|
||||
fragment=avatar.fragment,
|
||||
weapon_unique_id=avatar.weapon_id,
|
||||
stigmata_unique_id_1=avatar.stigmata_ids.get(1,0),
|
||||
stigmata_unique_id_2=avatar.stigmata_ids.get(2,0),
|
||||
stigmata_unique_id_3=avatar.stigmata_ids.get(3,0),
|
||||
skill_list=[
|
||||
AvatarSkill(
|
||||
skill_id=skill_id,
|
||||
sub_skill_list=[
|
||||
AvatarSubSkill(
|
||||
sub_skill_id=sub_skill.sub_skill_id,
|
||||
level=sub_skill.level
|
||||
)
|
||||
for sub_id, sub_skill in skill.sub_skill_lists.items()
|
||||
]
|
||||
)
|
||||
for skill_id,skill in avatar.skill_lists.items()
|
||||
],
|
||||
touch_goodfeel=avatar.touch_good_feel,
|
||||
today_has_add_goodfeel=avatar.today_has_add_good_feel,
|
||||
dress_list=avatar.dress_lists,
|
||||
dress_id=avatar.dress_id,
|
||||
sub_star=avatar.sub_star
|
||||
)
|
||||
)
|
||||
rsp.is_all = False
|
||||
rsp.avatar_list=avatar_list
|
||||
return rsp
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetAvatarMissionActivityReq,GetAvatarMissionActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetAvatarMissionActivityReq) -> betterproto.Message:
|
||||
return GetAvatarMissionActivityRsp(retcode=0)
|
||||
399
game_server/packet/handlers/GetAvatarRollDataReq.py
Normal file
399
game_server/packet/handlers/GetAvatarRollDataReq.py
Normal file
@@ -0,0 +1,399 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetAvatarRollDataReq,
|
||||
GetAvatarRollDataRsp,
|
||||
AvatarRoll
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetAvatarRollDataReq) -> betterproto.Message:
|
||||
return GetAvatarRollDataRsp(
|
||||
retcode=0,
|
||||
is_all=True,
|
||||
roll_list=[
|
||||
AvatarRoll(
|
||||
avatar_id=101,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=102,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=103,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=104,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=105,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=106,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=111,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=112,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=113,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=114,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=201,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=202,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=203,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=204,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=205,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=206,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=211,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=212,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=213,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=214,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=301,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=302,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=303,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=311,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=312,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=313,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=314,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=317,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=401,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=402,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=403,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=404,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=411,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=412,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=421,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=422,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=501,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=502,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=503,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=504,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=506,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=507,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=511,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=601,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=602,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=603,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=604,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=611,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=612,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=702,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=703,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=705,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=706,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=711,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=712,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=713,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=714,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=801,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=802,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=803,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2201,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2202,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2401,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2501,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2601,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2801,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2901,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=2902,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=3101,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=3201,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=3301,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=3501,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=3601,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=3701,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=20201,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=20301,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=20401,
|
||||
is_unlock=True
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70005,
|
||||
progress=18
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70006,
|
||||
progress=18
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70010,
|
||||
progress=18
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70011,
|
||||
has_take_group_list=[
|
||||
111
|
||||
],
|
||||
progress=33
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70019,
|
||||
has_take_group_list=[
|
||||
191,
|
||||
192
|
||||
],
|
||||
progress=87
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70022,
|
||||
has_take_group_list=[
|
||||
221,
|
||||
222
|
||||
],
|
||||
is_unlock=True,
|
||||
progress=68
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70025,
|
||||
has_take_group_list=[
|
||||
251,
|
||||
252
|
||||
],
|
||||
progress=87
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70030,
|
||||
has_take_group_list=[
|
||||
301,
|
||||
302
|
||||
],
|
||||
progress=87
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70032,
|
||||
has_take_group_list=[
|
||||
321
|
||||
],
|
||||
progress=33
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70038,
|
||||
progress=21
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70065,
|
||||
progress=33
|
||||
),
|
||||
AvatarRoll(
|
||||
avatar_id=70080,
|
||||
has_take_group_list=[
|
||||
801,
|
||||
802
|
||||
],
|
||||
is_unlock=True,
|
||||
progress=63
|
||||
)
|
||||
]
|
||||
)
|
||||
23
game_server/packet/handlers/GetAvatarTeamDataReq.py
Normal file
23
game_server/packet/handlers/GetAvatarTeamDataReq.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetAvatarTeamDataReq,
|
||||
GetAvatarTeamDataRsp,
|
||||
CustomAvatarTeam
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetAvatarTeamDataReq) -> betterproto.Message:
|
||||
return GetAvatarTeamDataRsp(
|
||||
retcode=0,
|
||||
custom_avatar_team_list=[
|
||||
CustomAvatarTeam(
|
||||
team_id=team.team_id,
|
||||
name=team.name,
|
||||
avatar_id_list=team.avatar_id_list,
|
||||
elf_id_list=team.elf_id_list,
|
||||
astra_mate_id=team.astral_mate_id,
|
||||
is_using_astra_mate=team.is_using_astra_mate
|
||||
)
|
||||
for team_id,team in session.player.custom_avatar_team_list.items()
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetBattlePassMissionPanelReq,GetBattlePassMissionPanelRsp
|
||||
|
||||
async def handle(session: Session, msg: GetBattlePassMissionPanelReq) -> betterproto.Message:
|
||||
return GetBattlePassMissionPanelRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetBlackListReq.py
Normal file
6
game_server/packet/handlers/GetBlackListReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetBlackListReq, GetBlackListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetBlackListReq) -> betterproto.Message:
|
||||
return GetBlackListRsp(retcode=0)
|
||||
22
game_server/packet/handlers/GetBuffEffectReq.py
Normal file
22
game_server/packet/handlers/GetBuffEffectReq.py
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetBuffEffectReq,
|
||||
GetBuffEffectRsp,
|
||||
BuffEffect
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetBuffEffectReq) -> betterproto.Message:
|
||||
return GetBuffEffectRsp(
|
||||
retcode=0,
|
||||
effect_list=[
|
||||
BuffEffect(
|
||||
effect_id=i,
|
||||
end_time=int(get_unix_in_seconds()+3600*24*7)
|
||||
)
|
||||
for i in msg.effect_id_list
|
||||
],
|
||||
aura_effect_list=msg.effect_id_list[:]
|
||||
)
|
||||
304
game_server/packet/handlers/GetBulletinActivityMissionReq.py
Normal file
304
game_server/packet/handlers/GetBulletinActivityMissionReq.py
Normal file
@@ -0,0 +1,304 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetBulletinActivityMissionReq,
|
||||
GetBulletinActivityMissionRsp,
|
||||
BulletinMissionGroup,
|
||||
PanelMissionData,
|
||||
PanelMissionDataPanelMissionCycleData
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetBulletinActivityMissionReq) -> betterproto.Message:
|
||||
return GetBulletinActivityMissionRsp(
|
||||
retcode=0,
|
||||
mission_group_list=[
|
||||
BulletinMissionGroup(
|
||||
activity_id=5931
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5938,
|
||||
mission_list=[
|
||||
PanelMissionData(
|
||||
mission_id=115679,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729828800,
|
||||
cycle_id=20006997,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5941,
|
||||
mission_list=[
|
||||
PanelMissionData(
|
||||
mission_id=687511,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729828800,
|
||||
cycle_id=20007074,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5943,
|
||||
mission_list=[
|
||||
PanelMissionData(
|
||||
mission_id=687521,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729828800,
|
||||
cycle_id=20007081,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5944,
|
||||
mission_list=[
|
||||
PanelMissionData(
|
||||
mission_id=687530,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007089,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5949,
|
||||
mission_list=[
|
||||
PanelMissionData(
|
||||
mission_id=687546,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007106,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687549,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007109,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687566,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007126,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687563,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007123,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687564,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007124,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687565,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007125,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687562,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007122,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687554,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007114,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687555,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007115,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687567,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007127,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687550,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007110,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687551,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007111,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687552,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007112,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687553,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007113,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687560,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007120,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687561,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007121,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687545,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007105,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5952
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5953,
|
||||
mission_list=[
|
||||
PanelMissionData(
|
||||
mission_id=687608,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007187,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687620,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007141,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
),
|
||||
PanelMissionData(
|
||||
mission_id=687716,
|
||||
cycle_list=[
|
||||
PanelMissionDataPanelMissionCycleData(
|
||||
begin_time=1729108800,
|
||||
cycle_id=20007143,
|
||||
end_time=1880308800
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5959
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5962
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5963
|
||||
),
|
||||
BulletinMissionGroup(
|
||||
activity_id=5964
|
||||
)
|
||||
]
|
||||
)
|
||||
9
game_server/packet/handlers/GetBulletinReq.py
Normal file
9
game_server/packet/handlers/GetBulletinReq.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetBulletinReq,GetBulletinRsp
|
||||
|
||||
async def handle(session: Session, msg: GetBulletinReq) -> betterproto.Message:
|
||||
return GetBulletinRsp(
|
||||
retcode=0,
|
||||
is_all=True
|
||||
)
|
||||
6
game_server/packet/handlers/GetCardProductInfoReq.py
Normal file
6
game_server/packet/handlers/GetCardProductInfoReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetCardProductInfoReq,GetCardProductInfoRsp
|
||||
|
||||
async def handle(session: Session, msg: GetCardProductInfoReq) -> betterproto.Message:
|
||||
return GetCardProductInfoRsp(retcode=0)
|
||||
@@ -0,0 +1,37 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.step_mission_compensation import StepMissionCompensationData
|
||||
from lib.proto import (
|
||||
GetChallengeStepCompensationInfoReq,
|
||||
GetChallengeStepCompensationInfoRsp,
|
||||
ChallengeStepCompensation,
|
||||
StepCompensation
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetChallengeStepCompensationInfoReq) -> betterproto.Message:
|
||||
return GetChallengeStepCompensationInfoRsp(
|
||||
retcode=0,
|
||||
compensation_list=[
|
||||
ChallengeStepCompensation(
|
||||
compensation_id=challenge.CompensationID,
|
||||
is_take_compensation=True,
|
||||
new_challenge_step_compensation_list=[
|
||||
StepCompensation(
|
||||
step_id=id
|
||||
) for id in challenge.NewChallengeStepIDList
|
||||
],
|
||||
old_challenge_step_compensation_list=[
|
||||
StepCompensation(
|
||||
step_id=id
|
||||
) for id in challenge.OldChallengeStepIDList
|
||||
],
|
||||
mainline_step_compensation_list=[
|
||||
StepCompensation(
|
||||
step_id=id
|
||||
) for id in challenge.MainLineStepIDList
|
||||
]
|
||||
)
|
||||
for challenge in ResourceManager.instance().values(StepMissionCompensationData)
|
||||
]
|
||||
)
|
||||
6
game_server/packet/handlers/GetChapterActivityDataReq.py
Normal file
6
game_server/packet/handlers/GetChapterActivityDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetChapterActivityDataReq,GetChapterActivityDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetChapterActivityDataReq) -> betterproto.Message:
|
||||
return GetChapterActivityDataRsp(retcode=0)
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetChapterCompensationInfoReq,GetChapterCompensationInfoRsp
|
||||
|
||||
async def handle(session: Session, msg: GetChapterCompensationInfoReq) -> betterproto.Message:
|
||||
return GetChapterCompensationInfoRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetChatgroupListReq.py
Normal file
6
game_server/packet/handlers/GetChatgroupListReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetChatgroupListReq, GetChatgroupListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetChatgroupListReq) -> betterproto.Message:
|
||||
return GetChatgroupListRsp(retcode=0)
|
||||
23
game_server/packet/handlers/GetClientDataReq.py
Normal file
23
game_server/packet/handlers/GetClientDataReq.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from database import mongo
|
||||
from lib.proto import GetClientDataReq,GetClientDataRsp,ClientData
|
||||
|
||||
async def handle(session: Session, msg: GetClientDataReq) -> betterproto.Message:
|
||||
data = []
|
||||
client_data = list(mongo.find_documents_by_key_values("clientdata", {"ID": msg.id, "Type":msg.type}))
|
||||
if client_data:
|
||||
for client in client_data:
|
||||
data.append(
|
||||
ClientData(
|
||||
id=client['ID'],
|
||||
type=client['Type'],
|
||||
data=client['Data'][0]
|
||||
)
|
||||
)
|
||||
return GetClientDataRsp(
|
||||
retcode=0,
|
||||
type=msg.type,
|
||||
id=msg.id,
|
||||
client_data_list=data
|
||||
)
|
||||
6
game_server/packet/handlers/GetClientMailDataReq.py
Normal file
6
game_server/packet/handlers/GetClientMailDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetClientMailDataReq, GetClientMailDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetClientMailDataReq) -> betterproto.Message:
|
||||
return GetClientMailDataRsp(retcode=0)
|
||||
11
game_server/packet/handlers/GetClientSettingReq.py
Normal file
11
game_server/packet/handlers/GetClientSettingReq.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetClientSettingReq,GetClientSettingRsp
|
||||
|
||||
async def handle(session: Session, msg: GetClientSettingReq) -> betterproto.Message:
|
||||
return GetClientSettingRsp(
|
||||
retcode=0,
|
||||
client_setting_type=msg.client_setting_type,
|
||||
is_weekly_guide_switch_on=True,
|
||||
avatar_artifact_switch_list=[]
|
||||
)
|
||||
16
game_server/packet/handlers/GetCollectionListReq.py
Normal file
16
game_server/packet/handlers/GetCollectionListReq.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.collection import CollectionData
|
||||
from lib.proto import GetCollectionListReq, GetCollectionListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetCollectionListReq) -> betterproto.Message:
|
||||
collection = [
|
||||
collection.ID
|
||||
for collection in ResourceManager.instance().values(CollectionData)
|
||||
]
|
||||
return GetCollectionListRsp(
|
||||
retcode=0,
|
||||
collection_id_list=collection,
|
||||
active_collection_id_list=collection
|
||||
)
|
||||
55
game_server/packet/handlers/GetConfigReq.py
Normal file
55
game_server/packet/handlers/GetConfigReq.py
Normal file
File diff suppressed because one or more lines are too long
6
game_server/packet/handlers/GetConsignedOrderDataReq.py
Normal file
6
game_server/packet/handlers/GetConsignedOrderDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetConsignedOrderDataReq, GetConsignedOrderDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetConsignedOrderDataReq) -> betterproto.Message:
|
||||
return GetConsignedOrderDataRsp(retcode=0)
|
||||
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetCurrencyExchangeInfoReq, GetCurrencyExchangeInfoRsp
|
||||
|
||||
async def handle(session: Session, msg: GetCurrencyExchangeInfoReq) -> betterproto.Message:
|
||||
return GetCurrencyExchangeInfoRsp(retcode=0)
|
||||
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
|
||||
)
|
||||
441
game_server/packet/handlers/GetDLCAvatarReq.py
Normal file
441
game_server/packet/handlers/GetDLCAvatarReq.py
Normal file
@@ -0,0 +1,441 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetDLCAvatarReq,
|
||||
GetDLCAvatarRsp,
|
||||
DLCAvatar,
|
||||
DLCAvatarTalent
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetDLCAvatarReq) -> betterproto.Message:
|
||||
return GetDLCAvatarRsp(
|
||||
retcode=0,
|
||||
avatar_list=[
|
||||
DLCAvatar(
|
||||
avatar_id=1203,
|
||||
equip_talent_list=[20304,20322,20327],
|
||||
talent_list=[
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20300
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20301
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20302
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20303
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20304
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=20305
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20306
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20307
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20308
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20309
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20310
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20311
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20312
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20313
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20314
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20315
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=20316
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=20317
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20318
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=20319
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20320
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20321
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20322
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=4,
|
||||
talent_id=20323
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=20324
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=20325
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=20326
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20327
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=20328
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=20329,
|
||||
wait_select_affix_set_id=3
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=20330,
|
||||
wait_select_affix_set_id=3
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=20331,
|
||||
wait_select_affix_set_id=3
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=20332,
|
||||
wait_select_affix_set_id=3
|
||||
)
|
||||
]
|
||||
),
|
||||
DLCAvatar(
|
||||
avatar_id=1304,
|
||||
equip_talent_list=[30403,30423,30430],
|
||||
talent_list=[
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30401
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30402
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30403
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30404
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30405
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30406
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=4,
|
||||
talent_id=30407
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30408
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30409
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30410
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30411
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30412
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30413
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30414
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30415
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30416
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30417
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30418
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30420
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30421
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30422
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30423
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30424
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=4,
|
||||
talent_id=30425
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30426
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=30427
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30428
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=30429
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=30430
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=30431,
|
||||
wait_select_affix_set_id=5
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=30432,
|
||||
wait_select_affix_set_id=5
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=30433,
|
||||
wait_select_affix_set_id=5
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=30434,
|
||||
wait_select_affix_set_id=5
|
||||
)
|
||||
]
|
||||
),
|
||||
DLCAvatar(
|
||||
avatar_id=1411,
|
||||
equip_talent_list=[41101,41123,41124],
|
||||
talent_list=[
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41100
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41101
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41102
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41103
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41104
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41105
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41106
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=4,
|
||||
talent_id=41107
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41108
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41109
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41110
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41111
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41112
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41113
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41114
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41115
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41116
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=41117
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41118
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41119
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=41120
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41122
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41123
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41124
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41125
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=41126
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=1,
|
||||
talent_id=41127
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=3,
|
||||
talent_id=41128
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=2,
|
||||
talent_id=41129
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=41130,
|
||||
wait_select_affix_set_id=3
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=41131,
|
||||
wait_select_affix_set_id=3
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=41132,
|
||||
wait_select_affix_set_id=3
|
||||
),
|
||||
DLCAvatarTalent(
|
||||
level=8,
|
||||
talent_id=41133,
|
||||
wait_select_affix_set_id=3
|
||||
)
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
104
game_server/packet/handlers/GetDLCReq.py
Normal file
104
game_server/packet/handlers/GetDLCReq.py
Normal file
@@ -0,0 +1,104 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetDLCReq,
|
||||
GetDLCRsp,
|
||||
DLCSupportNPC
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetDLCReq) -> betterproto.Message:
|
||||
return GetDLCRsp(
|
||||
retcode=0,
|
||||
exp=5300,
|
||||
finished_dialog_id_list=[
|
||||
310145,
|
||||
310151,
|
||||
310207,
|
||||
310237,
|
||||
310240,
|
||||
310250,
|
||||
310523,
|
||||
310724,
|
||||
320206,
|
||||
320224,
|
||||
350510,
|
||||
350515,
|
||||
350526,
|
||||
360607,
|
||||
500010006,
|
||||
500010020,
|
||||
500010037,
|
||||
500010068,
|
||||
500010069,
|
||||
500010079,
|
||||
500020008,
|
||||
500020014,
|
||||
500050003,
|
||||
500060005,
|
||||
500060014,
|
||||
500060039,
|
||||
500070016,
|
||||
500070021,
|
||||
500070040,
|
||||
500080006,
|
||||
500090006,
|
||||
500090015,
|
||||
500100043,
|
||||
500110024,
|
||||
500110039,
|
||||
500110045,
|
||||
500120012,
|
||||
500120021,
|
||||
500120036,
|
||||
500130003,
|
||||
500130016,
|
||||
500140003,
|
||||
500140017,
|
||||
500140029,
|
||||
500150007,
|
||||
500200003,
|
||||
500200036,
|
||||
500200054,
|
||||
500210005,
|
||||
500210009,
|
||||
510010006,
|
||||
510010014,
|
||||
510010019,
|
||||
510050010,
|
||||
510080005,
|
||||
510080025,
|
||||
510090006,
|
||||
510100004,
|
||||
510100022,
|
||||
510110007,
|
||||
510120008,
|
||||
510120013
|
||||
],
|
||||
has_take_reward_level=30,
|
||||
level=30,
|
||||
name="ley",
|
||||
support_npc_list=[
|
||||
DLCSupportNPC(
|
||||
npc_id=1,
|
||||
support_level=3
|
||||
),
|
||||
DLCSupportNPC(
|
||||
npc_id=2,
|
||||
support_level=2,
|
||||
support_point=75
|
||||
),
|
||||
DLCSupportNPC(
|
||||
npc_id=3,
|
||||
support_level=3
|
||||
),
|
||||
DLCSupportNPC(
|
||||
npc_id=4,
|
||||
support_level=3
|
||||
),
|
||||
DLCSupportNPC(
|
||||
npc_id=5,
|
||||
support_level=1,
|
||||
support_point=2
|
||||
)
|
||||
]
|
||||
)
|
||||
6
game_server/packet/handlers/GetDLCTowerReq.py
Normal file
6
game_server/packet/handlers/GetDLCTowerReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetDLCTowerReq, GetDLCTowerRsp
|
||||
|
||||
async def handle(session: Session, msg: GetDLCTowerReq) -> betterproto.Message:
|
||||
return GetDLCTowerRsp(retcode=0,schedule_id=203)
|
||||
924
game_server/packet/handlers/GetDormDataReq.py
Normal file
924
game_server/packet/handlers/GetDormDataReq.py
Normal file
@@ -0,0 +1,924 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetDormDataReq,
|
||||
GetDormDataRsp,
|
||||
DepotFurniture,
|
||||
DormEvent,
|
||||
DormHouse,
|
||||
DormRoom,
|
||||
Furniture
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetDormDataReq) -> betterproto.Message:
|
||||
return GetDormDataRsp(
|
||||
retcode=0,
|
||||
depot_furniture_list=[
|
||||
DepotFurniture(
|
||||
id=140001,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140002,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140003,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140010,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140012,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140013,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140015,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140016,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140201,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140202,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140213,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140215,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140216,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140601,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140603,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140801,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140802,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140806,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140810,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140812,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140813,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140814,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140815,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140816,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140817,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140818,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140819,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140820,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=140822,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141501,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141601,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141606,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141615,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141619,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141620,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141621,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141622,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141701,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141702,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141703,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141704,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141709,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141713,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141801,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141802,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141804,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141805,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141807,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141808,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141809,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141810,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141811,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141812,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141814,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=141815,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=146120,
|
||||
num=1
|
||||
),
|
||||
DepotFurniture(
|
||||
id=146620,
|
||||
num=1
|
||||
)
|
||||
],
|
||||
event_list=[
|
||||
DormEvent(
|
||||
avatar_id=101,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=102,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=103,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=104,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=105,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=106,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=111,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=112,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=113,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=114,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=201,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=202,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=203,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=204,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=205,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=206,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=211,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=212,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=213,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=214,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=301,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=302,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=303,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=311,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=312,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=313,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=314,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=317,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=401,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=402,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=403,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=404,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=411,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=412,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=421,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=422,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=501,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=502,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=503,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=504,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=506,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=507,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=511,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=601,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=602,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=603,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=604,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=611,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=612,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=702,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=703,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=705,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=706,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=711,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=712,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=713,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=714,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=801,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=802,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=803,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2201,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2202,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2401,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2501,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2601,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2801,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2901,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=2902,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=3101,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=3201,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=3301,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=3501,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=3601,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=3701,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=20201,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=20301,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
),
|
||||
DormEvent(
|
||||
avatar_id=20401,
|
||||
event_id_list=[
|
||||
10007,
|
||||
10011
|
||||
]
|
||||
)
|
||||
],
|
||||
house_list=[
|
||||
DormHouse(
|
||||
id=101,
|
||||
level=39,
|
||||
name="HitLey",
|
||||
room_list=[
|
||||
DormRoom(
|
||||
avatar_list=[
|
||||
412,705,
|
||||
802,
|
||||
2201,
|
||||
2401
|
||||
],
|
||||
furniture_list=[
|
||||
Furniture(
|
||||
id=140015
|
||||
),
|
||||
Furniture(
|
||||
id=140013
|
||||
),
|
||||
Furniture(
|
||||
id=140016
|
||||
),
|
||||
],
|
||||
id=1011
|
||||
),
|
||||
DormRoom(
|
||||
avatar_list=[
|
||||
105,
|
||||
113,
|
||||
205,
|
||||
313,
|
||||
612
|
||||
],
|
||||
furniture_list=[
|
||||
Furniture(
|
||||
id=140808,
|
||||
pos_x=1,
|
||||
pos_y=22
|
||||
),
|
||||
Furniture(
|
||||
id=140809,
|
||||
location=3,
|
||||
pos_x=7,
|
||||
pos_y=5
|
||||
),
|
||||
Furniture(
|
||||
direction=3,
|
||||
id=140803,
|
||||
pos_x=1,
|
||||
pos_y=15
|
||||
),
|
||||
Furniture(
|
||||
direction=1,
|
||||
id=140811,
|
||||
pos_x=5,
|
||||
pos_y=14
|
||||
),
|
||||
Furniture(
|
||||
id=141610,
|
||||
pos_x=2,
|
||||
pos_y=8
|
||||
),
|
||||
Furniture(
|
||||
id=140812,
|
||||
pos_x=4,
|
||||
pos_y=4
|
||||
),
|
||||
Furniture(
|
||||
id=141806,
|
||||
pos_x=9,
|
||||
pos_y=7
|
||||
),
|
||||
Furniture(
|
||||
id=141803,
|
||||
pos_x=11,
|
||||
pos_y=12
|
||||
),
|
||||
Furniture(
|
||||
id=140821,
|
||||
location=2,
|
||||
pos_x=7,
|
||||
pos_y=3
|
||||
),
|
||||
Furniture(
|
||||
id=140002,
|
||||
pos_x=26,
|
||||
pos_y=2
|
||||
),
|
||||
Furniture(
|
||||
id=140804,
|
||||
pos_x=24,
|
||||
pos_y=17
|
||||
),
|
||||
Furniture(
|
||||
id=140805,
|
||||
pos_x=25,
|
||||
pos_y=15
|
||||
),
|
||||
Furniture(
|
||||
id=140807,
|
||||
pos_x=23,
|
||||
pos_y=5
|
||||
),
|
||||
Furniture(
|
||||
id=140825
|
||||
),
|
||||
Furniture(
|
||||
id=140824
|
||||
),
|
||||
Furniture(
|
||||
id=140823
|
||||
)
|
||||
],
|
||||
id=1012
|
||||
),
|
||||
DormRoom(
|
||||
furniture_list=[
|
||||
Furniture(
|
||||
id=140015
|
||||
),
|
||||
Furniture(
|
||||
id=140013
|
||||
),
|
||||
Furniture(
|
||||
id=140016
|
||||
),
|
||||
],
|
||||
id=1013
|
||||
)
|
||||
]
|
||||
)
|
||||
],
|
||||
is_allow_visit=True,
|
||||
show_house=101,
|
||||
show_room=1012,
|
||||
visit_avatar=101
|
||||
)
|
||||
245
game_server/packet/handlers/GetDropLimitActivityReq.py
Normal file
245
game_server/packet/handlers/GetDropLimitActivityReq.py
Normal file
@@ -0,0 +1,245 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetDropLimitActivityReq,
|
||||
GetDropLimitActivityRsp,
|
||||
DropLimitActivity,
|
||||
DropLimitItem
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetDropLimitActivityReq) -> betterproto.Message:
|
||||
return GetDropLimitActivityRsp(
|
||||
retcode=0,
|
||||
drop_limit_activity_list=[
|
||||
DropLimitActivity(
|
||||
activity_id=1,
|
||||
begin_time=1576029600,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
limit_id=101
|
||||
),
|
||||
DropLimitItem(
|
||||
limit_id=201
|
||||
),
|
||||
DropLimitItem(
|
||||
limit_id=301
|
||||
),
|
||||
DropLimitItem(
|
||||
limit_id=401
|
||||
)
|
||||
],
|
||||
end_time=1891735200
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=38,
|
||||
begin_time=1624500000,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
limit_id=3001
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=3800,
|
||||
limit_id=3002
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3003
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3004
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3005
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3006
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3007
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3008
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3010
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3013
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3014
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3015
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3016
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3017
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3019
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3021
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3022
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3026
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3027
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3028
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3031
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3032
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3035
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3036
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=210,
|
||||
limit_id=3040
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3042
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3043
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=430,
|
||||
limit_id=3045
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=430,
|
||||
limit_id=3047
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=430,
|
||||
limit_id=3048
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=1500,
|
||||
limit_id=3049
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=430,
|
||||
limit_id=3050
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=465,
|
||||
limit_id=3051
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=465,
|
||||
limit_id=3052
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=505,
|
||||
limit_id=3054
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=505,
|
||||
limit_id=3055
|
||||
)
|
||||
],
|
||||
end_time=2068056000
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=42,
|
||||
begin_time=1634004000,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
limit_id=408
|
||||
)
|
||||
],
|
||||
end_time=1891735200
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=45,
|
||||
begin_time=1644264000,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
limit_id=4001
|
||||
)
|
||||
],
|
||||
end_time=1975780800
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=47,
|
||||
begin_time=1668045600,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
got_num=360,
|
||||
limit_id=4003
|
||||
)
|
||||
],
|
||||
end_time=1976558400
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=48,
|
||||
begin_time=1668045600,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
limit_id=4006
|
||||
)
|
||||
],
|
||||
end_time=1976558400
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=49,
|
||||
begin_time=1668045600,
|
||||
drop_limit_got_num_list=[
|
||||
DropLimitItem(
|
||||
got_num=1050,
|
||||
limit_id=4010
|
||||
),
|
||||
DropLimitItem(
|
||||
got_num=600,
|
||||
limit_id=4012
|
||||
)
|
||||
],
|
||||
end_time=1976558400
|
||||
),
|
||||
DropLimitActivity(
|
||||
activity_id=50,
|
||||
begin_time=1673740800,
|
||||
end_time=1976558400
|
||||
)
|
||||
]
|
||||
)
|
||||
29
game_server/packet/handlers/GetElfDataReq.py
Normal file
29
game_server/packet/handlers/GetElfDataReq.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetElfDataReq,
|
||||
GetElfDataRsp,
|
||||
Elf,
|
||||
ElfSkill
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetElfDataReq) -> betterproto.Message:
|
||||
return GetElfDataRsp(
|
||||
retcode=0,
|
||||
elf_list=[
|
||||
Elf(
|
||||
elf_id=elf_id,
|
||||
level=elf.level,
|
||||
star=elf.star,
|
||||
exp=elf.exp,
|
||||
skill_list=[
|
||||
ElfSkill(
|
||||
skill_id=skill_id,
|
||||
skill_level=skill.level
|
||||
)
|
||||
for skill_id,skill in elf.skill_list.items()
|
||||
]
|
||||
)
|
||||
for elf_id,elf in session.player.elfs.items()
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetEliteChapterCompensationInfoReq,
|
||||
GetEliteChapterCompensationInfoRsp,
|
||||
EliteChapterCompensationInfo
|
||||
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetEliteChapterCompensationInfoReq) -> betterproto.Message:
|
||||
return GetEliteChapterCompensationInfoRsp(
|
||||
retcode=0,
|
||||
chapter_list=[
|
||||
EliteChapterCompensationInfo(
|
||||
chapter_id=id,
|
||||
has_taken_compensation=True
|
||||
)
|
||||
for id in range(1,35)
|
||||
]
|
||||
)
|
||||
6
game_server/packet/handlers/GetEmojiDataReq.py
Normal file
6
game_server/packet/handlers/GetEmojiDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetEmojiDataReq, GetEmojiDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetEmojiDataReq) -> betterproto.Message:
|
||||
return GetEmojiDataRsp(retcode=0,is_all=True)
|
||||
29
game_server/packet/handlers/GetEndlessStatusReq.py
Normal file
29
game_server/packet/handlers/GetEndlessStatusReq.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetEndlessStatusReq,
|
||||
GetEndlessStatusRsp,
|
||||
EndlessStatus,
|
||||
EndlessType
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetEndlessStatusReq) -> betterproto.Message:
|
||||
return GetEndlessStatusRsp(
|
||||
retcode=0,
|
||||
cur_status=EndlessStatus(
|
||||
begin_time=1730098800,
|
||||
can_join_in=True,
|
||||
close_time=1880308800,
|
||||
end_time=1880308800,
|
||||
endless_type=EndlessType.ENDLESS_TYPE_ULTRA.value,
|
||||
),
|
||||
next_status_list=[
|
||||
EndlessStatus(
|
||||
begin_time=1730444400,
|
||||
close_time=1880308800,
|
||||
end_time=1880308800,
|
||||
endless_type=EndlessType.ENDLESS_TYPE_ULTRA.value
|
||||
)
|
||||
],
|
||||
selected_endless_type=5
|
||||
)
|
||||
50
game_server/packet/handlers/GetEquipmentDataReq.py
Normal file
50
game_server/packet/handlers/GetEquipmentDataReq.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import betterproto
|
||||
from typing import List
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.weapon_data import WeaponData
|
||||
from game_server.resource.configdb.stigmata_data import StigmataData
|
||||
from lib.proto import (
|
||||
GetEquipmentDataReq,
|
||||
GetEquipmentDataRsp,
|
||||
Material,
|
||||
Weapon,
|
||||
Stigmata,
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetEquipmentDataReq) -> betterproto.Message:
|
||||
return GetEquipmentDataRsp(
|
||||
retcode=0,
|
||||
is_all=True,
|
||||
weapon_list=[
|
||||
Weapon(
|
||||
unique_id=id,
|
||||
id=weapon.item_id,
|
||||
level=weapon.level,
|
||||
exp=weapon.exp,
|
||||
is_protected=weapon.is_locked,
|
||||
is_extracted=weapon.is_extracted
|
||||
)
|
||||
for id, weapon in session.player.inventory.weapon_items.items()
|
||||
],
|
||||
stigmata_list=[
|
||||
Stigmata(
|
||||
unique_id=id,
|
||||
id=stigmata.item_id,
|
||||
level=stigmata.level,
|
||||
exp=stigmata.exp,
|
||||
slot_num=stigmata.slot_num,
|
||||
refine_value=stigmata.refine_value,
|
||||
promote_times=stigmata.promote_times,
|
||||
is_protected=stigmata.is_locked
|
||||
)
|
||||
for id, stigmata in session.player.inventory.stigmata_items.items()
|
||||
],
|
||||
material_list=[
|
||||
Material(
|
||||
id=material.item_id,
|
||||
num=material.num
|
||||
)
|
||||
for id, material in session.player.inventory.material_items.items()
|
||||
]
|
||||
)
|
||||
24
game_server/packet/handlers/GetEquipmentForgeDataReq.py
Normal file
24
game_server/packet/handlers/GetEquipmentForgeDataReq.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetEquipmentForgeDataReq,
|
||||
GetEquipmentForgeDataRsp,
|
||||
EquipmentForge
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetEquipmentForgeDataReq) -> betterproto.Message:
|
||||
return GetEquipmentForgeDataRsp(
|
||||
retcode=0,
|
||||
forge_list=[11001,11002,11003,11004,11005,11006,11007,11008,11009,11010,11011,11012,11013,11014,11015,11016,11017,11618,11619,11620,11621,11622,11623,11624,11625,11626,11627,11628,11629,11630,11631,11632,11633,12001,12002,12003,12004,12005,12006,12007,12008,12009,12010,12011,12012,12013,12014,12015,12016,12617,12618,12619,12620,12621,12622,12623,12624,12625,12626,12627,12628,12629,13001,13002,13003,13004,13005,13006,13007,13008,13009,13010,13011,13012,13013,13014,13015,13016,13617,13618,13619,13620,13621,13622,13623,13624,13625,13626,13627,13628,13629,14001,14002,14003,14004,14005,14006,14007,14008,14009,14010,14011,14012,14013,14014,14015,14016,14017,14618,14619,14620,14621,14622,14623,14624,14625,14626,14627,14628,14629,14630,12030,14031,11634,12631,13630,14632,11035,11036,11037,11038,12032,13031,14033,12033,13032,14034,11639,11640,11641,11642,11643,11644,11645,11646,11047,12034,13033,14035,11648,11649,12635,13634,14636,12036,13035,14037,12037,13036,14038,11050,12038,13037,14039,12639,13638,14640,12640,13639,14641,12041,13040,14042,12042,13041,14043,11051,11052,11053,13042,12644,13644,14645,11654,12645,13645,14646,11055,11056,11057,11059,21001,21002,21003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033,20034,20035,20036,20037,20038,20039,20040,20041,20042,20043,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,70001,70002,70003,70004,70005,70006,70007,70008,70009,70010,70011,70012,70013,70014,70015,70016,70017,70018,70025,70026,70027,70028,70029,70030,70031,70032,70033,11804,11805,11806,11807,11808,11809,11810,11811,11812,11813,11814,11815,11816,11817,11818,11819,11820,11821,11822,11823,11824,11825,11826,11827,11828,11829,11830,11831,11832,11833,11834,11835,11836,31001,31002,31003,31004,31005,31006,31007,31008,31009,31010,40034,40035,70019,70020,70021,70022,70023,70024,11060,20068,20069,20070,11837,11838,11839,11840,11841,11842,11843,11844,11845,11846,11847,11848,11849,11850,20071,20072,20073,20074,20075,20076,20077,20078,20079,20080,20081,20082,20083,20084,20085,20086,20087,20088,20089,20090,20091,20092,20093,20094,20095,20096,20097,11061,11851,20098,20099,20100,11852,20101,20102,20103,11853,20104,20105,20106,11854,70034,70035,70036,20107,20108,20109,11855,11856,20110,20111,20112,11857,20113,20114,20115,11858,20116,20117,20118,11062,11063,11064,11065,20119,20120,20121,11860,11861,20122,20123,20124,11859,20125,20126,20127,20128,20129,20130,20131,20132,20133,11862,20134,20135,20136,20137,20138,20139,11863,20140,20141,20142,20143,20144,20145,11066,11864,20146,20147,20148,20149,20150,20151,11865,11866,20152,20153,20154,20155,20156,20157,20158,20159,20160],
|
||||
has_forge_list=[
|
||||
EquipmentForge(
|
||||
forge_id=20042,
|
||||
times=1
|
||||
),
|
||||
EquipmentForge(
|
||||
forge_id=20049,
|
||||
times=1
|
||||
)
|
||||
],
|
||||
schedule_id=1
|
||||
)
|
||||
29
game_server/packet/handlers/GetExBossInfoReq.py
Normal file
29
game_server/packet/handlers/GetExBossInfoReq.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetExBossInfoReq,
|
||||
GetExBossInfoRsp,
|
||||
ExBossInfo,
|
||||
ExBossIdInfo
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetExBossInfoReq) -> betterproto.Message:
|
||||
return GetExBossInfoRsp(
|
||||
retcode=0,
|
||||
boss_info=ExBossInfo(
|
||||
boss_id_list=[
|
||||
ExBossIdInfo(
|
||||
boss_id=48016
|
||||
),
|
||||
ExBossIdInfo(
|
||||
boss_id=41021
|
||||
),
|
||||
ExBossIdInfo(
|
||||
boss_id=13021
|
||||
)
|
||||
],
|
||||
cur_max_enter_times=714,
|
||||
rank_id=104,
|
||||
schedule_id=10359
|
||||
)
|
||||
)
|
||||
6
game_server/packet/handlers/GetExBossScheduleReq.py
Normal file
6
game_server/packet/handlers/GetExBossScheduleReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetExBossScheduleReq, GetExBossScheduleRsp
|
||||
|
||||
async def handle(session: Session, msg: GetExBossScheduleReq) -> betterproto.Message:
|
||||
return GetExBossScheduleRsp(retcode=0)
|
||||
14
game_server/packet/handlers/GetExtraStoryDataReq.py
Normal file
14
game_server/packet/handlers/GetExtraStoryDataReq.py
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetExtractReforgeActivityReq,GetExtractReforgeActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetExtractReforgeActivityReq) -> betterproto.Message:
|
||||
return GetExtractReforgeActivityRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetFarmActivityDataReq.py
Normal file
6
game_server/packet/handlers/GetFarmActivityDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetFarmActivityDataReq, GetFarmActivityDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetFarmActivityDataReq) -> betterproto.Message:
|
||||
return GetFarmActivityDataRsp(retcode=0)
|
||||
716
game_server/packet/handlers/GetFinishGuideDataReq.py
Normal file
716
game_server/packet/handlers/GetFinishGuideDataReq.py
Normal file
@@ -0,0 +1,716 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetFinishGuideDataReq,GetFinishGuideDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetFinishGuideDataReq) -> betterproto.Message:
|
||||
return GetFinishGuideDataRsp(
|
||||
retcode=0,
|
||||
guide_id_list=[
|
||||
2007,
|
||||
5007,
|
||||
5008,
|
||||
5009,
|
||||
2002,
|
||||
5648,
|
||||
2974,
|
||||
5391,
|
||||
5392,
|
||||
5537,
|
||||
1080,
|
||||
1274,
|
||||
1275,
|
||||
1276,
|
||||
1299,
|
||||
1302,
|
||||
1500,
|
||||
1501,
|
||||
1502,
|
||||
1503,
|
||||
1504,
|
||||
1505,
|
||||
1506,
|
||||
1507,
|
||||
1508,
|
||||
1509,
|
||||
1510,
|
||||
1511,
|
||||
1512,
|
||||
1513,
|
||||
1514,
|
||||
1515,
|
||||
1516,
|
||||
1517,
|
||||
1518,
|
||||
1519,
|
||||
1520,
|
||||
1521,
|
||||
1522,
|
||||
1523,
|
||||
1524,
|
||||
1525,
|
||||
1527,
|
||||
1528,
|
||||
1529,
|
||||
1530,
|
||||
1531,
|
||||
1532,
|
||||
1533,
|
||||
1534,
|
||||
1535,
|
||||
1536,
|
||||
1537,
|
||||
1538,
|
||||
1539,
|
||||
1540,
|
||||
1541,
|
||||
1542,
|
||||
1543,
|
||||
1544,
|
||||
1545,
|
||||
1546,
|
||||
1547,
|
||||
1550,
|
||||
1624,
|
||||
1625,
|
||||
2003,
|
||||
2400,
|
||||
2401,
|
||||
2402,
|
||||
2403,
|
||||
2404,
|
||||
2405,
|
||||
2501,
|
||||
2519,
|
||||
2521,
|
||||
2539,
|
||||
2540,
|
||||
2600,
|
||||
2700,
|
||||
2701,
|
||||
2703,
|
||||
2900,
|
||||
2901,
|
||||
2902,
|
||||
2903,
|
||||
2904,
|
||||
2920,
|
||||
2960,
|
||||
2963,
|
||||
2968,
|
||||
2969,
|
||||
2985,
|
||||
2986,
|
||||
2994,
|
||||
3000,
|
||||
3001,
|
||||
3002,
|
||||
3003,
|
||||
3005,
|
||||
3006,
|
||||
3007,
|
||||
3008,
|
||||
3009,
|
||||
3010,
|
||||
3011,
|
||||
3012,
|
||||
3013,
|
||||
3014,
|
||||
3015,
|
||||
3016,
|
||||
3017,
|
||||
3020,
|
||||
3023,
|
||||
3024,
|
||||
3025,
|
||||
4112,
|
||||
5006,
|
||||
5008,
|
||||
5009,
|
||||
5010,
|
||||
5102,
|
||||
5104,
|
||||
5105,
|
||||
5108,
|
||||
5109,
|
||||
5110,
|
||||
5112,
|
||||
5114,
|
||||
5202,
|
||||
5231,
|
||||
5367,
|
||||
5368,
|
||||
5369,
|
||||
5830,
|
||||
5831,
|
||||
5832,
|
||||
5833,
|
||||
5851,
|
||||
5852,
|
||||
5853,
|
||||
5854,
|
||||
5889,
|
||||
6010,
|
||||
6015,
|
||||
6022,
|
||||
6023,
|
||||
6024,
|
||||
6025,
|
||||
6401,
|
||||
6402,
|
||||
6403,
|
||||
6501,
|
||||
6521,
|
||||
6522,
|
||||
6523,
|
||||
6551,
|
||||
6715,
|
||||
6716,
|
||||
6835,
|
||||
6838,
|
||||
6852,
|
||||
7056,
|
||||
7057,
|
||||
7058,
|
||||
7060,
|
||||
7069,
|
||||
7070,
|
||||
7100,
|
||||
7101,
|
||||
7102,
|
||||
7103,
|
||||
7200,
|
||||
7230,
|
||||
7301,
|
||||
7302,
|
||||
7303,
|
||||
7304,
|
||||
7305,
|
||||
7306,
|
||||
7307,
|
||||
7308,
|
||||
7309,
|
||||
7310,
|
||||
7311,
|
||||
7312,
|
||||
7313,
|
||||
7501,
|
||||
7502,
|
||||
7503,
|
||||
7505,
|
||||
7507,
|
||||
7508,
|
||||
7509,
|
||||
7510,
|
||||
7511,
|
||||
7512,
|
||||
7513,
|
||||
7514,
|
||||
7515,
|
||||
7516,
|
||||
7517,
|
||||
7518,
|
||||
7523,
|
||||
7528,
|
||||
7529,
|
||||
7530,
|
||||
7531,
|
||||
7533,
|
||||
7534,
|
||||
7535,
|
||||
7537,
|
||||
7539,
|
||||
7540,
|
||||
7541,
|
||||
7542,
|
||||
7543,
|
||||
7545,
|
||||
7601,
|
||||
7602,
|
||||
7603,
|
||||
7605,
|
||||
7615,
|
||||
7616,
|
||||
7617,
|
||||
7618,
|
||||
7619,
|
||||
7620,
|
||||
7621,
|
||||
7631,
|
||||
7632,
|
||||
7637,
|
||||
7638,
|
||||
7639,
|
||||
7640,
|
||||
7641,
|
||||
7642,
|
||||
7643,
|
||||
7701,
|
||||
7750,
|
||||
7751,
|
||||
7752,
|
||||
7753,
|
||||
7834,
|
||||
7835,
|
||||
7836,
|
||||
7837,
|
||||
7839,
|
||||
7851,
|
||||
7852,
|
||||
7853,
|
||||
7854,
|
||||
7855,
|
||||
7856,
|
||||
7858,
|
||||
7859,
|
||||
7860,
|
||||
7867,
|
||||
7868,
|
||||
7869,
|
||||
7884,
|
||||
7885,
|
||||
7886,
|
||||
7887,
|
||||
9101,
|
||||
9202,
|
||||
9301,
|
||||
9302,
|
||||
9311,
|
||||
9313,
|
||||
9483,
|
||||
9484,
|
||||
9485,
|
||||
9488,
|
||||
9495,
|
||||
9496,
|
||||
9497,
|
||||
9498,
|
||||
9502,
|
||||
9505,
|
||||
9508,
|
||||
9530,
|
||||
9550,
|
||||
9562,
|
||||
9563,
|
||||
9564,
|
||||
9566,
|
||||
9567,
|
||||
9576,
|
||||
9581,
|
||||
9630,
|
||||
9631,
|
||||
9632,
|
||||
9642,
|
||||
9644,
|
||||
9650,
|
||||
9651,
|
||||
9702,
|
||||
9714,
|
||||
9783,
|
||||
9784,
|
||||
9785,
|
||||
9786,
|
||||
9787,
|
||||
9788,
|
||||
9790,
|
||||
9793,
|
||||
9905,
|
||||
9906,
|
||||
9993,
|
||||
9996,
|
||||
9997,
|
||||
20041,
|
||||
20042,
|
||||
20043,
|
||||
20044,
|
||||
20045,
|
||||
20046,
|
||||
20047,
|
||||
20048,
|
||||
20049,
|
||||
20050,
|
||||
20051,
|
||||
20052,
|
||||
20053,
|
||||
20057,
|
||||
20059,
|
||||
20060,
|
||||
20062,
|
||||
20063,
|
||||
20064,
|
||||
20065,
|
||||
20066,
|
||||
20067,
|
||||
20068,
|
||||
20069,
|
||||
20070,
|
||||
20071,
|
||||
20072,
|
||||
20073,
|
||||
20074,
|
||||
20075,
|
||||
20076,
|
||||
40001,
|
||||
40005,
|
||||
40006,
|
||||
40007,
|
||||
40008,
|
||||
40009,
|
||||
40023,
|
||||
40024,
|
||||
40025,
|
||||
40026,
|
||||
40027,
|
||||
40028,
|
||||
40029,
|
||||
40030,
|
||||
40031,
|
||||
40032,
|
||||
40033,
|
||||
40034,
|
||||
40035,
|
||||
40036,
|
||||
40037,
|
||||
40038,
|
||||
40039,
|
||||
40040,
|
||||
40044,
|
||||
40045,
|
||||
40046,
|
||||
40047,
|
||||
40048,
|
||||
40055,
|
||||
40056,
|
||||
40057,
|
||||
40058,
|
||||
40059,
|
||||
40060,
|
||||
40061,
|
||||
40062,
|
||||
40063,
|
||||
40064,
|
||||
40065,
|
||||
40067,
|
||||
40068,
|
||||
40069,
|
||||
40070,
|
||||
40071,
|
||||
40072,
|
||||
40073,
|
||||
40084,
|
||||
40085,
|
||||
40086,
|
||||
40087,
|
||||
40088,
|
||||
40089,
|
||||
40115,
|
||||
40116,
|
||||
40117,
|
||||
40118,
|
||||
40119,
|
||||
40120,
|
||||
40121,
|
||||
40122,
|
||||
40123,
|
||||
40124,
|
||||
41001,
|
||||
42000,
|
||||
42001,
|
||||
42002,
|
||||
42003,
|
||||
42004,
|
||||
42005,
|
||||
42006,
|
||||
42007,
|
||||
42008,
|
||||
42009,
|
||||
42010,
|
||||
42012,
|
||||
42013,
|
||||
42014,
|
||||
42015,
|
||||
42016,
|
||||
42017,
|
||||
42020,
|
||||
42021,
|
||||
42024,
|
||||
42027,
|
||||
42028,
|
||||
42047,
|
||||
42050,
|
||||
42051,
|
||||
42052,
|
||||
42053,
|
||||
42055,
|
||||
42066,
|
||||
42067,
|
||||
42070,
|
||||
42085,
|
||||
42087,
|
||||
42090,
|
||||
42114,
|
||||
42116,
|
||||
42122,
|
||||
42124,
|
||||
42126,
|
||||
42129,
|
||||
42141,
|
||||
42142,
|
||||
42143,
|
||||
42144,
|
||||
42145,
|
||||
42146,
|
||||
42156,
|
||||
42157,
|
||||
42159,
|
||||
42161,
|
||||
42163,
|
||||
42166,
|
||||
42180,
|
||||
42181,
|
||||
42182,
|
||||
42184,
|
||||
42210,
|
||||
42213,
|
||||
42214,
|
||||
42215,
|
||||
42262,
|
||||
42263,
|
||||
42264,
|
||||
42269,
|
||||
42274,
|
||||
42275,
|
||||
42288,
|
||||
42309,
|
||||
42310,
|
||||
42311,
|
||||
42312,
|
||||
42313,
|
||||
42316,
|
||||
42318,
|
||||
42320,
|
||||
42321,
|
||||
42325,
|
||||
42328,
|
||||
42333,
|
||||
42338,
|
||||
42372,
|
||||
42382,
|
||||
42383,
|
||||
42392,
|
||||
42400,
|
||||
42403,
|
||||
42413,
|
||||
42414,
|
||||
42419,
|
||||
42433,
|
||||
42439,
|
||||
42440,
|
||||
42441,
|
||||
42452,
|
||||
42453,
|
||||
42454,
|
||||
42464,
|
||||
42465,
|
||||
42494,
|
||||
42517,
|
||||
42519,
|
||||
42521,
|
||||
42532,
|
||||
42533,
|
||||
42572,
|
||||
42573,
|
||||
42745,
|
||||
42747,
|
||||
42751,
|
||||
42775,
|
||||
44618,
|
||||
44619,
|
||||
44620,
|
||||
44621,
|
||||
44622,
|
||||
44747,
|
||||
44748,
|
||||
44751,
|
||||
44754,
|
||||
44756,
|
||||
44758,
|
||||
44761,
|
||||
44762,
|
||||
45000,
|
||||
45001,
|
||||
45002,
|
||||
45009,
|
||||
45010,
|
||||
45011,
|
||||
45023,
|
||||
45024,
|
||||
48256,
|
||||
48258,
|
||||
48272,
|
||||
48278,
|
||||
48280,
|
||||
48283,
|
||||
48289,
|
||||
48290,
|
||||
48291,
|
||||
48294,
|
||||
48319,
|
||||
48347,
|
||||
50079,
|
||||
50080,
|
||||
50081,
|
||||
50084,
|
||||
50087,
|
||||
50102,
|
||||
50103,
|
||||
50104,
|
||||
50105,
|
||||
50252,
|
||||
50253,
|
||||
50254,
|
||||
50255,
|
||||
50256,
|
||||
50262,
|
||||
50263,
|
||||
50266,
|
||||
50271,
|
||||
50272,
|
||||
50274,
|
||||
50276,
|
||||
50277,
|
||||
50281,
|
||||
50282,
|
||||
50284,
|
||||
50290,
|
||||
50291,
|
||||
50292,
|
||||
50294,
|
||||
50299,
|
||||
50304,
|
||||
50312,
|
||||
50316,
|
||||
50317,
|
||||
50318,
|
||||
50322,
|
||||
50323,
|
||||
50325,
|
||||
50332,
|
||||
50340,
|
||||
50351,
|
||||
50352,
|
||||
50353,
|
||||
50355,
|
||||
50357,
|
||||
50360,
|
||||
50361,
|
||||
50362,
|
||||
50366,
|
||||
50376,
|
||||
50377,
|
||||
50379,
|
||||
50380,
|
||||
50382,
|
||||
50383,
|
||||
50385,
|
||||
50386,
|
||||
50387,
|
||||
50388,
|
||||
50396,
|
||||
50397,
|
||||
50398,
|
||||
50399,
|
||||
50404,
|
||||
50407,
|
||||
50408,
|
||||
50409,
|
||||
50410,
|
||||
50411,
|
||||
50412,
|
||||
50416,
|
||||
50417,
|
||||
50418,
|
||||
50419,
|
||||
50422,
|
||||
50423,
|
||||
50424,
|
||||
50425,
|
||||
50432,
|
||||
50433,
|
||||
50436,
|
||||
50446,
|
||||
50447,
|
||||
50449,
|
||||
50467,
|
||||
50468,
|
||||
50469,
|
||||
50473,
|
||||
50474,
|
||||
50475,
|
||||
50476,
|
||||
50477,
|
||||
50478,
|
||||
50479,
|
||||
50480,
|
||||
50486,
|
||||
50492,
|
||||
50493,
|
||||
100002,
|
||||
100003,
|
||||
100004,
|
||||
100005,
|
||||
100006,
|
||||
100007,
|
||||
100078,
|
||||
100079,
|
||||
100080,
|
||||
100082,
|
||||
100083,
|
||||
100086,
|
||||
100087,
|
||||
100088,
|
||||
100089,
|
||||
100091,
|
||||
100095,
|
||||
100097,
|
||||
100098,
|
||||
100100,
|
||||
100101,
|
||||
100102,
|
||||
100106,
|
||||
100107,
|
||||
100108,
|
||||
100109,
|
||||
100111,
|
||||
100113,
|
||||
100115,
|
||||
100116,
|
||||
100117,
|
||||
100139,
|
||||
100140,
|
||||
100142,
|
||||
100143,
|
||||
100144,
|
||||
100145,
|
||||
100146,
|
||||
100147,
|
||||
100148,
|
||||
100149,
|
||||
100150,
|
||||
100151,
|
||||
100152,
|
||||
100153,
|
||||
100154,
|
||||
100158,
|
||||
100159,
|
||||
100160,
|
||||
100162,
|
||||
100163,
|
||||
100356,
|
||||
100357,
|
||||
100366,
|
||||
100367,
|
||||
100369,
|
||||
100372,
|
||||
100373
|
||||
]
|
||||
)
|
||||
24
game_server/packet/handlers/GetFrameDataReq.py
Normal file
24
game_server/packet/handlers/GetFrameDataReq.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.frame_data import Frame_Data
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetFrameDataReq,
|
||||
GetFrameDataRsp,
|
||||
FrameData
|
||||
)
|
||||
|
||||
|
||||
async def handle(session: Session, msg: GetFrameDataReq) -> betterproto.Message:
|
||||
return GetFrameDataRsp(
|
||||
retcode=0,
|
||||
is_all=True,
|
||||
frame_list=[
|
||||
FrameData(
|
||||
id=frame.id,
|
||||
expire_time=get_unix_in_seconds() + 3600 * 24 * 7
|
||||
)
|
||||
for frame in ResourceManager.instance().values(Frame_Data)
|
||||
]
|
||||
)
|
||||
6
game_server/packet/handlers/GetFriendListReq.py
Normal file
6
game_server/packet/handlers/GetFriendListReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetFriendListReq, GetFriendListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetFriendListReq) -> betterproto.Message:
|
||||
return GetFriendListRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetFriendRemarkListReq.py
Normal file
6
game_server/packet/handlers/GetFriendRemarkListReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetFriendRemarkListReq, GetFriendRemarkListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetFriendRemarkListReq) -> betterproto.Message:
|
||||
return GetFriendRemarkListRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetGachaDisplayReq.py
Normal file
6
game_server/packet/handlers/GetGachaDisplayReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetGachaDisplayReq, GetGachaDisplayRsp
|
||||
|
||||
async def handle(session: Session, msg: GetGachaDisplayReq) -> betterproto.Message:
|
||||
return GetGachaDisplayRsp(retcode=0)
|
||||
11
game_server/packet/handlers/GetGalInteractTriggerEventReq.py
Normal file
11
game_server/packet/handlers/GetGalInteractTriggerEventReq.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import betterproto
|
||||
import random
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetGalInteractTriggerEventReq,GetGalInteractTriggerEventRsp
|
||||
|
||||
async def handle(session: Session, msg: GetGalInteractTriggerEventReq) -> betterproto.Message:
|
||||
return GetGalInteractTriggerEventRsp(
|
||||
retcode=0,
|
||||
avatar_id=msg.avatar_id,
|
||||
event_id=0
|
||||
)
|
||||
6
game_server/packet/handlers/GetGardenScheduleReq.py
Normal file
6
game_server/packet/handlers/GetGardenScheduleReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetGardenScheduleReq, GetGardenScheduleRsp
|
||||
|
||||
async def handle(session: Session, msg: GetGardenScheduleReq) -> betterproto.Message:
|
||||
return GetGardenScheduleRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetGobackReq.py
Normal file
6
game_server/packet/handlers/GetGobackReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetGobackReq,GetGobackRsp
|
||||
|
||||
async def handle(session: Session, msg: GetGobackReq) -> betterproto.Message:
|
||||
return GetGobackRsp(retcode=0)
|
||||
3116
game_server/packet/handlers/GetGodWarReq.py
Normal file
3116
game_server/packet/handlers/GetGodWarReq.py
Normal file
File diff suppressed because it is too large
Load Diff
82
game_server/packet/handlers/GetGrandKeyReq.py
Normal file
82
game_server/packet/handlers/GetGrandKeyReq.py
Normal file
@@ -0,0 +1,82 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetGrandKeyReq,
|
||||
GetGrandKeyRsp,
|
||||
GrandKey,
|
||||
GrandKeySkill
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetGrandKeyReq) -> betterproto.Message:
|
||||
return GetGrandKeyRsp(
|
||||
retcode=0,
|
||||
is_all=True,
|
||||
key_list=[
|
||||
GrandKey(
|
||||
activate_level=10,
|
||||
breach_level=1,
|
||||
end_time=1975780800,
|
||||
id=203,
|
||||
level=10,
|
||||
skill=GrandKeySkill(
|
||||
skill_id=20310
|
||||
),
|
||||
unlock_level=50
|
||||
),
|
||||
GrandKey(
|
||||
id=208,
|
||||
level=1,
|
||||
unlock_level=65
|
||||
),
|
||||
GrandKey(
|
||||
activate_level=10,
|
||||
breach_level=1,
|
||||
end_time=1975780800,
|
||||
id=205,
|
||||
level=10,
|
||||
skill=GrandKeySkill(
|
||||
skill_id=20509
|
||||
),
|
||||
unlock_level=65
|
||||
),
|
||||
GrandKey(
|
||||
activate_level=10,
|
||||
breach_level=2,
|
||||
end_time=1975780800,
|
||||
id=202,
|
||||
level=10,
|
||||
skill=GrandKeySkill(
|
||||
skill_id=20209
|
||||
),
|
||||
unlock_level=50
|
||||
),
|
||||
GrandKey(
|
||||
breach_level=1,
|
||||
id=207,
|
||||
level=1,
|
||||
unlock_level=65
|
||||
),
|
||||
GrandKey(
|
||||
breach_level=1,
|
||||
id=204,
|
||||
level=1,
|
||||
unlock_level=65
|
||||
),
|
||||
GrandKey(
|
||||
activate_level=10,
|
||||
end_time=1975780800,
|
||||
id=201,
|
||||
level=10,
|
||||
skill=GrandKeySkill(
|
||||
skill_id=20109
|
||||
),
|
||||
unlock_level=50
|
||||
),
|
||||
GrandKey(
|
||||
breach_level=1,
|
||||
id=206,
|
||||
level=1,
|
||||
unlock_level=35
|
||||
)
|
||||
]
|
||||
)
|
||||
6
game_server/packet/handlers/GetGratuityActivityReq.py
Normal file
6
game_server/packet/handlers/GetGratuityActivityReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetGratuityActivityReq,GetGratuityActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetGratuityActivityReq) -> betterproto.Message:
|
||||
return GetGratuityActivityRsp(retcode=0)
|
||||
10
game_server/packet/handlers/GetHasGotFurnitureIdListReq.py
Normal file
10
game_server/packet/handlers/GetHasGotFurnitureIdListReq.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetHasGotFurnitureIdListReq, GetHasGotFurnitureIdListRsp
|
||||
|
||||
async def handle(session: Session, msg: GetHasGotFurnitureIdListReq) -> betterproto.Message:
|
||||
return GetHasGotFurnitureIdListRsp(
|
||||
retcode=0,
|
||||
furniture_id_list=[140001,140002,140003,140010,140012,140013,140015,140016,140201,140202,140213,140215,140216,140601,140603,140801,140802,140803,140804,140805,140806,140807,140808,140809,140810,140811,140812,140813,140814,140815,140816,140817,140818,140819,140820,140821,140822,140823,140824,140825,141501,141601,141606,141610,141615,141619,141620,141621,141622,141701,141702,141703,141704,141709,141713,141801,141802,141803,141804,141805,141806,141807,141808,141809,141810,141811,141812,141814,141815,146120,146620],
|
||||
has_unlock_furniture_id_list=[140601,140603,140801,140802,140803,140804,140805,140806,140807,140808,140809,140810,140811,140812,140813,140814,140815,140816,140817,140818,140819,140820,140821,140822,140823,140824,140825,141501,141701,141702,141703,141704,141801,141807,141808,141809,141810,141811,141812,141815]
|
||||
)
|
||||
349
game_server/packet/handlers/GetHasGotItemIdListReq.py
Normal file
349
game_server/packet/handlers/GetHasGotItemIdListReq.py
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,19 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetInviteActivityInviteeDataReq,
|
||||
GetInviteActivityInviteeDataRsp,
|
||||
InviteeActivity,
|
||||
InviteeActivityType
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetInviteActivityInviteeDataReq) -> betterproto.Message:
|
||||
return GetInviteActivityInviteeDataRsp(
|
||||
retcode=0,
|
||||
invitee_activity_info_list=[
|
||||
InviteeActivity(
|
||||
schedule_id=2,
|
||||
activity_type=InviteeActivityType.INVITEE_ACTIVITY_TYPE_GOBACK
|
||||
)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,21 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetInviteActivityInviterDataReq,
|
||||
GetInviteActivityInviterDataRsp,
|
||||
InviterActivity
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetInviteActivityInviterDataReq) -> betterproto.Message:
|
||||
return GetInviteActivityInviterDataRsp(
|
||||
retcode=0,
|
||||
inviter_activity_info_list=[
|
||||
InviterActivity(
|
||||
schedule_id=4
|
||||
),
|
||||
InviterActivity(
|
||||
schedule_id=103
|
||||
),
|
||||
],
|
||||
my_invite_code="17263334YG"
|
||||
)
|
||||
21
game_server/packet/handlers/GetLoginActivityReq.py
Normal file
21
game_server/packet/handlers/GetLoginActivityReq.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetLoginActivityReq,
|
||||
GetLoginActivityRsp,
|
||||
LoginActivityData
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetLoginActivityReq) -> betterproto.Message:
|
||||
return GetLoginActivityRsp(
|
||||
retcode=0,
|
||||
login_list=[
|
||||
LoginActivityData(
|
||||
id=581,
|
||||
login_days=get_unix_in_seconds(),
|
||||
accept_time=get_unix_in_seconds(),
|
||||
duration_end_time=get_unix_in_seconds() + 604800 * 2
|
||||
)
|
||||
]
|
||||
)
|
||||
49
game_server/packet/handlers/GetMainDataReq.py
Normal file
49
game_server/packet/handlers/GetMainDataReq.py
Normal file
@@ -0,0 +1,49 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMainDataReq,GetMainDataRsp,WarshipAvatarData,ChatworldActivityInfo,WarshipThemeData
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
|
||||
async def handle(session: Session, msg: GetMainDataReq) -> betterproto.Message:
|
||||
return GetMainDataRsp(
|
||||
retcode=0,
|
||||
assistant_avatar_id=session.player.assistant_avatar_id,
|
||||
birthday=session.player.birth_date,
|
||||
nickname=session.player.name,
|
||||
level=session.player.level,
|
||||
exp=session.player.exp,
|
||||
free_hcoin=0,
|
||||
hcoin=session.player.hcoin,
|
||||
custom_head_id=session.player.head_photo,
|
||||
scoin=0,
|
||||
is_all=True,
|
||||
register_time=get_unix_in_seconds(),
|
||||
pay_hcoin=0,
|
||||
warship_avatar=WarshipAvatarData(
|
||||
warship_first_avatar_id=session.player.warship_avatar.warship_first_avatar_id,
|
||||
warship_second_avatar_id=session.player.warship_avatar.warship_second_avatar_id
|
||||
),
|
||||
self_desc=session.player.signature,
|
||||
use_frame_id=session.player.head_frame,
|
||||
on_phone_pendant_id=350005,
|
||||
stamina=session.player.stamina,
|
||||
stamina_recover_config_time=360,
|
||||
stamina_recover_left_time=360,
|
||||
equipment_size_limit=1000,
|
||||
open_panel_activity_list=[2],
|
||||
chatworld_activity_info=ChatworldActivityInfo(
|
||||
is_has_npc_red_envelope=False,
|
||||
treasure_schedule_id=0
|
||||
),
|
||||
is_allow_cost_senior_equip_on_cur_device=True,
|
||||
type_list=[2, 3, 4, 5, 6, 7, 8, 9, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 35, 36, 37, 38, 39],
|
||||
level_lock_id=1,
|
||||
mcoin=100000,
|
||||
month_recharge_price=0,
|
||||
warship_theme=WarshipThemeData(
|
||||
warship_id=session.player.warship_id
|
||||
),
|
||||
total_login_days=1,
|
||||
next_evaluate_time=0,
|
||||
on_medal_id=0,
|
||||
today_recharge_price=0
|
||||
)
|
||||
13
game_server/packet/handlers/GetMasterPupilApplyReq.py
Normal file
13
game_server/packet/handlers/GetMasterPupilApplyReq.py
Normal file
@@ -0,0 +1,13 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetMasterPupilApplyReq,
|
||||
GetMasterPupilApplyRsp,
|
||||
MasterPupilType
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetMasterPupilApplyReq) -> betterproto.Message:
|
||||
return GetMasterPupilApplyRsp(
|
||||
retcode=0,
|
||||
type=MasterPupilType.MASTER_PUPIL_MASTER_TYPE.value
|
||||
)
|
||||
6
game_server/packet/handlers/GetMasterPupilCardReq.py
Normal file
6
game_server/packet/handlers/GetMasterPupilCardReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMasterPupilCardReq, GetMasterPupilCardRsp
|
||||
|
||||
async def handle(session: Session, msg: GetMasterPupilCardReq) -> betterproto.Message:
|
||||
return GetMasterPupilCardRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetMasterPupilDataReq.py
Normal file
6
game_server/packet/handlers/GetMasterPupilDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMasterPupilDataReq, GetMasterPupilDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetMasterPupilDataReq) -> betterproto.Message:
|
||||
return GetMasterPupilDataRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetMasterPupilMainDataReq.py
Normal file
6
game_server/packet/handlers/GetMasterPupilMainDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMasterPupilMainDataReq, GetMasterPupilMainDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetMasterPupilMainDataReq) -> betterproto.Message:
|
||||
return GetMasterPupilMainDataRsp(retcode=0)
|
||||
195
game_server/packet/handlers/GetMedalDataReq.py
Normal file
195
game_server/packet/handlers/GetMedalDataReq.py
Normal file
@@ -0,0 +1,195 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetMedalDataReq,
|
||||
GetMedalDataRsp,
|
||||
Medal
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetMedalDataReq) -> betterproto.Message:
|
||||
return GetMedalDataRsp(
|
||||
retcode=0,
|
||||
medal_list=[
|
||||
Medal(
|
||||
extra_param=110,
|
||||
id=101113
|
||||
),
|
||||
Medal(
|
||||
id=101042
|
||||
),
|
||||
Medal(
|
||||
id=101089
|
||||
),
|
||||
Medal(
|
||||
id=101108
|
||||
),
|
||||
Medal(
|
||||
end_time=1757947552,
|
||||
id=101092
|
||||
),
|
||||
Medal(
|
||||
id=101115
|
||||
),
|
||||
Medal(
|
||||
id=101103
|
||||
),
|
||||
Medal(
|
||||
id=101112
|
||||
),
|
||||
Medal(
|
||||
extra_param=30,
|
||||
id=101110
|
||||
),
|
||||
Medal(
|
||||
end_time=1743980267,
|
||||
id=101031
|
||||
),
|
||||
Medal(
|
||||
id=101125
|
||||
),
|
||||
Medal(
|
||||
id=101091
|
||||
),
|
||||
Medal(
|
||||
id=101047
|
||||
),
|
||||
Medal(
|
||||
end_time=1719062973,
|
||||
id=101094
|
||||
),
|
||||
Medal(
|
||||
id=101074
|
||||
),
|
||||
Medal(
|
||||
extra_param=3010,
|
||||
id=101120
|
||||
),
|
||||
Medal(
|
||||
id=101026
|
||||
),
|
||||
Medal(
|
||||
id=101096
|
||||
),
|
||||
Medal(
|
||||
id=101085
|
||||
),
|
||||
Medal(
|
||||
id=101145
|
||||
),
|
||||
Medal(
|
||||
id=101098
|
||||
),
|
||||
Medal(
|
||||
id=101102
|
||||
),
|
||||
Medal(
|
||||
extra_param=40,
|
||||
id=101117
|
||||
),
|
||||
Medal(
|
||||
id=101040
|
||||
),
|
||||
Medal(
|
||||
id=101134
|
||||
),
|
||||
Medal(
|
||||
id=101090
|
||||
),
|
||||
Medal(
|
||||
id=101067
|
||||
),
|
||||
Medal(
|
||||
id=101111
|
||||
),
|
||||
Medal(
|
||||
id=101088
|
||||
),
|
||||
Medal(
|
||||
end_time=1684342752,
|
||||
id=101121
|
||||
),
|
||||
Medal(
|
||||
id=101024
|
||||
),
|
||||
Medal(
|
||||
id=101118
|
||||
),
|
||||
Medal(
|
||||
extra_param=268,
|
||||
id=101124
|
||||
),
|
||||
Medal(
|
||||
end_time=1681312396,
|
||||
id=101083
|
||||
),
|
||||
Medal(
|
||||
end_time=1675728702,
|
||||
id=101036
|
||||
),
|
||||
Medal(
|
||||
id=101106
|
||||
),
|
||||
Medal(
|
||||
id=101059
|
||||
),
|
||||
Medal(
|
||||
id=101105
|
||||
),
|
||||
Medal(
|
||||
id=101104
|
||||
),
|
||||
Medal(
|
||||
end_time=1757949121,
|
||||
id=101093
|
||||
),
|
||||
Medal(
|
||||
id=101116
|
||||
),
|
||||
Medal(
|
||||
end_time=1661813717,
|
||||
id=101069
|
||||
),
|
||||
Medal(
|
||||
end_time=1719448204,
|
||||
id=101030
|
||||
),
|
||||
Medal(
|
||||
extra_param=49,
|
||||
id=101127
|
||||
),
|
||||
Medal(
|
||||
id=101109
|
||||
),
|
||||
Medal(
|
||||
extra_param=1593836710,
|
||||
id=101142
|
||||
),
|
||||
Medal(
|
||||
id=101025
|
||||
),
|
||||
Medal(
|
||||
extra_param=4,
|
||||
id=101122
|
||||
),
|
||||
Medal(
|
||||
id=101099
|
||||
),
|
||||
Medal(
|
||||
id=101146
|
||||
),
|
||||
Medal(
|
||||
id=101107
|
||||
),
|
||||
Medal(
|
||||
id=101100
|
||||
),
|
||||
Medal(
|
||||
id=101126
|
||||
),
|
||||
Medal(
|
||||
end_time=1664198688,
|
||||
id=101079
|
||||
)
|
||||
]
|
||||
|
||||
)
|
||||
39
game_server/packet/handlers/GetMissionDataReq.py
Normal file
39
game_server/packet/handlers/GetMissionDataReq.py
Normal file
@@ -0,0 +1,39 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from game_server.resource import ResourceManager
|
||||
from game_server.resource.configdb.mission_data import MissionData
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetMissionDataReq,
|
||||
GetMissionDataRsp,
|
||||
Mission,
|
||||
MissionStatus,
|
||||
ChallengeMissionData,
|
||||
MainlineStepMission
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetMissionDataReq) -> betterproto.Message:
|
||||
return GetMissionDataRsp(
|
||||
retcode=0,
|
||||
challenge_mission=ChallengeMissionData(
|
||||
is_unlock=True
|
||||
),
|
||||
close_mission_list=[mission.id for mission in ResourceManager.instance().values(MissionData)],
|
||||
is_all=True,
|
||||
is_in_activity=True,
|
||||
mainline_step=MainlineStepMission(
|
||||
is_update=True
|
||||
),
|
||||
mission_list=[
|
||||
Mission(
|
||||
mission_id=mission.id,
|
||||
status=MissionStatus.MISSION_CLOSE.value,
|
||||
priority=mission.Priority,
|
||||
progress=mission.totalProgress,
|
||||
begin_time=0,
|
||||
end_time=2073239999,
|
||||
cycle_id=1
|
||||
)
|
||||
for mission in ResourceManager.instance().values(MissionData)
|
||||
]
|
||||
)
|
||||
@@ -0,0 +1,9 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMissionGroupMainInfoReq,GetMissionGroupMainInfoRsp
|
||||
|
||||
async def handle(session: Session, msg: GetMissionGroupMainInfoReq) -> betterproto.Message:
|
||||
return GetMissionGroupMainInfoRsp(
|
||||
retcode=0,
|
||||
has_take_reward_mission_group_list=[97001]
|
||||
)
|
||||
6
game_server/packet/handlers/GetMissionThemeDataReq.py
Normal file
6
game_server/packet/handlers/GetMissionThemeDataReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMissionThemeDataReq, GetMissionThemeDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetMissionThemeDataReq) -> betterproto.Message:
|
||||
return GetMissionThemeDataRsp(retcode=0,is_get_all=True)
|
||||
6
game_server/packet/handlers/GetMosaicActivityReq.py
Normal file
6
game_server/packet/handlers/GetMosaicActivityReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetMosaicActivityReq, GetMosaicActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetMosaicActivityReq) -> betterproto.Message:
|
||||
return GetMosaicActivityRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetNewOpenworldReq.py
Normal file
6
game_server/packet/handlers/GetNewOpenworldReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetNewOpenworldReq, GetNewOpenworldRsp
|
||||
|
||||
async def handle(session: Session, msg: GetNewOpenworldReq) -> betterproto.Message:
|
||||
return GetNewOpenworldRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetNewbieActivityReq.py
Normal file
6
game_server/packet/handlers/GetNewbieActivityReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetNewbieActivityReq, GetNewbieActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetNewbieActivityReq) -> betterproto.Message:
|
||||
return GetNewbieActivityRsp(retcode=0)
|
||||
6
game_server/packet/handlers/GetNinjaActivityReq.py
Normal file
6
game_server/packet/handlers/GetNinjaActivityReq.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetNinjaActivityReq,GetNinjaActivityRsp
|
||||
|
||||
async def handle(session: Session, msg: GetNinjaActivityReq) -> betterproto.Message:
|
||||
return GetNinjaActivityRsp(retcode=0)
|
||||
7
game_server/packet/handlers/GetOfflineResourceDataReq.py
Normal file
7
game_server/packet/handlers/GetOfflineResourceDataReq.py
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import GetOfflineResourceDataReq,GetOfflineResourceDataRsp
|
||||
|
||||
async def handle(session: Session, msg: GetOfflineResourceDataReq) -> betterproto.Message:
|
||||
return GetOfflineResourceDataRsp(retcode=0)
|
||||
19
game_server/packet/handlers/GetOpenworldEndlessDataReq.py
Normal file
19
game_server/packet/handlers/GetOpenworldEndlessDataReq.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import betterproto
|
||||
import random
|
||||
from game_server.net.session import Session
|
||||
from game_server.utils import get_unix_in_seconds
|
||||
from lib.proto import (
|
||||
GetOpenworldEndlessDataReq,
|
||||
GetOpenworldEndlessDataRsp
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetOpenworldEndlessDataReq) -> betterproto.Message:
|
||||
return GetOpenworldEndlessDataRsp(
|
||||
retcode=0,
|
||||
begin_time=0,
|
||||
end_time=int(get_unix_in_seconds() + 3600 * 24 * 7),
|
||||
close_time=int(get_unix_in_seconds() + 3600 * 24 * 7 + 1200),
|
||||
random_seed=random.randint(1, 1000000),
|
||||
hard_level=msg.level,
|
||||
type=msg.type
|
||||
)
|
||||
15
game_server/packet/handlers/GetOpenworldMechaDefenseReq.py
Normal file
15
game_server/packet/handlers/GetOpenworldMechaDefenseReq.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import betterproto
|
||||
from game_server.net.session import Session
|
||||
from lib.proto import (
|
||||
GetOpenworldMechaDefenseReq,
|
||||
GetOpenworldMechaDefenseRsp,
|
||||
OpenworldMechaDefense
|
||||
)
|
||||
|
||||
async def handle(session: Session, msg: GetOpenworldMechaDefenseReq) -> betterproto.Message:
|
||||
return GetOpenworldMechaDefenseRsp(
|
||||
retcode=0,
|
||||
mecha_defense=OpenworldMechaDefense(
|
||||
left_enter_times=1
|
||||
)
|
||||
)
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user