Guest User

2

a guest
Mar 8th, 2022
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 49.60 KB | None | 0 0
  1. import ui
  2. import player
  3. import mouseModule
  4. import net
  5. import app
  6. import snd
  7. import item
  8. import player
  9. import chat
  10. import grp
  11. import uiScriptLocale
  12. import uiRefine
  13. import uiAttachMetin
  14. import uiPickMoney
  15. import uiPickItem
  16. import uiCommon
  17. import uiPrivateShopBuilder # 개인상점 열동안 ItemMove 방지
  18. import localeInfo
  19. import constInfo
  20. import ime
  21. import wndMgr
  22. import exchange
  23. import invshort
  24. if app.ITEM_CHECKINOUT_UPDATE:
  25. import exchange
  26. ITEM_MALL_BUTTON_ENABLE = True
  27.  
  28. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  29. def ReprGetItemIndex(window):
  30. return lambda pos : player.GetItemIndex(window, pos)
  31.  
  32. if app.ENABLE_REMEMBER_LAST_SPLIT:
  33. import systemSetting
  34.  
  35. if app.ENABLE_SASH_SYSTEM:
  36. import sash
  37.  
  38. ITEM_FLAG_APPLICABLE = 1 << 14
  39.  
  40. class CostumeWindow(ui.ScriptWindow):
  41.  
  42. def __init__(self, wndInventory):
  43. import exception
  44.  
  45. if not app.ENABLE_COSTUME_SYSTEM:
  46. exception.Abort("What do you do?")
  47. return
  48.  
  49. if not wndInventory:
  50. exception.Abort("wndInventory parameter must be set to InventoryWindow")
  51. return
  52.  
  53. ui.ScriptWindow.__init__(self)
  54.  
  55. self.isLoaded = 0
  56. self.wndInventory = wndInventory;
  57.  
  58. self.__LoadWindow()
  59.  
  60. def __del__(self):
  61. ui.ScriptWindow.__del__(self)
  62.  
  63. def Show(self):
  64. self.__LoadWindow()
  65. self.RefreshCostumeSlot()
  66.  
  67. ui.ScriptWindow.Show(self)
  68.  
  69. def Close(self):
  70. self.Hide()
  71.  
  72. def __LoadWindow(self):
  73. if self.isLoaded == 1:
  74. return
  75.  
  76. self.isLoaded = 1
  77.  
  78. try:
  79. pyScrLoader = ui.PythonScriptLoader()
  80. pyScrLoader.LoadScriptFile(self, "UIScript/CostumeWindow.py")
  81. except:
  82. import exception
  83. exception.Abort("CostumeWindow.LoadWindow.LoadObject")
  84.  
  85. try:
  86. wndEquip = self.GetChild("CostumeSlot")
  87. self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
  88.  
  89. except:
  90. import exception
  91. exception.Abort("CostumeWindow.LoadWindow.BindObject")
  92.  
  93. ## Equipment
  94. wndEquip.SetOverInItemEvent(ui.__mem_func__(self.wndInventory.OverInItem))
  95. wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.wndInventory.OverOutItem))
  96. wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
  97. wndEquip.SetUseSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
  98. wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.wndInventory.SelectEmptySlot))
  99. wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.wndInventory.SelectItemSlot))
  100.  
  101. self.wndEquip = wndEquip
  102.  
  103. def RefreshCostumeSlot(self):
  104. getItemVNum=player.GetItemIndex
  105.  
  106. for i in xrange(item.COSTUME_SLOT_COUNT):
  107. slotNumber = item.COSTUME_SLOT_START + i
  108. self.wndEquip.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)
  109.  
  110. self.wndEquip.RefreshSlot()
  111.  
  112. class BeltInventoryWindow(ui.ScriptWindow):
  113.  
  114. def __init__(self, wndInventory):
  115. import exception
  116.  
  117. if not app.ENABLE_NEW_EQUIPMENT_SYSTEM:
  118. exception.Abort("What do you do?")
  119. return
  120.  
  121. if not wndInventory:
  122. exception.Abort("wndInventory parameter must be set to InventoryWindow")
  123. return
  124.  
  125. ui.ScriptWindow.__init__(self)
  126.  
  127. self.isLoaded = 0
  128. self.UseItemBelt = None
  129. self.wndInventory = wndInventory;
  130.  
  131. self.wndBeltInventoryLayer = None
  132. self.wndBeltInventorySlot = None
  133. self.expandBtn = None
  134. self.minBtn = None
  135.  
  136. self.__LoadWindow()
  137.  
  138. def __del__(self):
  139. ui.ScriptWindow.__del__(self)
  140.  
  141. def Show(self, openBeltSlot = False):
  142. self.__LoadWindow()
  143. self.RefreshSlot()
  144.  
  145. ui.ScriptWindow.Show(self)
  146.  
  147. if openBeltSlot:
  148. self.OpenInventory()
  149. else:
  150. self.CloseInventory()
  151.  
  152. def Close(self):
  153. self.Hide()
  154.  
  155. def IsOpeningInventory(self):
  156. return self.wndBeltInventoryLayer.IsShow()
  157.  
  158. def OpenInventory(self):
  159. self.wndBeltInventoryLayer.Show()
  160. self.expandBtn.Hide()
  161.  
  162. self.AdjustPositionAndSize()
  163.  
  164. def CloseInventory(self):
  165. self.wndBeltInventoryLayer.Hide()
  166. self.expandBtn.Show()
  167.  
  168. self.AdjustPositionAndSize()
  169.  
  170. ## 현재 인벤토리 위치를 기준으로 BASE 위치를 계산, 리턴.. 숫자 하드코딩하기 정말 싫지만 방법이 없다..
  171. def GetBasePosition(self):
  172. x, y = self.wndInventory.GetGlobalPosition()
  173. return x - 148, y + 241
  174.  
  175. def AdjustPositionAndSize(self):
  176. bx, by = self.GetBasePosition()
  177.  
  178. if self.IsOpeningInventory():
  179. self.SetPosition(bx, by)
  180. self.SetSize(self.ORIGINAL_WIDTH, self.GetHeight())
  181.  
  182. else:
  183. self.SetPosition(bx + 138, by);
  184. self.SetSize(10, self.GetHeight())
  185.  
  186. def __LoadWindow(self):
  187. if self.isLoaded == 1:
  188. return
  189.  
  190. self.isLoaded = 1
  191.  
  192. try:
  193. pyScrLoader = ui.PythonScriptLoader()
  194. pyScrLoader.LoadScriptFile(self, "UIScript/BeltInventoryWindow.py")
  195. except:
  196. import exception
  197. exception.Abort("CostumeWindow.LoadWindow.LoadObject")
  198.  
  199. try:
  200. self.ORIGINAL_WIDTH = self.GetWidth()
  201. wndBeltInventorySlot = self.GetChild("BeltInventorySlot")
  202. self.wndBeltInventoryLayer = self.GetChild("BeltInventoryLayer")
  203. self.expandBtn = self.GetChild("ExpandBtn")
  204. self.minBtn = self.GetChild("MinimizeBtn")
  205. self.UseItemBelt = self.GetChild("UseBeltItemsButton")
  206.  
  207. self.expandBtn.SetEvent(ui.__mem_func__(self.OpenInventory))
  208. self.minBtn.SetEvent(ui.__mem_func__(self.CloseInventory))
  209. self.UseItemBelt.SetEvent(self.ActivateAll)
  210.  
  211. for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
  212. slotNumber = item.BELT_INVENTORY_SLOT_START + i
  213. wndBeltInventorySlot.SetCoverButton(slotNumber, "d:/ymir work/ui/game/quest/slot_button_01.sub",\
  214. "d:/ymir work/ui/game/quest/slot_button_01.sub",\
  215. "d:/ymir work/ui/game/quest/slot_button_01.sub",\
  216. "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False, False)
  217.  
  218. except:
  219. import exception
  220. exception.Abort("CostumeWindow.LoadWindow.BindObject")
  221.  
  222. ## Equipment
  223. wndBeltInventorySlot.SetOverInItemEvent(ui.__mem_func__(self.wndInventory.OverInItem))
  224. wndBeltInventorySlot.SetOverOutItemEvent(ui.__mem_func__(self.wndInventory.OverOutItem))
  225. wndBeltInventorySlot.SetUnselectItemSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
  226. wndBeltInventorySlot.SetUseSlotEvent(ui.__mem_func__(self.wndInventory.UseItemSlot))
  227. wndBeltInventorySlot.SetSelectEmptySlotEvent(ui.__mem_func__(self.wndInventory.SelectEmptySlot))
  228. wndBeltInventorySlot.SetSelectItemSlotEvent(ui.__mem_func__(self.wndInventory.SelectItemSlot))
  229.  
  230. self.wndBeltInventorySlot = wndBeltInventorySlot
  231.  
  232. def RefreshSlot(self):
  233. getItemVNum=player.GetItemIndex
  234.  
  235. for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
  236. slotNumber = item.BELT_INVENTORY_SLOT_START + i
  237. self.wndBeltInventorySlot.SetItemSlot(slotNumber, getItemVNum(slotNumber), player.GetItemCount(slotNumber))
  238. self.wndBeltInventorySlot.SetAlwaysRenderCoverButton(slotNumber, True)
  239.  
  240. avail = "0"
  241.  
  242. if player.IsAvailableBeltInventoryCell(slotNumber):
  243. self.wndBeltInventorySlot.EnableCoverButton(slotNumber)
  244. else:
  245. self.wndBeltInventorySlot.DisableCoverButton(slotNumber)
  246.  
  247. self.wndBeltInventorySlot.RefreshSlot()
  248.  
  249. def ActivateAll(self):
  250. for i in xrange(item.BELT_INVENTORY_SLOT_COUNT):
  251. slotNumber = item.BELT_INVENTORY_SLOT_START + i
  252. net.SendItemUsePacket(slotNumber)
  253.  
  254.  
  255. class InventoryWindow(ui.ScriptWindow):
  256.  
  257. 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")
  258. timeleftshort = 0
  259.  
  260. questionDialog = None
  261. tooltipItem = None
  262. wndCostume = None
  263. wndBelt = None
  264. dlgPickMoney = None
  265. interface = None
  266. if app.WJ_ENABLE_TRADABLE_ICON:
  267. bindWnds = []
  268.  
  269. sellingSlotNumber = -1
  270. isLoaded = 0
  271. isOpenedCostumeWindowWhenClosingInventory = 0 # 인벤토리 닫을 때 코스츔이 열려있었는지 여부-_-; 네이밍 ㅈㅅ
  272. isOpenedBeltWindowWhenClosingInventory = 0 # 인벤토리 닫을 때 벨트 인벤토리가 열려있었는지 여부-_-; 네이밍 ㅈㅅ
  273.  
  274. def __init__(self):
  275. ui.ScriptWindow.__init__(self)
  276. #self.inventoryPageIndex = 0
  277. #self.equipmentPageIndex = 0
  278. self.__LoadWindow()
  279.  
  280. def __del__(self):
  281. ui.ScriptWindow.__del__(self)
  282.  
  283. def Show(self):
  284. self.__LoadWindow()
  285.  
  286. ui.ScriptWindow.Show(self)
  287.  
  288. # 인벤토리를 닫을 때 코스츔이 열려있었다면 인벤토리를 열 때 코스츔도 같이 열도록 함.
  289. if self.isOpenedCostumeWindowWhenClosingInventory and self.wndCostume:
  290. self.wndCostume.Show()
  291.  
  292. # 인벤토리를 닫을 때 벨트 인벤토리가 열려있었다면 같이 열도록 함.
  293. if self.wndBelt:
  294. self.wndBelt.Show(self.isOpenedBeltWindowWhenClosingInventory)
  295.  
  296. def BindInterfaceClass(self, interface):
  297. self.interface = interface
  298. if app.WJ_ENABLE_TRADABLE_ICON:
  299. def BindWindow(self, wnd):
  300. self.bindWnds.append(wnd)
  301. def __LoadWindow(self):
  302. if self.isLoaded == 1:
  303. return
  304.  
  305. self.isLoaded = 1
  306.  
  307. try:
  308. pyScrLoader = ui.PythonScriptLoader()
  309.  
  310. if ITEM_MALL_BUTTON_ENABLE:
  311. pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "InventoryWindow.py")
  312. else:
  313. pyScrLoader.LoadScriptFile(self, "UIScript/InventoryWindow.py")
  314. except:
  315. import exception
  316. exception.Abort("InventoryWindow.LoadWindow.LoadObject")
  317.  
  318. try:
  319. #GetObject = self.GetChild
  320. #self.titleName = GetObject("TitleName")
  321. wndItem = self.GetChild("ItemSlot")
  322. # wndCostume = self.GetChild("CostumeSlot")
  323. wndEquip = self.GetChild("EquipmentSlot")
  324. self.GetChild("TitleBar").SetCloseEvent(ui.__mem_func__(self.Close))
  325. self.wndMoney = self.GetChild("Money")
  326. self.wndMoneySlot = self.GetChild("Money_Slot")
  327. self.mallButton = self.GetChild2("MallButton")
  328.  
  329. self.DSSButton = self.GetChild2("DSSButton")
  330. self.costumeButton = self.GetChild2("CostumeButton")
  331. self.ButtonShort = self.GetChild2("ButtonShort")
  332.  
  333. self.inventoryTab = []
  334. self.inventoryTab.append(self.GetChild("Inventory_Tab_01"))
  335. self.inventoryTab.append(self.GetChild("Inventory_Tab_02"))
  336. self.inventoryTab.append(self.GetChild("Inventory_Tab_03"))
  337. self.inventoryTab.append(self.GetChild("Inventory_Tab_04"))
  338. #self.inventoryTab.append(self.GetChild("Inventory_Tab_05"))
  339.  
  340. self.equipmentTab = []
  341. self.equipmentTab.append(self.GetChild("Equipment_Tab_01"))
  342. self.equipmentTab.append(self.GetChild("Equipment_Tab_02"))
  343. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  344. self.listHighlightedSlot = []
  345.  
  346. if self.costumeButton and not app.ENABLE_COSTUME_SYSTEM:
  347. self.costumeButton.Hide()
  348. self.costumeButton.Destroy()
  349. self.costumeButton = 0
  350.  
  351. # Belt Inventory Window
  352. self.wndBelt = None
  353.  
  354. if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
  355. self.wndBelt = BeltInventoryWindow(self)
  356.  
  357. except:
  358. import exception
  359. exception.Abort("InventoryWindow.LoadWindow.BindObject")
  360.  
  361. ## Item
  362. wndItem.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
  363. wndItem.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
  364. wndItem.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
  365. wndItem.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
  366. wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
  367. wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
  368.  
  369. ## Equipment
  370. wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
  371. wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
  372. wndEquip.SetUnselectItemSlotEvent(ui.__mem_func__(self.UseItemSlot))
  373. wndEquip.SetUseSlotEvent(ui.__mem_func__(self.UseItemSlot))
  374. wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
  375. wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
  376.  
  377. ## PickMoneyDialog
  378. dlgPickMoney = uiPickMoney.PickMoneyDialog()
  379. dlgPickMoney = uiPickItem.PickItemDialog()
  380. dlgPickMoney.LoadDialog()
  381. dlgPickMoney.Hide()
  382.  
  383. ## RefineDialog
  384. self.refineDialog = uiRefine.RefineDialog()
  385. self.refineDialog.Hide()
  386.  
  387. ## AttachMetinDialog
  388. if app.WJ_ENABLE_TRADABLE_ICON:
  389. self.attachMetinDialog = uiAttachMetin.AttachMetinDialog(self)
  390. self.BindWindow(self.attachMetinDialog)
  391. else:
  392. self.attachMetinDialog = uiAttachMetin.AttachMetinDialog()
  393. self.attachMetinDialog.Hide()
  394.  
  395. ## MoneySlot
  396. self.wndMoneySlot.SetEvent(ui.__mem_func__(self.OpenPickMoneyDialog))
  397.  
  398. self.inventoryTab[0].SetEvent(lambda arg=0: self.SetInventoryPage(arg))
  399. self.inventoryTab[1].SetEvent(lambda arg=1: self.SetInventoryPage(arg))
  400. self.inventoryTab[2].SetEvent(lambda arg=2: self.SetInventoryPage(arg))
  401. self.inventoryTab[3].SetEvent(lambda arg=3: self.SetInventoryPage(arg))
  402. self.inventoryTab[0].Down()
  403. self.inventoryPageIndex = 0
  404.  
  405. self.equipmentTab[0].SetEvent(lambda arg=0: self.SetEquipmentPage(arg))
  406. self.equipmentTab[1].SetEvent(lambda arg=1: self.SetEquipmentPage(arg))
  407. self.equipmentTab[0].Down()
  408. self.equipmentTab[0].Hide()
  409. self.equipmentTab[1].Hide()
  410.  
  411. self.wndItem = wndItem
  412. self.wndEquip = wndEquip
  413. self.dlgPickMoney = dlgPickMoney
  414.  
  415. # MallButton
  416. if self.mallButton:
  417. self.mallButton.SetEvent(ui.__mem_func__(self.ClickMallButton))
  418.  
  419. if self.DSSButton:
  420. self.DSSButton.SetEvent(ui.__mem_func__(self.ClickDSSButton))
  421.  
  422. # Costume Button
  423. if self.costumeButton:
  424. self.costumeButton.SetEvent(ui.__mem_func__(self.ClickCostumeButton))
  425. if self.ButtonShort:
  426. self.ButtonShort.SetEvent(ui.__mem_func__(self.ClickOnShort))
  427.  
  428. self.wndCostume = None
  429.  
  430. #####
  431.  
  432. ## Refresh
  433. if app.ENABLE_SASH_SYSTEM:
  434. self.listAttachedSashs = []
  435. self.SetInventoryPage(0)
  436. self.SetEquipmentPage(0)
  437. self.RefreshItemSlot()
  438. self.RefreshStatus()
  439.  
  440. def Destroy(self):
  441. self.ClearDictionary()
  442.  
  443. self.dlgPickMoney.Destroy()
  444. self.dlgPickMoney = 0
  445.  
  446. self.refineDialog.Destroy()
  447. self.refineDialog = 0
  448.  
  449. self.attachMetinDialog.Destroy()
  450. self.attachMetinDialog = 0
  451.  
  452. self.tooltipItem = None
  453. self.wndItem = 0
  454. self.wndEquip = 0
  455. self.dlgPickMoney = 0
  456. self.wndMoney = 0
  457. self.wndMoneySlot = 0
  458. self.questionDialog = None
  459. self.mallButton = None
  460. self.ButtonShort = None
  461. self.DSSButton = None
  462. self.interface = None
  463. if app.WJ_ENABLE_TRADABLE_ICON:
  464. self.bindWnds = []
  465.  
  466. if self.wndCostume:
  467. self.wndCostume.Destroy()
  468. self.wndCostume = 0
  469.  
  470. if self.wndBelt:
  471. self.wndBelt.Destroy()
  472. self.wndBelt = None
  473.  
  474. self.inventoryTab = []
  475. self.equipmentTab = []
  476.  
  477. def Hide(self):
  478. if None != self.tooltipItem:
  479. self.tooltipItem.HideToolTip()
  480.  
  481. if self.wndCostume:
  482. self.isOpenedCostumeWindowWhenClosingInventory = self.wndCostume.IsShow() # 인벤토리 창이 닫힐 때 코스츔이 열려 있었는가?
  483. self.wndCostume.Close()
  484.  
  485. if self.wndBelt:
  486. self.isOpenedBeltWindowWhenClosingInventory = self.wndBelt.IsOpeningInventory() # 인벤토리 창이 닫힐 때 벨트 인벤토리도 열려 있었는가?
  487. print "Is Opening Belt Inven?? ", self.isOpenedBeltWindowWhenClosingInventory
  488. self.wndBelt.Close()
  489.  
  490. if self.dlgPickMoney:
  491. self.dlgPickMoney.Close()
  492.  
  493. self.OnCloseQuestionDialog()
  494.  
  495. wndMgr.Hide(self.hWnd)
  496.  
  497. def Close(self):
  498. self.Hide()
  499.  
  500. # def SetInventoryPage(self, page):
  501. # self.inventoryPageIndex = page
  502. # self.inventoryTab[1-page].SetUp()
  503. # self.RefreshBagSlotWindow()
  504.  
  505. def SetInventoryPage(self, page):
  506. self.inventoryTab[self.inventoryPageIndex].SetUp()
  507. self.inventoryPageIndex = page
  508. self.inventoryTab[self.inventoryPageIndex].Down()
  509. self.RefreshBagSlotWindow()
  510.  
  511. def SetEquipmentPage(self, page):
  512. self.equipmentPageIndex = page
  513. self.equipmentTab[1-page].SetUp()
  514. self.RefreshEquipSlotWindow()
  515. #self.RefreshCostumeSlotWindow()
  516.  
  517. def ClickMallButton(self):
  518. print "click_mall_button"
  519. net.SendChatPacket("/click_mall")
  520.  
  521. # DSSButton
  522. def ClickDSSButton(self):
  523. print "click_dss_button"
  524. self.interface.ToggleDragonSoulWindow()
  525.  
  526. def ClickCostumeButton(self):
  527. print "Click Costume Button"
  528. if self.wndCostume:
  529. if self.wndCostume.IsShow():
  530. self.wndCostume.Hide()
  531. else:
  532. self.wndCostume.Show()
  533. else:
  534. self.wndCostume = CostumeWindow(self)
  535. self.wndCostume.Show()
  536.  
  537. def ClickOnShort(self):
  538. if app.GetTime() > self.timeleftshort:
  539. self.test = invshort.sirala()
  540. self.test.OnUpdate()
  541. self.timeleftshort = app.GetTime() + 20
  542. else:
  543. v = self.timeleftshort - app.GetTime()
  544. chat.AppendChat(chat.CHAT_TYPE_NOTICE, "Wait: %d" % (v))
  545.  
  546. def OpenPickMoneyDialog(self):
  547.  
  548. if mouseModule.mouseController.isAttached():
  549.  
  550. attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  551. if player.SLOT_TYPE_SAFEBOX == mouseModule.mouseController.GetAttachedType():
  552.  
  553. if player.ITEM_MONEY == mouseModule.mouseController.GetAttachedItemIndex():
  554. net.SendSafeboxWithdrawMoneyPacket(mouseModule.mouseController.GetAttachedItemCount())
  555. snd.PlaySound("sound/ui/money.wav")
  556.  
  557. mouseModule.mouseController.DeattachObject()
  558.  
  559. else:
  560. curMoney = player.GetElk()
  561.  
  562. if curMoney <= 0:
  563. return
  564.  
  565. self.dlgPickMoney.SetTitleName(localeInfo.PICK_MONEY_TITLE)
  566. self.dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickMoney))
  567. self.dlgPickMoney.Open(curMoney)
  568. self.dlgPickMoney.SetMax(7) # 인벤토리 990000 제한 버그 수정
  569.  
  570. def OnPickMoney(self, money):
  571. mouseModule.mouseController.AttachMoney(self, player.SLOT_TYPE_INVENTORY, money)
  572.  
  573. def OnPickItem(self, count):
  574. itemSlotIndex = self.dlgPickMoney.itemGlobalSlotIndex
  575. selectedItemVNum = player.GetItemIndex(itemSlotIndex)
  576. mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_INVENTORY, itemSlotIndex, selectedItemVNum, count)
  577. if app.ENABLE_REMEMBER_LAST_SPLIT:
  578. systemSetting.SetLastSplitData(count)
  579.  
  580. def __InventoryLocalSlotPosToGlobalSlotPos(self, local):
  581.  
  582. if player.IsEquipmentSlot(local) or player.IsCostumeSlot(local) or player.IsBeltInventorySlot(local):
  583. return local
  584.  
  585. return self.inventoryPageIndex*player.INVENTORY_PAGE_SIZE + local
  586.  
  587. def GetInventoryPageIndex(self):
  588. return self.inventoryPageIndex
  589.  
  590. if app.WJ_ENABLE_TRADABLE_ICON:
  591. def RefreshMarkSlots(self, localIndex=None):
  592. if not self.interface:
  593. return
  594.  
  595. onTopWnd = self.interface.GetOnTopWindow()
  596. if localIndex:
  597. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(localIndex)
  598. if onTopWnd == player.ON_TOP_WND_NONE:
  599. self.wndItem.SetUsableSlotOnTopWnd(localIndex)
  600.  
  601. elif onTopWnd == player.ON_TOP_WND_SHOP:
  602. if player.IsAntiFlagBySlot(slotNumber, item.ANTIFLAG_SELL):
  603. self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
  604. else:
  605. self.wndItem.SetUsableSlotOnTopWnd(localIndex)
  606.  
  607. elif onTopWnd == player.ON_TOP_WND_EXCHANGE:
  608. if player.IsAntiFlagBySlot(slotNumber, item.ANTIFLAG_GIVE):
  609. self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
  610. else:
  611. self.wndItem.SetUsableSlotOnTopWnd(localIndex)
  612.  
  613. elif onTopWnd == player.ON_TOP_WND_PRIVATE_SHOP:
  614. if player.IsAntiFlagBySlot(slotNumber, item.ITEM_ANTIFLAG_MYSHOP):
  615. self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
  616. else:
  617. self.wndItem.SetUsableSlotOnTopWnd(localIndex)
  618.  
  619. elif onTopWnd == player.ON_TOP_WND_SAFEBOX:
  620. if player.IsAntiFlagBySlot(slotNumber, item.ANTIFLAG_SAFEBOX):
  621. self.wndItem.SetUnusableSlotOnTopWnd(localIndex)
  622. else:
  623. self.wndItem.SetUsableSlotOnTopWnd(localIndex)
  624.  
  625. return
  626.  
  627. for i in xrange(player.INVENTORY_PAGE_SIZE):
  628. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
  629.  
  630. if onTopWnd == player.ON_TOP_WND_NONE:
  631. self.wndItem.SetUsableSlotOnTopWnd(i)
  632.  
  633. elif onTopWnd == player.ON_TOP_WND_SHOP:
  634. if player.IsAntiFlagBySlot(slotNumber, item.ANTIFLAG_SELL):
  635. self.wndItem.SetUnusableSlotOnTopWnd(i)
  636. else:
  637. self.wndItem.SetUsableSlotOnTopWnd(i)
  638.  
  639. elif onTopWnd == player.ON_TOP_WND_EXCHANGE:
  640. if player.IsAntiFlagBySlot(slotNumber, item.ANTIFLAG_GIVE):
  641. self.wndItem.SetUnusableSlotOnTopWnd(i)
  642. else:
  643. self.wndItem.SetUsableSlotOnTopWnd(i)
  644.  
  645. elif onTopWnd == player.ON_TOP_WND_PRIVATE_SHOP:
  646. if player.IsAntiFlagBySlot(slotNumber, item.ITEM_ANTIFLAG_MYSHOP):
  647. self.wndItem.SetUnusableSlotOnTopWnd(i)
  648. else:
  649. self.wndItem.SetUsableSlotOnTopWnd(i)
  650.  
  651. elif onTopWnd == player.ON_TOP_WND_SAFEBOX:
  652. if player.IsAntiFlagBySlot(slotNumber, item.ANTIFLAG_SAFEBOX):
  653. self.wndItem.SetUnusableSlotOnTopWnd(i)
  654. else:
  655. self.wndItem.SetUsableSlotOnTopWnd(i)
  656.  
  657. def RefreshBagSlotWindow(self):
  658. getItemVNum=player.GetItemIndex
  659. getItemCount=player.GetItemCount
  660. setItemVNum=self.wndItem.SetItemSlot
  661.  
  662. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  663. for i in xrange(self.wndItem.GetSlotCount()):
  664. self.wndItem.DeactivateSlot(i)
  665.  
  666. for i in xrange(player.INVENTORY_PAGE_SIZE*2):
  667. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
  668.  
  669. itemCount = getItemCount(slotNumber)
  670. # itemCount == 0이면 소켓을 비운다.
  671. if 0 == itemCount:
  672. self.wndItem.ClearSlot(i)
  673. continue
  674. elif 1 == itemCount:
  675. itemCount = 0
  676.  
  677. itemVnum = getItemVNum(slotNumber)
  678. setItemVNum(i, itemVnum, itemCount)
  679.  
  680. ## 자동물약 (HP: #72723 ~ #72726, SP: #72727 ~ #72730) 특수처리 - 아이템인데도 슬롯에 활성화/비활성화 표시를 위한 작업임 - [hyo]
  681. if constInfo.IS_AUTO_POTION(itemVnum):
  682. # metinSocket - [0] : 활성화 여부, [1] : 사용한 양, [2] : 최대 용량
  683. metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
  684.  
  685. if slotNumber >= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex:
  686. slotNumber -= player.INVENTORY_PAGE_SIZE*self.inventoryPageIndex
  687.  
  688. isActivated = 0 != metinSocket[0]
  689.  
  690. if isActivated:
  691. self.wndItem.ActivateSlot(slotNumber)
  692. potionType = 0;
  693. if constInfo.IS_AUTO_POTION_HP(itemVnum):
  694. potionType = player.AUTO_POTION_TYPE_HP
  695. elif constInfo.IS_AUTO_POTION_SP(itemVnum):
  696. potionType = player.AUTO_POTION_TYPE_SP
  697.  
  698. usedAmount = int(metinSocket[1])
  699. totalAmount = int(metinSocket[2])
  700. player.SetAutoPotionInfo(potionType, isActivated, (totalAmount - usedAmount), totalAmount, self.__InventoryLocalSlotPosToGlobalSlotPos(i))
  701.  
  702. elif itemVnum >= 53001 and itemVnum <= 53256:
  703. metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
  704. isActivated = 0 != metinSocket[1]
  705. if isActivated:
  706. self.wndItem.ActivateSlot(i)
  707. else:
  708. self.wndItem.DeactivateSlot(i)
  709.  
  710. if app.ENABLE_SASH_SYSTEM:
  711. slotNumberChecked = 0
  712. if not constInfo.IS_AUTO_POTION(itemVnum):
  713. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  714. if not slotNumber in self.listHighlightedSlot:
  715. self.wndItem.DeactivateSlot(i)
  716. else:
  717. self.wndItem.DeactivateSlot(i)
  718.  
  719. if app.ENABLE_SASH_SYSTEM:
  720. slotNumberChecked = 0
  721. for j in xrange(sash.WINDOW_MAX_MATERIALS):
  722. (isHere, iCell) = sash.GetAttachedItem(j)
  723. if isHere:
  724. if iCell == slotNumber:
  725. self.wndItem.ActivateSlot(i, (36.00 / 255.0), (222.00 / 255.0), (3.00 / 255.0), 1.0)
  726. if not slotNumber in self.listAttachedSashs:
  727. self.listAttachedSashs.append(slotNumber)
  728.  
  729. slotNumberChecked = 1
  730. else:
  731. if slotNumber in self.listAttachedSashs and not slotNumberChecked:
  732. self.wndItem.DeactivateSlot(i)
  733. self.listAttachedSashs.remove(slotNumber)
  734.  
  735. if app.WJ_ENABLE_TRADABLE_ICON:
  736. self.RefreshMarkSlots(i)
  737.  
  738. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  739. self.__HighlightSlot_Refresh()
  740.  
  741. self.wndItem.RefreshSlot()
  742. if self.wndBelt:
  743. self.wndBelt.RefreshSlot()
  744. if app.WJ_ENABLE_TRADABLE_ICON:
  745. map(lambda wnd:wnd.RefreshLockedSlot(), self.bindWnds)
  746.  
  747. def RefreshEquipSlotWindow(self):
  748. getItemVNum=player.GetItemIndex
  749. getItemCount=player.GetItemCount
  750. setItemVNum=self.wndEquip.SetItemSlot
  751. for i in xrange(player.EQUIPMENT_PAGE_COUNT):
  752. slotNumber = player.EQUIPMENT_SLOT_START + i
  753. itemCount = getItemCount(slotNumber)
  754. if itemCount <= 1:
  755. itemCount = 0
  756. setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
  757.  
  758. if app.ENABLE_NEW_EQUIPMENT_SYSTEM:
  759. for i in xrange(player.NEW_EQUIPMENT_SLOT_COUNT):
  760. slotNumber = player.NEW_EQUIPMENT_SLOT_START + i
  761. itemCount = getItemCount(slotNumber)
  762. if itemCount <= 1:
  763. itemCount = 0
  764. setItemVNum(slotNumber, getItemVNum(slotNumber), itemCount)
  765. print "ENABLE_NEW_EQUIPMENT_SYSTEM", slotNumber, itemCount, getItemVNum(slotNumber)
  766.  
  767. self.wndEquip.RefreshSlot()
  768.  
  769. if self.wndCostume:
  770. self.wndCostume.RefreshCostumeSlot()
  771.  
  772. # def RefreshCostumeSlotWindow(self):
  773. # getItemVNum = player.GetItemIndex
  774.  
  775. # # for slotNumber in v_slot:
  776. # # self.wndCostume.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)
  777.  
  778. # for i in xrange(item.COSTUME_SLOT_COUNT):
  779. # slotNumber = item.COSTUME_SLOT_START
  780. # self.wndCostume.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)
  781. # self.wndEquip.SetItemSlot(slotNumber, getItemVNum(slotNumber), 0)
  782.  
  783. # if app.ENABLE_CHANGELOOK_SYSTEM:
  784. # itemTransmutedVnum = player.GetItemTransmutation(slotNumber)
  785. # if not itemTransmutedVnum:
  786. # self.wndEquip.EnableCoverButton(slotNumber)
  787. # else:
  788. # self.wndEquip.DisableCoverButton(slotNumber)
  789.  
  790. # self.wndCostume.RefreshSlot()
  791.  
  792. def RefreshItemSlot(self):
  793. self.RefreshBagSlotWindow()
  794. self.RefreshEquipSlotWindow()
  795. # self.RefreshCostumeSlotWindow()
  796.  
  797. def RefreshStatus(self):
  798. money = player.GetElk()
  799. self.wndMoney.SetText(localeInfo.NumberToMoneyString(money))
  800.  
  801. def OnUpdate(self):
  802. self.RefreshStatus()
  803.  
  804. def SetItemToolTip(self, tooltipItem):
  805. self.tooltipItem = tooltipItem
  806.  
  807. def SellItem(self):
  808. if self.sellingSlotitemIndex == player.GetItemIndex(self.sellingSlotNumber):
  809. if self.sellingSlotitemCount == player.GetItemCount(self.sellingSlotNumber):
  810. net.SendShopSellPacketNew(self.sellingSlotNumber, self.questionDialog.count)
  811. snd.PlaySound("sound/ui/money.wav")
  812. self.OnCloseQuestionDialog()
  813.  
  814. if app.ENABLE_QUICK_SELL:
  815. def QuickSellItem(self, itemSlotIndex):
  816. itemIndex = player.GetItemIndex(itemSlotIndex)
  817. itemCount = player.GetItemCount(itemSlotIndex)
  818. if itemIndex == player.GetItemIndex(itemSlotIndex):
  819. if itemCount == player.GetItemCount(itemSlotIndex):
  820. net.SendShopSellPacketNew(itemSlotIndex, itemCount, player.INVENTORY)
  821. snd.PlaySound("sound/ui/money.wav")
  822.  
  823. def OnDetachMetinFromItem(self):
  824. if None == self.questionDialog:
  825. return
  826.  
  827. #net.SendItemUseToItemPacket(self.questionDialog.sourcePos, self.questionDialog.targetPos)
  828. self.__SendUseItemToItemPacket(self.questionDialog.sourcePos, self.questionDialog.targetPos)
  829. self.OnCloseQuestionDialog()
  830.  
  831. def OnCloseQuestionDialog(self):
  832. if self.questionDialog:
  833. self.questionDialog.Close()
  834.  
  835. self.questionDialog = None
  836.  
  837. ## Slot Event
  838. def SelectEmptySlot(self, selectedSlotPos):
  839. if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
  840. return
  841.  
  842. selectedSlotPos = self.__InventoryLocalSlotPosToGlobalSlotPos(selectedSlotPos)
  843.  
  844. if mouseModule.mouseController.isAttached():
  845.  
  846. attachedSlotType = mouseModule.mouseController.GetAttachedType()
  847. attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  848. attachedItemCount = mouseModule.mouseController.GetAttachedItemCount()
  849. attachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  850.  
  851. if player.SLOT_TYPE_INVENTORY == attachedSlotType:
  852. itemCount = player.GetItemCount(attachedSlotPos)
  853. attachedCount = mouseModule.mouseController.GetAttachedItemCount()
  854. if self.dlgPickMoney and self.dlgPickMoney.IsSplitAll():
  855. net.SendChatPacket("/split_items %d %d %d" % (attachedSlotPos, attachedCount, selectedSlotPos))
  856. self.dlgPickMoney.SplitClear()
  857. else:
  858. self.__SendMoveItemPacket(attachedSlotPos, selectedSlotPos, attachedCount)
  859.  
  860. if item.IsRefineScroll(attachedItemIndex):
  861. self.wndItem.SetUseMode(False)
  862.  
  863. elif app.ENABLE_SWITCHBOT and player.SLOT_TYPE_SWITCHBOT == attachedSlotType:
  864. attachedCount = mouseModule.mouseController.GetAttachedItemCount()
  865. net.SendItemMovePacket(player.SWITCHBOT, attachedSlotPos, player.INVENTORY, selectedSlotPos, attachedCount)
  866.  
  867. elif player.SLOT_TYPE_PRIVATE_SHOP == attachedSlotType:
  868. mouseModule.mouseController.RunCallBack("INVENTORY")
  869.  
  870. elif player.SLOT_TYPE_SHOP == attachedSlotType:
  871. net.SendShopBuyPacket(attachedSlotPos)
  872.  
  873. elif player.SLOT_TYPE_SAFEBOX == attachedSlotType:
  874.  
  875. if player.ITEM_MONEY == attachedItemIndex:
  876. net.SendSafeboxWithdrawMoneyPacket(mouseModule.mouseController.GetAttachedItemCount())
  877. snd.PlaySound("sound/ui/money.wav")
  878.  
  879. else:
  880. net.SendSafeboxCheckoutPacket(attachedSlotPos, selectedSlotPos)
  881.  
  882. elif player.SLOT_TYPE_MALL == attachedSlotType:
  883. net.SendMallCheckoutPacket(attachedSlotPos, selectedSlotPos)
  884.  
  885. mouseModule.mouseController.DeattachObject()
  886.  
  887. def SelectItemSlot(self, itemSlotIndex):
  888. if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS() == 1:
  889. return
  890.  
  891. itemSlotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(itemSlotIndex)
  892.  
  893. if mouseModule.mouseController.isAttached():
  894. attachedSlotType = mouseModule.mouseController.GetAttachedType()
  895. attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
  896. attachedItemVID = mouseModule.mouseController.GetAttachedItemIndex()
  897.  
  898. if player.SLOT_TYPE_INVENTORY == attachedSlotType:
  899. self.__DropSrcItemToDestItemInInventory(attachedItemVID, attachedSlotPos, itemSlotIndex)
  900.  
  901. mouseModule.mouseController.DeattachObject()
  902.  
  903. else:
  904.  
  905. curCursorNum = app.GetCursor()
  906. if app.SELL == curCursorNum:
  907. self.__SellItem(itemSlotIndex)
  908.  
  909. elif app.BUY == curCursorNum:
  910. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SHOP_BUY_INFO)
  911.  
  912. elif app.IsPressed(app.DIK_LALT):
  913. link = player.GetItemLink(itemSlotIndex)
  914. ime.PasteString(link)
  915.  
  916. elif app.IsPressed(app.DIK_LSHIFT):
  917. itemCount = player.GetItemCount(itemSlotIndex)
  918.  
  919. if itemCount > 1:
  920. self.dlgPickMoney.SetTitleName(localeInfo.PICK_ITEM_TITLE)
  921. self.dlgPickMoney.SetAcceptEvent(ui.__mem_func__(self.OnPickItem))
  922. if app.ENABLE_REMEMBER_LAST_SPLIT:
  923. if itemCount >= systemSetting.GetLastSplitData():
  924. self.dlgPickMoney.Open(itemCount, systemSetting.GetLastSplitData())
  925. else:
  926. self.dlgPickMoney.Open(itemCount)
  927. else:
  928. self.dlgPickMoney.Open(itemCount)
  929. self.dlgPickMoney.itemGlobalSlotIndex = itemSlotIndex
  930. #else:
  931. #selectedItemVNum = player.GetItemIndex(itemSlotIndex)
  932. #mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_INVENTORY, itemSlotIndex, selectedItemVNum)
  933.  
  934. elif app.IsPressed(app.DIK_LCONTROL):
  935. itemIndex = player.GetItemIndex(itemSlotIndex)
  936.  
  937. if True == item.CanAddToQuickSlotItem(itemIndex):
  938. player.RequestAddToEmptyLocalQuickSlot(player.SLOT_TYPE_INVENTORY, itemSlotIndex)
  939. else:
  940. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.QUICKSLOT_REGISTER_DISABLE_ITEM)
  941.  
  942. else:
  943. selectedItemVNum = player.GetItemIndex(itemSlotIndex)
  944. itemCount = player.GetItemCount(itemSlotIndex)
  945. mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_INVENTORY, itemSlotIndex, selectedItemVNum, itemCount)
  946.  
  947. if self.__IsUsableItemToItem(selectedItemVNum, itemSlotIndex):
  948. self.wndItem.SetUseMode(True)
  949. else:
  950. self.wndItem.SetUseMode(False)
  951.  
  952. snd.PlaySound("sound/ui/pick.wav")
  953.  
  954. def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos):
  955. if srcItemSlotPos == dstItemSlotPos:
  956. return
  957.  
  958. if item.IsRefineScroll(srcItemVID):
  959. self.RefineItem(srcItemSlotPos, dstItemSlotPos)
  960. self.wndItem.SetUseMode(False)
  961.  
  962. elif item.IsMetin(srcItemVID):
  963. self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos)
  964.  
  965. elif item.IsDetachScroll(srcItemVID):
  966. self.DetachMetinFromItem(srcItemSlotPos, dstItemSlotPos)
  967.  
  968. elif item.IsKey(srcItemVID):
  969. self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)
  970.  
  971. elif (player.GetItemFlags(srcItemSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:
  972. self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)
  973.  
  974. elif item.GetUseType(srcItemVID) in self.USE_TYPE_TUPLE:
  975. self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)
  976.  
  977. else:
  978. #snd.PlaySound("sound/ui/drop.wav")
  979.  
  980. ## 이동시킨 곳이 장착 슬롯일 경우 아이템을 사용해서 장착 시킨다 - [levites]
  981. if player.IsEquipmentSlot(dstItemSlotPos):
  982.  
  983. ## 들고 있는 아이템이 장비일때만
  984. if item.IsEquipmentVID(srcItemVID):
  985. self.__UseItem(srcItemSlotPos)
  986.  
  987. else:
  988. self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos, 0)
  989. #net.SendItemMovePacket(srcItemSlotPos, dstItemSlotPos, 0)
  990.  
  991. def __SellItem(self, itemSlotPos):
  992. if not player.IsEquipmentSlot(itemSlotPos):
  993. self.sellingSlotNumber = itemSlotPos
  994. itemIndex = player.GetItemIndex(itemSlotPos)
  995. itemCount = player.GetItemCount(itemSlotPos)
  996.  
  997.  
  998. self.sellingSlotitemIndex = itemIndex
  999. self.sellingSlotitemCount = itemCount
  1000.  
  1001. item.SelectItem(itemIndex)
  1002. itemPrice = item.GetISellItemPrice()
  1003.  
  1004. if item.Is1GoldItem():
  1005. itemPrice = itemCount / itemPrice / 5
  1006. else:
  1007. itemPrice = itemPrice * itemCount / 5
  1008.  
  1009. item.GetItemName(itemIndex)
  1010. itemName = item.GetItemName()
  1011.  
  1012. self.questionDialog = uiCommon.QuestionDialog()
  1013. self.questionDialog.SetText(localeInfo.DO_YOU_SELL_ITEM(itemName, itemCount, itemPrice))
  1014. self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.SellItem))
  1015. self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
  1016. self.questionDialog.Open()
  1017. self.questionDialog.count = itemCount
  1018.  
  1019. # def OnRunMouseWheel(self, a):
  1020. # if a > 0:
  1021. # index = self.inventoryPageIndex-1
  1022. # if index < 0:
  1023. # self.inventoryPageIndex = 4
  1024. # index = 4
  1025. # else:
  1026. # self.inventoryPageIndex = index
  1027. # else:
  1028. # index = 1 + self.inventoryPageIndex
  1029. # if index > 4:
  1030. # self.inventoryPageIndex = 0
  1031. # index = 0
  1032. # else:
  1033. # self.inventoryPageIndex = index
  1034.  
  1035. # for i in xrange(5):
  1036. # self.inventoryTab[i].SetUp()
  1037.  
  1038. # self.inventoryTab[index].Down()
  1039.  
  1040. # self.RefreshBagSlotWindow()
  1041.  
  1042. def RefineItem(self, scrollSlotPos, targetSlotPos):
  1043.  
  1044. scrollIndex = player.GetItemIndex(scrollSlotPos)
  1045. targetIndex = player.GetItemIndex(targetSlotPos)
  1046.  
  1047. if player.REFINE_OK != player.CanRefine(scrollIndex, targetSlotPos):
  1048. return
  1049.  
  1050. ###########################################################
  1051. self.__SendUseItemToItemPacket(scrollSlotPos, targetSlotPos)
  1052. #net.SendItemUseToItemPacket(scrollSlotPos, targetSlotPos)
  1053. return
  1054. ###########################################################
  1055.  
  1056. ###########################################################
  1057. #net.SendRequestRefineInfoPacket(targetSlotPos)
  1058. #return
  1059. ###########################################################
  1060.  
  1061. result = player.CanRefine(scrollIndex, targetSlotPos)
  1062.  
  1063. if player.REFINE_ALREADY_MAX_SOCKET_COUNT == result:
  1064. #snd.PlaySound("sound/ui/jaeryun_fail.wav")
  1065. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_NO_MORE_SOCKET)
  1066.  
  1067. elif player.REFINE_NEED_MORE_GOOD_SCROLL == result:
  1068. #snd.PlaySound("sound/ui/jaeryun_fail.wav")
  1069. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_NEED_BETTER_SCROLL)
  1070.  
  1071. elif player.REFINE_CANT_MAKE_SOCKET_ITEM == result:
  1072. #snd.PlaySound("sound/ui/jaeryun_fail.wav")
  1073. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_SOCKET_DISABLE_ITEM)
  1074.  
  1075. elif player.REFINE_NOT_NEXT_GRADE_ITEM == result:
  1076. #snd.PlaySound("sound/ui/jaeryun_fail.wav")
  1077. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_UPGRADE_DISABLE_ITEM)
  1078.  
  1079. elif player.REFINE_CANT_REFINE_METIN_TO_EQUIPMENT == result:
  1080. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_EQUIP_ITEM)
  1081.  
  1082. if player.REFINE_OK != result:
  1083. return
  1084.  
  1085. self.refineDialog.Open(scrollSlotPos, targetSlotPos)
  1086.  
  1087. def DetachMetinFromItem(self, scrollSlotPos, targetSlotPos):
  1088. scrollIndex = player.GetItemIndex(scrollSlotPos)
  1089. targetIndex = player.GetItemIndex(targetSlotPos)
  1090. if app.ENABLE_SASH_SYSTEM:
  1091. if not player.CanDetach(scrollIndex, targetSlotPos):
  1092. item.SelectItem(scrollIndex)
  1093. if item.GetValue(0) == sash.CLEAN_ATTR_VALUE0:
  1094. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.SASH_FAILURE_CLEAN)
  1095. else:
  1096. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_METIN_INSEPARABLE_ITEM)
  1097.  
  1098. return
  1099. else:
  1100. if not player.CanDetach(scrollIndex, targetSlotPos):
  1101. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_METIN_INSEPARABLE_ITEM)
  1102. return
  1103.  
  1104. self.questionDialog = uiCommon.QuestionDialog()
  1105. self.questionDialog.SetText(localeInfo.REFINE_DO_YOU_SEPARATE_METIN)
  1106. if app.ENABLE_SASH_SYSTEM:
  1107. item.SelectItem(targetIndex)
  1108. if item.GetItemType() == item.ITEM_TYPE_COSTUME and item.GetItemSubType() == item.COSTUME_TYPE_SASH:
  1109. item.SelectItem(scrollIndex)
  1110. if item.GetValue(0) == sash.CLEAN_ATTR_VALUE0:
  1111. self.questionDialog.SetText(localeInfo.SASH_DO_YOU_CLEAN)
  1112.  
  1113. self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.OnDetachMetinFromItem))
  1114. self.questionDialog.SetCancelEvent(ui.__mem_func__(self.OnCloseQuestionDialog))
  1115. self.questionDialog.Open()
  1116. self.questionDialog.sourcePos = scrollSlotPos
  1117. self.questionDialog.targetPos = targetSlotPos
  1118.  
  1119. def AttachMetinToItem(self, metinSlotPos, targetSlotPos):
  1120. metinIndex = player.GetItemIndex(metinSlotPos)
  1121. targetIndex = player.GetItemIndex(targetSlotPos)
  1122.  
  1123. item.SelectItem(metinIndex)
  1124. itemName = item.GetItemName()
  1125.  
  1126. result = player.CanAttachMetin(metinIndex, targetSlotPos)
  1127.  
  1128. if player.ATTACH_METIN_NOT_MATCHABLE_ITEM == result:
  1129. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_CAN_NOT_ATTACH(itemName))
  1130.  
  1131. if player.ATTACH_METIN_NO_MATCHABLE_SOCKET == result:
  1132. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_NO_SOCKET(itemName))
  1133.  
  1134. elif player.ATTACH_METIN_NOT_EXIST_GOLD_SOCKET == result:
  1135. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_NO_GOLD_SOCKET(itemName))
  1136.  
  1137. elif player.ATTACH_METIN_CANT_ATTACH_TO_EQUIPMENT == result:
  1138. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.REFINE_FAILURE_EQUIP_ITEM)
  1139.  
  1140. if player.ATTACH_METIN_OK != result:
  1141. return
  1142.  
  1143. self.attachMetinDialog.Open(metinSlotPos, targetSlotPos)
  1144.  
  1145.  
  1146.  
  1147. def OverOutItem(self):
  1148. self.wndItem.SetUsableItem(False)
  1149. if None != self.tooltipItem:
  1150. self.tooltipItem.HideToolTip()
  1151.  
  1152. def OverInItem(self, overSlotPos):
  1153. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  1154. stat = 0
  1155. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(overSlotPos)
  1156. itemVnum = player.GetItemIndex(slotNumber)
  1157. if constInfo.IS_AUTO_POTION(itemVnum):
  1158. metinSocket = [player.GetItemMetinSocket(slotNumber, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
  1159. if slotNumber >= player.INVENTORY_PAGE_SIZE:
  1160. slotNumber -= player.INVENTORY_PAGE_SIZE
  1161.  
  1162. isActivated = 0 != metinSocket[0]
  1163. if isActivated:
  1164. stat = 1
  1165.  
  1166. if not stat:
  1167. if slotNumber in self.listHighlightedSlot:
  1168. self.wndItem.DeactivateSlot(overSlotPos)
  1169. try:
  1170. if app.ENABLE_SASH_SYSTEM:
  1171. if not slotNumber in self.listAttachedSashs:
  1172. self.listHighlightedSlot.remove(slotNumber)
  1173. else:
  1174. self.listHighlightedSlot.remove(slotNumber)
  1175. except:
  1176. pass
  1177.  
  1178. self.ShowToolTip(overSlotPos)
  1179.  
  1180. def __IsUsableItemToItem(self, srcItemVNum, srcSlotPos):
  1181. "다른 아이템에 사용할 수 있는 아이템인가?"
  1182.  
  1183. if item.IsRefineScroll(srcItemVNum):
  1184. return True
  1185. elif item.IsMetin(srcItemVNum):
  1186. return True
  1187. elif item.IsDetachScroll(srcItemVNum):
  1188. return True
  1189. elif item.IsKey(srcItemVNum):
  1190. return True
  1191. elif (player.GetItemFlags(srcSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:
  1192. return True
  1193. else:
  1194. if item.GetUseType(srcItemVNum) in self.USE_TYPE_TUPLE:
  1195. return True
  1196.  
  1197. return False
  1198.  
  1199. def __CanUseSrcItemToDstItem(self, srcItemVNum, srcSlotPos, dstSlotPos):
  1200. "대상 아이템에 사용할 수 있는가?"
  1201.  
  1202. if srcSlotPos == dstSlotPos:
  1203. return False
  1204.  
  1205. if item.IsRefineScroll(srcItemVNum):
  1206. if player.REFINE_OK == player.CanRefine(srcItemVNum, dstSlotPos):
  1207. return True
  1208. elif item.IsMetin(srcItemVNum):
  1209. if player.ATTACH_METIN_OK == player.CanAttachMetin(srcItemVNum, dstSlotPos):
  1210. return True
  1211. elif item.IsDetachScroll(srcItemVNum):
  1212. if player.DETACH_METIN_OK == player.CanDetach(srcItemVNum, dstSlotPos):
  1213. return True
  1214. elif item.IsKey(srcItemVNum):
  1215. if player.CanUnlock(srcItemVNum, dstSlotPos):
  1216. return True
  1217.  
  1218. elif (player.GetItemFlags(srcSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:
  1219. return True
  1220.  
  1221. else:
  1222. useType=item.GetUseType(srcItemVNum)
  1223.  
  1224. if "USE_CLEAN_SOCKET" == useType:
  1225. if self.__CanCleanBrokenMetinStone(dstSlotPos):
  1226. return True
  1227. elif "USE_CHANGE_ATTRIBUTE" == useType:
  1228. if self.__CanChangeItemAttrList(dstSlotPos):
  1229. return True
  1230. elif "USE_ADD_ATTRIBUTE" == useType:
  1231. if self.__CanAddItemAttr(dstSlotPos):
  1232. return True
  1233. elif "USE_ADD_ATTRIBUTE2" == useType:
  1234. if self.__CanAddItemAttr(dstSlotPos):
  1235. return True
  1236. elif "USE_ADD_ACCESSORY_SOCKET" == useType:
  1237. if self.__CanAddAccessorySocket(dstSlotPos):
  1238. return True
  1239. elif "USE_PUT_INTO_ACCESSORY_SOCKET" == useType:
  1240. if self.__CanPutAccessorySocket(dstSlotPos, srcItemVNum):
  1241. return True;
  1242. elif "USE_PUT_INTO_BELT_SOCKET" == useType:
  1243. dstItemVNum = player.GetItemIndex(dstSlotPos)
  1244. print "USE_PUT_INTO_BELT_SOCKET", srcItemVNum, dstItemVNum
  1245.  
  1246. item.SelectItem(dstItemVNum)
  1247.  
  1248. if item.ITEM_TYPE_BELT == item.GetItemType():
  1249. return True
  1250.  
  1251. return False
  1252.  
  1253. def __CanCleanBrokenMetinStone(self, dstSlotPos):
  1254. dstItemVNum = player.GetItemIndex(dstSlotPos)
  1255. if dstItemVNum == 0:
  1256. return False
  1257.  
  1258. item.SelectItem(dstItemVNum)
  1259.  
  1260. if item.ITEM_TYPE_WEAPON != item.GetItemType():
  1261. return False
  1262.  
  1263. for i in xrange(player.METIN_SOCKET_MAX_NUM):
  1264. if player.GetItemMetinSocket(dstSlotPos, i) == constInfo.ERROR_METIN_STONE:
  1265. return True
  1266.  
  1267. return False
  1268.  
  1269. def __CanChangeItemAttrList(self, dstSlotPos):
  1270. dstItemVNum = player.GetItemIndex(dstSlotPos)
  1271. if dstItemVNum == 0:
  1272. return False
  1273.  
  1274. item.SelectItem(dstItemVNum)
  1275.  
  1276. if not item.GetItemType() in (item.ITEM_TYPE_WEAPON, item.ITEM_TYPE_ARMOR):
  1277. return False
  1278.  
  1279. for i in xrange(player.METIN_SOCKET_MAX_NUM):
  1280. if player.GetItemAttribute(dstSlotPos, i) != 0:
  1281. return True
  1282.  
  1283. return False
  1284.  
  1285. def __CanPutAccessorySocket(self, dstSlotPos, mtrlVnum):
  1286. dstItemVNum = player.GetItemIndex(dstSlotPos)
  1287. if dstItemVNum == 0:
  1288. return False
  1289.  
  1290. item.SelectItem(dstItemVNum)
  1291.  
  1292. if item.GetItemType() != item.ITEM_TYPE_ARMOR:
  1293. return False
  1294.  
  1295. if not item.GetItemSubType() in (item.ARMOR_WRIST, item.ARMOR_NECK, item.ARMOR_EAR):
  1296. return False
  1297.  
  1298. curCount = player.GetItemMetinSocket(dstSlotPos, 0)
  1299. maxCount = player.GetItemMetinSocket(dstSlotPos, 1)
  1300.  
  1301. if mtrlVnum != constInfo.GET_ACCESSORY_MATERIAL_VNUM(dstItemVNum, item.GetItemSubType()):
  1302. return False
  1303.  
  1304. if curCount>=maxCount:
  1305. return False
  1306.  
  1307. return True
  1308.  
  1309. def __CanAddAccessorySocket(self, dstSlotPos):
  1310. dstItemVNum = player.GetItemIndex(dstSlotPos)
  1311. if dstItemVNum == 0:
  1312. return False
  1313.  
  1314. item.SelectItem(dstItemVNum)
  1315.  
  1316. if item.GetItemType() != item.ITEM_TYPE_ARMOR:
  1317. return False
  1318.  
  1319. if not item.GetItemSubType() in (item.ARMOR_WRIST, item.ARMOR_NECK, item.ARMOR_EAR):
  1320. return False
  1321.  
  1322. curCount = player.GetItemMetinSocket(dstSlotPos, 0)
  1323. maxCount = player.GetItemMetinSocket(dstSlotPos, 1)
  1324.  
  1325. ACCESSORY_SOCKET_MAX_SIZE = 3
  1326. if maxCount >= ACCESSORY_SOCKET_MAX_SIZE:
  1327. return False
  1328.  
  1329. return True
  1330.  
  1331. def __CanAddItemAttr(self, dstSlotPos):
  1332. dstItemVNum = player.GetItemIndex(dstSlotPos)
  1333. if dstItemVNum == 0:
  1334. return False
  1335.  
  1336. item.SelectItem(dstItemVNum)
  1337.  
  1338. if not item.GetItemType() in (item.ITEM_TYPE_WEAPON, item.ITEM_TYPE_ARMOR):
  1339. return False
  1340.  
  1341. attrCount = 0
  1342. for i in xrange(player.METIN_SOCKET_MAX_NUM):
  1343. if player.GetItemAttribute(dstSlotPos, i) != 0:
  1344. attrCount += 1
  1345.  
  1346. if attrCount<4:
  1347. return True
  1348.  
  1349. return False
  1350.  
  1351. def ShowToolTip(self, slotIndex):
  1352. if None != self.tooltipItem:
  1353. self.tooltipItem.SetInventoryItem(slotIndex)
  1354.  
  1355. def OnTop(self):
  1356. if None != self.tooltipItem:
  1357. self.tooltipItem.SetTop()
  1358. if app.WJ_ENABLE_TRADABLE_ICON:
  1359. map(lambda wnd:wnd.RefreshLockedSlot(), self.bindWnds)
  1360. self.RefreshMarkSlots()
  1361.  
  1362. def OnPressEscapeKey(self):
  1363. self.Close()
  1364. return True
  1365.  
  1366. def UseItemSlot(self, slotIndex):
  1367.  
  1368. curCursorNum = app.GetCursor()
  1369. if app.SELL == curCursorNum:
  1370. return
  1371.  
  1372. if constInfo.GET_ITEM_DROP_QUESTION_DIALOG_STATUS():
  1373. return
  1374.  
  1375. slotIndex = self.__InventoryLocalSlotPosToGlobalSlotPos(slotIndex)
  1376.  
  1377. if app.ENABLE_QUICK_SELL:
  1378. import shop
  1379. if app.IsPressed(app.DIK_LSHIFT) or app.IsPressed(app.DIK_RSHIFT):
  1380. if shop.IsOpen():
  1381. if not shop.IsPrivateShop():
  1382. self.QuickSellItem(slotIndex)
  1383. return
  1384.  
  1385. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1386. if self.wndDragonSoulRefine.IsShow():
  1387. self.wndDragonSoulRefine.AutoSetItem((player.INVENTORY, slotIndex), 1)
  1388. return
  1389.  
  1390. if app.ENABLE_SASH_SYSTEM:
  1391. if self.isShowSashWindow():
  1392. sash.Add(player.INVENTORY, slotIndex, 255)
  1393. return
  1394.  
  1395. if app.ITEM_CHECKINOUT_UPDATE:
  1396. if self.wndSafeBox.IsShow() and slotIndex < player.EQUIPMENT_SLOT_START:
  1397. net.SendSafeboxCheckinPacket(slotIndex)
  1398. return
  1399. if exchange.isTrading() and slotIndex < player.EQUIPMENT_SLOT_START:
  1400. net.SendExchangeItemAddPacket(player.INVENTORY, slotIndex, -1)
  1401. return
  1402.  
  1403. self.__UseItem(slotIndex)
  1404. mouseModule.mouseController.DeattachObject()
  1405. self.OverOutItem()
  1406.  
  1407. def __UseItem(self, slotIndex):
  1408. ItemVNum = player.GetItemIndex(slotIndex)
  1409. item.SelectItem(ItemVNum)
  1410. if item.IsFlag(item.ITEM_FLAG_CONFIRM_WHEN_USE):
  1411. self.questionDialog = uiCommon.QuestionDialog()
  1412. self.questionDialog.SetText(localeInfo.INVENTORY_REALLY_USE_ITEM)
  1413. self.questionDialog.SetAcceptEvent(ui.__mem_func__(self.__UseItemQuestionDialog_OnAccept))
  1414. self.questionDialog.SetCancelEvent(ui.__mem_func__(self.__UseItemQuestionDialog_OnCancel))
  1415. self.questionDialog.Open()
  1416. self.questionDialog.slotIndex = slotIndex
  1417.  
  1418. else:
  1419. self.__SendUseItemPacket(slotIndex)
  1420.  
  1421. def __UseItemQuestionDialog_OnCancel(self):
  1422. self.OnCloseQuestionDialog()
  1423.  
  1424. def __UseItemQuestionDialog_OnAccept(self):
  1425. self.__SendUseItemPacket(self.questionDialog.slotIndex)
  1426.  
  1427. if self.questionDialog:
  1428. self.questionDialog.Close()
  1429. self.questionDialog = None
  1430.  
  1431. def __SendUseItemToItemPacket(self, srcSlotPos, dstSlotPos):
  1432. # 개인상점 열고 있는 동안 아이템 사용 방지
  1433. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1434. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_ITEM_FAILURE_PRIVATE_SHOP)
  1435. return
  1436.  
  1437. net.SendItemUseToItemPacket(srcSlotPos, dstSlotPos)
  1438.  
  1439. def __SendUseItemPacket(self, slotPos):
  1440. # 개인상점 열고 있는 동안 아이템 사용 방지
  1441. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1442. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.USE_ITEM_FAILURE_PRIVATE_SHOP)
  1443. return
  1444.  
  1445. net.SendItemUsePacket(slotPos)
  1446.  
  1447. def __SendMoveItemPacket(self, srcSlotPos, dstSlotPos, srcItemCount):
  1448. # 개인상점 열고 있는 동안 아이템 사용 방지
  1449. if uiPrivateShopBuilder.IsBuildingPrivateShop():
  1450. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.MOVE_ITEM_FAILURE_PRIVATE_SHOP)
  1451. return
  1452.  
  1453. net.SendItemMovePacket(srcSlotPos, dstSlotPos, srcItemCount)
  1454.  
  1455. def SetDragonSoulRefineWindow(self, wndDragonSoulRefine):
  1456. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1457. self.wndDragonSoulRefine = wndDragonSoulRefine
  1458.  
  1459. if app.ENABLE_SASH_SYSTEM:
  1460. def SetSashWindow(self, wndSashCombine, wndSashAbsorption):
  1461. self.wndSashCombine = wndSashCombine
  1462. self.wndSashAbsorption = wndSashAbsorption
  1463.  
  1464. def isShowSashWindow(self):
  1465. if self.wndSashCombine:
  1466. if self.wndSashCombine.IsShow():
  1467. return 1
  1468.  
  1469. if self.wndSashAbsorption:
  1470. if self.wndSashAbsorption.IsShow():
  1471. return 1
  1472.  
  1473. return 0
  1474.  
  1475. if app.ITEM_CHECKINOUT_UPDATE:
  1476. def SetSafeboxWindow(self, wndSafeBox):
  1477. self.wndSafeBox = wndSafeBox
  1478.  
  1479. def OnMoveWindow(self, x, y):
  1480. if self.wndBelt:
  1481. self.wndBelt.AdjustPositionAndSize()
  1482.  
  1483. if app.BL_ENABLE_PICKUP_ITEM_EFFECT:
  1484. def ActivateSlot(self, slotindex, type):
  1485. if type == wndMgr.HILIGHTSLOT_MAX:
  1486. return
  1487.  
  1488. def DeactivateSlot(self, slotindex, type):
  1489. if type == wndMgr.HILIGHTSLOT_MAX:
  1490. return
  1491.  
  1492. def __HighlightSlot_Refresh(self):
  1493. for i in xrange(self.wndItem.GetSlotCount()):
  1494. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
  1495. if slotNumber in self.listHighlightedSlot:
  1496. self.wndItem.ActivateSlot(i)
  1497. # self.wndItem.SetSlotDiffuseColor(i, wndMgr.COLOR_TYPE_YELLOW)
  1498. # self.wndItem.SetSlotFlashEffect(i, True)
  1499.  
  1500. def __HighlightSlot_Clear(self):
  1501. for i in xrange(self.wndItem.GetSlotCount()):
  1502. slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(i)
  1503. if slotNumber in self.listHighlightedSlot:
  1504. self.wndItem.DeactivateSlot(i)
  1505. self.listHighlightedSlot.remove(slotNumber)
  1506.  
  1507. def HighlightSlot(self, slot):
  1508. if slot>player.INVENTORY_PAGE_SIZE*player.INVENTORY_PAGE_COUNT:
  1509. return
  1510.  
  1511. if not slot in self.listHighlightedSlot:
  1512. self.listHighlightedSlot.append (slot)
  1513.  
  1514. def DelHighlightSlot(self, inventorylocalslot):
  1515. if inventorylocalslot in self.listHighlightedSlot:
  1516. if inventorylocalslot >= player.INVENTORY_PAGE_SIZE:
  1517. self.wndItem.DeactivateSlot(inventorylocalslot - (self.inventoryPageIndex * player.INVENTORY_PAGE_SIZE) )
  1518. else:
  1519. self.wndItem.DeactivateSlot(inventorylocalslot)
  1520.  
  1521. self.listHighlightedSlot.remove(inventorylocalslot)
Advertisement
Add Comment
Please, Sign In to add comment