mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-03 18:13:08 -04:00
This should hopefully fix the blue ghost problems with equipping/unequipping items
22 lines
457 B
Python
22 lines
457 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:
|
|
result = target.moveToContainer(actor, inventory)
|
|
actor.removeEquipment(target)
|
|
return
|
|
else:
|
|
result = target.moveToContainer(actor, actor)
|
|
actor.addEquipment(target)
|
|
return
|
|
|
|
return |