Refactor battle & fix name for avatar_manager

This commit is contained in:
Naruse
2025-04-16 16:25:31 +08:00
parent ec8972d5d6
commit f0e41e3258
11 changed files with 127 additions and 82 deletions

View File

@@ -72,10 +72,10 @@ class AvatarData(BaseDatabaseData):
has_taken_promotion_reward_list=[1,2,3,4,5,6],
)
def ToBattleProto(self,index,session):
def ToBattleProto(self,index,player):
get_equipment = None
if self.lightcone_id > 0:
get_equipment = session.player.inventory_manager.get(self.lightcone_id)
get_equipment = player.inventory_manager.get(self.lightcone_id)
return BattleAvatar(
id=self.avatar_id,
@@ -105,7 +105,7 @@ class AvatarData(BaseDatabaseData):
)
],
relic_list = [
session.player.inventory_manager.get(relic_id).RelicBattleProto()
player.inventory_manager.get(relic_id).RelicBattleProto()
for type, relic_id in self.relic_ids.items()
if relic_id > 0
]