mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2026-01-06 15:51:52 +00:00
Fixed stat modifiers... again
This commit is contained in:
@@ -127,7 +127,15 @@ fun OfflinePlayer.setEffectLevel(effect: Effect, level: Int) {
|
||||
}
|
||||
|
||||
fun OfflinePlayer.getStatLevel(stat: Stat): Int {
|
||||
return profile.readInt(stat.id)
|
||||
var base = profile.readInt(stat.id)
|
||||
if (this is Player) {
|
||||
for (modifier in this.getStatModifiers()) {
|
||||
if (modifier.stat == stat) {
|
||||
base += modifier.amount
|
||||
}
|
||||
}
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
fun Player.setStatLevel(stat: Stat, level: Int) {
|
||||
|
||||
Reference in New Issue
Block a user