1
This commit is contained in:
parent
41cf561327
commit
e1ce023900
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user