diff --git a/webapp/models/BattleHistory.php b/webapp/models/BattleHistory.php index bde219e6..c2adf42b 100644 --- a/webapp/models/BattleHistory.php +++ b/webapp/models/BattleHistory.php @@ -59,13 +59,13 @@ class BattleHistory extends BaseModel public static function toDto($row){ if ($row['hero_id']){ - $row['hero_id'] = Hero::find($row['hero_id'])['hero_id']; + $row['hero_id'] = Hero::findByAccountId($row['account_id'],$row['hero_id'])['hero_id']; } if ($row['weapon1']){ - $row['weapon1'] = Gun::find($row['weapon1'])['gun_id']; + $row['weapon1'] = Gun::findByAccountId($row['account_id'],$row['weapon1'])['gun_id']; } if ($row['weapon2']){ - $row['weapon2'] = Gun::find($row['weapon2'])['gun_id']; + $row['weapon2'] = Gun::findByAccountId($row['account_id'],$row['weapon2'])['gun_id']; } return $row; }