Fixed #126, updated git ignore list

This commit is contained in:
Seefo
2014-03-26 22:02:19 -04:00
parent c31c24d7ec
commit 7970be3656
3 changed files with 23 additions and 8 deletions
+6 -6
View File
@@ -50,12 +50,12 @@ interiorlayout/
clientdata/quest/
# PSWG Object Databases
odb/building/je.info.0.19
odb/creature/je.info.0.19
odb/doids/je.info.0.18
odb/guild/je.info.0.19
odb/mails/je.info.0.19
odb/oids/je.info.0.19
odb/building/je.info.*
odb/creature/je.info.*
odb/doids/je.info.*
odb/guild/je.info.*
odb/mails/je.info.*
odb/oids/je.info.*
# External tool builders
.externalToolBuilders/
+6
View File
@@ -78,6 +78,12 @@ def run(core, actor, target, commandString):
elif command == 'instance' and arg1:
core.instanceService.queue(arg1, actor)
elif command == 'action' and arg1:
actor.setAction(int(arg1))
elif command == 'health' and arg1:
actor.setHealth(int(arg1))
elif command == 'id':
actor.sendSystemMessage('Your id is: ' + str(actor.getObjectId()), 0)
@@ -1246,8 +1246,12 @@ public class CreatureObject extends TangibleObject implements IPersistent {
IoBuffer delta;
synchronized(objectMutex) {
if (this.health == health) return;
if(health > maxHealth)
health = maxHealth;
{
setHealth(maxHealth);
return;
}
setHamListCounter(getHamListCounter() + 1);
delta = messageBuilder.buildHealthDelta(health);
@@ -1264,10 +1268,15 @@ public class CreatureObject extends TangibleObject implements IPersistent {
}
public void setAction(int action) {
IoBuffer delta;
synchronized(objectMutex) {
if (this.action == action) return;
if(action > maxAction)
action = maxAction;
{
setAction(maxAction);
return;
}
setHamListCounter(getHamListCounter() + 1);
delta = messageBuilder.buildActionDelta(action);
notifyObservers(delta, true);