// ARAT...
def SellAttachedItem(self):
// KOD BLOĞU DEĞİŞTİR...
def SellAttachedItem(self):
if shop.IsPrivateShop():
mouseModule.mouseController.DeattachObject()
return
attachedSlotType = mouseModule.mouseController.GetAttachedType()
attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
attachedCount = mouseModule.mouseController.GetAttachedItemCount()
attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
# EK Envanter
if player.SLOT_TYPE_INVENTORY == attachedSlotType or \
player.SLOT_TYPE_SKILL_BOOK_INVENTORY == attachedSlotType or \
player.SLOT_TYPE_UPGRADE_ITEMS_INVENTORY == attachedSlotType or \
player.SLOT_TYPE_STONE_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_DRAGON_SOUL_INVENTORY == attachedSlotType:
item.SelectItem(attachedItemIndex)
if item.IsAntiFlag(item.ANTIFLAG_SELL):
popup = uiCommon.PopupDialog()
popup.SetText(localeInfo.SHOP_CANNOT_SELL_ITEM)
popup.SetAcceptEvent(self.__OnClosePopupDialog)
popup.Open()
self.popup = popup
mouseModule.mouseController.DeattachObject()
return
if player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:
itemtype = player.DRAGON_SOUL_INVENTORY
else:
itemtype = player.INVENTORY
itemPrice = item.GetISellItemPrice()
if item.Is1GoldItem():
itemPrice = attachedCount / itemPrice if itemPrice != 0 else 0
else:
itemPrice = itemPrice * max(1, attachedCount)
if not app.ENABLE_NO_SELL_PRICE_DIVIDED_BY_5:
itemPrice /= 5
itemName = item.GetItemName()
questionDialog = uiCommon.QuestionDialog()
questionDialog.SetText(localeInfo.DO_YOU_SELL_ITEM(itemName, attachedCount, itemPrice))
questionDialog.SetAcceptEvent(lambda arg1=attachedSlotPos, arg2=attachedCount, arg3=itemtype: self.OnSellItem(arg1, arg2, arg3))
questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
questionDialog.Open()
self.questionDialog = questionDialog
constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
else:
snd.PlaySound("sound/ui/loginfail.wav")
mouseModule.mouseController.DeattachObject()