Çok eski bir web tarayıcısı kullanıyorsunuz. Bu veya diğer siteleri görüntülemekte sorunlar yaşayabilirsiniz.. Tarayıcınızı güncellemeli veya alternatif bir tarayıcı kullanmalısınız.
Cevaplandı'Interface' object has no attribute 'questButtonList'
Astra2 filesinden offline shop unu söktüm, python tarafını packlerime göre düzenledim, ne kadar doğru oldu bilmiyorum ama oyuna giriş yaptıktan sonra offline shop a tıkladığımda böyle bir syserr düşüyor.
Kodları inceledim tek tek karşılaştırdım ama sorun bulamadım bende.
Yedeklerden sıfırdan ekledim. Bu hata kalktı ama bu seferde pazar aç tuşuna basınca hiç bir şey gelmiyor.
Kodları inceledim tek tek karşılaştırdım ama sorun bulamadım bende.
Yedeklerden sıfırdan ekledim. Bu hata kalktı ama bu seferde pazar aç tuşuna basınca hiç bir şey gelmiyor.
[CODE lang="python" title="uiPrivateShopBuilder.py" highlight="254"]import ui
import snd
import shop
import mouseModule
import player
import chr
import net
import uiCommon
import localeInfo
import chat
import item
import systemSetting #±èÁØÈ£
import player #±èÁØÈ£
import app
import __builtin__ as selfs
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
import constInfo
import uiPrivateShopEditor
import chat
g_isBuildingPrivateShop = False
g_itemPriceDict={}
g_privateShopAdvertisementBoardDict={}
def Clear():
global g_itemPriceDict
global g_isBuildingPrivateShop
g_itemPriceDict={}
g_isBuildingPrivateShop = False
# @@@correction007 BEGIN
global g_privateShopAdvertisementBoardDict
g_privateShopAdvertisementBoardDict={}
# @@@correction007 END
def IsPrivateShopItemPriceList():
global g_itemPriceDict
if g_itemPriceDict:
return True
else:
return False
def IsBuildingPrivateShop():
global g_isBuildingPrivateShop
if player.IsOpenPrivateShop() or g_isBuildingPrivateShop:
return True
else:
return False
def SetPrivateShopItemPrice(itemVNum, itemPrice):
global g_itemPriceDict
g_itemPriceDict[int(itemVNum)]=itemPrice
def OnMouseLeftButtonUp(self):
if not self.vid:
return
net.SendOnClickPacket(self.vid)
return True
def OnUpdate(self):
if not self.vid:
return
if systemSetting.IsShowSalesText():
self.Show()
(x, y) = chr.GetProjectPosition(self.vid, 220)
self.SetPosition(x - self.GetWidth() / 2, y - self.GetHeight() / 2)
else:
for key in g_privateShopAdvertisementBoardDict.keys():
if player.GetMainCharacterIndex() == key:
g_privateShopAdvertisementBoardDict[key].Show()
x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
else:
g_privateShopAdvertisementBoardDict[key].Hide()
class PrivateShopBuilder(ui.ScriptWindow):
def __init__(self):
#print "NEW MAKE_PRIVATE_SHOP_WINDOW ----------------------------------------------------------------"
ui.ScriptWindow.__init__(self)
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
asd = 0
z = 1
j = asd / 45
if self.page and j:
if j == 1:
z = 0
elif j == 3:
z = 2
asd = asd % 45
self.list = [None] * 180
for i in xrange(shop.SHOP_PAGE_SIZE):
slotNumber = self.page * shop.SHOP_PAGE_SIZE + i
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
y = i / 10
x = i % 10
y2 = asd / 5
x2 = asd % 5
var = (y * 10) + (z * 5) + self.page * shop.SHOP_PAGE_SIZE
if y2 > y and z:
var += y2 * 10
if y2 > y and not z:
var += 5
if y2 == y:
var += x2
if slotNumber >= var or (self.page and z and not j):
btn = ui.Button()
btn.SetParent(self.itemSlot)
btn.SetUpVisual("d:/ymir work/ui/game/shopsearchp2p/padlock.dds")
btn.SetOverVisual("d:/ymir work/ui/game/shopsearchp2p/padlock.dds")
btn.SetDownVisual("d:/ymir work/ui/game/shopsearchp2p/padlock.dds")
btn.SetPosition((x) * 32, (y) * 32)
# btn.SetEvent(lambda : self.DeleteAll())
btn.Show()
self.list[slotNumber] = (btn)
if item.IsAntiFlag(item.ANTIFLAG_GIVE) or item.IsAntiFlag(item.ANTIFLAG_MYSHOP):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PRIVATE_SHOP_CANNOT_SELL_ITEM)
return
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
(width, height) = item.GetItemSize()
for i in xrange(height):
if self.list[selectedSlotPos + (height - 1) * 10]:
return
priceInputBoard = uiCommon.MoneyInputDialog()
priceInputBoard.SetTitle(localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE)
priceInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrice))
priceInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrice))
if app.ENABLE_OFFLINE_PRIVATE_SHOP and constInfo.PriceCheck.has_key(itemVNum):
(min, max) = constInfo.PriceCheck[itemVNum]
priceInputBoard.SetCheckPrices(min, max)
priceInputBoard.Open()
itemPrice=GetPrivateShopItemPrice(itemVNum)
if itemPrice>0:
priceInputBoard.SetValue(itemPrice)
for privatePos, (itemWindowType, itemSlotIndex) in self.itemStock.items():
if itemWindowType == attachedInvenType and itemSlotIndex == sourceSlotPos:
shop.DelPrivateShopItemStock(itemWindowType, itemSlotIndex)
del self.itemStock[privatePos]
price = int(self.priceInputBoard.GetText())
if app.ENABLE_OFFLINE_PRIVATE_SHOP and constInfo.PriceCheck.has_key(self.priceInputBoard.itemVNum):
(min, max) = constInfo.PriceCheck[self.priceInputBoard.itemVNum]
count = player.GetItemCount(sourceSlotPos)
fprice = float(float(price) / float(count))
if fprice > float(max) or fprice < float(min):
chat.AppendChat(chat.CHAT_TYPE_INFO, "Bu Fiyata Ekliyemezsin !")
return
if IsPrivateShopItemPriceList():
SetPrivateShopItemPrice(self.priceInputBoard.itemVNum, price)
def OnOverInItem(self, slotIndex):
slotIndex += self.page * shop.SHOP_PAGE_SIZE
if self.tooltipItem:
if self.itemStock.has_key(slotIndex):
self.tooltipItem.SetPrivateShopBuilderItem(*self.itemStock[slotIndex] + (slotIndex,))
def OnOverOutItem(self):
if self.tooltipItem:
self.tooltipItem.HideToolTip()
def OnUpdate(self):
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
(x, y, z) = player.GetMainCharacterPosition()
self.positionInfo.SetText("%s - (%.0f, %.0f)" % (localeInfo.MINIMAP_ZONE_NAME_DICT[selfs.wndMiniMap.GetMapName()], x/100, y/100))
def OnMoveWindow(self, x, y):
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
if self.time_bar:
self.BarAdjustPositionAndSize()
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
def BarAdjustPositionAndSize(self):
x, y = self.time_select_pivot_window.GetGlobalPosition()
self.time_bar.SetPosition(x, y)
def __SelectTime(self):
self.cur_time_text.SetText(self.time_listbox.GetSelectedItem().GetText())
if self.time_bar:
self.time_bar.Hide()
def OnTimeSelect(self):
x, y = self.time_select_pivot_window.GetGlobalPosition()
self.time_bar.SetPosition(x, y)
if self.time_bar:
if self.time_bar.IsShow():
self.time_bar.Hide()
else:
self.time_bar.Show()
def SetPage(self, i):
self.page = i
if i:
self.Page1Button.SetUp()
else:
self.Page2Button.SetUp()
self.Refresh()
if app.ENABLE_OFFLINE_PRIVATE_SHOP:
class PrivateShopTitleBar(ui.ShopDecoTitle):
def __init__(self, type):
ui.ShopDecoTitle.__init__(self, type-1, "UI_BOTTOM")
self.Show()
self.type = type
self.vid = None
self.__MakeTextLine()
self.__CalcFontColor()
def OnMouseLeftButtonUp(self):
if not self.vid:
return
net.SendOnClickPacket(self.vid)
return True
def OnUpdate(self):
if not self.vid:
return
if systemSetting.IsShowSalesText():
self.Show()
x, y = chr.GetProjectPosition(self.vid, 220)
width = x - self.GetWidth()/2
height = y - self.GetHeight()/2
self.SetPosition(width, height)
else:
for key in g_privateShopAdvertisementBoardDict.keys():
if player.GetMainCharacterIndex() == key:
title_bar = g_privateShopAdvertisementBoardDict[key]
title_bar.Show()
x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
width = x - title_bar.GetWidth()/2
height = y - title_bar.GetHeight()/2