From abc6b8de01456a6a1ca611d1f775cb2bfca4f007 Mon Sep 17 00:00:00 2001 From: Treeku Date: Mon, 8 Sep 2014 21:48:30 +0100 Subject: [PATCH] Updated transferitemarmor --- scripts/commands/transferitemarmor.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/scripts/commands/transferitemarmor.py b/scripts/commands/transferitemarmor.py index 46a741f3..421c0f05 100644 --- a/scripts/commands/transferitemarmor.py +++ b/scripts/commands/transferitemarmor.py @@ -15,13 +15,16 @@ def run(core, actor, target, commandString): if container == oldContainer: print 'Error: New container is same as old container.' return; - - if oldContainer == actor.getSlottedObject('appearance_inventory'): - core.equipmentService.unequipAppearance(actor, target) - - oldContainer.transferTo(actor, container, target) - - if container == actor.getSlottedObject('appearance_inventory'): - core.equipmentService.equipAppearance(actor, target) - + + if oldContainer == actor: + core.equipmentService.unequip(actor, target) + elif oldContainer == actor.getSlottedObject('appearance_inventory'): + core.equipmentService.unequipAppearance(actor, target) + elif container == actor: + core.equipmentService.equip(actor, target) + elif container == actor.getSlottedObject('appearance_inventory'): + core.equipmentService.equipAppearance(actor, target) + else: + oldContainer.transferTo(actor, container, target) + return