This commit is contained in:
aozhiwei 2022-09-21 16:13:39 +08:00
parent 2e529a9183
commit 236f37c699
2 changed files with 24 additions and 2 deletions

View File

@ -45,12 +45,29 @@ class Fragment {
throw err; throw err;
return; return;
} }
const allocedFragments = {}; const allocedFragments = new Map();
allocedFragments.set(0, new Map());
allocedFragments.set(1, new Map());
rows.forEach( rows.forEach(
(element) => { (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;
} }
} }

View File

@ -485,4 +485,9 @@ class Gun extends BaseModel {
return $newAttrPro; return $newAttrPro;
} }
public static function calcPveGainGold($gunDto, $count)
{
return 0;
}
} }