Changed setOwner to also call Player.setCreatureObject

This commit is contained in:
Obique PSWG
2016-05-19 16:20:34 -05:00
parent fe738b2869
commit fa11bfe49e
4 changed files with 4 additions and 3 deletions
+4
View File
@@ -409,7 +409,11 @@ public abstract class SWGObject extends BaselineObject implements Comparable<SWG
}
public void setOwner(Player player) {
if (owner != null)
owner.setCreatureObject(null);
this.owner = player;
if (player != null && this instanceof CreatureObject)
player.setCreatureObject((CreatureObject) this);
}
public void setLocation(Location l) {