Files
Holocore/scripts/commands/generic/transferItemMisc.py
T
Waverunner 2160380287 Fixed a crash by un-equipping and then re-equipping an item
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.
2015-06-06 09:24:36 -04:00

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