Fixed equip/unequip bug

This commit is contained in:
Obique PSWG
2016-01-18 01:24:46 -06:00
parent e0aa79e7f2
commit e98c35a63c
3 changed files with 14 additions and 8 deletions
+2
View File
@@ -198,6 +198,7 @@ public abstract class SWGObject implements Serializable, Comparable<SWGObject> {
// Get a pre-parent-removal list of the observers so we can send create/destroy/update messages
Set<SWGObject> oldObservers = getObservers();
Player prevOwner = getOwner();
oldObservers.add(prevOwner.getCreatureObject());
// Remove this object from the old parent if one exists
SWGObject oldParent = null;
@@ -212,6 +213,7 @@ public abstract class SWGObject implements Serializable, Comparable<SWGObject> {
// Observer notification
Player newOwner = getOwner();
Set<SWGObject> containerObservers = getObservers();
containerObservers.add(newOwner.getCreatureObject());
if (prevOwner != newOwner) {
if (prevOwner != null)
oldObservers.add(prevOwner.getCreatureObject());