1
This commit is contained in:
parent
59b262fc3a
commit
a4e3308d8b
@ -140,14 +140,14 @@ class Fragment {
|
|||||||
(element) => {
|
(element) => {
|
||||||
if (element == constant.SPEC_HERO_FRAGMENT) {
|
if (element == constant.SPEC_HERO_FRAGMENT) {
|
||||||
const allocedNum = data.get(element);
|
const allocedNum = data.get(element);
|
||||||
let remainNum = Math.floor(value.get('specHeroNum') / remainHour);
|
let remainNum = value.get('specHeroNum');
|
||||||
if (allocedNum) {
|
if (allocedNum) {
|
||||||
remainNum = Math.max(0, remainNum - allocedNum);
|
remainNum = Math.max(0, remainNum - allocedNum);
|
||||||
}
|
}
|
||||||
value.set(element, remainNum);
|
value.set(element, remainNum);
|
||||||
} else {
|
} else {
|
||||||
const allocedNum = data.get(element);
|
const allocedNum = data.get(element);
|
||||||
let remainNum = Math.floor(value.get('normalHeroNum') / remainHour);
|
let remainNum = value.get('normalHeroNum');
|
||||||
if (allocedNum) {
|
if (allocedNum) {
|
||||||
remainNum = Math.max(0, remainNum - allocedNum);
|
remainNum = Math.max(0, remainNum - allocedNum);
|
||||||
}
|
}
|
||||||
@ -160,14 +160,14 @@ class Fragment {
|
|||||||
(element) => {
|
(element) => {
|
||||||
if (element == constant.SPEC_GUN_FRAGMENT) {
|
if (element == constant.SPEC_GUN_FRAGMENT) {
|
||||||
const allocedNum = data.get(element);
|
const allocedNum = data.get(element);
|
||||||
let remainNum = Math.floor(value.get('specGunNum') / remainHour);
|
let remainNum = value.get('specGunNum');
|
||||||
if (allocedNum) {
|
if (allocedNum) {
|
||||||
remainNum = Math.max(0, remainNum - allocedNum);
|
remainNum = Math.max(0, remainNum - allocedNum);
|
||||||
}
|
}
|
||||||
value.set(ITEM_PRE + element, remainNum);
|
value.set(ITEM_PRE + element, remainNum);
|
||||||
} else {
|
} else {
|
||||||
const allocedNum = data.get(element);
|
const allocedNum = data.get(element);
|
||||||
let remainNum = Math.floor(value.get('normalGunNum') / remainHour);
|
let remainNum = value.get('normalGunNum');
|
||||||
if (allocedNum) {
|
if (allocedNum) {
|
||||||
remainNum = Math.max(0, remainNum - allocedNum);
|
remainNum = Math.max(0, remainNum - allocedNum);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user