Support SRTools web

This commit is contained in:
Naruse
2025-04-17 20:13:39 +08:00
parent 2d6462c321
commit 6208880642
12 changed files with 341 additions and 27 deletions

View File

@@ -11,9 +11,9 @@ from pydantic import BaseModel
from rail_proto.lib import (
Equipment,
Relic,
RelicAffix,
BattleRelic,
RelicAffix
RelicAffix,
PlayerSyncScNotify
)
items_collection = get_collection("items")
@@ -124,6 +124,18 @@ class InventoryData(BaseDatabaseData):
]
)
return proto
def RelicSyncProto(self):
proto = PlayerSyncScNotify(
relic_list=[self.ToProto()]
)
return proto
def LightconeSyncProto(self):
proto = PlayerSyncScNotify(
equipment_list=[self.ToProto()]
)
return proto
def save_item(self):
item_data = self.model_dump()