Çözüldü NPC ye item satarken satmak istiyor musun sorusu

  • Konuyu açan Konuyu açan eldem07
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 1
  • Gösterim Gösterim 81
Bu konu çözüme ulaştırılmıştır. Çözüm için konuya yazılan tüm yorumları okumayı unutmayın. Eğer konudaki yorumlar sorununuzu çözmediyse yeni bir konu açabilirsiniz.
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.

eldem07

Gold Üye
Gold Üye
Yardımsever Üye
MT Üye
Mesaj
257
Çözümler
31
Beğeni
104
Puan
604
Ticaret Puanı
0
Selamlar NPCye kılıç, beceri kitabı satarken şu fiyata satmak istiyor musun sorunu soruyor ama mor pot, yeşil pot yeşil efsun nesnesi gibi itemlerde ise bu soruyu sormadan direk satıyor.

 
Çözüm
Selamlar NPCye kılıç, beceri kitabı satarken şu fiyata satmak istiyor musun sorunu soruyor ama mor pot, yeşil pot yeşil efsun nesnesi gibi itemlerde ise bu soruyu sormadan direk satıyor.

Sorun Çözülmüştür..

ÇÖZÜM ( uishop.py ):
Genişlet Daralt Kopyala
// 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()...
Selamlar NPCye kılıç, beceri kitabı satarken şu fiyata satmak istiyor musun sorunu soruyor ama mor pot, yeşil pot yeşil efsun nesnesi gibi itemlerde ise bu soruyu sormadan direk satıyor.

Sorun Çözülmüştür..

ÇÖZÜM ( uishop.py ):
Genişlet Daralt Kopyala
// 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()
 
Çözüm
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Geri
Üst