mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-01-24 09:51:23 +01:00
!Removed unused method
This commit is contained in:
parent
2d032b2483
commit
22e4314bfb
@ -124,10 +124,6 @@ public class PlayerAttributes {
|
|||||||
setBase(spent + value);
|
setBase(spent + value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTotal() {
|
|
||||||
return (int) getTotal(spent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 1) two types of attributes: flat attributes which add X to the value,
|
* 1) two types of attributes: flat attributes which add X to the value,
|
||||||
* and relative attributes which add X% and which must be applied
|
* and relative attributes which add X% and which must be applied
|
||||||
@ -135,7 +131,8 @@ public class PlayerAttributes {
|
|||||||
* attributes also apply on the base stat, or if they only apply on the
|
* attributes also apply on the base stat, or if they only apply on the
|
||||||
* extra stat value
|
* extra stat value
|
||||||
*/
|
*/
|
||||||
public double getTotal(double d) {
|
public int getTotal() {
|
||||||
|
double d = spent;
|
||||||
|
|
||||||
for (StatModifier attr : map.values())
|
for (StatModifier attr : map.values())
|
||||||
if (attr.getType() == ModifierType.FLAT)
|
if (attr.getType() == ModifierType.FLAT)
|
||||||
@ -145,7 +142,8 @@ public class PlayerAttributes {
|
|||||||
if (attr.getType() == ModifierType.RELATIVE)
|
if (attr.getType() == ModifierType.RELATIVE)
|
||||||
d *= attr.getValue();
|
d *= attr.getValue();
|
||||||
|
|
||||||
return d;
|
// cast to int at the last moment
|
||||||
|
return (int) d;
|
||||||
}
|
}
|
||||||
|
|
||||||
public StatModifier getModifier(String key) {
|
public StatModifier getModifier(String key) {
|
||||||
|
Loading…
Reference in New Issue
Block a user