def SelectOwnerEmptySlot(self, SlotIndex):
if FALSE == mouseModule.mouseController.isAttached():
return
if mouseModule.mouseController.IsAttachedMoney():
net.SendExchangeElkAddPacket(mouseModule.mouseController.GetAttachedMoneyAmount())
else:
attachedSlotType = mouseModule.mouseController.GetAttachedType()
if app.WJ_SPLIT_INVENTORY_SYSTEM:
if player.SLOT_TYPE_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_BOX_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_EFSUN_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_CICEK_INVENTORY == attachedSlotType or\
player.SLOT_TYPE_STONE_INVENTORY == attachedSlotType:
attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
DstSlotNumber = SlotIndex
itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
item.SelectItem(itemID)
if item.IsAntiFlag(item.ANTIFLAG_GIVE):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
mouseModule.mouseController.DeattachObject()
return
net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
else:
if (player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType):
attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
SrcSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
DstSlotNumber = SlotIndex
itemID = player.GetItemIndex(attachedInvenType, SrcSlotNumber)
item.SelectItem(itemID)
if item.IsAntiFlag(item.ANTIFLAG_GIVE):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EXCHANGE_CANNOT_GIVE)
mouseModule.mouseController.DeattachObject()
return
net.SendExchangeItemAddPacket(attachedInvenType, SrcSlotNumber, DstSlotNumber)
mouseModule.mouseController.DeattachObject()