Support SRTools web
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user