mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-21 11:03:00 -04:00
@@ -4,6 +4,8 @@ def setup():
|
||||
return
|
||||
|
||||
def run(core, actor, target, commandString):
|
||||
|
||||
|
||||
|
||||
parsedMsg = commandString.split(' ', 3)
|
||||
objService = core.objectService
|
||||
@@ -12,8 +14,8 @@ def run(core, actor, target, commandString):
|
||||
if target and container and target.getContainer():
|
||||
oldContainer = target.getContainer()
|
||||
if container == oldContainer:
|
||||
print 'Error: New container is same as old container.'
|
||||
return
|
||||
print 'Error: New container is same as old container.'
|
||||
return;
|
||||
|
||||
canEquip = core.equipmentService.canEquip(actor, target)
|
||||
|
||||
@@ -25,18 +27,19 @@ def run(core, actor, target, commandString):
|
||||
slotName = None
|
||||
replacedObjects = []
|
||||
slotNames = None
|
||||
|
||||
|
||||
if actor == container:
|
||||
slotNames = container.getSlotNamesForObject(target)
|
||||
|
||||
|
||||
for slotName in slotNames:
|
||||
object = container.getSlottedObject(slotName)
|
||||
|
||||
|
||||
if not object in replacedObjects and not object == None:
|
||||
replacedObjects.append(object)
|
||||
|
||||
if object != None:
|
||||
container.transferTo(actor, container, object)
|
||||
|
||||
if target.getTemplate().find('/wearables/') or target.getTemplate().find('/weapon/'):
|
||||
core.equipmentService.equip(actor, target)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user