Çözüldü Great Offline Shop global name 'SHOP_VISIT_COLOR' is not defined

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ı.

lmaohw

Premium Üye
Premium Üye
MT Üye
Mesaj
187
Çözümler
11
Beğeni
65
Puan
474
Ticaret Puanı
0
Merhabalar, great offline shop kurdum servere her şey güzel işliyor fakat pazar kurduktan sonra pazara tıklayınca çince bir yazı geçiyor chatten ve ekranı açılmıyor
Pazar paketine tıklayınca başka bir pencere açıkken depo açamazsın hatası alıyorum ama önümde ekran falan açık değil oyundan çıkış veya karakterde atamıyorum

Nerede hata yapmış olabilirim acaba ?

ch1 sysser:
Genişlet Daralt Kopyala
SYSERR: Apr 29 17:25:09 :: heart_idle: losing 53 seconds. (lag occured)
SYSERR: Apr 29 17:26:26 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:26:27 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:26:28 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:26:28 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:04 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:05 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:06 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:06 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:07 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:07 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:48 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:27:49 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
SYSERR: Apr 29 17:28:34 :: locale_find: LOCALE_ERROR: "´U¸A °L·^Áß(A^°í,±lCZ,»óÁ^)z^´Â °lRλóÁ^R» »çzëÇN Lö lr¨R´D´U.";
 
Çözüm
SHOP_VISIT_COLOR bunun eklemesi var mı senin python tarafında? colorinfoda felan olması lazım sanki. yoksa eklediğin dosyalara bir bakıp orada eklemesi var mı bul. ya da eklediğin dosyaları at birlikte bakalım.
şimdi ekledim burayı bir deneyeyim tekrar bakalım
1716806327930.png


sysser:
Genişlet Daralt Kopyala
0527 13:44:20404 :: Traceback (most recent call last):

0527 13:44:20404 ::   File "game.py", line 952, in StartShop

0527 13:44:20404 ::   File "interfaceModule.py", line 667, in OpenShopDialog

0527 13:44:20404 ::   File "uiShop.py", line 165, in Open

0527 13:44:20404 :: AttributeError
0527 13:44:20404 :: :
0527 13:44:20404 :: 'builtin_function_or_method' object has no attribute 'SelectInstance'
0527 13:44:20404 ::

0527 13:44:20966 :: Traceback (most...
syserr var mı? packta syserr olması lazım.
 
syserr var mı? packta syserr olması lazım.
pack sysser:
Genişlet Daralt Kopyala
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/recuperation/autodrugup_red.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=267, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/recuperation/autodrugup_red.mse, isCache=1) - Error
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/recuperation/autodrugup_blue.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=268, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/recuperation/autodrugup_blue.mse, isCache=1) - Error
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/buff/buff_item1.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=269, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/buff/buff_item1.mse, isCache=1) - Error
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/buff/buff_item2.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=270, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/buff/buff_item2.mse, isCache=1) - Error
0527 12:45:54861 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/buff/buff_item4.mse) Error
0527 12:45:54861 :: CInstanceBase::RegisterEffect(eEftType=272, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/buff/buff_item4.mse, isCache=1) - Error
0527 12:45:54892 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage1.mse) Error
0527 12:45:54892 :: CInstanceBase::RegisterEffect(eEftType=264, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage1.mse, isCache=1) - Error
0527 12:45:54892 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage2.mse) Error
0527 12:45:54892 :: CInstanceBase::RegisterEffect(eEftType=265, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage2.mse, isCache=1) - Error
0527 12:45:54892 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage3.mse) Error
0527 12:45:54892 :: CInstanceBase::RegisterEffect(eEftType=266, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage3.mse, isCache=1) - Error
0527 12:45:55192 :: invalid idx 0
0527 12:45:00716 :: GRANNY: r:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000f, which doesn't match this version of Granny (0x80000010).  Automatic conversion will be attempted.
0527 12:45:00946 :: CEffectManager::RegisterEffect - LoadScript(D:/ymir work/pc/common/effect/armor/armor-4-2-1.mse) Error
0527 12:45:00946 :: CInstanceBase::RegisterEffect(eEftType=248, c_szEftAttachBone=Bip01, c_szEftName=D:/ymir work/pc/common/effect/armor/armor-4-2-1.mse, isCache=0) - Error
0527 12:45:00946 :: CEffectManager::RegisterEffect - LoadScript(D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse) Error
0527 12:45:00946 :: CInstanceBase::RegisterEffect(eEftType=249, c_szEftAttachBone=Bip01, c_szEftName=D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse, isCache=0) - Error
0527 12:45:05106 :: Traceback (most recent call last):

0527 12:45:05106 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:05106 :: NameError
0527 12:45:05108 :: :
0527 12:45:05108 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:05108 ::

0527 12:45:05156 :: Traceback (most recent call last):

0527 12:45:05156 ::   File "game.py", line 952, in StartShop

0527 12:45:05156 ::   File "interfaceModule.py", line 667, in OpenShopDialog

0527 12:45:05156 ::   File "uiShop.py", line 165, in Open

0527 12:45:05156 :: AttributeError
0527 12:45:05156 :: :
0527 12:45:05156 :: 'builtin_function_or_method' object has no attribute 'SelectInstance'
0527 12:45:05156 ::

0527 12:45:06195 :: Traceback (most recent call last):

0527 12:45:06195 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:06195 :: NameError
0527 12:45:06195 :: :
0527 12:45:06195 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:06195 ::

0527 12:45:06822 :: Traceback (most recent call last):

0527 12:45:06822 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:06822 :: NameError
0527 12:45:06822 :: :
0527 12:45:06822 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:06822 ::

0527 12:45:07548 :: Traceback (most recent call last):

0527 12:45:07548 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:07548 :: NameError
0527 12:45:07548 :: :
0527 12:45:07548 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:07548 ::

0527 12:46:08070 :: Traceback (most recent call last):

0527 12:46:08070 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:46:08070 :: NameError
0527 12:46:08070 :: :
0527 12:46:08070 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:46:08070 ::
 
pack sysser:
Genişlet Daralt Kopyala
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/recuperation/autodrugup_red.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=267, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/recuperation/autodrugup_red.mse, isCache=1) - Error
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/recuperation/autodrugup_blue.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=268, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/recuperation/autodrugup_blue.mse, isCache=1) - Error
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/buff/buff_item1.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=269, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/buff/buff_item1.mse, isCache=1) - Error
0527 12:45:54859 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/buff/buff_item2.mse) Error
0527 12:45:54859 :: CInstanceBase::RegisterEffect(eEftType=270, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/buff/buff_item2.mse, isCache=1) - Error
0527 12:45:54861 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/etc/buff/buff_item4.mse) Error
0527 12:45:54861 :: CInstanceBase::RegisterEffect(eEftType=272, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/etc/buff/buff_item4.mse, isCache=1) - Error
0527 12:45:54892 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage1.mse) Error
0527 12:45:54892 :: CInstanceBase::RegisterEffect(eEftType=264, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage1.mse, isCache=1) - Error
0527 12:45:54892 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage2.mse) Error
0527 12:45:54892 :: CInstanceBase::RegisterEffect(eEftType=265, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage2.mse, isCache=1) - Error
0527 12:45:54892 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/hit/percent_damage3.mse) Error
0527 12:45:54892 :: CInstanceBase::RegisterEffect(eEftType=266, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/hit/percent_damage3.mse, isCache=1) - Error
0527 12:45:55192 :: invalid idx 0
0527 12:45:00716 :: GRANNY: r:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000f, which doesn't match this version of Granny (0x80000010).  Automatic conversion will be attempted.
0527 12:45:00946 :: CEffectManager::RegisterEffect - LoadScript(D:/ymir work/pc/common/effect/armor/armor-4-2-1.mse) Error
0527 12:45:00946 :: CInstanceBase::RegisterEffect(eEftType=248, c_szEftAttachBone=Bip01, c_szEftName=D:/ymir work/pc/common/effect/armor/armor-4-2-1.mse, isCache=0) - Error
0527 12:45:00946 :: CEffectManager::RegisterEffect - LoadScript(D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse) Error
0527 12:45:00946 :: CInstanceBase::RegisterEffect(eEftType=249, c_szEftAttachBone=Bip01, c_szEftName=D:/ymir work/pc/common/effect/armor/armor-4-2-2.mse, isCache=0) - Error
0527 12:45:05106 :: Traceback (most recent call last):

0527 12:45:05106 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:05106 :: NameError
0527 12:45:05108 :: :
0527 12:45:05108 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:05108 ::

0527 12:45:05156 :: Traceback (most recent call last):

0527 12:45:05156 ::   File "game.py", line 952, in StartShop

0527 12:45:05156 ::   File "interfaceModule.py", line 667, in OpenShopDialog

0527 12:45:05156 ::   File "uiShop.py", line 165, in Open

0527 12:45:05156 :: AttributeError
0527 12:45:05156 :: :
0527 12:45:05156 :: 'builtin_function_or_method' object has no attribute 'SelectInstance'
0527 12:45:05156 ::

0527 12:45:06195 :: Traceback (most recent call last):

0527 12:45:06195 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:06195 :: NameError
0527 12:45:06195 :: :
0527 12:45:06195 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:06195 ::

0527 12:45:06822 :: Traceback (most recent call last):

0527 12:45:06822 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:06822 :: NameError
0527 12:45:06822 :: :
0527 12:45:06822 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:06822 ::

0527 12:45:07548 :: Traceback (most recent call last):

0527 12:45:07548 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:45:07548 :: NameError
0527 12:45:07548 :: :
0527 12:45:07548 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:45:07548 ::

0527 12:46:08070 :: Traceback (most recent call last):

0527 12:46:08070 ::   File "uiPrivateShopBuilder.py", line 119, in OnMouseLeftButtonUp

0527 12:46:08070 :: NameError
0527 12:46:08070 :: :
0527 12:46:08070 :: global name 'SHOP_VISIT_COLOR' is not defined
0527 12:46:08070 ::
SHOP_VISIT_COLOR bunun eklemesi var mı senin python tarafında? colorinfoda felan olması lazım sanki. yoksa eklediğin dosyalara bir bakıp orada eklemesi var mı bul. ya da eklediğin dosyaları at birlikte bakalım.
 
SHOP_VISIT_COLOR bunun eklemesi var mı senin python tarafında? colorinfoda felan olması lazım sanki. yoksa eklediğin dosyalara bir bakıp orada eklemesi var mı bul. ya da eklediğin dosyaları at birlikte bakalım.
şimdi ekledim burayı bir deneyeyim tekrar bakalım
1716806327930.png


sysser:
Genişlet Daralt Kopyala
0527 13:44:20404 :: Traceback (most recent call last):

0527 13:44:20404 ::   File "game.py", line 952, in StartShop

0527 13:44:20404 ::   File "interfaceModule.py", line 667, in OpenShopDialog

0527 13:44:20404 ::   File "uiShop.py", line 165, in Open

0527 13:44:20404 :: AttributeError
0527 13:44:20404 :: :
0527 13:44:20404 :: 'builtin_function_or_method' object has no attribute 'SelectInstance'
0527 13:44:20404 ::

0527 13:44:20966 :: Traceback (most recent call last):

0527 13:44:20966 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:20966 :: AttributeError
0527 13:44:20966 :: :
0527 13:44:20966 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:20966 ::

0527 13:44:21278 :: Traceback (most recent call last):

0527 13:44:21278 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:21278 :: AttributeError
0527 13:44:21278 :: :
0527 13:44:21278 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:21278 ::

0527 13:44:22218 :: Traceback (most recent call last):

0527 13:44:22218 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:22218 :: AttributeError
0527 13:44:22218 :: :
0527 13:44:22218 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:22218 ::

0527 13:44:22465 :: Traceback (most recent call last):

0527 13:44:22465 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:22465 :: AttributeError
0527 13:44:22465 :: :
0527 13:44:22465 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:22465 ::

0527 13:44:23968 :: Traceback (most recent call last):

0527 13:44:23968 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:23968 :: AttributeError
0527 13:44:23968 :: :
0527 13:44:23968 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:23968 ::

0527 13:44:24380 :: Traceback (most recent call last):

0527 13:44:24380 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:24380 :: AttributeError
0527 13:44:24380 :: :
0527 13:44:24380 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:24380 ::

uishop.py:
Genişlet Daralt Kopyala
import net
import player
import item
import snd
import shop
import net
import wndMgr
import app
import chat

import ui
import uiCommon
import mouseModule
import localeInfo
import constInfo

###################################################################################################
## Shop
class ShopDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.tooltipItem = 0
        self.xShopStart = 0
        self.yShopStart = 0
        self.questionDialog = None
        self.popup = None
        self.itemBuyQuestionDialog = None
        self.vid = 0

    def __del__(self):
        ui.ScriptWindow.__del__(self)
    
    def __GetRealIndex(self, i):
        return self.tabIdx * shop.SHOP_SLOT_COUNT + i
    
    def Refresh(self):
        getItemID=shop.GetItemID
        getItemCount=shop.GetItemCount
        setItemID=self.itemSlotWindow.SetItemSlot
        for i in xrange(shop.SHOP_SLOT_COUNT):
            idx = self.__GetRealIndex(i)
            itemCount = getItemCount(idx)
            if itemCount <= 1:
                itemCount = 0
            setItemID(i, getItemID(idx), itemCount)

        wndMgr.RefreshSlot(self.itemSlotWindow.GetWindowHandle())

    def SetItemData(self, pos, itemID, itemCount, itemPrice):
        shop.SetItemData(pos, itemID, itemCount, itemPrice)

    def LoadDialog(self):
        try:
            PythonScriptLoader = ui.PythonScriptLoader()
            PythonScriptLoader.LoadScriptFile(self, "UIScript/shopdialog.py")
        except:
            import exception
            exception.Abort("ShopDialog.LoadDialog.LoadObject")

        smallTab1 = None
        smallTab2 = None
        smallTab3 = None
        middleTab1 = None
        middleTab2 = None
        
        try:
            GetObject = self.GetChild
            self.itemSlotWindow = GetObject("ItemSlot")
            self.btnBuy = GetObject("BuyButton")
            self.btnSell = GetObject("SellButton")
            self.btnClose = GetObject("CloseButton")
            self.titleBar = GetObject("TitleBar")
            middleTab1 = GetObject("MiddleTab1")
            middleTab2 = GetObject("MiddleTab2")
            smallTab1 = GetObject("SmallTab1")
            smallTab2 = GetObject("SmallTab2")
            smallTab3 = GetObject("SmallTab3")
        except:
            import exception
            exception.Abort("ShopDialog.LoadDialog.BindObject")

        self.itemSlotWindow.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
        self.itemSlotWindow.SAFE_SetButtonEvent("LEFT", "EMPTY", self.SelectEmptySlot)
        self.itemSlotWindow.SAFE_SetButtonEvent("LEFT", "EXIST", self.SelectItemSlot)
        self.itemSlotWindow.SAFE_SetButtonEvent("RIGHT", "EXIST", self.UnselectItemSlot)

        self.itemSlotWindow.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        self.itemSlotWindow.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        self.btnBuy.SetToggleUpEvent(ui.__mem_func__(self.CancelShopping))
        self.btnBuy.SetToggleDownEvent(ui.__mem_func__(self.OnBuy))

        self.btnSell.SetToggleUpEvent(ui.__mem_func__(self.CancelShopping))
        self.btnSell.SetToggleDownEvent(ui.__mem_func__(self.OnSell))

        self.btnClose.SetEvent(ui.__mem_func__(self.AskClosePrivateShop))

        self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))

        self.smallRadioButtonGroup = ui.RadioButtonGroup.Create([[smallTab1, lambda : self.OnClickTabButton(0), None], [smallTab2, lambda : self.OnClickTabButton(1), None], [smallTab3, lambda : self.OnClickTabButton(2), None]])
        self.middleRadioButtonGroup = ui.RadioButtonGroup.Create([[middleTab1, lambda : self.OnClickTabButton(0), None], [middleTab2, lambda : self.OnClickTabButton(1), None]])

        self.__HideMiddleTabs()
        self.__HideSmallTabs()
        
        self.tabIdx = 0
        self.coinType = shop.SHOP_COIN_TYPE_GOLD
        
        self.Refresh()
    
    def __ShowBuySellButton(self):
        self.btnBuy.Show()
        self.btnSell.Show()
        
    def __ShowMiddleTabs(self):
        self.middleRadioButtonGroup.Show()
    
    def __ShowSmallTabs(self):
        self.smallRadioButtonGroup.Show()
    
    def __HideBuySellButton(self):
        self.btnBuy.Hide()
        self.btnSell.Hide()
    
    def __HideMiddleTabs(self):
        self.middleRadioButtonGroup.Hide()
    
    def __HideSmallTabs(self):
        self.smallRadioButtonGroup.Hide()
        
    def __SetTabNames(self):
        if shop.GetTabCount() == 2:
            self.middleRadioButtonGroup.SetText(0, shop.GetTabName(0))
            self.middleRadioButtonGroup.SetText(1, shop.GetTabName(1))
        elif shop.GetTabCount() == 3:
            self.smallRadioButtonGroup.SetText(0, shop.GetTabName(0))
            self.smallRadioButtonGroup.SetText(1, shop.GetTabName(1))
            self.smallRadioButtonGroup.SetText(2, shop.GetTabName(2))
    
 
    def Destroy(self):
        self.Close()
        self.ClearDictionary()

        self.tooltipItem = 0
        self.itemSlotWindow = 0
        self.btnBuy = 0
        self.btnSell = 0
        self.btnClose = 0
        self.titleBar = 0
        self.questionDialog = None
        self.popup = None
        self.vid = 0

    def Open(self, vid, type=0):
        self.vid=int(vid)
        isPrivateShop = False
        isMainPlayerPrivateShop = False
        myshop=False
        for i in xrange(len(constInfo.MyShops)):
            if int(constInfo.MyShops[i]["vid"]) == int(self.vid):
                myshop=True
                self.vid=int(constInfo.MyShops[i]["id"])
        chr.SelectInstance(self.vid)
        if chr.GetRace() == 30000 or not chr.IsNPC(self.vid):
            isPrivateShop = True
        if player.IsMainCharacterIndex(self.vid):
            myshop=True
            self.vid=""
        if myshop == True:
            isMainPlayerPrivateShop = True

            self.btnBuy.Hide()
            self.btnSell.Hide()
            self.btnClose.Show()

        else:

            isMainPlayerPrivateShop = False

            self.btnBuy.Show()
            self.btnSell.Show()
            self.btnClose.Hide()
        shop.Open(isPrivateShop, isMainPlayerPrivateShop)

        self.tabIdx = 0

        if isPrivateShop:
            self.__HideMiddleTabs()
            self.__HideSmallTabs()
        else:
            if shop.GetTabCount() == 1:
                self.__ShowBuySellButton()
                self.__HideMiddleTabs()
                self.__HideSmallTabs()
            elif shop.GetTabCount() == 2:
                self.__HideBuySellButton()
                self.__ShowMiddleTabs()
                self.__HideSmallTabs()
                self.__SetTabNames()
                self.middleRadioButtonGroup.OnClick(0)
            elif shop.GetTabCount() == 3:
                self.__HideBuySellButton()
                self.__HideMiddleTabs()
                self.__ShowSmallTabs()
                self.__SetTabNames()
                self.middleRadioButtonGroup.OnClick(1)

        self.Refresh()
        self.SetTop()
        
        self.Show()

        (self.xShopStart, self.yShopStart, z) = player.GetMainCharacterPosition()

    def Close(self):
        if self.itemBuyQuestionDialog:
            self.itemBuyQuestionDialog.Close()
            self.itemBuyQuestionDialog = None       
            constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
        if self.questionDialog:
            self.OnCloseQuestionDialog()
        shop.Close()
        net.SendShopEndPacket()
        self.CancelShopping()
        self.tooltipItem.HideToolTip()
        self.Hide()

    def GetIndexFromSlotPos(self, slotPos):
        return self.tabIdx * shop.SHOP_SLOT_COUNT + slotPos
        
    def OnClickTabButton(self, idx):
        self.tabIdx = idx
        self.Refresh()
        
    def AskClosePrivateShop(self):
        questionDialog = uiCommon.QuestionDialog()
        questionDialog.SetText(localeInfo.PRIVATE_SHOP_CLOSE_QUESTION)
        questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnClosePrivateShop))
        questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
        questionDialog.Open()
        self.questionDialog = questionDialog

        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

        return True

    def OnClosePrivateShop(self):
        net.SendChatPacket("/close_shop "+str(self.vid))
        self.OnCloseQuestionDialog()
        return True

    def OnPressEscapeKey(self):
        self.Close()
        return True

    def OnPressExitKey(self):
        self.Close()
        return True

    def OnBuy(self):
        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_BUY_INFO)
        app.SetCursor(app.BUY)
        self.btnSell.SetUp()

    def OnSell(self):
        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)
        app.SetCursor(app.SELL)
        self.btnBuy.SetUp()

    def CancelShopping(self):
        self.btnBuy.SetUp()
        self.btnSell.SetUp()
        app.SetCursor(app.NORMAL)

    def __OnClosePopupDialog(self):
        self.pop = None
        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

    ## ¿ëÈ¥¼® Æȸ®´Â ±â´É Ãß°¡.
    def SellAttachedItem(self):

        if shop.IsPrivateShop():
            mouseModule.mouseController.DeattachObject()
            return

        attachedSlotType = mouseModule.mouseController.GetAttachedType()
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        attachedCount = mouseModule.mouseController.GetAttachedItemCount()
        if localeInfo.IsBRAZIL() == 0:
            attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
        
        if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:

            if localeInfo.IsBRAZIL():
                itemIndex = player.GetItemIndex(attachedSlotPos)
                item.SelectItem(itemIndex)
            else:
                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
                return
                
            itemtype = player.INVENTORY

            if localeInfo.IsBRAZIL() == 0:
                if player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:
                    itemtype = player.DRAGON_SOUL_INVENTORY
            
            if player.IsValuableItem(itemtype, attachedSlotPos):

                itemPrice = item.GetISellItemPrice()

                if item.Is1GoldItem():
                    itemPrice = attachedCount / itemPrice / 5
                else:
                    itemPrice = itemPrice * max(1, attachedCount) / 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:
                self.OnSellItem(attachedSlotPos, attachedCount, itemtype)

        else:
            snd.PlaySound("sound/ui/loginfail.wav")

        mouseModule.mouseController.DeattachObject()

    def OnSellItem(self, slotPos, count, itemtype):
        net.SendShopSellPacketNew(slotPos, count, itemtype)
        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):

        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            self.SellAttachedItem()

    def UnselectItemSlot(self, selectedSlotPos):
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return
        if shop.IsPrivateShop():
            self.AskBuyItem(selectedSlotPos)
        else:
            net.SendShopBuyPacket(self.__GetRealIndex(selectedSlotPos))

    def SelectItemSlot(self, selectedSlotPos):
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return

        isAttached = mouseModule.mouseController.isAttached()
        selectedSlotPos = self.__GetRealIndex(selectedSlotPos)
        if isAttached:
            self.SellAttachedItem()

        else:

            if True == shop.IsMainPlayerPrivateShop():
                return

            curCursorNum = app.GetCursor()
            if app.BUY == curCursorNum:
                self.AskBuyItem(selectedSlotPos)

            elif app.SELL == curCursorNum:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)

            else:
                selectedItemID = shop.GetItemID(selectedSlotPos)
                itemCount = shop.GetItemCount(selectedSlotPos)

                type = player.SLOT_TYPE_SHOP
                if shop.IsPrivateShop():
                    type = player.SLOT_TYPE_PRIVATE_SHOP

                mouseModule.mouseController.AttachObject(self, type, selectedSlotPos, selectedItemID, itemCount)
                mouseModule.mouseController.SetCallBack("INVENTORY", ui.__mem_func__(self.DropToInventory))
                snd.PlaySound("sound/ui/pick.wav")

    def DropToInventory(self):
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        self.AskBuyItem(attachedSlotPos)

    def AskBuyItem(self, slotPos):
        slotPos = self.__GetRealIndex(slotPos)
        
        itemIndex = shop.GetItemID(slotPos)
        itemPrice = shop.GetItemPrice(slotPos)
        itemCount = shop.GetItemCount(slotPos)

        item.SelectItem(itemIndex)
        itemName = item.GetItemName()

        itemBuyQuestionDialog = uiCommon.QuestionDialog()
        itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToMoneyString(itemPrice)))
        itemBuyQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.Open()
        itemBuyQuestionDialog.pos = slotPos
        self.itemBuyQuestionDialog = itemBuyQuestionDialog
        
        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

    def AnswerBuyItem(self, flag):

        if flag:
            pos = self.itemBuyQuestionDialog.pos
            net.SendShopBuyPacket(pos)

        self.itemBuyQuestionDialog.Close()
        self.itemBuyQuestionDialog = None
        
        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

    def SetItemToolTip(self, tooltipItem):
        self.tooltipItem = tooltipItem

    def OverInItem(self, slotIndex):
        slotIndex = self.__GetRealIndex(slotIndex)
        if mouseModule.mouseController.isAttached():
            return

        if 0 != self.tooltipItem:
            if shop.SHOP_COIN_TYPE_GOLD == shop.GetTabCoinType(self.tabIdx):
                self.tooltipItem.SetShopItem(slotIndex)
            else:
                self.tooltipItem.SetShopItemBySecondaryCoin(slotIndex)
    def OverOutItem(self):
        if 0 != self.tooltipItem:
            self.tooltipItem.HideToolTip()

    def OnUpdate(self):

        USE_SHOP_LIMIT_RANGE = 1000

        (x, y, z) = player.GetMainCharacterPosition()
        if abs(x - self.xShopStart) > USE_SHOP_LIMIT_RANGE or abs(y - self.yShopStart) > USE_SHOP_LIMIT_RANGE:
            self.Close()


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

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

    def Destroy(self):
        self.ClearDictionary()

    def Open(self):
        scriptLoader = ui.PythonScriptLoader()
        scriptLoader.LoadScriptFile(self, "uiscript/mallpagedialog.py")

        self.GetChild("titlebar").SetCloseEvent(ui.__mem_func__(self.Close))
        
        (x, y)=self.GetGlobalPosition()
        x+=10
        y+=30
        
        MALL_PAGE_WIDTH = 600
        MALL_PAGE_HEIGHT = 480
        
        app.ShowWebPage(
            "http://metin2.co.kr/08_mall/game_mall/login_fail.htm",
            (x, y, x+MALL_PAGE_WIDTH, y+MALL_PAGE_HEIGHT))

        self.Lock()
        self.Show()
        
    def Close(self):           
        app.HideWebPage()
        self.Unlock()
        self.Hide()
        
    def OnPressEscapeKey(self):
        self.Close()
        return True

sysser:
Genişlet Daralt Kopyala
0527 13:44:20404 :: Traceback (most recent call last):

0527 13:44:20404 ::   File "game.py", line 952, in StartShop

0527 13:44:20404 ::   File "interfaceModule.py", line 667, in OpenShopDialog

0527 13:44:20404 ::   File "uiShop.py", line 165, in Open

0527 13:44:20404 :: AttributeError
0527 13:44:20404 :: :
0527 13:44:20404 :: 'builtin_function_or_method' object has no attribute 'SelectInstance'
0527 13:44:20404 ::

0527 13:44:20966 :: Traceback (most recent call last):

0527 13:44:20966 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:20966 :: AttributeError
0527 13:44:20966 :: :
0527 13:44:20966 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:20966 ::

0527 13:44:21278 :: Traceback (most recent call last):

0527 13:44:21278 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:21278 :: AttributeError
0527 13:44:21278 :: :
0527 13:44:21278 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:21278 ::

0527 13:44:22218 :: Traceback (most recent call last):

0527 13:44:22218 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:22218 :: AttributeError
0527 13:44:22218 :: :
0527 13:44:22218 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:22218 ::

0527 13:44:22465 :: Traceback (most recent call last):

0527 13:44:22465 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:22465 :: AttributeError
0527 13:44:22465 :: :
0527 13:44:22465 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:22465 ::

0527 13:44:23968 :: Traceback (most recent call last):

0527 13:44:23968 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:23968 :: AttributeError
0527 13:44:23968 :: :
0527 13:44:23968 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:23968 ::

0527 13:44:24380 :: Traceback (most recent call last):

0527 13:44:24380 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:44:24380 :: AttributeError
0527 13:44:24380 :: :
0527 13:44:24380 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:44:24380 ::

uishop.py:
Genişlet Daralt Kopyala
import net
import player
import item
import snd
import shop
import net
import wndMgr
import app
import chat

import ui
import uiCommon
import mouseModule
import localeInfo
import constInfo

###################################################################################################
## Shop
class ShopDialog(ui.ScriptWindow):

    def __init__(self):
        ui.ScriptWindow.__init__(self)
        self.tooltipItem = 0
        self.xShopStart = 0
        self.yShopStart = 0
        self.questionDialog = None
        self.popup = None
        self.itemBuyQuestionDialog = None
        self.vid = 0

    def __del__(self):
        ui.ScriptWindow.__del__(self)
   
    def __GetRealIndex(self, i):
        return self.tabIdx * shop.SHOP_SLOT_COUNT + i
   
    def Refresh(self):
        getItemID=shop.GetItemID
        getItemCount=shop.GetItemCount
        setItemID=self.itemSlotWindow.SetItemSlot
        for i in xrange(shop.SHOP_SLOT_COUNT):
            idx = self.__GetRealIndex(i)
            itemCount = getItemCount(idx)
            if itemCount <= 1:
                itemCount = 0
            setItemID(i, getItemID(idx), itemCount)

        wndMgr.RefreshSlot(self.itemSlotWindow.GetWindowHandle())

    def SetItemData(self, pos, itemID, itemCount, itemPrice):
        shop.SetItemData(pos, itemID, itemCount, itemPrice)

    def LoadDialog(self):
        try:
            PythonScriptLoader = ui.PythonScriptLoader()
            PythonScriptLoader.LoadScriptFile(self, "UIScript/shopdialog.py")
        except:
            import exception
            exception.Abort("ShopDialog.LoadDialog.LoadObject")

        smallTab1 = None
        smallTab2 = None
        smallTab3 = None
        middleTab1 = None
        middleTab2 = None
       
        try:
            GetObject = self.GetChild
            self.itemSlotWindow = GetObject("ItemSlot")
            self.btnBuy = GetObject("BuyButton")
            self.btnSell = GetObject("SellButton")
            self.btnClose = GetObject("CloseButton")
            self.titleBar = GetObject("TitleBar")
            middleTab1 = GetObject("MiddleTab1")
            middleTab2 = GetObject("MiddleTab2")
            smallTab1 = GetObject("SmallTab1")
            smallTab2 = GetObject("SmallTab2")
            smallTab3 = GetObject("SmallTab3")
        except:
            import exception
            exception.Abort("ShopDialog.LoadDialog.BindObject")

        self.itemSlotWindow.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
        self.itemSlotWindow.SAFE_SetButtonEvent("LEFT", "EMPTY", self.SelectEmptySlot)
        self.itemSlotWindow.SAFE_SetButtonEvent("LEFT", "EXIST", self.SelectItemSlot)
        self.itemSlotWindow.SAFE_SetButtonEvent("RIGHT", "EXIST", self.UnselectItemSlot)

        self.itemSlotWindow.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
        self.itemSlotWindow.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))

        self.btnBuy.SetToggleUpEvent(ui.__mem_func__(self.CancelShopping))
        self.btnBuy.SetToggleDownEvent(ui.__mem_func__(self.OnBuy))

        self.btnSell.SetToggleUpEvent(ui.__mem_func__(self.CancelShopping))
        self.btnSell.SetToggleDownEvent(ui.__mem_func__(self.OnSell))

        self.btnClose.SetEvent(ui.__mem_func__(self.AskClosePrivateShop))

        self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))

        self.smallRadioButtonGroup = ui.RadioButtonGroup.Create([[smallTab1, lambda : self.OnClickTabButton(0), None], [smallTab2, lambda : self.OnClickTabButton(1), None], [smallTab3, lambda : self.OnClickTabButton(2), None]])
        self.middleRadioButtonGroup = ui.RadioButtonGroup.Create([[middleTab1, lambda : self.OnClickTabButton(0), None], [middleTab2, lambda : self.OnClickTabButton(1), None]])

        self.__HideMiddleTabs()
        self.__HideSmallTabs()
       
        self.tabIdx = 0
        self.coinType = shop.SHOP_COIN_TYPE_GOLD
       
        self.Refresh()
   
    def __ShowBuySellButton(self):
        self.btnBuy.Show()
        self.btnSell.Show()
       
    def __ShowMiddleTabs(self):
        self.middleRadioButtonGroup.Show()
   
    def __ShowSmallTabs(self):
        self.smallRadioButtonGroup.Show()
   
    def __HideBuySellButton(self):
        self.btnBuy.Hide()
        self.btnSell.Hide()
   
    def __HideMiddleTabs(self):
        self.middleRadioButtonGroup.Hide()
   
    def __HideSmallTabs(self):
        self.smallRadioButtonGroup.Hide()
       
    def __SetTabNames(self):
        if shop.GetTabCount() == 2:
            self.middleRadioButtonGroup.SetText(0, shop.GetTabName(0))
            self.middleRadioButtonGroup.SetText(1, shop.GetTabName(1))
        elif shop.GetTabCount() == 3:
            self.smallRadioButtonGroup.SetText(0, shop.GetTabName(0))
            self.smallRadioButtonGroup.SetText(1, shop.GetTabName(1))
            self.smallRadioButtonGroup.SetText(2, shop.GetTabName(2))
   
 
    def Destroy(self):
        self.Close()
        self.ClearDictionary()

        self.tooltipItem = 0
        self.itemSlotWindow = 0
        self.btnBuy = 0
        self.btnSell = 0
        self.btnClose = 0
        self.titleBar = 0
        self.questionDialog = None
        self.popup = None
        self.vid = 0

    def Open(self, vid, type=0):
        self.vid=int(vid)
        isPrivateShop = False
        isMainPlayerPrivateShop = False
        myshop=False
        for i in xrange(len(constInfo.MyShops)):
            if int(constInfo.MyShops[i]["vid"]) == int(self.vid):
                myshop=True
                self.vid=int(constInfo.MyShops[i]["id"])
        chr.SelectInstance(self.vid)
        if chr.GetRace() == 30000 or not chr.IsNPC(self.vid):
            isPrivateShop = True
        if player.IsMainCharacterIndex(self.vid):
            myshop=True
            self.vid=""
        if myshop == True:
            isMainPlayerPrivateShop = True

            self.btnBuy.Hide()
            self.btnSell.Hide()
            self.btnClose.Show()

        else:

            isMainPlayerPrivateShop = False

            self.btnBuy.Show()
            self.btnSell.Show()
            self.btnClose.Hide()
        shop.Open(isPrivateShop, isMainPlayerPrivateShop)

        self.tabIdx = 0

        if isPrivateShop:
            self.__HideMiddleTabs()
            self.__HideSmallTabs()
        else:
            if shop.GetTabCount() == 1:
                self.__ShowBuySellButton()
                self.__HideMiddleTabs()
                self.__HideSmallTabs()
            elif shop.GetTabCount() == 2:
                self.__HideBuySellButton()
                self.__ShowMiddleTabs()
                self.__HideSmallTabs()
                self.__SetTabNames()
                self.middleRadioButtonGroup.OnClick(0)
            elif shop.GetTabCount() == 3:
                self.__HideBuySellButton()
                self.__HideMiddleTabs()
                self.__ShowSmallTabs()
                self.__SetTabNames()
                self.middleRadioButtonGroup.OnClick(1)

        self.Refresh()
        self.SetTop()
       
        self.Show()

        (self.xShopStart, self.yShopStart, z) = player.GetMainCharacterPosition()

    def Close(self):
        if self.itemBuyQuestionDialog:
            self.itemBuyQuestionDialog.Close()
            self.itemBuyQuestionDialog = None      
            constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
        if self.questionDialog:
            self.OnCloseQuestionDialog()
        shop.Close()
        net.SendShopEndPacket()
        self.CancelShopping()
        self.tooltipItem.HideToolTip()
        self.Hide()

    def GetIndexFromSlotPos(self, slotPos):
        return self.tabIdx * shop.SHOP_SLOT_COUNT + slotPos
       
    def OnClickTabButton(self, idx):
        self.tabIdx = idx
        self.Refresh()
       
    def AskClosePrivateShop(self):
        questionDialog = uiCommon.QuestionDialog()
        questionDialog.SetText(localeInfo.PRIVATE_SHOP_CLOSE_QUESTION)
        questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnClosePrivateShop))
        questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
        questionDialog.Open()
        self.questionDialog = questionDialog

        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

        return True

    def OnClosePrivateShop(self):
        net.SendChatPacket("/close_shop "+str(self.vid))
        self.OnCloseQuestionDialog()
        return True

    def OnPressEscapeKey(self):
        self.Close()
        return True

    def OnPressExitKey(self):
        self.Close()
        return True

    def OnBuy(self):
        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_BUY_INFO)
        app.SetCursor(app.BUY)
        self.btnSell.SetUp()

    def OnSell(self):
        chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)
        app.SetCursor(app.SELL)
        self.btnBuy.SetUp()

    def CancelShopping(self):
        self.btnBuy.SetUp()
        self.btnSell.SetUp()
        app.SetCursor(app.NORMAL)

    def __OnClosePopupDialog(self):
        self.pop = None
        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

    ## ¿ëÈ¥¼® Æȸ®´Â ±â´É Ãß°¡.
    def SellAttachedItem(self):

        if shop.IsPrivateShop():
            mouseModule.mouseController.DeattachObject()
            return

        attachedSlotType = mouseModule.mouseController.GetAttachedType()
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        attachedCount = mouseModule.mouseController.GetAttachedItemCount()
        if localeInfo.IsBRAZIL() == 0:
            attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
       
        if player.SLOT_TYPE_INVENTORY == attachedSlotType or player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:

            if localeInfo.IsBRAZIL():
                itemIndex = player.GetItemIndex(attachedSlotPos)
                item.SelectItem(itemIndex)
            else:
                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
                return
               
            itemtype = player.INVENTORY

            if localeInfo.IsBRAZIL() == 0:
                if player.SLOT_TYPE_DRAGON_SOUL_INVENTORY == attachedSlotType:
                    itemtype = player.DRAGON_SOUL_INVENTORY
           
            if player.IsValuableItem(itemtype, attachedSlotPos):

                itemPrice = item.GetISellItemPrice()

                if item.Is1GoldItem():
                    itemPrice = attachedCount / itemPrice / 5
                else:
                    itemPrice = itemPrice * max(1, attachedCount) / 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:
                self.OnSellItem(attachedSlotPos, attachedCount, itemtype)

        else:
            snd.PlaySound("sound/ui/loginfail.wav")

        mouseModule.mouseController.DeattachObject()

    def OnSellItem(self, slotPos, count, itemtype):
        net.SendShopSellPacketNew(slotPos, count, itemtype)
        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):

        isAttached = mouseModule.mouseController.isAttached()
        if isAttached:
            self.SellAttachedItem()

    def UnselectItemSlot(self, selectedSlotPos):
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return
        if shop.IsPrivateShop():
            self.AskBuyItem(selectedSlotPos)
        else:
            net.SendShopBuyPacket(self.__GetRealIndex(selectedSlotPos))

    def SelectItemSlot(self, selectedSlotPos):
        if constInfo.GET_ITEM_QUESTION_DIALOG_STATUS() == 1:
            return

        isAttached = mouseModule.mouseController.isAttached()
        selectedSlotPos = self.__GetRealIndex(selectedSlotPos)
        if isAttached:
            self.SellAttachedItem()

        else:

            if True == shop.IsMainPlayerPrivateShop():
                return

            curCursorNum = app.GetCursor()
            if app.BUY == curCursorNum:
                self.AskBuyItem(selectedSlotPos)

            elif app.SELL == curCursorNum:
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_SELL_INFO)

            else:
                selectedItemID = shop.GetItemID(selectedSlotPos)
                itemCount = shop.GetItemCount(selectedSlotPos)

                type = player.SLOT_TYPE_SHOP
                if shop.IsPrivateShop():
                    type = player.SLOT_TYPE_PRIVATE_SHOP

                mouseModule.mouseController.AttachObject(self, type, selectedSlotPos, selectedItemID, itemCount)
                mouseModule.mouseController.SetCallBack("INVENTORY", ui.__mem_func__(self.DropToInventory))
                snd.PlaySound("sound/ui/pick.wav")

    def DropToInventory(self):
        attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
        self.AskBuyItem(attachedSlotPos)

    def AskBuyItem(self, slotPos):
        slotPos = self.__GetRealIndex(slotPos)
       
        itemIndex = shop.GetItemID(slotPos)
        itemPrice = shop.GetItemPrice(slotPos)
        itemCount = shop.GetItemCount(slotPos)

        item.SelectItem(itemIndex)
        itemName = item.GetItemName()

        itemBuyQuestionDialog = uiCommon.QuestionDialog()
        itemBuyQuestionDialog.SetText(localeInfo.DO_YOU_BUY_ITEM(itemName, itemCount, localeInfo.NumberToMoneyString(itemPrice)))
        itemBuyQuestionDialog.SetAcceptEvent(lambda arg=True: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.SetCancelEvent(lambda arg=False: self.AnswerBuyItem(arg))
        itemBuyQuestionDialog.Open()
        itemBuyQuestionDialog.pos = slotPos
        self.itemBuyQuestionDialog = itemBuyQuestionDialog
       
        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(1)

    def AnswerBuyItem(self, flag):

        if flag:
            pos = self.itemBuyQuestionDialog.pos
            net.SendShopBuyPacket(pos)

        self.itemBuyQuestionDialog.Close()
        self.itemBuyQuestionDialog = None
       
        constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)

    def SetItemToolTip(self, tooltipItem):
        self.tooltipItem = tooltipItem

    def OverInItem(self, slotIndex):
        slotIndex = self.__GetRealIndex(slotIndex)
        if mouseModule.mouseController.isAttached():
            return

        if 0 != self.tooltipItem:
            if shop.SHOP_COIN_TYPE_GOLD == shop.GetTabCoinType(self.tabIdx):
                self.tooltipItem.SetShopItem(slotIndex)
            else:
                self.tooltipItem.SetShopItemBySecondaryCoin(slotIndex)
    def OverOutItem(self):
        if 0 != self.tooltipItem:
            self.tooltipItem.HideToolTip()

    def OnUpdate(self):

        USE_SHOP_LIMIT_RANGE = 1000

        (x, y, z) = player.GetMainCharacterPosition()
        if abs(x - self.xShopStart) > USE_SHOP_LIMIT_RANGE or abs(y - self.yShopStart) > USE_SHOP_LIMIT_RANGE:
            self.Close()


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

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

    def Destroy(self):
        self.ClearDictionary()

    def Open(self):
        scriptLoader = ui.PythonScriptLoader()
        scriptLoader.LoadScriptFile(self, "uiscript/mallpagedialog.py")

        self.GetChild("titlebar").SetCloseEvent(ui.__mem_func__(self.Close))
       
        (x, y)=self.GetGlobalPosition()
        x+=10
        y+=30
       
        MALL_PAGE_WIDTH = 600
        MALL_PAGE_HEIGHT = 480
       
        app.ShowWebPage(
            "http://metin2.co.kr/08_mall/game_mall/login_fail.htm",
            (x, y, x+MALL_PAGE_WIDTH, y+MALL_PAGE_HEIGHT))

        self.Lock()
        self.Show()
       
    def Close(self):          
        app.HideWebPage()
        self.Unlock()
        self.Hide()
       
    def OnPressEscapeKey(self):
        self.Close()
        return True
import chr ekledim düzeldi
1716807138961.png


sysserde sadece şu kaldı

sysser:
Genişlet Daralt Kopyala
0527 13:55:26984 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:55:26984 :: AttributeError
0527 13:55:26984 :: :
0527 13:55:26984 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:55:26984 ::
 
Çözüm
sysserde sadece şu kaldı

sysser:
Genişlet Daralt Kopyala
0527 13:55:26984 ::   File "uiPrivateShopBuilder.py", line 126, in OnMouseLeftButtonUp

0527 13:55:26984 :: AttributeError
0527 13:55:26984 :: :
0527 13:55:26984 :: 'PrivateShopAdvertisementBoard' object has no attribute 'shopAdvertismentBoardSeen'
0527 13:55:26984 ::
yeni konu aç bunun için. hepsini aynı konuda çözmeyelim.
 
Durum
İçerik kilitlendiği için mesaj gönderimine kapatıldı.
Üst