mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-30 01:13:38 +01:00
Fixed attribute exp tables not claiming the right amount of times when shift clicking
This commit is contained in:
parent
bf4df777e5
commit
c788a88a82
@ -136,9 +136,12 @@ public class PlayerAttributes {
|
|||||||
* @param value Amount of attribute points spent in the attribute
|
* @param value Amount of attribute points spent in the attribute
|
||||||
*/
|
*/
|
||||||
public void addBase(int value) {
|
public void addBase(int value) {
|
||||||
PlayerAttribute attribute = MMOCore.plugin.attributeManager.get(id);
|
|
||||||
setBase(spent + value);
|
setBase(spent + value);
|
||||||
|
|
||||||
|
// Apply exp table as many times as required
|
||||||
|
final PlayerAttribute attribute = MMOCore.plugin.attributeManager.get(id);
|
||||||
if (attribute.hasExperienceTable())
|
if (attribute.hasExperienceTable())
|
||||||
|
while (value-- > 0)
|
||||||
attribute.getExperienceTable().claim(data, spent, attribute);
|
attribute.getExperienceTable().claim(data, spent, attribute);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user