Exemple #1
0
    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 (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()
Exemple #2
0
    def SelectOwnerItemSlot(self, SlotIndex):

        if player.ITEM_MONEY == mouseModule.mouseController.GetAttachedItemIndex(
        ):

            money = mouseModule.mouseController.GetAttachedItemCount()
            net.SendExchangeElkAddPacket(money)
Exemple #3
0
 def OnPickMoney(self, money):
     net.SendExchangeElkAddPacket(money)