mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-06 21:13:37 -04:00
Fixed equip/unequip bug
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user