*Problemă/Întrebare: Cand dau ctrl + click dreapta sa vad ce ofera din dropul unui cufar apare erroare asta in syserr
*Resursă folosită (sistem/funcție/modificare):Chest view drop
*Syserr: 0408 22:15:24471 :: File "ui.py", line 2510, in OnUnselectItemSlot
0408 22:15:24471 :: File "ui.py", line 96, in __call__
0408 22:15:24472 :: File "ui.py", line 87, in __call__
0408 22:15:24472 :: File "uiextrainventory.py", line 630, in UseItemSlot
0408 22:15:24472 :: File "uiextrainventory.py", line 641, in __UseItem
*Fișier(e) cu problema (link pastebin / code):
*Poze / Video:
*Resursă folosită (sistem/funcție/modificare):Chest view drop
*Syserr: 0408 22:15:24471 :: File "ui.py", line 2510, in OnUnselectItemSlot
0408 22:15:24471 :: File "ui.py", line 96, in __call__
0408 22:15:24472 :: File "ui.py", line 87, in __call__
0408 22:15:24472 :: File "uiextrainventory.py", line 630, in UseItemSlot
0408 22:15:24472 :: File "uiextrainventory.py", line 641, in __UseItem
*Fișier(e) cu problema (link pastebin / code):
*Poze / Video:
📢 Resurse Metin2 Premium!
Zeci de resurse Metin2 Premium - exclusive și 100% funcționale începând cu 15.99€!.
Vezi resursele Cumpără premium
Premium
Anunț
Contact:
ne-ai dat jumate de eroare, nu te putem ajuta asa..
Te asteptam si pe serverul de Discord
- aici ne-am strans toata comunitatea de Metin2 din Romania.
Link: https://discord.gg/jWxeDSf7HP
Suntem peste 1700 membri! - Avem chat activ zilnic, support, cereri, resurse.
Link: https://discord.gg/jWxeDSf7HP
Suntem peste 1700 membri! - Avem chat activ zilnic, support, cereri, resurse.
See full signature
Asta este tot ce primesc,
0409 14:21:27151 :: Traceback (most recent call last):
0409 14:21:27151 :: File "ui.py", line 2510, in OnUnselectItemSlot
0409 14:21:27151 :: File "ui.py", line 96, in __call__
0409 14:21:27152 :: File "ui.py", line 87, in __call__
0409 14:21:27152 :: File "uiextrainventory.py", line 630, in UseItemSlot
0409 14:21:27152 :: File "uiextrainventory.py", line 641, in __UseItem
0409 14:21:27152 :: TypeError
0409 14:21:27152 :: :
0409 14:21:27152 :: OpenChestDropWindow() takes exactly 3 arguments (5 given)
0409 14:21:27152 ::
0409 14:21:27151 :: Traceback (most recent call last):
0409 14:21:27151 :: File "ui.py", line 2510, in OnUnselectItemSlot
0409 14:21:27151 :: File "ui.py", line 96, in __call__
0409 14:21:27152 :: File "ui.py", line 87, in __call__
0409 14:21:27152 :: File "uiextrainventory.py", line 630, in UseItemSlot
0409 14:21:27152 :: File "uiextrainventory.py", line 641, in __UseItem
0409 14:21:27152 :: TypeError
0409 14:21:27152 :: :
0409 14:21:27152 :: OpenChestDropWindow() takes exactly 3 arguments (5 given)
0409 14:21:27152 ::
Contact:
functia OpenChestDropWindow necesita 3 argumente,d ar tu i-ai dat 5.
lasa-ne linia 641 din uiextrainventory.py
si def OpenChestDropWindow(
Te asteptam si pe serverul de Discord
- aici ne-am strans toata comunitatea de Metin2 din Romania.
Link: https://discord.gg/jWxeDSf7HP
Suntem peste 1700 membri! - Avem chat activ zilnic, support, cereri, resurse.
Link: https://discord.gg/jWxeDSf7HP
Suntem peste 1700 membri! - Avem chat activ zilnic, support, cereri, resurse.
See full signature
def __UseItem(self, slotIndex):
ItemVNum = player.GetItemIndex(player.EXTRA_INVENTORY, slotIndex)
item.SelectItem(ItemVNum)
if app.__BL_CHEST_DROP_INFO__:
if app.IsPressed(app.DIK_LCONTROL):
isMain = not app.IsPressed(app.DIK_LSHIFT)
if item.HasDropInfo(ItemVNum, isMain) and self.interface:
self.interface.OpenChestDropWindow(ItemVNum, isMain, slotIndex, player.EXTRA_INVENTORY)
return
ItemVNum = player.GetItemIndex(player.EXTRA_INVENTORY, slotIndex)
item.SelectItem(ItemVNum)
if app.__BL_CHEST_DROP_INFO__:
if app.IsPressed(app.DIK_LCONTROL):
isMain = not app.IsPressed(app.DIK_LSHIFT)
if item.HasDropInfo(ItemVNum, isMain) and self.interface:
self.interface.OpenChestDropWindow(ItemVNum, isMain, slotIndex, player.EXTRA_INVENTORY)
return
Ma ajuta cineva va rog?
Contact:
Code:
if __USE_DYNAMIC_MODULE__:
import pyapi
import app
import player
import net
import ui
import mousemodule
import snd
import item
import chat
import uicommon
import uiprivateshopbuilder
import constinfo
import ime
import uipickmoney
import localeinfo
if app.__ENABLE_NEW_OFFLINESHOP__:
import offlineshop
import uiofflineshop
class ExtraInventoryWindow(ui.ScriptWindow):
if app.WJ_ENABLE_TRADABLE_ICON:
bindWnds = []
interface = None
def __init__(self):
ui.ScriptWindow.__init__(self)
self.wndDragonSoulRefine = None
def __del__(self):
ui.ScriptWindow.__del__(self)
def Open(self):
self.Show()
self.SetTop()
self.SetCenterPosition()
if app.WJ_ENABLE_TRADABLE_ICON:
def BindWindow(self, wnd):
self.bindWnds.append(wnd)
def BindInterfaceClass(self, interface):
self.interface = interface
def LoadWindow(self, parent):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/extrainventory.py")
except:
import exception
exception.Abort("ExtraInventoryWindow.LoadWindow.LoadObject")
try:
self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
# self.GetChild("RefreshButton").SetEvent(ui.__mem_func__(self.SortExtraInventory))
self.GetChild("Mall_cat").SetEvent(ui.__mem_func__(self.ClickMallButton))
self.GetChild("Safebox_cat").SetEvent(ui.__mem_func__(self.ClickSafeboxButton))
self.wndItem = self.GetChild("ItemSlot")
self.inventoryTab = []
for x in xrange(player.EXTRA_INVENTORY_PAGE_COUNT / (player.EXTRA_INVENTORY_CATEGORY_COUNT)):
self.inventoryTab.append(self.GetChild("Inventory_Tab_%02d" % (x + 1)))
self.categoryTab = []
for x in xrange(player.EXTRA_INVENTORY_CATEGORY_COUNT):
self.categoryTab.append(self.GetChild("Cat_%02d" % x))
if app.ENABLE_LOCKED_EXTRA_INVENTORY:
self.EX_INVEN_COVER_IMG_CLOSE = []
self.EX_INVEN_COVER_IMG_OPEN = []
for i in xrange(9):
self.EX_INVEN_COVER_IMG_OPEN.append(self.GetChild("cover_open_" + str(i)))
self.EX_INVEN_COVER_IMG_CLOSE.append(self.GetChild("cover_close_" + str(i)))
except:
import exception
exception.Abort("ExtraInventoryWindow.LoadWindow.BindObject")
if app.ENABLE_LOCKED_EXTRA_INVENTORY:
for i in xrange(9):
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_OPEN[i].SetEvent(ui.__mem_func__(self.Env_key))
self.wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
self.wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
self.wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
self.wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
self.wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
self.wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
self.wndItem.SetOverInEmptySlotEvent(ui.__mem_func__(self.OverOutItem))
self.wndItem.SetOverOutEmptySlotEvent(ui.__mem_func__(self.OverOutItem))
for x in xrange(player.EXTRA_INVENTORY_PAGE_COUNT / (player.EXTRA_INVENTORY_CATEGORY_COUNT)):
self.inventoryTab[x].SetEvent(lambda arg = x: self.SetInventoryPage(arg))
self.inventoryTab[0].Down()
for x in xrange(player.EXTRA_INVENTORY_CATEGORY_COUNT):
self.categoryTab[x].SetEvent(lambda arg = x: self.SetCategory(arg))
self.categoryTab[0].Down()
self.inventoryPageIndex = 0
self.category = 0
self.sellingSlotNumber = -1
self.questionDialog = None
self.tooltipItem = None
self.dlgPickMoney = uipickmoney.PickMoneyDialog()
self.dlgPickMoney.LoadDialog()
self.dlgPickMoney.Hide()
if app.ENABLE_HIGHLIGHT_SYSTEM:
self.listHighlightedSlot = []
for i in xrange(player.EXTRA_INVENTORY_CATEGORY_COUNT):
self.listHighlightedSlot.append([])
if app.ENABLE_DRAGON_SOUL_SYSTEM:
self.wndDragonSoulRefine = parent
self.SetInventoryPage(0)
if app.ENABLE_HIGHLIGHT_SYSTEM:
def HighlightSlot(self, slot):
category = 0
if slot >= 180 and slot < 360:
category = 1
if slot >= 360 and slot < 540:
category = 2
if slot >= 540 and slot < 720:
category = 3
if slot >= 720 and slot < 900:
category = 4
if not slot in self.listHighlightedSlot[category]:
self.listHighlightedSlot[category].append(slot)
def Destroy(self):
self.ClearDictionary()
self.tooltipItem = None
self.wndItem = None
self.inventoryTab = []
self.categoryTab = []
self.dlgPickMoney.Destroy()
self.dlgPickMoney = None
if app.ENABLE_LOCKED_EXTRA_INVENTORY:
self.EX_INVEN_COVER_IMG_CLOSE = None
self.EX_INVEN_COVER_IMG_OPEN = None
self.wndDragonSoulRefine = None
if app.WJ_ENABLE_TRADABLE_ICON:
self.bindWnds = []
def Close(self):
if constinfo.GET_ITEM_QUESTION_DIALOG_STATUS():
self.OnCloseQuestionDialog()
return
if self.tooltipItem:
self.tooltipItem.HideToolTip()
if self.dlgPickMoney:
self.dlgPickMoney.Close()
self.Hide()
if app.ENABLE_LOCKED_EXTRA_INVENTORY:
def UpdateInven(self):
for i in xrange(9):
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
slotsAv = player.GetStatus(int(self.category) + player.EXTRA_INVENTORY1)
page = self.inventoryPageIndex
if page == 2:
first = False
for i in xrange(4, 9):
if slotsAv > int(i - 4):
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
else:
if not first and (int(slotsAv) < 6):
self.EX_INVEN_COVER_IMG_OPEN[i].Show()
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
first = True
else:
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_CLOSE[i].Show()
elif page == 3:
first = False
slotsAv -= 5
for i in xrange(9):
if slotsAv == 0 and not first:
self.EX_INVEN_COVER_IMG_OPEN[i].Show()
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
first = True
elif slotsAv <= 0:
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_CLOSE[i].Show()
else:
if slotsAv >= int(i + 1):
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
else:
if not first:
self.EX_INVEN_COVER_IMG_OPEN[i].Show()
self.EX_INVEN_COVER_IMG_CLOSE[i].Hide()
first = True
else:
self.EX_INVEN_COVER_IMG_OPEN[i].Hide()
self.EX_INVEN_COVER_IMG_CLOSE[i].Show()
def Expansion_env(self):
net.SendChatPacket("/unlock_extra " + str(self.category))
self.OnCloseQuestionDialog()
def Env_key(self):
slotsAv = player.GetStatus(int(self.category) + player.EXTRA_INVENTORY1)
if slotsAv < 14:
needkeys = (
1,
1,
1,
2,
2,
2,
3,
3,
3,
4,
4,
4,
5,
6,
)
self.questionDialog = uicommon.QuestionDialog()
self.questionDialog.SetText(localeinfo.ENVANTER_EXPANS_1 % needkeys[slotsAv])
self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.Expansion_env))
self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
self.questionDialog.Open()
def GetInventoryPageIndex(self):
return self.inventoryPageIndex + (self.category * 4)
def SetInventoryPage(self, page):
self.inventoryPageIndex = page
for x in xrange(player.EXTRA_INVENTORY_PAGE_COUNT / (player.EXTRA_INVENTORY_CATEGORY_COUNT)):
if x != page:
self.inventoryTab[x].SetUp()
if app.ENABLE_LOCKED_EXTRA_INVENTORY:
self.UpdateInven()
self.RefreshItemSlot()
def SetCategory(self, category):
self.category = category
for x in xrange(player.EXTRA_INVENTORY_CATEGORY_COUNT):
if x != category:
self.categoryTab[x].SetUp()
if app.ENABLE_LOCKED_EXTRA_INVENTORY:
self.UpdateInven()
self.RefreshItemSlot()
def OnPickItem(self, count):
itemSlotIndex = self.dlgPickMoney.itemGlobalSlotIndex
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop() and uiofflineshop.IsSaleSlot(player.EXTRA_INVENTORY, itemSlotIndex):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
division = self.dlgPickMoney.division
if division:
net.SendItemDivisionPacket(itemSlotIndex, player.EXTRA_INVENTORY)
else:
selectedItemVNum = player.GetItemIndex(player.EXTRA_INVENTORY, itemSlotIndex)
mousemodule.mouseController.AttachObject(self, player.SLOT_TYPE_EXTRA_INVENTORY, itemSlotIndex, selectedItemVNum, count)
def __InventoryLocalSlotPosToGlobalSlotPos(self, local):
return self.inventoryPageIndex * player.EXTRA_INVENTORY_PAGE_SIZE + local + (self.category * (player.EXTRA_INVENTORY_PAGE_SIZE * 4))
if app.WJ_ENABLE_TRADABLE_ICON:
def RefreshMarkSlots(self, localIndex=None):
if not self.interface:
return
onTopWnd = self.interface.GetOnTopWindow()
if localIndex:
slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(localIndex)
if onTopWnd == player.ON_TOP_WND_NONE:
self.wndItem.SetUsableSlotOnTopWnd(localIndex)
elif onTopWnd == player.ON_TOP_WND_SHOP:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ANTIFLAG_SELL):
self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
else:
self.wndItem.SetUsableSlotOnTopWnd(localIndex)
elif onTopWnd == player.ON_TOP_WND_EXCHANGE:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ANTIFLAG_GIVE):
self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
else:
self.wndItem.SetUsableSlotOnTopWnd(localIndex)
elif onTopWnd == player.ON_TOP_WND_PRIVATE_SHOP:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ITEM_ANTIFLAG_MYSHOP):
self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
else:
self.wndItem.SetUsableSlotOnTopWnd(localIndex)
elif onTopWnd == player.ON_TOP_WND_SAFEBOX:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ANTIFLAG_SAFEBOX):
self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
else:
self.wndItem.SetUsableSlotOnTopWnd(localIndex)
return
for i in xrange(player.EXTRA_INVENTORY_PAGE_SIZE):
slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
if onTopWnd == player.ON_TOP_WND_NONE:
self.wndItem.SetUsableSlotOnTopWnd(i)
elif onTopWnd == player.ON_TOP_WND_SHOP:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ANTIFLAG_SELL):
self.wndItem.SetUnusableSlotOnTopWnd(i)
else:
self.wndItem.SetUsableSlotOnTopWnd(i)
elif onTopWnd == player.ON_TOP_WND_EXCHANGE:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ANTIFLAG_GIVE):
self.wndItem.SetUnusableSlotOnTopWnd(i)
else:
self.wndItem.SetUsableSlotOnTopWnd(i)
elif onTopWnd == player.ON_TOP_WND_PRIVATE_SHOP:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ITEM_ANTIFLAG_MYSHOP):
self.wndItem.SetUnusableSlotOnTopWnd(i)
else:
self.wndItem.SetUsableSlotOnTopWnd(i)
elif onTopWnd == player.ON_TOP_WND_SAFEBOX:
if player.IsAntiFlagBySlot(player.EXTRA_INVENTORY, slotNumber, item.ANTIFLAG_SAFEBOX):
self.wndItem.SetUnusableSlotOnTopWnd(i)
else:
self.wndItem.SetUsableSlotOnTopWnd(i)
def RefreshItemSlot(self):
getItemVNum = player.GetItemIndex
getItemCount = player.GetItemCount
for i in xrange(self.wndItem.GetSlotCount()):
self.wndItem.DeactivateSlot(i)
for i in xrange(player.EXTRA_INVENTORY_PAGE_SIZE):
slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
itemCount = getItemCount(player.EXTRA_INVENTORY, slotNumber)
if 0 == itemCount:
self.wndItem.ClearSlot(i)
continue
elif 1 == itemCount:
itemCount = 0
itemVnum = getItemVNum(player.EXTRA_INVENTORY, slotNumber)
if not itemVnum:
continue
self.wndItem.SetItemSlot(i, itemVnum, itemCount)
if app.ENABLE_HIGHLIGHT_SYSTEM and slotNumber in self.listHighlightedSlot[self.category]:
self.wndItem.ActivateSlot(i, 0.2, 0.8, 0.0, 1.0)
if app.WJ_ENABLE_TRADABLE_ICON:
self.RefreshMarkSlots(i)
self.wndItem.RefreshSlot()
if app.WJ_ENABLE_TRADABLE_ICON:
map(lambda wnd:wnd.RefreshExtraLockedSlot(), self.bindWnds)
def SetItemToolTip(self, tooltipItem):
self.tooltipItem = tooltipItem
def SellItem(self):
# offlineshop-updated 04/08/19
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop() and uiofflineshop.IsSaleSlot(player.EXTRA_INVENTORY, self.sellingSlotNumber):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
if self.sellingSlotitemIndex == player.GetItemIndex(player.EXTRA_INVENTORY, self.sellingSlotNumber):
if self.sellingSlotitemCount == player.GetItemCount(player.EXTRA_INVENTORY, self.sellingSlotNumber):
net.SendShopSellPacketNew(self.sellingSlotNumber, self.questionDialog.count, player.EXTRA_INVENTORY)
snd.PlaySound("sound/ui/money.wav")
self.OnCloseQuestionDialog()
def OnCloseQuestionDialog(self):
if not self.questionDialog:
return
self.questionDialog.Close()
self.questionDialog = None
constinfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
def SelectEmptySlot(self, selectedSlotPos):
if constinfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
return
selectedSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(selectedSlotPos)
if mousemodule.mouseController.isAttached():
attachedSlotType = mousemodule.mouseController.GetAttachedType()
attachedSlotPos = mousemodule.mouseController.GetAttachedSlotNumber()
attachedCount = mousemodule.mouseController.GetAttachedItemCount()
# offlineshop-updated 04/08/19
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop() and uiofflineshop.IsSaleSlot(attachedSlotType,attachedSlotPos):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
if player.SLOT_TYPE_EXTRA_INVENTORY == attachedSlotType:
self.__SendMoveItemPacket(attachedSlotPos, selectedSlotPos, attachedCount)
elif player.SLOT_TYPE_SAFEBOX == attachedSlotType:
net.SendSafeboxCheckoutPacket(attachedSlotPos, player.EXTRA_INVENTORY, selectedSlotPos)
mousemodule.mouseController.DeattachObject()
def SelectItemSlot(self, itemSlotIndex):
if constinfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
return
itemSlotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(itemSlotIndex)
selectedItemVNum = player.GetItemIndex(player.EXTRA_INVENTORY, itemSlotIndex)
itemCount = player.GetItemCount(player.EXTRA_INVENTORY, itemSlotIndex)
if mousemodule.mouseController.isAttached():
attachedSlotType = mousemodule.mouseController.GetAttachedType()
attachedSlotPos = mousemodule.mouseController.GetAttachedSlotNumber()
attachedCount = mousemodule.mouseController.GetAttachedItemCount()
if player.SLOT_TYPE_EXTRA_INVENTORY == attachedSlotType:
self.__SendMoveItemPacket(attachedSlotPos, itemSlotIndex, attachedCount)
mousemodule.mouseController.DeattachObject()
else:
curCursorNum = app.GetCursor()
if app.SELL == curCursorNum:
self.__SellItem(itemSlotIndex)
elif app.BUY == curCursorNum:
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.SHOP_BUY_INFO)
elif app.IsPressed(app.DIK_LALT):
link = player.GetItemLink(player.EXTRA_INVENTORY, itemSlotIndex)
ime.PasteString(link)
elif app.IsPressed(app.DIK_LSHIFT):
if itemCount > 1:
self.dlgPickMoney.SetTitleName(localeinfo.PICK_ITEM_TITLE)
self.dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickItem))
self.dlgPickMoney.Open(itemCount, 1, False)
self.dlgPickMoney.itemGlobalSlotIndex = itemSlotIndex
else:
mousemodule.mouseController.AttachObject(self, player.SLOT_TYPE_EXTRA_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
else:
mousemodule.mouseController.AttachObject(self, player.SLOT_TYPE_EXTRA_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
snd.PlaySound("sound/ui/pick.wav")
def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos):
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop() and (uiofflineshop.IsSaleSlot(player.EXTRA_INVENTORY, srcItemSlotPos) or uiofflineshop.IsSaleSlot(player.EXTRA_INVENTORY , dstItemSlotPos)):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
if item.IsKey(srcItemVID):
self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)
else:
self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos, 0)
def __SellItem(self, itemSlotPos):
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
self.sellingSlotNumber = itemSlotPos
itemIndex = player.GetItemIndex(player.EXTRA_INVENTORY, itemSlotPos)
itemCount = player.GetItemCount(player.EXTRA_INVENTORY, itemSlotPos)
self.sellingSlotitemIndex = itemIndex
self.sellingSlotitemCount = itemCount
item.SelectItem(itemIndex)
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
return
itemPrice = item.GetISellItemPrice()
if item.Is1GoldItem():
itemPrice = itemCount / itemPrice / 5
else:
itemPrice = itemPrice * itemCount / 5
item.GetItemName(itemIndex)
itemName = item.GetItemName()
self.questionDialog = uicommon.QuestionDialog()
self.questionDialog.SetText(localeinfo.DO_YOU_SELL_ITEM(itemName, itemCount, itemPrice))
self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.SellItem))
self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
self.questionDialog.Open()
self.questionDialog.count = itemCount
constinfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
def __OnClosePopupDialog(self):
self.pop = None
def OverOutItem(self):
self.wndItem.SetUseMode(False)
self.wndItem.SetUsableItem(False)
if None != self.tooltipItem:
self.tooltipItem.HideToolTip()
def OverInItem(self, overSlotPos):
if app.ENABLE_HIGHLIGHT_SYSTEM:
slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
if slotNumber in self.listHighlightedSlot[self.category]:
self.wndItem.DeactivateSlot(overSlotPos)
self.listHighlightedSlot[self.category].remove(slotNumber)
overSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
self.wndItem.SetUsableItem(True)
if mousemodule.mouseController.isAttached():
attachedItemType = mousemodule.mouseController.GetAttachedType()
if attachedItemType == player.SLOT_TYPE_EXTRA_INVENTORY:
attachedItemVNum = mousemodule.mouseController.GetAttachedItemIndex()
if self.__CanUseSrcItemToDstItem(attachedItemVNum, overSlotPos):
self.wndItem.SetUseMode(True)
else:
self.wndItem.SetUseMode(False)
self.ShowToolTip(overSlotPos)
def __CanUseSrcItemToDstItem(self, srcItemVNum, dstSlotPos):
if item.IsKey(srcItemVNum):
if player.CanUnlock(srcItemVNum, player.EXTRA_INVENTORY, dstSlotPos):
return True
def ShowToolTip(self, slotIndex):
if None != self.tooltipItem:
self.tooltipItem.SetInventoryItem(slotIndex, player.EXTRA_INVENTORY)
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop() or uiofflineshop.IsBuildingAuction():
self.__AddTooltipSaleMode(slotIndex)
if app.__ENABLE_NEW_OFFLINESHOP__:
def __AddTooltipSaleMode(self, slot):
itemIndex = player.GetItemIndex(player.EXTRA_INVENTORY,slot)
if itemIndex !=0:
item.SelectItem(itemIndex)
if item.IsAntiFlag(item.ANTIFLAG_MYSHOP) or item.IsAntiFlag(item.ANTIFLAG_GIVE):
return
self.tooltipItem.AddRightClickForSale()
def OnTop(self):
if None != self.tooltipItem:
self.tooltipItem.SetTop()
if app.WJ_ENABLE_TRADABLE_ICON:
map(lambda wnd:wnd.RefreshExtraLockedSlot(), self.bindWnds)
self.RefreshMarkSlots()
def OnPressEscapeKey(self):
self.Close()
return True
def UseItemSlot(self, slotIndex):
curCursorNum = app.GetCursor()
if app.SELL == curCursorNum:
return
if constinfo.GET_ITEM_QUESTION_DIALOG_STATUS():
return
slotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(slotIndex)
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if self.wndDragonSoulRefine.IsShow():
self.wndDragonSoulRefine.AutoSetItem((player.EXTRA_INVENTORY, slotIndex), 1)
return
if app.__ENABLE_NEW_OFFLINESHOP__:
if uiofflineshop.IsBuildingShop():
itemIndex = player.GetItemIndex(player.EXTRA_INVENTORY, slotIndex)
item.SelectItem(itemIndex)
if not item.IsAntiFlag(item.ANTIFLAG_GIVE) and not item.IsAntiFlag(item.ANTIFLAG_MYSHOP):
offlineshop.ShopBuilding_AddItem(player.EXTRA_INVENTORY, slotIndex)
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
elif uiofflineshop.IsBuildingAuction():
itemIndex = player.GetItemIndex(player.EXTRA_INVENTORY,slotIndex)
item.SelectItem(itemIndex)
if not item.IsAntiFlag(item.ANTIFLAG_GIVE) and not item.IsAntiFlag(item.ANTIFLAG_MYSHOP):
offlineshop.AuctionBuilding_AddItem(player.EXTRA_INVENTORY,slotIndex)
else:
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.OFFLINESHOP_CANT_SELECT_ITEM_DURING_BUILING)
return
self.__UseItem(slotIndex)
mousemodule.mouseController.DeattachObject()
self.OverOutItem()
def __UseItem(self, slotIndex):
ItemVNum = player.GetItemIndex(player.EXTRA_INVENTORY, slotIndex)
item.SelectItem(ItemVNum)
if app.__BL_CHEST_DROP_INFO__:
if app.IsPressed(app.DIK_LCONTROL):
isMain = not app.IsPressed(app.DIK_LSHIFT)
if item.HasDropInfo(ItemVNum, isMain) and self.interface:
self.interface.OpenChestDropWindow(slotIndex, player.EXTRA_INVENTORY)
return
if item.IsFlag(item.ITEM_FLAG_CONFIRM_WHEN_USE):
self.questionDialog = uicommon.QuestionDialog()
self.questionDialog.SetText(localeinfo.INVENTORY_REALLY_USE_ITEM)
self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.__UseItemQuestionDialog_OnAccept))
self.questionDialog.SetCancelEvent(ui.__mem_func__(self.__UseItemQuestionDialog_OnCancel))
self.questionDialog.Open()
self.questionDialog.slotIndex = slotIndex
constinfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)
else:
self.__SendUseItemPacket(slotIndex)
def __UseItemQuestionDialog_OnCancel(self):
self.OnCloseQuestionDialog()
def __UseItemQuestionDialog_OnAccept(self):
self.__SendUseItemPacket(self.questionDialog.slotIndex)
self.OnCloseQuestionDialog()
def __SendUseItemPacket(self, slotPos):
if uiprivateshopbuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.USE_ITEM_FAILURE_PRIVATE_SHOP)
return
net.SendItemUsePacket(player.EXTRA_INVENTORY, slotPos)
def __SendMoveItemPacket(self, srcSlotPos, dstSlotPos, srcItemCount):
if uiprivateshopbuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
return
if srcSlotPos == dstSlotPos:
return
net.SendItemMovePacket(player.EXTRA_INVENTORY, srcSlotPos, player.EXTRA_INVENTORY, dstSlotPos, srcItemCount)
def __SendUseItemToItemPacket(self, srcSlotPos, dstSlotPos):
if uiprivateshopbuilder.IsBuildingPrivateShop():
chat.AppendChat(chat.CHAT_TYPE_INFO, localeinfo.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
return
if srcSlotPos == dstSlotPos:
return
net.SendItemUseToItemPacket(player.EXTRA_INVENTORY, srcSlotPos, player.EXTRA_INVENTORY, dstSlotPos)
# if app.ENABLE_SORT_INVEN:
# def SortExtraInventory(self):
# net.SendChatPacket("/sort_extra_inventory")
# def Sort_ExtraInventoryDone(self):
# if app.ENABLE_HIGHLIGHT_SYSTEM:
# for i in xrange(player.EXTRA_INVENTORY_CATEGORY_COUNT):
# del self.listHighlightedSlot[i][:]
# self.RefreshItemSlot()
def ClickMallButton(self):
print "click_mall_button"
net.SendChatPacket("/click_mall")
def ClickSafeboxButton(self):
print "click_safebox_button"
net.SendChatPacket("/click_safebox")
Contact:
Danzo scrie: ↑ 0409 14:21:27151 :: Traceback (most recent call last):
0409 14:21:27151 :: File "ui.py", line 2510, in OnUnselectItemSlot
0409 14:21:27151 :: File "ui.py", line 96, in __call__
0409 14:21:27152 :: File "ui.py", line 87, in __call__
0409 14:21:27152 :: File "uiextrainventory.py", line 630, in UseItemSlot
0409 14:21:27152 :: File "uiextrainventory.py", line 641, in __UseItem
0409 14:21:27152 :: TypeError
0409 14:21:27152 :: :
0409 14:21:27152 :: OpenChestDropWindow() takes exactly 3 arguments (5 given)
0409 14:21:27152 ::
In interfacemodule.py cauta:
si inlocuisti toata functia cu:
Code:
0410 22:04:12430 ::
networkmodule.py(line:202) SetSelectCharacterPhase
system.py(line:179) __hybrid_import
system.py(line:147) _process_result
introselect.py(line:30) <module>
system.py(line:179) __hybrid_import
networkmodule.SetSelectCharacterPhase - <type 'exceptions.IndentationError'>:unindent does not match any outer indentation level (interfacemodule.py, line 2524)
0410 22:04:12430 :: ============================================================================================================
0410 22:04:12430 :: Abort!!!!
🔥 Hai pe Discord! - Chat activ și support direct
Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.
Alătură-te acum!1300+ de membri activi!
Roboțelu'
Anunț
-
Subiecte similare
-
7Răspunsuri3791Vizualizăride KimuraMt2
-
0Răspunsuri644Vizualizăride ZuZuR
-
0Răspunsuri768Vizualizăride iShadoW
-
10Răspunsuri1327Vizualizăride pepene12345
-
2Răspunsuri204Vizualizăride ZuZuR
-
Informații
Utilizatori ce navighează pe acest forum: Niciun utilizator înregistrat și 7 vizitatori
Discord ID copiat:




la acest mesaj și conținutul se va afișa automat.