mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-09-28 13:12:59 -04:00
22 lines
483 B
Python
22 lines
483 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:
|
|
actor.removeEquipment(target)
|
|
target.moveToContainer(actor, inventory)
|
|
return
|
|
else:
|
|
target.moveToContainer(actor, actor)
|
|
# actor.addEquipment(target) # This seems to crash the client, look to
|
|
return
|
|
|
|
return |