mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-08 23:13:25 -04:00
Fixed incorrect getters for base attributes in CreatureObject and added some setters
This commit is contained in:
@@ -719,11 +719,11 @@ public class CreatureObject extends TangibleObject {
|
||||
}
|
||||
|
||||
public int getMaxAction() {
|
||||
return attributes.get(2);
|
||||
return maxAttributes.get(2);
|
||||
}
|
||||
|
||||
public int getBaseAction() {
|
||||
return attributes.get(2);
|
||||
return baseAttributes.get(2);
|
||||
}
|
||||
|
||||
public void addAbility(String abilityName){
|
||||
@@ -739,6 +739,13 @@ public class CreatureObject extends TangibleObject {
|
||||
|
||||
public Set<String> getAbilityNames() { return abilities.keySet(); };
|
||||
|
||||
public void setBaseHealth(int baseHealth) {
|
||||
synchronized(baseAttributes) {
|
||||
baseAttributes.set(0, baseHealth);
|
||||
baseAttributes.sendDeltaMessage(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void setHealth(int health) {
|
||||
synchronized(attributes) {
|
||||
attributes.set(0, health);
|
||||
@@ -753,6 +760,13 @@ public class CreatureObject extends TangibleObject {
|
||||
}
|
||||
}
|
||||
|
||||
public void setBaseAction(int baseAction) {
|
||||
synchronized(baseAttributes) {
|
||||
baseAttributes.set(2, baseAction);
|
||||
baseAttributes.sendDeltaMessage(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void setAction(int action) {
|
||||
synchronized(attributes) {
|
||||
attributes.set(2, action);
|
||||
|
||||
Reference in New Issue
Block a user