1
This commit is contained in:
parent
2e529a9183
commit
236f37c699
@ -45,12 +45,29 @@ class Fragment {
|
||||
throw err;
|
||||
return;
|
||||
}
|
||||
const allocedFragments = {};
|
||||
const allocedFragments = new Map();
|
||||
allocedFragments.set(0, new Map());
|
||||
allocedFragments.set(1, new Map());
|
||||
rows.forEach(
|
||||
(element) => {
|
||||
|
||||
if (element['type'] == 0 ||
|
||||
element['type'] == 1) {
|
||||
const data = allocedFragments.get(element['type']);
|
||||
if (data) {
|
||||
const num = Math.max(0, element['alloc_num'] - element['fragment_num']);
|
||||
if (!data.has(element['fragment_id'])) {
|
||||
data.set(element['fragment_id'], {
|
||||
'fragment_id' : element['fragment_id'],
|
||||
'num' : num
|
||||
});
|
||||
} else {
|
||||
data.get(element['fragment_id'])['num'] += num
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
return allocedFragments;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -485,4 +485,9 @@ class Gun extends BaseModel {
|
||||
return $newAttrPro;
|
||||
}
|
||||
|
||||
public static function calcPveGainGold($gunDto, $count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user