forked from MagicBane/Server
Update to helper method
This commit is contained in:
@@ -422,19 +422,18 @@ public class WpakPowerManager {
|
|||||||
|
|
||||||
Pair<Float, Float> outData = new Pair<>(0f, 0f);
|
Pair<Float, Float> outData = new Pair<>(0f, 0f);
|
||||||
|
|
||||||
// Only a subset of these ModTypes used for percents
|
|
||||||
// are multiplicative. These have compound curves
|
|
||||||
// with "SIVL" as a prefix. (Suggests interpolation)
|
|
||||||
|
|
||||||
if (modifierEntry.percentage != 0f) {
|
if (modifierEntry.percentage != 0f) {
|
||||||
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
|
outData.first = modifierEntry.percentage + (modifierEntry.compoundCurveType.getValue() * rank);
|
||||||
modifierEntry.percentage * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
|
|
||||||
modifierEntry.percentage + (modifierEntry.compoundCurveType.getValue() * rank);
|
|
||||||
outData.first = outData.first * 0.01f;
|
outData.first = outData.first * 0.01f;
|
||||||
return outData;
|
return outData;
|
||||||
}
|
}
|
||||||
|
|
||||||
// As there is a min/max we return both as a pair
|
// As there is a min/max we return both as a pair.
|
||||||
|
|
||||||
|
// MB Dev Note:
|
||||||
|
// A subset of health/mana/stam modifiers are additive.
|
||||||
|
// These all have "SIVL" in the curve name suggesting
|
||||||
|
// that SB interpolates between min max.
|
||||||
|
|
||||||
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
|
outData.first = modifierEntry.compoundCurveType.name().contains("SIVL") ?
|
||||||
modifierEntry.min * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
|
modifierEntry.min * (1 + (modifierEntry.compoundCurveType.getValue() * rank)) :
|
||||||
|
|||||||
Reference in New Issue
Block a user