1
This commit is contained in:
parent
131c8bd9b3
commit
3991edf55d
@ -70,16 +70,18 @@ class ChipPage extends BaseModel
|
|||||||
|
|
||||||
public static function toDtoBattle($row){
|
public static function toDtoBattle($row){
|
||||||
$data = emptyReplace(json_decode($row['data'], true), array());
|
$data = emptyReplace(json_decode($row['data'], true), array());
|
||||||
foreach ($data as &$value){
|
if ($data){
|
||||||
$chipDb = Chip::find($value['chip_id']);
|
foreach ($data as &$value){
|
||||||
if ( !$chipDb ) {
|
$chipDb = Chip::find($value['chip_id']);
|
||||||
$value['chip_id'] = 0;
|
if ( !$chipDb ) {
|
||||||
Chip::updateInlayState($value['chip_id'],0);
|
$value['chip_id'] = 0;
|
||||||
|
Chip::updateInlayState($value['chip_id'],0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
self::update($row['hero_uniid'],array(
|
||||||
|
'data' => json_encode($data)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
self::update($row['hero_uniid'],array(
|
|
||||||
'data' => json_encode($data)
|
|
||||||
));
|
|
||||||
$newRow = self::find($row['hero_uniid']);
|
$newRow = self::find($row['hero_uniid']);
|
||||||
$newData = emptyReplace(json_decode($newRow['data'], true), array());
|
$newData = emptyReplace(json_decode($newRow['data'], true), array());
|
||||||
$attrs = array();
|
$attrs = array();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user