mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-20 10:03:02 -04:00
ODB wipe will be needed since the equipmentList will be out of sync with your character's slots if you attempted to remove an equipment item! "Removing" an item never removed it from the equipment list, only the slots.
22 lines
439 B
Python
22 lines
439 B
Python
import sys
|
|
|
|
def execute(galacticManager, player, target, args):
|
|
actor = player.getCreatureObject()
|
|
if actor is None or target is None:
|
|
return
|
|
|
|
inventory = actor.getSlottedObject("inventory")
|
|
|
|
if inventory is None:
|
|
return
|
|
|
|
if target.getParent() == actor:
|
|
target.moveToContainer(actor, inventory)
|
|
actor.removeEquipment(target)
|
|
return
|
|
else:
|
|
target.moveToContainer(actor, actor)
|
|
actor.addEquipment(target)
|
|
return
|
|
|
|
return |