Yardım SetEvent Syserr

  • Konuyu açan Konuyu açan dePayens
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 1
  • Gösterim Gösterim 434
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

dePayens

Üye
Üye
Mesaj
53
Çözümler
2
Beğeni
10
Puan
444
Ticaret Puanı
0
Öncelikle herkese kolay gelsin.
Great uyumlu won sistemi eklemeye çalışıyorum serverime ancak şu syserr'i alıyorum.Yardım edebilir misiniz?
SYSERR:
Genişlet Daralt Kopyala
0408 00:37:14269 ::
uiInventory.py(line:342) __LoadWindow

InventoryWindow.LoadWindow.BindObject - <type 'exceptions.AttributeError'>:'NoneType' object has no attribute 'SetEvent'

0408 00:37:14269 :: ============================================================================================================
0408 00:37:14269 :: Abort!!!!

Dosyam da bu:
uiInventory.py:
Genişlet Daralt Kopyala
import ui
import player
import mouseModule
import net
import app
import snd
import item
import player
import chat
import grp
import uiScriptLocale
import uiRefine
import uiAttachMetin
import uiPickMoney
import uiCommon
import uiPrivateShopBuilder # 개인상점 열동안 ItemMove 방지
import localeInfo
import constInfo
import ime
import wndMgr

if app.ENABLE_CHEQUE_SYSTEM:
    import uiToolTip
    import uiPickETC

ITEM_MALL_BUTTON_ENABLE = True



ITEM_FLAG_APPLICABLE = 1 << 14

class CostumeWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
        
        if not app.ENABLE_COSTUME_SYSTEM:           
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                       
                  
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;

        self.__LoadWindow()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def Show(self):
        self.__LoadWindow()
        self.RefreshCostumeSlot()

        ui.ScriptWindow.Show(self)

    def Close(self):
        self.Hide()

    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/CostumeWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            wndEquip = self.GetChild("CostumeSlot")
            self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
            
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

        ## Equipment
        wndEquip.SetOverInItemEvent(ui.__mem_func__(self.wndInventory.OverInItem))
        wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.wndInventory.OverOutItem))
        wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
        wndEquip.SetUseSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))                       
        wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.wndInventory.SelectEmptySlot))
        wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.wndInventory.SelectItemSlot))

        self.wndEquip = wndEquip

    def RefreshCostumeSlot(self):
        getItemVNum=player.GetItemIndex
        
        for i in xrange(item.COSTUME_SLOT_COUNT):
            slotNumber = item.COSTUME_SLOT_START + i
            self.wndEquip.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)

        self.wndEquip.RefreshSlot()
        
class BeltInventoryWindow(ui.ScriptWindow):

    def __init__(self, wndInventory):
        import exception
        
        if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:           
            exception.Abort("What do you do?")
            return

        if not wndInventory:
            exception.Abort("wndInventory parameter must be set to InventoryWindow")
            return                       
                  
        ui.ScriptWindow.__init__(self)

        self.isLoaded = 0
        self.wndInventory = wndInventory;
        
        self.wndBeltInventoryLayer = None
        self.wndBeltInventorySlot = None
        self.expandBtn = None
        self.minBtn = None

        self.__LoadWindow()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def Show(self, openBeltSlot = FALSE):
        self.__LoadWindow()
        self.RefreshSlot()

        ui.ScriptWindow.Show(self)
        
        if openBeltSlot:
            self.OpenInventory()
        else:
            self.CloseInventory()

    def Close(self):
        self.Hide()

    def IsOpeningInventory(self):
        return self.wndBeltInventoryLayer.IsShow()
        
    def OpenInventory(self):
        self.wndBeltInventoryLayer.Show()
        self.expandBtn.Hide()

        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()
                
    def CloseInventory(self):
        self.wndBeltInventoryLayer.Hide()
        self.expandBtn.Show()
        
        if localeInfo.IsARABIC() == 0:
            self.AdjustPositionAndSize()

    ## 현재 인벤토리 위치를 기준으로 BASE 위치를 계산, 리턴.. 숫자 하드코딩하기 정말 싫지만 방법이 없다..
    def GetBasePosition(self):
        x, y = self.wndInventory.GetGlobalPosition()
        return x - 148, y + 241
        
    def AdjustPositionAndSize(self):
        bx, by = self.GetBasePosition()
        
        if self.IsOpeningInventory():           
            self.SetPosition(bx, by)
            self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())
            
        else:
            self.SetPosition(bx + 138, by);
            self.SetSize(10, self.GetHeight())

    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()
            pyScrLoader.LoadScriptFile(self, "UIScript/BeltInventoryWindow.py")
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.LoadObject")

        try:
            self.ORIGINAL_WIDTH = self.GetWidth()
            wndBeltInventorySlot = self.GetChild("BeltInventorySlot")
            self.wndBeltInventoryLayer = self.GetChild("BeltInventoryLayer")
            self.expandBtn = self.GetChild("ExpandBtn")
            self.minBtn = self.GetChild("MinimizeBtn")
            
            self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
            self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
            
            if localeInfo.IsARABIC() :
                self.expandBtn.SetPosition(self.expandBtn.GetWidth() - 2, 15)
                self.wndBeltInventoryLayer.SetPosition(self.wndBeltInventoryLayer.GetWidth() - 5, 0)
                self.minBtn.SetPosition(self.minBtn.GetWidth() + 3, 15)           
    
            for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
                slotNumber = item.BELT_INVENTORY_SLOT_START + i                           
                wndBeltInventorySlot.SetCoverButton(slotNumber,    "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/quest/slot_button_01.sub",\
                                                "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", FALSE, FALSE)                                   
            
        except:
            import exception
            exception.Abort("CostumeWindow.LoadWindow.BindObject")

        ## Equipment
        wndBeltInventorySlot.SetOverInItemEvent(ui.__mem_func__(self.wndInventory.OverInItem))
        wndBeltInventorySlot.SetOverOutItemEvent(ui.__mem_func__(self.wndInventory.OverOutItem))
        wndBeltInventorySlot.SetUnselectItemSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
        wndBeltInventorySlot.SetUseSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))                       
        wndBeltInventorySlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.wndInventory.SelectEmptySlot))
        wndBeltInventorySlot.SetSelectItemSlotEvent(ui.__mem_func__(self.wndInventory.SelectItemSlot))

        self.wndBeltInventorySlot = wndBeltInventorySlot

    def RefreshSlot(self):
        getItemVNum=player.GetItemIndex
        
        for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
            slotNumber = item.BELT_INVENTORY_SLOT_START + i
            self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVNum(slotNumber), player.GetItemCount(slotNumber))
            self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, TRUE)
            
            avail = "0"
            
            if player.IsAvailableBeltInventoryCell(slotNumber):
                self.wndBeltInventorySlot.EnableCoverButton(slotNumber)               
            else:
                self.wndBeltInventorySlot.DisableCoverButton(slotNumber)               

        self.wndBeltInventorySlot.RefreshSlot()

        
class InventoryWindow(ui.ScriptWindow):

    USE_TYPE_TUPLE = ("USE_CLEAN_SOCKET", "USE_CHANGE_ATTRIBUTE", "USE_ADD_ATTRIBUTE", "USE_ADD_ATTRIBUTE2", "USE_ADD_ACCESSORY_SOCKET", "USE_PUT_INTO_ACCESSORY_SOCKET", "USE_PUT_INTO_BELT_SOCKET", "USE_PUT_INTO_RING_SOCKET")

    questionDialog = None
    tooltipItem = None
    wndCostume = None
    wndBelt = None
    dlgPickMoney = None
    if app.ENABLE_CHEQUE_SYSTEM:
        dlgPickETC = None
    interface = None
    if app.WJ_ENABLE_TRADABLE_ICON:
        bindWnds = []
    sellingSlotNumber = -1
    isLoaded = 0
    isOpenedCostumeWindowWhenClosingInventory = 0        # 인벤토리 닫을 때 코스츔이 열려있었는지 여부-_-; 네이밍 ㅈㅅ
    isOpenedBeltWindowWhenClosingInventory = 0        # 인벤토리 닫을 때 벨트 인벤토리가 열려있었는지 여부-_-; 네이밍 ㅈㅅ

    def __init__(self):
        ui.ScriptWindow.__init__(self)

        self.isOpenedBeltWindowWhenClosingInventory = 0        # 인벤토리 닫을 때 벨트 인벤토리가 열려있었는지 여부-_-; 네이밍 ㅈㅅ

        self.__LoadWindow()

    def __del__(self):
        ui.ScriptWindow.__del__(self)

    def Show(self):
        self.__LoadWindow()

        ui.ScriptWindow.Show(self)

        # 인벤토리를 닫을 때 코스츔이 열려있었다면 인벤토리를 열 때 코스츔도 같이 열도록 함.
        if self.isOpenedCostumeWindowWhenClosingInventory and self.wndCostume:
            self.wndCostume.Show()

        # 인벤토리를 닫을 때 벨트 인벤토리가 열려있었다면 같이 열도록 함.
        if self.wndBelt:
            self.wndBelt.Show(self.isOpenedBeltWindowWhenClosingInventory)

    def BindInterfaceClass(self, interface):
        self.interface = interface
    if app.WJ_ENABLE_TRADABLE_ICON:
        def BindWindow(self, wnd):
            self.bindWnds.append(wnd)
    def __LoadWindow(self):
        if self.isLoaded == 1:
            return

        self.isLoaded = 1

        try:
            pyScrLoader = ui.PythonScriptLoader()

            if ITEM_MALL_BUTTON_ENABLE:
                pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "InventoryWindow.py")
            else:
                pyScrLoader.LoadScriptFile(self, "UIScript/InventoryWindow.py")
        except:
            import exception
            exception.Abort("InventoryWindow.LoadWindow.LoadObject")

        try:
            wndItem = self.GetChild("ItemSlot")
            wndEquip = self.GetChild("EquipmentSlot")
            self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
            self.wndMoney = self.GetChild("Money")
            self.wndMoneySlot = self.GetChild("Money_Slot")
            self.mallButton = self.GetChild2("MallButton")
            self.DSSButton = self.GetChild2("DSSButton")
            self.costumeButton = self.GetChild2("CostumeButton")

            if app.ENABLE_CHEQUE_SYSTEM:
                self.wndCheque = self.GetChild2("Cheque")
                self.wndChequeSlot = self.GetChild2("Cheque_Slot")

                if app.ENABLE_GEM_SYSTEM:
                    self.wndMoneyIcon = self.GetChild2("Money_Icon")
                    self.wndChequeIcon = self.GetChild2("Cheque_Icon")
                    self.wndMoneyIcon.Hide()
                    self.wndMoneySlot.Hide()
                    self.wndChequeIcon.Hide()
                    self.wndChequeSlot.Hide()

                    ## 높이 조절
                    height = self.GetHeight()
                    width = self.GetWidth()
                    self.SetSize(width, height - 22)
                    self.GetChild("board").SetSize(width, height - 22)
                else:
                    self.wndMoneyIcon = self.GetChild2("Money_Icon")
                    self.wndChequeIcon = self.GetChild2("Cheque_Icon")

                    self.wndMoneyIcon.SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 0)
                    self.wndChequeIcon.SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_in", 1)

                    self.wndMoneyIcon.SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 0)
                    self.wndChequeIcon.SetEvent(ui.__mem_func__(self.EventProgress), "mouse_over_out", 1)

                    self.toolTip = uiToolTip.ToolTip()
                    self.toolTip.ClearToolTip()

            self.inventoryTab = []
            self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
            self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))

            self.equipmentTab = []
            self.equipmentTab.append(self.GetChild("Equipment_Tab_01"))
            self.equipmentTab.append(self.GetChild("Equipment_Tab_02"))

            if self.costumeButton and not app.ENABLE_COSTUME_SYSTEM:
                self.costumeButton.Hide()
                self.costumeButton.Destroy()
                self.costumeButton = 0

            # Belt Inventory Window
            self.wndBelt = None
            
            if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
                self.wndBelt = BeltInventoryWindow(self)
            
        except:
            import exception
            exception.Abort("InventoryWindow.LoadWindow.BindObject")

        ## Item
        wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
        wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
        wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        ## Equipment
        wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
        wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
        wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndEquip.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
        wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        ## PickMoneyDialog
        dlgPickMoney = uiPickMoney.PickMoneyDialog()
        dlgPickMoney.LoadDialog()
        dlgPickMoney.Hide()

        ## PickETCDialog
        if app.ENABLE_CHEQUE_SYSTEM:
            dlgPickETC = uiPickETC.PickETCDialog()
            dlgPickETC.LoadDialog()
            dlgPickETC.Hide()

        ## RefineDialog
        self.refineDialog = uiRefine.RefineDialog()
        self.refineDialog.Hide()
 
çektiğiniz yerde ui.py içinde mouse_over_in bununla alakalı class __mem_func__: içinde bir şeyler olmalı
 
Üst