Fixed use() in object scripts. It should work now

This commit is contained in:
Treeku
2013-12-05 04:17:06 +00:00
parent ca807ae5ae
commit 82e513363e
6 changed files with 41 additions and 32 deletions
@@ -137,6 +137,26 @@ public class TangibleObject extends SWGObject {
this.optionsBitmask = optionsBitmask;
}
public void setOptions(int options, boolean add) {
synchronized(objectMutex) {
if (options != 0) {
if (add) {
addOption(options);
} else {
removeOption(options);
}
}
}
}
public void addOption(int option) {
setOptionsBitmask(getOptionsBitmask() | option);
}
public void removeOption(int option) {
setOptionsBitmask(getOptionsBitmask() & ~option);
}
public int getMaxDamage() {
return maxDamage;
}