1. import ui
  2. import snd
  3. import shop
  4. import mouseModule
  5. import player
  6. import chr
  7. import net
  8. import uiCommon
  9. import localeInfo
  10. import chat
  11. import item
  12. import systemSetting #김준호
  13. import player #김준호
  14. import uiMaydanoz
  15. import constInfo
  16. g_isBuildingPrivateShop = False
  17. g_itemPriceDict={}
  18. g_privateShopAdvertisementBoardDict={}
  19. def Clear():
  20. global g_itemPriceDict
  21. global g_isBuildingPrivateShop
  22. g_itemPriceDict={}
  23. g_isBuildingPrivateShop = False
  24. def IsPrivateShopItemPriceList():
  25. global g_itemPriceDict
  26. if g_itemPriceDict:
  27. return True
  28. else:
  29. return False
  30. def IsBuildingPrivateShop():
  31. global g_isBuildingPrivateShop
  32. if player.IsOpenPrivateShop() or g_isBuildingPrivateShop:
  33. return True
  34. else:
  35. return False
  36. def SetPrivateShopItemPrice(itemVNum, itemPrice):
  37. global g_itemPriceDict
  38. g_itemPriceDict[int(itemVNum)]=itemPrice
  39. def GetPrivateShopItemPrice(itemVNum):
  40. try:
  41. global g_itemPriceDict
  42. return g_itemPriceDict[itemVNum]
  43. except KeyError:
  44. return 0
  45. def UpdateADBoard():
  46. for key in g_privateShopAdvertisementBoardDict.keys():
  47. g_privateShopAdvertisementBoardDict[key].Show()
  48. def DeleteADBoard(vid):
  49. if not g_privateShopAdvertisementBoardDict.has_key(vid):
  50. return
  51. del g_privateShopAdvertisementBoardDict[vid]
  52. class PrivateShopAdvertisementBoard(ui.ThinBoard):
  53. def __init__(self):
  54. ui.ThinBoard.__init__(self, "UI_BOTTOM")
  55. self.vid = None
  56. self.__MakeTextLine()
  57. def __del__(self):
  58. ui.ThinBoard.__del__(self)
  59. def __MakeTextLine(self):
  60. self.textLine = ui.TextLine()
  61. self.textLine.SetParent(self)
  62. self.textLine.SetWindowHorizontalAlignCenter()
  63. self.textLine.SetWindowVerticalAlignCenter()
  64. self.textLine.SetHorizontalAlignCenter()
  65. self.textLine.SetVerticalAlignCenter()
  66. self.textLine.Show()
  67. def Open(self, vid, text):
  68. self.vid = vid
  69. self.textLine.SetText(text)
  70. self.textLine.UpdateRect()
  71. self.SetSize(len(text)*6 + 10*2, 20)
  72. self.Show()
  73. g_privateShopAdvertisementBoardDict[vid] = self
  74. def OnMouseLeftButtonUp(self):
  75. if not self.vid:
  76. return
  77. net.SendOnClickPacket(self.vid)
  78. return True
  79. def OnUpdate(self):
  80. if not self.vid:
  81. return
  82. if systemSetting.IsShowSalesText():
  83. self.Show()
  84. x, y = chr.GetProjectPosition(self.vid, 220)
  85. self.SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
  86. else:
  87. for key in g_privateShopAdvertisementBoardDict.keys():
  88. if player.GetMainCharacterIndex() == key: #상점풍선을 안보이게 감추는 경우에도, 플레이어 자신의 상점 풍선은 보이도록 함. by 김준호
  89. g_privateShopAdvertisementBoardDict[key].Show()
  90. x, y = chr.GetProjectPosition(player.GetMainCharacterIndex(), 220)
  91. g_privateShopAdvertisementBoardDict[key].SetPosition(x - self.GetWidth()/2, y - self.GetHeight()/2)
  92. else:
  93. g_privateShopAdvertisementBoardDict[key].Hide()
  94. class PrivateShopBuilder(ui.ScriptWindow):
  95. def __init__(self):
  96. #print "NEW MAKE_PRIVATE_SHOP_WINDOW ----------------------------------------------------------------"
  97. ui.ScriptWindow.__init__(self)
  98. self.__LoadWindow()
  99. self.itemStock = {}
  100. self.tooltipItem = None
  101. self.priceInputBoard = None
  102. self.title = ""
  103. def __del__(self):
  104. #print "------------------------------------------------------------- DELETE MAKE_PRIVATE_SHOP_WINDOW"
  105. ui.ScriptWindow.__del__(self)
  106. def __LoadWindow(self):
  107. try:
  108. pyScrLoader = ui.PythonScriptLoader()
  109. pyScrLoader.LoadScriptFile(self, "UIScript/PrivateShopBuilder.py")
  110. except:
  111. import exception
  112. exception.Abort("PrivateShopBuilderWindow.LoadWindow.LoadObject")
  113. try:
  114. GetObject = self.GetChild
  115. self.nameLine = GetObject("NameLine")
  116. self.itemSlot = GetObject("ItemSlot")
  117. self.btnOk = GetObject("OkButton")
  118. self.btnClose = GetObject("CloseButton")
  119. self.titleBar = GetObject("TitleBar")
  120. except:
  121. import exception
  122. exception.Abort("PrivateShopBuilderWindow.LoadWindow.BindObject")
  123. self.btnOk.SetEvent(ui.__mem_func__(self.OnOk))
  124. self.btnClose.SetEvent(ui.__mem_func__(self.OnClose))
  125. self.titleBar.SetCloseEvent(ui.__mem_func__(self.OnClose))
  126. self.itemSlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.OnSelectEmptySlot))
  127. self.itemSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.OnSelectItemSlot))
  128. self.itemSlot.SetOverInItemEvent(ui.__mem_func__(self.OnOverInItem))
  129. self.itemSlot.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem))
  130. def Destroy(self):
  131. self.ClearDictionary()
  132. self.nameLine = None
  133. self.itemSlot = None
  134. self.btnOk = None
  135. self.btnClose = None
  136. self.titleBar = None
  137. self.priceInputBoard = None
  138. def Open(self, title):
  139. self.title = title
  140. if len(title) > 25:
  141. title = title[:22] + "..."
  142. self.itemStock = {}
  143. shop.ClearPrivateShopStock()
  144. self.nameLine.SetText(title)
  145. self.SetCenterPosition()
  146. self.Refresh()
  147. self.Show()
  148. global g_isBuildingPrivateShop
  149. g_isBuildingPrivateShop = True
  150. def Close(self):
  151. global g_isBuildingPrivateShop
  152. g_isBuildingPrivateShop = False
  153. self.title = ""
  154. self.itemStock = {}
  155. shop.ClearPrivateShopStock()
  156. self.Hide()
  157. def SetItemToolTip(self, tooltipItem):
  158. self.tooltipItem = tooltipItem
  159. def Refresh(self):
  160. getitemVNum=player.GetItemIndex
  161. getItemCount=player.GetItemCount
  162. setitemVNum=self.itemSlot.SetItemSlot
  163. delItem=self.itemSlot.ClearSlot
  164. for i in xrange(shop.SHOP_SLOT_COUNT):
  165. if not self.itemStock.has_key(i):
  166. delItem(i)
  167. continue
  168. pos = self.itemStock[i]
  169. itemCount = getItemCount(*pos)
  170. if itemCount <= 1:
  171. itemCount = 0
  172. setitemVNum(i, getitemVNum(*pos), itemCount)
  173. self.itemSlot.RefreshSlot()
  174. def OnSelectEmptySlot(self, selectedSlotPos):
  175. isAttached = mouseModule.mouseController.isAttached()
  176. if isAttached:
  177. attachedSlotType = mouseModule.mouseController.GetAttachedType()
  178. attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  179. mouseModule.mouseController.DeattachObject()
  180. if player.SLOT_TYPE_INVENTORY != attachedSlotType and player.SLOT_TYPE_DRAGON_SOUL_INVENTORY != attachedSlotType:
  181. return
  182. attachedInvenType = player.SlotTypeToInvenType(attachedSlotType)
  183. itemVNum = player.GetItemIndex(attachedInvenType, attachedSlotPos)
  184. item.SelectItem(itemVNum)
  185. if item.IsAntiFlag(item.ANTIFLAG_GIVE) or item.IsAntiFlag(item.ANTIFLAG_MYSHOP):
  186. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.PRIVATE_SHOP_CANNOT_SELL_ITEM)
  187. return
  188. priceInputBoard = uiMaydanoz.NewMoneyInputDialog()
  189. priceInputBoard.SetTitle(localeInfo.PRIVATE_SHOP_INPUT_PRICE_DIALOG_TITLE)
  190. priceInputBoard.SetAcceptEvent(ui.__mem_func__(self.AcceptInputPrice))
  191. priceInputBoard.SetCancelEvent(ui.__mem_func__(self.CancelInputPrice))
  192. priceInputBoard.Open()
  193. itemPrice=GetPrivateShopItemPrice(itemVNum)
  194. if itemPrice>0:
  195. priceInputBoard.SetValue(itemPrice)
  196. self.priceInputBoard = priceInputBoard
  197. self.priceInputBoard.itemVNum = itemVNum
  198. self.priceInputBoard.sourceWindowType = attachedInvenType
  199. self.priceInputBoard.sourceSlotPos = attachedSlotPos
  200. self.priceInputBoard.targetSlotPos = selectedSlotPos
  201. def OnSelectItemSlot(self, selectedSlotPos):
  202. isAttached = mouseModule.mouseController.isAttached()
  203. if isAttached:
  204. snd.PlaySound("sound/ui/loginfail.wav")
  205. mouseModule.mouseController.DeattachObject()
  206. else:
  207. if not selectedSlotPos in self.itemStock:
  208. return
  209. invenType, invenPos = self.itemStock[selectedSlotPos]
  210. shop.DelPrivateShopItemStock(invenType, invenPos)
  211. snd.PlaySound("sound/ui/drop.wav")
  212. del self.itemStock[selectedSlotPos]
  213. self.Refresh()
  214. def AcceptInputPrice(self):
  215. if not self.priceInputBoard:
  216. return TRUE
  217. text = self.priceInputBoard.GetText()
  218. text1 = self.priceInputBoard.GetText1()
  219. text2 = self.priceInputBoard.GetText2()
  220. if text1 and int(text1) >= 30001:
  221. chat.AppendChat(1, "30.000'den y?sek bir de?r giremezsiniz.")
  222. return TRUE
  223. if text2 and int(text2) >= 30001:
  224. chat.AppendChat(1, "30.000'den y?sek bir de?r giremezsiniz.")
  225. return TRUE
  226. if not text:
  227. return TRUE
  228. if not text.isdigit():
  229. return TRUE
  230. if int(text) <= 0:
  231. return TRUE
  232. if int(text1) <= 0:
  233. chat.AppendChat(chat.CHAT_TYPE_INFO, "Birimlere de?r girmeniz gerekmektedir.")
  234. return TRUE
  235. if int(text2) <= 0:
  236. chat.AppendChat(chat.CHAT_TYPE_INFO, "Birimlere de?r girmeniz gerekmektedir.")
  237. return TRUE
  238. attachedInvenType = self.priceInputBoard.sourceWindowType
  239. sourceSlotPos = self.priceInputBoard.sourceSlotPos
  240. targetSlotPos = self.priceInputBoard.targetSlotPos
  241. for privatePos, (itemWindowType, itemSlotIndex) in self.itemStock.items():
  242. if itemWindowType == attachedInvenType and itemSlotIndex == sourceSlotPos:
  243. shop.DelPrivateShopItemStock(itemWindowType, itemSlotIndex)
  244. del self.itemStock[privatePos]
  245. price = int(self.priceInputBoard.GetText())
  246. if IsPrivateShopItemPriceList():
  247. SetPrivateShopItemPrice(self.priceInputBoard.itemVNum, price)
  248. shop.AddPrivateShopItemStock(attachedInvenType, sourceSlotPos, targetSlotPos, price) ## Bar ve su ile esya satma
  249. self.itemStock[targetSlotPos] = (attachedInvenType, sourceSlotPos)
  250. snd.PlaySound("sound/ui/drop.wav")
  251. import net
  252. net.SendChatPacket("/suileesyasat "+str(targetSlotPos)+" "+str(text1))
  253. net.SendChatPacket("/barileesyasat "+str(targetSlotPos)+" "+str(text2))
  254. if targetSlotPos == 0:
  255. constInfo.sufiyat0 = int(text1)
  256. if targetSlotPos == 1:
  257. constInfo.sufiyat1 = int(text1)
  258. if targetSlotPos == 2:
  259. constInfo.sufiyat2 = int(text1)
  260. if targetSlotPos == 3:
  261. constInfo.sufiyat3 = int(text1)
  262. if targetSlotPos == 4:
  263. constInfo.sufiyat4 = int(text1)
  264. if targetSlotPos == 5:
  265. constInfo.sufiyat5 = int(text1)
  266. if targetSlotPos == 6:
  267. constInfo.sufiyat6 = int(text1)
  268. if targetSlotPos == 7:
  269. constInfo.sufiyat7 = int(text1)
  270. if targetSlotPos == 8:
  271. constInfo.sufiyat8 = int(text1)
  272. if targetSlotPos == 9:
  273. constInfo.sufiyat9 = int(text1)
  274. if targetSlotPos == 10:
  275. constInfo.sufiyat10 = int(text1)
  276. if targetSlotPos == 11:
  277. constInfo.sufiyat11 = int(text1)
  278. if targetSlotPos == 12:
  279. constInfo.sufiyat12 = int(text1)
  280. if targetSlotPos == 13:
  281. constInfo.sufiyat13 = int(text1)
  282. if targetSlotPos == 14:
  283. constInfo.sufiyat14 = int(text1)
  284. if targetSlotPos == 15:
  285. constInfo.sufiyat15 = int(text1)
  286. if targetSlotPos == 16:
  287. constInfo.sufiyat16 = int(text1)
  288. if targetSlotPos == 17:
  289. constInfo.sufiyat17 = int(text1)
  290. if targetSlotPos == 18:
  291. constInfo.sufiyat18 = int(text1)
  292. if targetSlotPos == 19:
  293. constInfo.sufiyat19 = int(text1)
  294. if targetSlotPos == 20:
  295. constInfo.sufiyat20 = int(text1)
  296. if targetSlotPos == 21:
  297. constInfo.sufiyat21 = int(text1)
  298. if targetSlotPos == 22:
  299. constInfo.sufiyat22 = int(text1)
  300. if targetSlotPos == 23:
  301. constInfo.sufiyat23 = int(text1)
  302. if targetSlotPos == 24:
  303. constInfo.sufiyat24 = int(text1)
  304. if targetSlotPos == 25:
  305. constInfo.sufiyat25 = int(text1)
  306. if targetSlotPos == 26:
  307. constInfo.sufiyat26 = int(text1)
  308. if targetSlotPos == 27:
  309. constInfo.sufiyat27 = int(text1)
  310. if targetSlotPos == 28:
  311. constInfo.sufiyat28 = int(text1)
  312. if targetSlotPos == 29:
  313. constInfo.sufiyat29 = int(text1)
  314. if targetSlotPos == 30:
  315. constInfo.sufiyat30 = int(text1)
  316. if targetSlotPos == 31:
  317. constInfo.sufiyat31 = int(text1)
  318. if targetSlotPos == 32:
  319. constInfo.sufiyat32 = int(text1)
  320. if targetSlotPos == 33:
  321. constInfo.sufiyat33 = int(text1)
  322. if targetSlotPos == 34:
  323. constInfo.sufiyat34 = int(text1)
  324. if targetSlotPos == 35:
  325. constInfo.sufiyat35 = int(text1)
  326. if targetSlotPos == 36:
  327. constInfo.sufiyat36 = int(text1)
  328. if targetSlotPos == 37:
  329. constInfo.sufiyat37 = int(text1)
  330. if targetSlotPos == 38:
  331. constInfo.sufiyat38 = int(text1)
  332. if targetSlotPos == 39:
  333. constInfo.sufiyat39 = int(text1)
  334. if targetSlotPos == 40:
  335. constInfo.sufiyat40 = int(text1)
  336. if targetSlotPos == 41:
  337. constInfo.sufiyat41 = int(text1)
  338. if targetSlotPos == 42:
  339. constInfo.sufiyat42 = int(text1)
  340. if targetSlotPos == 43:
  341. constInfo.sufiyat43 = int(text1)
  342. if targetSlotPos == 44:
  343. constInfo.sufiyat44 = int(text1)
  344. if targetSlotPos == 45:
  345. constInfo.sufiyat45 = int(text1)
  346. if targetSlotPos == 46:
  347. constInfo.sufiyat46 = int(text1)
  348. if targetSlotPos == 47:
  349. constInfo.sufiyat47 = int(text1)
  350. if targetSlotPos == 48:
  351. constInfo.sufiyat48 = int(text1)
  352. if targetSlotPos == 49:
  353. constInfo.sufiyat49 = int(text1)
  354. if targetSlotPos == 50:
  355. constInfo.sufiyat50 = int(text1)
  356. if targetSlotPos == 51:
  357. constInfo.sufiyat51 = int(text1)
  358. if targetSlotPos == 52:
  359. constInfo.sufiyat52 = int(text1)
  360. if targetSlotPos == 53:
  361. constInfo.sufiyat53 = int(text1)
  362. if targetSlotPos == 54:
  363. constInfo.sufiyat54 = int(text1)
  364. if targetSlotPos == 55:
  365. constInfo.sufiyat55 = int(text1)
  366. if targetSlotPos == 56:
  367. constInfo.sufiyat56 = int(text1)
  368. if targetSlotPos == 57:
  369. constInfo.sufiyat57 = int(text1)
  370. if targetSlotPos == 58:
  371. constInfo.sufiyat58 = int(text1)
  372. if targetSlotPos == 59:
  373. constInfo.sufiyat59 = int(text1)
  374. if targetSlotPos == 60:
  375. constInfo.sufiyat60 = int(text1)
  376. if targetSlotPos == 61:
  377. constInfo.sufiyat61 = int(text1)
  378. if targetSlotPos == 62:
  379. constInfo.sufiyat62 = int(text1)
  380. if targetSlotPos == 63:
  381. constInfo.sufiyat63 = int(text1)
  382. if targetSlotPos == 64:
  383. constInfo.sufiyat64 = int(text1)
  384. if targetSlotPos == 65:
  385. constInfo.sufiyat65 = int(text1)
  386. if targetSlotPos == 66:
  387. constInfo.sufiyat66 = int(text1)
  388. if targetSlotPos == 67:
  389. constInfo.sufiyat67 = int(text1)
  390. if targetSlotPos == 68:
  391. constInfo.sufiyat68 = int(text1)
  392. if targetSlotPos == 69:
  393. constInfo.sufiyat69 = int(text1)
  394. if targetSlotPos == 70:
  395. constInfo.sufiyat70 = int(text1)
  396. if targetSlotPos == 71:
  397. constInfo.sufiyat71 = int(text1)
  398. if targetSlotPos == 72:
  399. constInfo.sufiyat72 = int(text1)
  400. if targetSlotPos == 73:
  401. constInfo.sufiyat73 = int(text1)
  402. if targetSlotPos == 74:
  403. constInfo.sufiyat74 = int(text1)
  404. if targetSlotPos == 75:
  405. constInfo.sufiyat75 = int(text1)
  406. if targetSlotPos == 76:
  407. constInfo.sufiyat76 = int(text1)
  408. if targetSlotPos == 77:
  409. constInfo.sufiyat77 = int(text1)
  410. if targetSlotPos == 78:
  411. constInfo.sufiyat78 = int(text1)
  412. if targetSlotPos == 79:
  413. constInfo.sufiyat79 = int(text1)
  414. if targetSlotPos == 80:
  415. constInfo.sufiyat80 = int(text1)
  416. if targetSlotPos == 81:
  417. constInfo.sufiyat81 = int(text1)
  418. if targetSlotPos == 82:
  419. constInfo.sufiyat82 = int(text1)
  420. if targetSlotPos == 83:
  421. constInfo.sufiyat83 = int(text1)
  422. if targetSlotPos == 84:
  423. constInfo.sufiyat84 = int(text1)
  424. if targetSlotPos == 85:
  425. constInfo.sufiyat85 = int(text1)
  426. if targetSlotPos == 86:
  427. constInfo.sufiyat86 = int(text1)
  428. if targetSlotPos == 87:
  429. constInfo.sufiyat87 = int(text1)
  430. if targetSlotPos == 88:
  431. constInfo.sufiyat88 = int(text1)
  432. if targetSlotPos == 89:
  433. constInfo.sufiyat89 = int(text1)
  434. if targetSlotPos == 90:
  435. constInfo.sufiyat90 = int(text1)
  436. if targetSlotPos == 91:
  437. constInfo.sufiyat91 = int(text1)
  438. if targetSlotPos == 92:
  439. constInfo.sufiyat92 = int(text1)
  440. if targetSlotPos == 93:
  441. constInfo.sufiyat93 = int(text1)
  442. if targetSlotPos == 94:
  443. constInfo.sufiyat94 = int(text1)
  444. if targetSlotPos == 95:
  445. constInfo.sufiyat95 = int(text1)
  446. if targetSlotPos == 96:
  447. constInfo.sufiyat96 = int(text1)
  448. if targetSlotPos == 97:
  449. constInfo.sufiyat97 = int(text1)
  450. if targetSlotPos == 98:
  451. constInfo.sufiyat98 = int(text1)
  452. if targetSlotPos == 99:
  453. constInfo.sufiyat99 = int(text1)
  454. if targetSlotPos == 100:
  455. constInfo.sufiyat100 = int(text1)
  456. if targetSlotPos == 0:
  457. constInfo.barfiyat0 = int(text2)
  458. if targetSlotPos == 1:
  459. constInfo.barfiyat1 = int(text2)
  460. if targetSlotPos == 2:
  461. constInfo.barfiyat2 = int(text2)
  462. if targetSlotPos == 3:
  463. constInfo.barfiyat3 = int(text2)
  464. if targetSlotPos == 4:
  465. constInfo.barfiyat4 = int(text2)
  466. if targetSlotPos == 5:
  467. constInfo.barfiyat5 = int(text2)
  468. if targetSlotPos == 6:
  469. constInfo.barfiyat6 = int(text2)
  470. if targetSlotPos == 7:
  471. constInfo.barfiyat7 = int(text2)
  472. if targetSlotPos == 8:
  473. constInfo.barfiyat8 = int(text2)
  474. if targetSlotPos == 9:
  475. constInfo.barfiyat9 = int(text2)
  476. if targetSlotPos == 10:
  477. constInfo.barfiyat10 = int(text2)
  478. if targetSlotPos == 11:
  479. constInfo.barfiyat11 = int(text2)
  480. if targetSlotPos == 12:
  481. constInfo.barfiyat12 = int(text2)
  482. if targetSlotPos == 13:
  483. constInfo.barfiyat13 = int(text2)
  484. if targetSlotPos == 14:
  485. constInfo.barfiyat14 = int(text2)
  486. if targetSlotPos == 15:
  487. constInfo.barfiyat15 = int(text2)
  488. if targetSlotPos == 16:
  489. constInfo.barfiyat16 = int(text2)
  490. if targetSlotPos == 17:
  491. constInfo.barfiyat17 = int(text2)
  492. if targetSlotPos == 18:
  493. constInfo.barfiyat18 = int(text2)
  494. if targetSlotPos == 19:
  495. constInfo.barfiyat19 = int(text2)
  496. if targetSlotPos == 20:
  497. constInfo.barfiyat20 = int(text2)
  498. if targetSlotPos == 21:
  499. constInfo.barfiyat21 = int(text2)
  500. if targetSlotPos == 22:
  501. constInfo.barfiyat22 = int(text2)
  502. if targetSlotPos == 23:
  503. constInfo.barfiyat23 = int(text2)
  504. if targetSlotPos == 24:
  505. constInfo.barfiyat24 = int(text2)
  506. if targetSlotPos == 25:
  507. constInfo.barfiyat25 = int(text2)
  508. if targetSlotPos == 26:
  509. constInfo.barfiyat26 = int(text2)
  510. if targetSlotPos == 27:
  511. constInfo.barfiyat27 = int(text2)
  512. if targetSlotPos == 28:
  513. constInfo.barfiyat28 = int(text2)
  514. if targetSlotPos == 29:
  515. constInfo.barfiyat29 = int(text2)
  516. if targetSlotPos == 30:
  517. constInfo.barfiyat30 = int(text2)
  518. if targetSlotPos == 31:
  519. constInfo.barfiyat31 = int(text2)
  520. if targetSlotPos == 32:
  521. constInfo.barfiyat32 = int(text2)
  522. if targetSlotPos == 33:
  523. constInfo.barfiyat33 = int(text2)
  524. if targetSlotPos == 34:
  525. constInfo.barfiyat34 = int(text2)
  526. if targetSlotPos == 35:
  527. constInfo.barfiyat35 = int(text2)
  528. if targetSlotPos == 36:
  529. constInfo.barfiyat36 = int(text2)
  530. if targetSlotPos == 37:
  531. constInfo.barfiyat37 = int(text2)
  532. if targetSlotPos == 38:
  533. constInfo.barfiyat38 = int(text2)
  534. if targetSlotPos == 39:
  535. constInfo.barfiyat39 = int(text2)
  536. if targetSlotPos == 40:
  537. constInfo.barfiyat40 = int(text2)
  538. if targetSlotPos == 41:
  539. constInfo.barfiyat41 = int(text2)
  540. if targetSlotPos == 42:
  541. constInfo.barfiyat42 = int(text2)
  542. if targetSlotPos == 43:
  543. constInfo.barfiyat43 = int(text2)
  544. if targetSlotPos == 44:
  545. constInfo.barfiyat44 = int(text2)
  546. if targetSlotPos == 45:
  547. constInfo.barfiyat45 = int(text2)
  548. if targetSlotPos == 46:
  549. constInfo.barfiyat46 = int(text2)
  550. if targetSlotPos == 47:
  551. constInfo.barfiyat47 = int(text2)
  552. if targetSlotPos == 48:
  553. constInfo.barfiyat48 = int(text2)
  554. if targetSlotPos == 49:
  555. constInfo.barfiyat49 = int(text2)
  556. if targetSlotPos == 50:
  557. constInfo.barfiyat50 = int(text2)
  558. if targetSlotPos == 51:
  559. constInfo.barfiyat51 = int(text2)
  560. if targetSlotPos == 52:
  561. constInfo.barfiyat52 = int(text2)
  562. if targetSlotPos == 53:
  563. constInfo.barfiyat53 = int(text2)
  564. if targetSlotPos == 54:
  565. constInfo.barfiyat54 = int(text2)
  566. if targetSlotPos == 55:
  567. constInfo.barfiyat55 = int(text2)
  568. if targetSlotPos == 56:
  569. constInfo.barfiyat56 = int(text2)
  570. if targetSlotPos == 57:
  571. constInfo.barfiyat57 = int(text2)
  572. if targetSlotPos == 58:
  573. constInfo.barfiyat58 = int(text2)
  574. if targetSlotPos == 59:
  575. constInfo.barfiyat59 = int(text2)
  576. if targetSlotPos == 60:
  577. constInfo.barfiyat60 = int(text2)
  578. if targetSlotPos == 61:
  579. constInfo.barfiyat61 = int(text2)
  580. if targetSlotPos == 62:
  581. constInfo.barfiyat62 = int(text2)
  582. if targetSlotPos == 63:
  583. constInfo.barfiyat63 = int(text2)
  584. if targetSlotPos == 64:
  585. constInfo.barfiyat64 = int(text2)
  586. if targetSlotPos == 65:
  587. constInfo.barfiyat65 = int(text2)
  588. if targetSlotPos == 66:
  589. constInfo.barfiyat66 = int(text2)
  590. if targetSlotPos == 67:
  591. constInfo.barfiyat67 = int(text2)
  592. if targetSlotPos == 68:
  593. constInfo.barfiyat68 = int(text2)
  594. if targetSlotPos == 69:
  595. constInfo.barfiyat69 = int(text2)
  596. if targetSlotPos == 70:
  597. constInfo.barfiyat70 = int(text2)
  598. if targetSlotPos == 71:
  599. constInfo.barfiyat71 = int(text2)
  600. if targetSlotPos == 72:
  601. constInfo.barfiyat72 = int(text2)
  602. if targetSlotPos == 73:
  603. constInfo.barfiyat73 = int(text2)
  604. if targetSlotPos == 74:
  605. constInfo.barfiyat74 = int(text2)
  606. if targetSlotPos == 75:
  607. constInfo.barfiyat75 = int(text2)
  608. if targetSlotPos == 76:
  609. constInfo.barfiyat76 = int(text2)
  610. if targetSlotPos == 77:
  611. constInfo.barfiyat77 = int(text2)
  612. if targetSlotPos == 78:
  613. constInfo.barfiyat78 = int(text2)
  614. if targetSlotPos == 79:
  615. constInfo.barfiyat79 = int(text2)
  616. if targetSlotPos == 80:
  617. constInfo.barfiyat80 = int(text2)
  618. if targetSlotPos == 81:
  619. constInfo.barfiyat81 = int(text2)
  620. if targetSlotPos == 82:
  621. constInfo.barfiyat82 = int(text2)
  622. if targetSlotPos == 83:
  623. constInfo.barfiyat83 = int(text2)
  624. if targetSlotPos == 84:
  625. constInfo.barfiyat84 = int(text2)
  626. if targetSlotPos == 85:
  627. constInfo.barfiyat85 = int(text2)
  628. if targetSlotPos == 86:
  629. constInfo.barfiyat86 = int(text2)
  630. if targetSlotPos == 87:
  631. constInfo.barfiyat87 = int(text2)
  632. if targetSlotPos == 88:
  633. constInfo.barfiyat88 = int(text2)
  634. if targetSlotPos == 89:
  635. constInfo.barfiyat89 = int(text2)
  636. if targetSlotPos == 90:
  637. constInfo.barfiyat90 = int(text2)
  638. if targetSlotPos == 91:
  639. constInfo.barfiyat91 = int(text2)
  640. if targetSlotPos == 92:
  641. constInfo.barfiyat92 = int(text2)
  642. if targetSlotPos == 93:
  643. constInfo.barfiyat93 = int(text2)
  644. if targetSlotPos == 94:
  645. constInfo.barfiyat94 = int(text2)
  646. if targetSlotPos == 95:
  647. constInfo.barfiyat95 = int(text2)
  648. if targetSlotPos == 96:
  649. constInfo.barfiyat96 = int(text2)
  650. if targetSlotPos == 97:
  651. constInfo.barfiyat97 = int(text2)
  652. if targetSlotPos == 98:
  653. constInfo.barfiyat98 = int(text2)
  654. if targetSlotPos == 99:
  655. constInfo.barfiyat99 = int(text2)
  656. if targetSlotPos == 100:
  657. constInfo.barfiyat100 = int(text2)
  658. self.Refresh()
  659. #####
  660. self.priceInputBoard = None
  661. return TRUE
  662. def CancelInputPrice(self):
  663. self.priceInputBoard = None
  664. return True
  665. def OnOk(self):
  666. if not self.title:
  667. return
  668. if 0 == len(self.itemStock):
  669. return
  670. shop.BuildPrivateShop(self.title)
  671. self.Close()
  672. def OnClose(self):
  673. self.Close()
  674. def OnPressEscapeKey(self):
  675. self.Close()
  676. return True
  677. def OnOverInItem(self, slotIndex):
  678. if self.tooltipItem:
  679. if self.itemStock.has_key(slotIndex):
  680. self.tooltipItem.SetPrivateShopBuilderItem(*self.itemStock[slotIndex] + (slotIndex,))
  681. def OnOverOutItem(self):
  682. if self.tooltipItem:
  683. self.tooltipItem.HideToolTip()