1
This commit is contained in:
parent
985038a3f1
commit
1cc5337847
@ -133,12 +133,23 @@ class Fragment {
|
||||
}
|
||||
break;
|
||||
}//end switch
|
||||
const data = allocedFragments.get(key);
|
||||
constant.ALL_HERO_FRAGMENT.forEach(
|
||||
(element) => {
|
||||
if (element == constant.SPEC_HERO_FRAGMENT) {
|
||||
|
||||
const allocedNum = data.get(element);
|
||||
let remainNum = Math.floor(value.get('specHeroNum') / remainHour);
|
||||
if (allocedNum) {
|
||||
remainNum = Math.max(0, remainNum - allocedNum);
|
||||
}
|
||||
value.set(element, remainNum);
|
||||
} else {
|
||||
|
||||
const allocedNum = data.get(element);
|
||||
let remainNum = Math.floor(value.get('normalHeroNum') / remainHour);
|
||||
if (allocedNum) {
|
||||
remainNum = Math.max(0, remainNum - allocedNum);
|
||||
}
|
||||
value.set(element, remainNum);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user