Skip to content

Commit a3f6072

Browse files
committed
Merge pull request #300 from DestinyItemManager/get-threshold
fix bug #297
2 parents 1459bf6 + a2f1072 commit a3f6072

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/scripts/infuse/dimInfuse.factory.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,14 @@
1818
// https://www.reddit.com/r/destinythegame/comments/3n6pox/python_infusion_calculator
1919
getThreshold: function(target, source) {
2020
if(source.tier === 'Exotic') {
21-
// upgrade exotic with rare or legendary, threshold = 4
22-
if(target.tier === 'Rare' || target.tier === 'Legendary') return 4;
23-
2421
// upgrade exotic with an exotic, threshold = 5
25-
if(target.tier === 'Exotic') return 5;
22+
// else we're upgrading exotic with rare or legendary, threshold = 4
23+
return target.tier === 'Exotic' ? 5 : 4;
2624
}
2725

2826
// infusing a rare or legendary with a rare or legendary, threshold = 6
2927
if((source.tier === 'Rare' || source.tier === 'Legendary') &&
30-
(source.tier === 'Rare' || source.tier === 'Legendary')) return 6;
28+
(target.tier === 'Rare' || target.tier === 'Legendary')) return 6;
3129

3230
// otherwise we're upgradeing a rare/legendary with an exotic, threshold = 7
3331
return 7;

0 commit comments

Comments
 (0)