Revert "Fix of Rifle bug part1"

This reverts commit e79d1ad9d0.
This commit is contained in:
CharonInferar
2014-08-09 01:35:47 +02:00
parent e79d1ad9d0
commit 560df308de
3 changed files with 19 additions and 37 deletions
+8 -5
View File
@@ -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)