Advertisement
Guest User

Untitled

a guest
Dec 8th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 72.04 KB | None | 0 0
  1. ##
  2. ## Interface
  3. ##
  4. import constInfo
  5. import systemSetting
  6. import wndMgr
  7. import chat
  8. import app
  9. import player
  10. import uiTaskBar
  11. import uiCharacter
  12. import uiInventory
  13. import uiDragonSoul
  14. import uiChat
  15. import uiMessenger
  16. import guild
  17.  
  18. import ui
  19. import uiHelp
  20. import uiWhisper
  21. import uiPointReset
  22. import uiShop
  23. import uiExchange
  24. import uiSystem
  25. import uiRestart
  26. import uiToolTip
  27. import uiMiniMap
  28. import uiParty
  29. import uiSafebox
  30. import uiGuild
  31. import uiQuest
  32. import uiPrivateShopBuilder
  33. import uiCommon
  34. import uiRefine
  35. import uiEquipmentDialog
  36. import uiGameButton
  37. import uiTip
  38. import uiCube
  39. import miniMap
  40. # ACCESSORY_REFINE_ADD_METIN_STONE
  41. import uiselectitem
  42. # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
  43. import uiScriptLocale
  44.  
  45. import event
  46. import localeInfo
  47. if app.ENABLE_SASH_SYSTEM:
  48. import uisash
  49.  
  50. if app.ENABLE_CHANGELOOK_SYSTEM:
  51. import uichangelook
  52.  
  53. IsQBHide = 0
  54. class Interface(object):
  55. CHARACTER_STATUS_TAB = 1
  56. CHARACTER_SKILL_TAB = 2
  57.  
  58. def __init__(self):
  59. systemSetting.SetInterfaceHandler(self)
  60. self.windowOpenPosition = 0
  61. self.dlgWhisperWithoutTarget = None
  62. self.inputDialog = None
  63. self.tipBoard = None
  64. self.bigBoard = None
  65. self.wndGiftBox = None
  66. # ITEM_MALL
  67. self.mallPageDlg = None
  68. # END_OF_ITEM_MALL
  69.  
  70. self.wndWeb = None
  71. self.wndTaskBar = None
  72. self.wndCharacter = None
  73. self.wndInventory = None
  74. self.wndExpandedTaskBar = None
  75. self.wndDragonSoul = None
  76. self.wndDragonSoulRefine = None
  77. self.wndChat = None
  78. self.wndMessenger = None
  79. self.wndMiniMap = None
  80. self.wndGuild = None
  81. self.wndGuildBuilding = None
  82.  
  83. self.listGMName = {}
  84. self.wndQuestWindow = {}
  85. self.wndQuestWindowNewKey = 0
  86. self.privateShopAdvertisementBoardDict = {}
  87. self.guildScoreBoardDict = {}
  88. self.equipmentDialogDict = {}
  89. event.SetInterfaceWindow(self)
  90.  
  91. def __OnClickGiftButton(self):
  92. if self.wndGameButton:
  93. if not self.wndGiftBox.IsShow():
  94. self.wndGiftBox.Open()
  95. else:
  96. self.wndGiftBox.Close()
  97.  
  98. def ClearGift(self):
  99. if self.wndGameButton:
  100. self.wndGameButton.HideGiftButton()
  101. if self.wndGiftBox:
  102. self.wndGiftBox.Clear()
  103. self.wndGiftBox.Refresh()
  104.  
  105. def __del__(self):
  106. systemSetting.DestroyInterfaceHandler()
  107. event.SetInterfaceWindow(None)
  108.  
  109. def SetStream(self, stream):
  110. self.stream = stream
  111.  
  112. ################################
  113. ## Make Windows & Dialogs
  114. def __MakeUICurtain(self):
  115. wndUICurtain = ui.Bar("TOP_MOST")
  116. wndUICurtain.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight())
  117. wndUICurtain.SetColor(0x77000000)
  118. wndUICurtain.Hide()
  119. self.wndUICurtain = wndUICurtain
  120.  
  121. def __MakeMessengerWindow(self):
  122. self.wndMessenger = uiMessenger.MessengerWindow()
  123.  
  124. from _weakref import proxy
  125. self.wndMessenger.SetWhisperButtonEvent(lambda n,i=proxy(self):i.OpenWhisperDialog(n))
  126. self.wndMessenger.SetGuildButtonEvent(ui.__mem_func__(self.ToggleGuildWindow))
  127.  
  128. def __MakeGuildWindow(self):
  129. self.wndGuild = uiGuild.GuildWindow()
  130.  
  131. def __MakeChatWindow(self):
  132.  
  133. wndChat = uiChat.ChatWindow()
  134.  
  135. wndChat.SetSize(wndChat.CHAT_WINDOW_WIDTH, 0)
  136. wndChat.SetPosition(wndMgr.GetScreenWidth()/2 - wndChat.CHAT_WINDOW_WIDTH/2, wndMgr.GetScreenHeight() - wndChat.EDIT_LINE_HEIGHT - 37)
  137. wndChat.SetHeight(200)
  138. wndChat.Refresh()
  139. wndChat.Show()
  140.  
  141. self.wndChat = wndChat
  142. self.wndChat.BindInterface(self)
  143. self.wndChat.SetSendWhisperEvent(ui.__mem_func__(self.OpenWhisperDialogWithoutTarget))
  144. self.wndChat.SetOpenChatLogEvent(ui.__mem_func__(self.ToggleChatLogWindow))
  145.  
  146. def __MakeTaskBar(self):
  147. wndTaskBar = uiTaskBar.TaskBar()
  148. wndTaskBar.LoadWindow()
  149. self.wndTaskBar = wndTaskBar
  150. self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_CHARACTER, ui.__mem_func__(self.ToggleCharacterWindowStatusPage))
  151. self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_INVENTORY, ui.__mem_func__(self.ToggleInventoryWindow))
  152. self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_MESSENGER, ui.__mem_func__(self.ToggleMessenger))
  153. self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_SYSTEM, ui.__mem_func__(self.ToggleSystemDialog))
  154. if uiTaskBar.TaskBar.IS_EXPANDED:
  155. self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_EXPAND, ui.__mem_func__(self.ToggleExpandedButton))
  156. self.wndExpandedTaskBar = uiTaskBar.ExpandedTaskBar()
  157. self.wndExpandedTaskBar.LoadWindow()
  158. self.wndExpandedTaskBar.SetToggleButtonEvent(uiTaskBar.ExpandedTaskBar.BUTTON_DRAGON_SOUL, ui.__mem_func__(self.ToggleDragonSoulWindow))
  159. self.wndExpandedTaskBar.SetToggleButtonEvent(uiTaskBar.ExpandedTaskBar.BUTTON_PET_GUI, ui.__mem_func__(self.TogglePetMain))
  160.  
  161. else:
  162. self.wndTaskBar.SetToggleButtonEvent(uiTaskBar.TaskBar.BUTTON_CHAT, ui.__mem_func__(self.ToggleChat))
  163.  
  164. self.wndEnergyBar = None
  165. import app
  166. if app.ENABLE_ENERGY_SYSTEM:
  167. wndEnergyBar = uiTaskBar.EnergyBar()
  168. wndEnergyBar.LoadWindow()
  169. self.wndEnergyBar = wndEnergyBar
  170.  
  171. import uiGift
  172. wndGiftBox=uiGift.GiftDialog()
  173. wndGiftBox.Hide()
  174. self.wndGiftBox=wndGiftBox
  175.  
  176. def __MakeParty(self):
  177. wndParty = uiParty.PartyWindow()
  178. wndParty.Hide()
  179. self.wndParty = wndParty
  180.  
  181. def __MakeGameButtonWindow(self):
  182. wndGameButton = uiGameButton.GameButtonWindow()
  183. wndGameButton.SetTop()
  184. wndGameButton.Show()
  185. wndGameButton.SetButtonEvent("STATUS", ui.__mem_func__(self.__OnClickStatusPlusButton))
  186. wndGameButton.SetButtonEvent("SKILL", ui.__mem_func__(self.__OnClickSkillPlusButton))
  187. wndGameButton.SetButtonEvent("QUEST", ui.__mem_func__(self.__OnClickQuestButton))
  188. wndGameButton.SetButtonEvent("HELP", ui.__mem_func__(self.__OnClickHelpButton))
  189. wndGameButton.SetButtonEvent("BUILD", ui.__mem_func__(self.__OnClickBuildButton))
  190. wndGameButton.SetButtonEvent("GIFT", ui.__mem_func__(self.__OnClickGiftButton))
  191.  
  192. self.wndGameButton = wndGameButton
  193.  
  194. def __IsChatOpen(self):
  195. return True
  196.  
  197. def __MakeWindows(self):
  198. wndCharacter = uiCharacter.CharacterWindow()
  199. wndInventory = uiInventory.InventoryWindow()
  200. wndInventory.BindInterfaceClass(self)
  201. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  202. wndDragonSoul = uiDragonSoul.DragonSoulWindow()
  203. wndDragonSoulRefine = uiDragonSoul.DragonSoulRefineWindow()
  204. else:
  205. wndDragonSoul = None
  206. wndDragonSoulRefine = None
  207.  
  208. wndMiniMap = uiMiniMap.MiniMap()
  209. wndSafebox = uiSafebox.SafeboxWindow()
  210.  
  211. # ITEM_MALL
  212. wndMall = uiSafebox.MallWindow()
  213. self.wndMall = wndMall
  214. # END_OF_ITEM_MALL
  215.  
  216. wndChatLog = uiChat.ChatLogWindow()
  217. wndChatLog.BindInterface(self)
  218.  
  219. self.wndCharacter = wndCharacter
  220. self.wndInventory = wndInventory
  221. self.wndDragonSoul = wndDragonSoul
  222. self.wndDragonSoulRefine = wndDragonSoulRefine
  223. self.wndMiniMap = wndMiniMap
  224. self.wndSafebox = wndSafebox
  225. self.wndChatLog = wndChatLog
  226.  
  227. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  228. self.wndDragonSoul.SetDragonSoulRefineWindow(self.wndDragonSoulRefine)
  229. self.wndDragonSoulRefine.SetInventoryWindows(self.wndInventory, self.wndDragonSoul)
  230. self.wndInventory.SetDragonSoulRefineWindow(self.wndDragonSoulRefine)
  231.  
  232. def __MakeDialogs(self):
  233. self.dlgExchange = uiExchange.ExchangeDialog()
  234. self.dlgExchange.LoadDialog()
  235. self.dlgExchange.SetCenterPosition()
  236. self.dlgExchange.Hide()
  237.  
  238. self.dlgPointReset = uiPointReset.PointResetDialog()
  239. self.dlgPointReset.LoadDialog()
  240. self.dlgPointReset.Hide()
  241.  
  242. self.dlgShop = uiShop.ShopDialog()
  243. self.dlgShop.LoadDialog()
  244. self.dlgShop.Hide()
  245.  
  246. self.dlgRestart = uiRestart.RestartDialog()
  247. self.dlgRestart.LoadDialog()
  248. self.dlgRestart.Hide()
  249.  
  250. self.dlgSystem = uiSystem.SystemDialog(self.stream)
  251. self.dlgSystem.LoadDialog()
  252. self.dlgSystem.SetOpenHelpWindowEvent(ui.__mem_func__(self.OpenHelpWindow))
  253.  
  254. self.dlgSystem.Hide()
  255.  
  256. self.dlgPassword = uiSafebox.PasswordDialog()
  257. self.dlgPassword.Hide()
  258.  
  259. self.hyperlinkItemTooltip = uiToolTip.HyperlinkItemToolTip()
  260. self.hyperlinkItemTooltip.Hide()
  261.  
  262. self.tooltipItem = uiToolTip.ItemToolTip()
  263. self.tooltipItem.Hide()
  264.  
  265. self.tooltipSkill = uiToolTip.SkillToolTip()
  266. self.tooltipSkill.Hide()
  267.  
  268. self.privateShopBuilder = uiPrivateShopBuilder.PrivateShopBuilder()
  269. self.privateShopBuilder.Hide()
  270.  
  271. self.dlgRefineNew = uiRefine.RefineDialogNew()
  272. self.dlgRefineNew.Hide()
  273.  
  274. def __MakeHelpWindow(self):
  275. self.wndHelp = uiHelp.HelpWindow()
  276. self.wndHelp.LoadDialog()
  277. self.wndHelp.SetCloseEvent(ui.__mem_func__(self.CloseHelpWindow))
  278. self.wndHelp.Hide()
  279.  
  280. def __MakeTipBoard(self):
  281. self.tipBoard = uiTip.TipBoard()
  282. self.tipBoard.Hide()
  283.  
  284. self.bigBoard = uiTip.BigBoard()
  285. self.bigBoard.Hide()
  286.  
  287. def __MakeWebWindow(self):
  288. if constInfo.IN_GAME_SHOP_ENABLE:
  289. import uiWeb
  290. self.wndWeb = uiWeb.WebWindow()
  291. self.wndWeb.LoadWindow()
  292. self.wndWeb.Hide()
  293.  
  294. if app.ENABLE_SASH_SYSTEM:
  295. def __MakeSashWindow(self):
  296. self.wndSashCombine = uisash.CombineWindow()
  297. self.wndSashCombine.LoadWindow()
  298. self.wndSashCombine.Hide()
  299.  
  300. self.wndSashAbsorption = uisash.AbsorbWindow()
  301. self.wndSashAbsorption.LoadWindow()
  302. self.wndSashAbsorption.Hide()
  303.  
  304. if self.wndInventory:
  305. self.wndInventory.SetSashWindow(self.wndSashCombine, self.wndSashAbsorption)
  306.  
  307. if app.ENABLE_CHANGELOOK_SYSTEM:
  308. def __MakeChangeLookWindow(self):
  309. self.wndChangeLook = uichangelook.Window()
  310. self.wndChangeLook.LoadWindow()
  311. self.wndChangeLook.Hide()
  312.  
  313. if self.wndInventory:
  314. self.wndInventory.SetChangeLookWindow(self.wndChangeLook)
  315.  
  316. def __MakeCubeWindow(self):
  317. self.wndCube = uiCube.CubeWindow()
  318. self.wndCube.LoadWindow()
  319. self.wndCube.Hide()
  320.  
  321. def __MakeCubeResultWindow(self):
  322. self.wndCubeResult = uiCube.CubeResultWindow()
  323. self.wndCubeResult.LoadWindow()
  324. self.wndCubeResult.Hide()
  325.  
  326. # ACCESSORY_REFINE_ADD_METIN_STONE
  327. def __MakeItemSelectWindow(self):
  328. self.wndItemSelect = uiselectitem.SelectItemWindow()
  329. self.wndItemSelect.Hide()
  330. # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
  331.  
  332. def MakeInterface(self):
  333. self.__MakeMessengerWindow()
  334. self.__MakeGuildWindow()
  335. self.__MakeChatWindow()
  336. self.__MakeParty()
  337. self.__MakeWindows()
  338. self.__MakeDialogs()
  339.  
  340. self.__MakeUICurtain()
  341. self.__MakeTaskBar()
  342. self.__MakeGameButtonWindow()
  343. self.__MakeHelpWindow()
  344. self.__MakeTipBoard()
  345. self.__MakeWebWindow()
  346. if app.ENABLE_SASH_SYSTEM:
  347. self.__MakeSashWindow()
  348. if app.ENABLE_CHANGELOOK_SYSTEM:
  349. self.__MakeChangeLookWindow()
  350. self.__MakeCubeWindow()
  351. self.__MakeCubeResultWindow()
  352.  
  353.  
  354. # ACCESSORY_REFINE_ADD_METIN_STONE
  355. self.__MakeItemSelectWindow()
  356. # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
  357.  
  358. self.questButtonList = []
  359. self.whisperButtonList = []
  360. self.whisperDialogDict = {}
  361. self.privateShopAdvertisementBoardDict = {}
  362.  
  363. self.wndInventory.SetItemToolTip(self.tooltipItem)
  364. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  365. self.wndDragonSoul.SetItemToolTip(self.tooltipItem)
  366. self.wndDragonSoulRefine.SetItemToolTip(self.tooltipItem)
  367. self.wndSafebox.SetItemToolTip(self.tooltipItem)
  368. if app.ENABLE_SASH_SYSTEM:
  369. self.wndSashCombine.SetItemToolTip(self.tooltipItem)
  370. self.wndSashAbsorption.SetItemToolTip(self.tooltipItem)
  371. if app.ENABLE_CHANGELOOK_SYSTEM:
  372. self.wndChangeLook.SetItemToolTip(self.tooltipItem)
  373. self.wndCube.SetItemToolTip(self.tooltipItem)
  374. self.wndCubeResult.SetItemToolTip(self.tooltipItem)
  375.  
  376. # ITEM_MALL
  377. self.wndMall.SetItemToolTip(self.tooltipItem)
  378. # END_OF_ITEM_MALL
  379.  
  380. self.wndCharacter.SetSkillToolTip(self.tooltipSkill)
  381. self.wndTaskBar.SetItemToolTip(self.tooltipItem)
  382. self.wndTaskBar.SetSkillToolTip(self.tooltipSkill)
  383. self.wndGuild.SetSkillToolTip(self.tooltipSkill)
  384.  
  385. # ACCESSORY_REFINE_ADD_METIN_STONE
  386. self.wndItemSelect.SetItemToolTip(self.tooltipItem)
  387. # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
  388.  
  389. self.dlgShop.SetItemToolTip(self.tooltipItem)
  390. self.dlgExchange.SetItemToolTip(self.tooltipItem)
  391. self.privateShopBuilder.SetItemToolTip(self.tooltipItem)
  392.  
  393. self.__InitWhisper()
  394. self.DRAGON_SOUL_IS_QUALIFIED = False
  395.  
  396. def MakeHyperlinkTooltip(self, hyperlink):
  397. tokens = hyperlink.split(":")
  398. if tokens and len(tokens):
  399. type = tokens[0]
  400. if "item" == type:
  401. self.hyperlinkItemTooltip.SetHyperlinkItem(tokens)
  402.  
  403. ## Make Windows & Dialogs
  404. ################################
  405.  
  406. def Close(self):
  407. if self.dlgWhisperWithoutTarget:
  408. self.dlgWhisperWithoutTarget.Destroy()
  409. del self.dlgWhisperWithoutTarget
  410.  
  411. if uiQuest.QuestDialog.__dict__.has_key("QuestCurtain"):
  412. uiQuest.QuestDialog.QuestCurtain.Close()
  413.  
  414. if self.wndQuestWindow:
  415. for key, eachQuestWindow in self.wndQuestWindow.items():
  416. eachQuestWindow.nextCurtainMode = -1
  417. eachQuestWindow.CloseSelf()
  418. eachQuestWindow = None
  419. self.wndQuestWindow = {}
  420.  
  421. if self.wndChat:
  422. self.wndChat.Destroy()
  423.  
  424. if self.wndTaskBar:
  425. self.wndTaskBar.Destroy()
  426.  
  427. if self.wndExpandedTaskBar:
  428. self.wndExpandedTaskBar.Destroy()
  429.  
  430. if self.wndEnergyBar:
  431. self.wndEnergyBar.Destroy()
  432.  
  433. if self.wndCharacter:
  434. self.wndCharacter.Destroy()
  435.  
  436. if self.wndInventory:
  437. self.wndInventory.Destroy()
  438.  
  439. if self.wndDragonSoul:
  440. self.wndDragonSoul.Destroy()
  441.  
  442. if self.wndDragonSoulRefine:
  443. self.wndDragonSoulRefine.Destroy()
  444.  
  445. if self.dlgExchange:
  446. self.dlgExchange.Destroy()
  447.  
  448. if self.dlgPointReset:
  449. self.dlgPointReset.Destroy()
  450.  
  451. if self.dlgShop:
  452. self.dlgShop.Destroy()
  453.  
  454. if self.dlgRestart:
  455. self.dlgRestart.Destroy()
  456.  
  457. if self.dlgSystem:
  458. self.dlgSystem.Destroy()
  459.  
  460. if self.dlgPassword:
  461. self.dlgPassword.Destroy()
  462.  
  463. if self.wndMiniMap:
  464. self.wndMiniMap.Destroy()
  465.  
  466. if self.wndSafebox:
  467. self.wndSafebox.Destroy()
  468.  
  469. if self.wndWeb:
  470. self.wndWeb.Destroy()
  471. self.wndWeb = None
  472.  
  473. if self.wndMall:
  474. self.wndMall.Destroy()
  475.  
  476. if self.wndParty:
  477. self.wndParty.Destroy()
  478.  
  479. if self.wndHelp:
  480. self.wndHelp.Destroy()
  481.  
  482. if app.ENABLE_SASH_SYSTEM:
  483. if self.wndSashCombine:
  484. self.wndSashCombine.Destroy()
  485.  
  486. if self.wndSashAbsorption:
  487. self.wndSashAbsorption.Destroy()
  488.  
  489. if app.ENABLE_CHANGELOOK_SYSTEM:
  490. if self.wndChangeLook:
  491. self.wndChangeLook.Destroy()
  492.  
  493. if self.wndCube:
  494. self.wndCube.Destroy()
  495.  
  496. if self.wndCubeResult:
  497. self.wndCubeResult.Destroy()
  498.  
  499. if self.wndMessenger:
  500. self.wndMessenger.Destroy()
  501.  
  502. if self.wndGuild:
  503. self.wndGuild.Destroy()
  504.  
  505. if self.privateShopBuilder:
  506. self.privateShopBuilder.Destroy()
  507.  
  508. if self.dlgRefineNew:
  509. self.dlgRefineNew.Destroy()
  510.  
  511. if self.wndGuildBuilding:
  512. self.wndGuildBuilding.Destroy()
  513.  
  514. if self.wndGameButton:
  515. self.wndGameButton.Destroy()
  516.  
  517. # ITEM_MALL
  518. if self.mallPageDlg:
  519. self.mallPageDlg.Destroy()
  520. # END_OF_ITEM_MALL
  521.  
  522. # ACCESSORY_REFINE_ADD_METIN_STONE
  523. if self.wndItemSelect:
  524. self.wndItemSelect.Destroy()
  525. # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
  526.  
  527. if self.wndGiftBox:
  528. self.wndGiftBox.Clear()
  529. self.wndGiftBox.Hide()
  530. self.wndGiftBox.Destroy()
  531. del self.wndGiftBox
  532.  
  533. self.wndChatLog.Destroy()
  534. for btn in self.questButtonList:
  535. btn.SetEvent(0)
  536. for btn in self.whisperButtonList:
  537. btn.SetEvent(0)
  538. for dlg in self.whisperDialogDict.itervalues():
  539. dlg.Destroy()
  540. for brd in self.guildScoreBoardDict.itervalues():
  541. brd.Destroy()
  542. for dlg in self.equipmentDialogDict.itervalues():
  543. dlg.Destroy()
  544.  
  545. # ITEM_MALL
  546. del self.mallPageDlg
  547. # END_OF_ITEM_MALL
  548.  
  549. del self.wndGuild
  550. del self.wndMessenger
  551. del self.wndUICurtain
  552. del self.wndChat
  553. del self.wndTaskBar
  554. if self.wndExpandedTaskBar:
  555. del self.wndExpandedTaskBar
  556. del self.wndEnergyBar
  557. del self.wndCharacter
  558. del self.wndInventory
  559. if self.wndDragonSoul:
  560. del self.wndDragonSoul
  561. if self.wndDragonSoulRefine:
  562. del self.wndDragonSoulRefine
  563. del self.dlgExchange
  564. del self.dlgPointReset
  565. del self.dlgShop
  566. del self.dlgRestart
  567. del self.dlgSystem
  568. del self.dlgPassword
  569. del self.hyperlinkItemTooltip
  570. del self.tooltipItem
  571. del self.tooltipSkill
  572. del self.wndMiniMap
  573. del self.wndSafebox
  574. del self.wndMall
  575. del self.wndParty
  576. del self.wndHelp
  577. if app.ENABLE_SASH_SYSTEM:
  578. del self.wndSashCombine
  579. del self.wndSashAbsorption
  580. if app.ENABLE_CHANGELOOK_SYSTEM:
  581. del self.wndChangeLook
  582. del self.wndCube
  583. del self.wndCubeResult
  584. del self.privateShopBuilder
  585. del self.inputDialog
  586. del self.wndChatLog
  587. del self.dlgRefineNew
  588. del self.wndGuildBuilding
  589. del self.wndGameButton
  590. del self.tipBoard
  591. del self.bigBoard
  592. del self.wndItemSelect
  593.  
  594. self.questButtonList = []
  595. self.whisperButtonList = []
  596. self.whisperDialogDict = {}
  597. self.privateShopAdvertisementBoardDict = {}
  598. self.guildScoreBoardDict = {}
  599. self.equipmentDialogDict = {}
  600.  
  601. uiChat.DestroyChatInputSetWindow()
  602.  
  603. def OpenGift(self):
  604. if self.wndGameButton:
  605. self.wndGameButton.ShowGiftButton()
  606.  
  607. ## Skill
  608. def OnUseSkill(self, slotIndex, coolTime):
  609. self.wndCharacter.OnUseSkill(slotIndex, coolTime)
  610. self.wndTaskBar.OnUseSkill(slotIndex, coolTime)
  611. self.wndGuild.OnUseSkill(slotIndex, coolTime)
  612.  
  613. def OnActivateSkill(self, slotIndex):
  614. self.wndCharacter.OnActivateSkill(slotIndex)
  615. self.wndTaskBar.OnActivateSkill(slotIndex)
  616.  
  617. def OnDeactivateSkill(self, slotIndex):
  618. self.wndCharacter.OnDeactivateSkill(slotIndex)
  619. self.wndTaskBar.OnDeactivateSkill(slotIndex)
  620.  
  621. def OnChangeCurrentSkill(self, skillSlotNumber):
  622. self.wndTaskBar.OnChangeCurrentSkill(skillSlotNumber)
  623.  
  624. def SelectMouseButtonEvent(self, dir, event):
  625. self.wndTaskBar.SelectMouseButtonEvent(dir, event)
  626.  
  627. ## Refresh
  628. def RefreshAlignment(self):
  629. self.wndCharacter.RefreshAlignment()
  630.  
  631. def RefreshStatus(self):
  632. self.wndTaskBar.RefreshStatus()
  633. self.wndCharacter.RefreshStatus()
  634. self.wndInventory.RefreshStatus()
  635. if self.wndEnergyBar:
  636. self.wndEnergyBar.RefreshStatus()
  637. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  638. self.wndDragonSoul.RefreshStatus()
  639.  
  640. def RefreshStamina(self):
  641. self.wndTaskBar.RefreshStamina()
  642.  
  643. def RefreshSkill(self):
  644. self.wndCharacter.RefreshSkill()
  645. self.wndTaskBar.RefreshSkill()
  646.  
  647. def RefreshInventory(self):
  648. self.wndTaskBar.RefreshQuickSlot()
  649. self.wndInventory.RefreshItemSlot()
  650. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  651. self.wndDragonSoul.RefreshItemSlot()
  652.  
  653. if app.ADD_INVENTORY:
  654. def SetInventoryPageKilit(self):
  655. if constInfo.envanter == 2:#3 envanter
  656. if player.GetEnvanter() == 0:#Hepsi kapali
  657. self.wndInventory.engelblack.Show()#open
  658. self.wndInventory.engelblackcl.Hide()
  659. self.wndInventory.engelblack2.Hide()
  660. self.wndInventory.engelblack2cl.Show()#close
  661. self.wndInventory.engelblack3.Hide()
  662. self.wndInventory.engelblack3cl.Show()
  663. self.wndInventory.engelblack4.Hide()
  664. self.wndInventory.engelblack4cl.Show()
  665. self.wndInventory.engelblack5.Hide()
  666. self.wndInventory.engelblack5cl.Show()
  667. self.wndInventory.engelblack6.Hide()
  668. self.wndInventory.engelblack6cl.Show()
  669. self.wndInventory.engelblack7.Hide()
  670. self.wndInventory.engelblack7cl.Show()
  671. self.wndInventory.engelblack8.Hide()
  672. self.wndInventory.engelblack8cl.Show()
  673. self.wndInventory.engelblack9.Hide()
  674. self.wndInventory.engelblack9cl.Show()
  675. elif player.GetEnvanter() == 1:# 1 tane acyk
  676. self.wndInventory.engelblack.Hide()#open
  677. self.wndInventory.engelblackcl.Hide()
  678. self.wndInventory.engelblack2.Show()
  679. self.wndInventory.engelblack2cl.Hide()#close
  680. self.wndInventory.engelblack3.Hide()
  681. self.wndInventory.engelblack3cl.Show()
  682. self.wndInventory.engelblack4.Hide()
  683. self.wndInventory.engelblack4cl.Show()
  684. self.wndInventory.engelblack5.Hide()
  685. self.wndInventory.engelblack5cl.Show()
  686. self.wndInventory.engelblack6.Hide()
  687. self.wndInventory.engelblack6cl.Show()
  688. self.wndInventory.engelblack7.Hide()
  689. self.wndInventory.engelblack7cl.Show()
  690. self.wndInventory.engelblack8.Hide()
  691. self.wndInventory.engelblack8cl.Show()
  692. self.wndInventory.engelblack9.Hide()
  693. self.wndInventory.engelblack9cl.Show()
  694. elif player.GetEnvanter() == 2:# 2 tane acyk
  695. self.wndInventory.engelblack.Hide()#open
  696. self.wndInventory.engelblackcl.Hide()#open
  697. self.wndInventory.engelblack2.Hide()
  698. self.wndInventory.engelblack2cl.Hide()#close
  699. self.wndInventory.engelblack3.Show()
  700. self.wndInventory.engelblack3cl.Hide()
  701. self.wndInventory.engelblack4.Hide()
  702. self.wndInventory.engelblack4cl.Show()
  703. self.wndInventory.engelblack5.Hide()
  704. self.wndInventory.engelblack5cl.Show()
  705. self.wndInventory.engelblack6.Hide()
  706. self.wndInventory.engelblack6cl.Show()
  707. self.wndInventory.engelblack7.Hide()
  708. self.wndInventory.engelblack7cl.Show()
  709. self.wndInventory.engelblack8.Hide()
  710. self.wndInventory.engelblack8cl.Show()
  711. self.wndInventory.engelblack9.Hide()
  712. self.wndInventory.engelblack9cl.Show()
  713. elif player.GetEnvanter() == 3:
  714. self.wndInventory.engelblack.Hide()#open
  715. self.wndInventory.engelblackcl.Hide()#open
  716. self.wndInventory.engelblack2.Hide()
  717. self.wndInventory.engelblack2cl.Hide()#close
  718. self.wndInventory.engelblack3.Hide()
  719. self.wndInventory.engelblack3cl.Hide()
  720. self.wndInventory.engelblack4.Show()###
  721. self.wndInventory.engelblack4cl.Hide()
  722. self.wndInventory.engelblack5.Hide()
  723. self.wndInventory.engelblack5cl.Show()
  724. self.wndInventory.engelblack6.Hide()
  725. self.wndInventory.engelblack6cl.Show()
  726. self.wndInventory.engelblack7.Hide()
  727. self.wndInventory.engelblack7cl.Show()
  728. self.wndInventory.engelblack8.Hide()
  729. self.wndInventory.engelblack8cl.Show()
  730. self.wndInventory.engelblack9.Hide()
  731. self.wndInventory.engelblack9cl.Show()
  732. elif player.GetEnvanter() == 4:
  733. self.wndInventory.engelblack.Hide()#open
  734. self.wndInventory.engelblackcl.Hide()#open
  735. self.wndInventory.engelblack2.Hide()
  736. self.wndInventory.engelblack2cl.Hide()#close
  737. self.wndInventory.engelblack3.Hide()
  738. self.wndInventory.engelblack3cl.Hide()
  739. self.wndInventory.engelblack4.Hide()###
  740. self.wndInventory.engelblack4cl.Hide()
  741. self.wndInventory.engelblack5.Show()
  742. self.wndInventory.engelblack5cl.Hide()
  743. self.wndInventory.engelblack6.Hide()
  744. self.wndInventory.engelblack6cl.Show()
  745. self.wndInventory.engelblack7.Hide()
  746. self.wndInventory.engelblack7cl.Show()
  747. self.wndInventory.engelblack8.Hide()
  748. self.wndInventory.engelblack8cl.Show()
  749. self.wndInventory.engelblack9.Hide()
  750. self.wndInventory.engelblack9cl.Show()
  751. elif player.GetEnvanter() == 5:
  752. self.wndInventory.engelblack.Hide()#open
  753. self.wndInventory.engelblackcl.Hide()#open
  754. self.wndInventory.engelblack2.Hide()
  755. self.wndInventory.engelblack2cl.Hide()#close
  756. self.wndInventory.engelblack3.Hide()
  757. self.wndInventory.engelblack3cl.Hide()
  758. self.wndInventory.engelblack4.Hide()###
  759. self.wndInventory.engelblack4cl.Hide()
  760. self.wndInventory.engelblack5.Hide()
  761. self.wndInventory.engelblack5cl.Hide()
  762. self.wndInventory.engelblack6.Show()#open
  763. self.wndInventory.engelblack6cl.Hide()
  764. self.wndInventory.engelblack7.Hide()
  765. self.wndInventory.engelblack7cl.Show()
  766. self.wndInventory.engelblack8.Hide()
  767. self.wndInventory.engelblack8cl.Show()
  768. self.wndInventory.engelblack9.Hide()
  769. self.wndInventory.engelblack9cl.Show()
  770. elif player.GetEnvanter() == 6:
  771. self.wndInventory.engelblack.Hide()#open
  772. self.wndInventory.engelblackcl.Hide()#open
  773. self.wndInventory.engelblack2.Hide()
  774. self.wndInventory.engelblack2cl.Hide()#close
  775. self.wndInventory.engelblack3.Hide()
  776. self.wndInventory.engelblack3cl.Hide()
  777. self.wndInventory.engelblack4.Hide()###
  778. self.wndInventory.engelblack4cl.Hide()
  779. self.wndInventory.engelblack5.Hide()
  780. self.wndInventory.engelblack5cl.Hide()
  781. self.wndInventory.engelblack6.Hide()#open
  782. self.wndInventory.engelblack6cl.Hide()
  783. self.wndInventory.engelblack7.Show()
  784. self.wndInventory.engelblack7cl.Hide()
  785. self.wndInventory.engelblack8.Hide()
  786. self.wndInventory.engelblack8cl.Show()
  787. self.wndInventory.engelblack9.Hide()
  788. self.wndInventory.engelblack9cl.Show()
  789. elif player.GetEnvanter() == 7:
  790. self.wndInventory.engelblack.Hide()#open
  791. self.wndInventory.engelblackcl.Hide()#open
  792. self.wndInventory.engelblack2.Hide()
  793. self.wndInventory.engelblack2cl.Hide()#close
  794. self.wndInventory.engelblack3.Hide()
  795. self.wndInventory.engelblack3cl.Hide()
  796. self.wndInventory.engelblack4.Hide()###
  797. self.wndInventory.engelblack4cl.Hide()
  798. self.wndInventory.engelblack5.Hide()
  799. self.wndInventory.engelblack5cl.Hide()
  800. self.wndInventory.engelblack6.Hide()#open
  801. self.wndInventory.engelblack6cl.Hide()
  802. self.wndInventory.engelblack7.Hide()
  803. self.wndInventory.engelblack7cl.Hide()
  804. self.wndInventory.engelblack8.Show()
  805. self.wndInventory.engelblack8cl.Hide()
  806. self.wndInventory.engelblack9.Hide()
  807. self.wndInventory.engelblack9cl.Show()
  808. elif player.GetEnvanter() == 8:
  809. self.wndInventory.engelblack.Hide()#open
  810. self.wndInventory.engelblackcl.Hide()#open
  811. self.wndInventory.engelblack2.Hide()
  812. self.wndInventory.engelblack2cl.Hide()#close
  813. self.wndInventory.engelblack3.Hide()
  814. self.wndInventory.engelblack3cl.Hide()
  815. self.wndInventory.engelblack4.Hide()###
  816. self.wndInventory.engelblack4cl.Hide()
  817. self.wndInventory.engelblack5.Hide()
  818. self.wndInventory.engelblack5cl.Hide()
  819. self.wndInventory.engelblack6.Hide()#open
  820. self.wndInventory.engelblack6cl.Hide()
  821. self.wndInventory.engelblack7.Hide()
  822. self.wndInventory.engelblack7cl.Hide()
  823. self.wndInventory.engelblack8.Hide()
  824. self.wndInventory.engelblack8cl.Hide()
  825. self.wndInventory.engelblack9.Show()
  826. self.wndInventory.engelblack9cl.Hide()
  827. elif player.GetEnvanter() == 9:
  828. self.wndInventory.engelblack.Hide()#open
  829. self.wndInventory.engelblackcl.Hide()#open
  830. self.wndInventory.engelblack2.Hide()
  831. self.wndInventory.engelblack2cl.Hide()#close
  832. self.wndInventory.engelblack3.Hide()
  833. self.wndInventory.engelblack3cl.Hide()
  834. self.wndInventory.engelblack4.Hide()###
  835. self.wndInventory.engelblack4cl.Hide()
  836. self.wndInventory.engelblack5.Hide()
  837. self.wndInventory.engelblack5cl.Hide()
  838. self.wndInventory.engelblack6.Hide()#open
  839. self.wndInventory.engelblack6cl.Hide()
  840. self.wndInventory.engelblack7.Hide()
  841. self.wndInventory.engelblack7cl.Hide()
  842. self.wndInventory.engelblack8.Hide()
  843. self.wndInventory.engelblack8cl.Hide()
  844. self.wndInventory.engelblack9.Hide()
  845. self.wndInventory.engelblack9cl.Hide()
  846. elif player.GetEnvanter() >= 10:
  847. self.wndInventory.engelblack.Hide()#open
  848. self.wndInventory.engelblackcl.Hide()#open
  849. self.wndInventory.engelblack2.Hide()
  850. self.wndInventory.engelblack2cl.Hide()#close
  851. self.wndInventory.engelblack3.Hide()
  852. self.wndInventory.engelblack3cl.Hide()
  853. self.wndInventory.engelblack4.Hide()###
  854. self.wndInventory.engelblack4cl.Hide()
  855. self.wndInventory.engelblack5.Hide()
  856. self.wndInventory.engelblack5cl.Hide()
  857. self.wndInventory.engelblack6.Hide()#open
  858. self.wndInventory.engelblack6cl.Hide()
  859. self.wndInventory.engelblack7.Hide()
  860. self.wndInventory.engelblack7cl.Hide()
  861. self.wndInventory.engelblack8.Hide()
  862. self.wndInventory.engelblack8cl.Hide()
  863. self.wndInventory.engelblack9.Hide()
  864. self.wndInventory.engelblack9cl.Hide()
  865. elif constInfo.envanter == 3:
  866. if player.GetEnvanter() >= 0 and player.GetEnvanter() <= 8:
  867. self.wndInventory.engelblack.Hide()#open
  868. self.wndInventory.engelblackcl.Show()
  869. self.wndInventory.engelblack2.Hide()
  870. self.wndInventory.engelblack2cl.Show()#close
  871. self.wndInventory.engelblack3.Hide()
  872. self.wndInventory.engelblack3cl.Show()
  873. self.wndInventory.engelblack4.Hide()
  874. self.wndInventory.engelblack4cl.Show()
  875. self.wndInventory.engelblack5.Hide()
  876. self.wndInventory.engelblack5cl.Show()
  877. self.wndInventory.engelblack6.Hide()
  878. self.wndInventory.engelblack6cl.Show()
  879. self.wndInventory.engelblack7.Hide()
  880. self.wndInventory.engelblack7cl.Show()
  881. self.wndInventory.engelblack8.Hide()
  882. self.wndInventory.engelblack8cl.Show()
  883. self.wndInventory.engelblack9.Hide()
  884. self.wndInventory.engelblack9cl.Show()
  885. elif player.GetEnvanter() == 9:#Hepsi kapali
  886. self.wndInventory.engelblack.Show()#open
  887. self.wndInventory.engelblackcl.Hide()
  888. self.wndInventory.engelblack2.Hide()
  889. self.wndInventory.engelblack2cl.Show()#close
  890. self.wndInventory.engelblack3.Hide()
  891. self.wndInventory.engelblack3cl.Show()
  892. self.wndInventory.engelblack4.Hide()
  893. self.wndInventory.engelblack4cl.Show()
  894. self.wndInventory.engelblack5.Hide()
  895. self.wndInventory.engelblack5cl.Show()
  896. self.wndInventory.engelblack6.Hide()
  897. self.wndInventory.engelblack6cl.Show()
  898. self.wndInventory.engelblack7.Hide()
  899. self.wndInventory.engelblack7cl.Show()
  900. self.wndInventory.engelblack8.Hide()
  901. self.wndInventory.engelblack8cl.Show()
  902. self.wndInventory.engelblack9.Hide()
  903. self.wndInventory.engelblack9cl.Show()
  904. elif player.GetEnvanter() == 10:# 1 tane acyk
  905. self.wndInventory.engelblack.Hide()#open
  906. self.wndInventory.engelblackcl.Hide()
  907. self.wndInventory.engelblack2.Show()
  908. self.wndInventory.engelblack2cl.Hide()#close
  909. self.wndInventory.engelblack3.Hide()
  910. self.wndInventory.engelblack3cl.Show()
  911. self.wndInventory.engelblack4.Hide()
  912. self.wndInventory.engelblack4cl.Show()
  913. self.wndInventory.engelblack5.Hide()
  914. self.wndInventory.engelblack5cl.Show()
  915. self.wndInventory.engelblack6.Hide()
  916. self.wndInventory.engelblack6cl.Show()
  917. self.wndInventory.engelblack7.Hide()
  918. self.wndInventory.engelblack7cl.Show()
  919. self.wndInventory.engelblack8.Hide()
  920. self.wndInventory.engelblack8cl.Show()
  921. self.wndInventory.engelblack9.Hide()
  922. self.wndInventory.engelblack9cl.Show()
  923. elif player.GetEnvanter() == 11:# 2 tane acyk
  924. self.wndInventory.engelblack.Hide()#open
  925. self.wndInventory.engelblackcl.Hide()#open
  926. self.wndInventory.engelblack2.Hide()
  927. self.wndInventory.engelblack2cl.Hide()#close
  928. self.wndInventory.engelblack3.Show()
  929. self.wndInventory.engelblack3cl.Hide()
  930. self.wndInventory.engelblack4.Hide()
  931. self.wndInventory.engelblack4cl.Show()
  932. self.wndInventory.engelblack5.Hide()
  933. self.wndInventory.engelblack5cl.Show()
  934. self.wndInventory.engelblack6.Hide()
  935. self.wndInventory.engelblack6cl.Show()
  936. self.wndInventory.engelblack7.Hide()
  937. self.wndInventory.engelblack7cl.Show()
  938. self.wndInventory.engelblack8.Hide()
  939. self.wndInventory.engelblack8cl.Show()
  940. self.wndInventory.engelblack9.Hide()
  941. self.wndInventory.engelblack9cl.Show()
  942. elif player.GetEnvanter() == 12:
  943. self.wndInventory.engelblack.Hide()#open
  944. self.wndInventory.engelblackcl.Hide()#open
  945. self.wndInventory.engelblack2.Hide()
  946. self.wndInventory.engelblack2cl.Hide()#close
  947. self.wndInventory.engelblack3.Hide()
  948. self.wndInventory.engelblack3cl.Hide()
  949. self.wndInventory.engelblack4.Show()###
  950. self.wndInventory.engelblack4cl.Hide()
  951. self.wndInventory.engelblack5.Hide()
  952. self.wndInventory.engelblack5cl.Show()
  953. self.wndInventory.engelblack6.Hide()
  954. self.wndInventory.engelblack6cl.Show()
  955. self.wndInventory.engelblack7.Hide()
  956. self.wndInventory.engelblack7cl.Show()
  957. self.wndInventory.engelblack8.Hide()
  958. self.wndInventory.engelblack8cl.Show()
  959. self.wndInventory.engelblack9.Hide()
  960. self.wndInventory.engelblack9cl.Show()
  961. elif player.GetEnvanter() == 13:
  962. self.wndInventory.engelblack.Hide()#open
  963. self.wndInventory.engelblackcl.Hide()#open
  964. self.wndInventory.engelblack2.Hide()
  965. self.wndInventory.engelblack2cl.Hide()#close
  966. self.wndInventory.engelblack3.Hide()
  967. self.wndInventory.engelblack3cl.Hide()
  968. self.wndInventory.engelblack4.Hide()###
  969. self.wndInventory.engelblack4cl.Hide()
  970. self.wndInventory.engelblack5.Show()
  971. self.wndInventory.engelblack5cl.Hide()
  972. self.wndInventory.engelblack6.Hide()
  973. self.wndInventory.engelblack6cl.Show()
  974. self.wndInventory.engelblack7.Hide()
  975. self.wndInventory.engelblack7cl.Show()
  976. self.wndInventory.engelblack8.Hide()
  977. self.wndInventory.engelblack8cl.Show()
  978. self.wndInventory.engelblack9.Hide()
  979. self.wndInventory.engelblack9cl.Show()
  980. elif player.GetEnvanter() == 14:
  981. self.wndInventory.engelblack.Hide()#open
  982. self.wndInventory.engelblackcl.Hide()#open
  983. self.wndInventory.engelblack2.Hide()
  984. self.wndInventory.engelblack2cl.Hide()#close
  985. self.wndInventory.engelblack3.Hide()
  986. self.wndInventory.engelblack3cl.Hide()
  987. self.wndInventory.engelblack4.Hide()###
  988. self.wndInventory.engelblack4cl.Hide()
  989. self.wndInventory.engelblack5.Hide()
  990. self.wndInventory.engelblack5cl.Hide()
  991. self.wndInventory.engelblack6.Show()#open
  992. self.wndInventory.engelblack6cl.Hide()
  993. self.wndInventory.engelblack7.Hide()
  994. self.wndInventory.engelblack7cl.Show()
  995. self.wndInventory.engelblack8.Hide()
  996. self.wndInventory.engelblack8cl.Show()
  997. self.wndInventory.engelblack9.Hide()
  998. self.wndInventory.engelblack9cl.Show()
  999. elif player.GetEnvanter() == 15:
  1000. self.wndInventory.engelblack.Hide()#open
  1001. self.wndInventory.engelblackcl.Hide()#open
  1002. self.wndInventory.engelblack2.Hide()
  1003. self.wndInventory.engelblack2cl.Hide()#close
  1004. self.wndInventory.engelblack3.Hide()
  1005. self.wndInventory.engelblack3cl.Hide()
  1006. self.wndInventory.engelblack4.Hide()###
  1007. self.wndInventory.engelblack4cl.Hide()
  1008. self.wndInventory.engelblack5.Hide()
  1009. self.wndInventory.engelblack5cl.Hide()
  1010. self.wndInventory.engelblack6.Hide()#open
  1011. self.wndInventory.engelblack6cl.Hide()
  1012. self.wndInventory.engelblack7.Show()
  1013. self.wndInventory.engelblack7cl.Hide()
  1014. self.wndInventory.engelblack8.Hide()
  1015. self.wndInventory.engelblack8cl.Show()
  1016. self.wndInventory.engelblack9.Hide()
  1017. self.wndInventory.engelblack9cl.Show()
  1018. elif player.GetEnvanter() == 16:
  1019. self.wndInventory.engelblack.Hide()#open
  1020. self.wndInventory.engelblackcl.Hide()#open
  1021. self.wndInventory.engelblack2.Hide()
  1022. self.wndInventory.engelblack2cl.Hide()#close
  1023. self.wndInventory.engelblack3.Hide()
  1024. self.wndInventory.engelblack3cl.Hide()
  1025. self.wndInventory.engelblack4.Hide()###
  1026. self.wndInventory.engelblack4cl.Hide()
  1027. self.wndInventory.engelblack5.Hide()
  1028. self.wndInventory.engelblack5cl.Hide()
  1029. self.wndInventory.engelblack6.Hide()#open
  1030. self.wndInventory.engelblack6cl.Hide()
  1031. self.wndInventory.engelblack7.Hide()
  1032. self.wndInventory.engelblack7cl.Hide()
  1033. self.wndInventory.engelblack8.Show()
  1034. self.wndInventory.engelblack8cl.Hide()
  1035. self.wndInventory.engelblack9.Hide()
  1036. self.wndInventory.engelblack9cl.Show()
  1037. elif player.GetEnvanter() == 17:
  1038. self.wndInventory.engelblack.Hide()#open
  1039. self.wndInventory.engelblackcl.Hide()#open
  1040. self.wndInventory.engelblack2.Hide()
  1041. self.wndInventory.engelblack2cl.Hide()#close
  1042. self.wndInventory.engelblack3.Hide()
  1043. self.wndInventory.engelblack3cl.Hide()
  1044. self.wndInventory.engelblack4.Hide()###
  1045. self.wndInventory.engelblack4cl.Hide()
  1046. self.wndInventory.engelblack5.Hide()
  1047. self.wndInventory.engelblack5cl.Hide()
  1048. self.wndInventory.engelblack6.Hide()#open
  1049. self.wndInventory.engelblack6cl.Hide()
  1050. self.wndInventory.engelblack7.Hide()
  1051. self.wndInventory.engelblack7cl.Hide()
  1052. self.wndInventory.engelblack8.Hide()
  1053. self.wndInventory.engelblack8cl.Hide()
  1054. self.wndInventory.engelblack9.Show()
  1055. self.wndInventory.engelblack9cl.Hide()
  1056. elif player.GetEnvanter() == 18:
  1057. self.wndInventory.engelblack.Hide()#open
  1058. self.wndInventory.engelblackcl.Hide()#open
  1059. self.wndInventory.engelblack2.Hide()
  1060. self.wndInventory.engelblack2cl.Hide()#close
  1061. self.wndInventory.engelblack3.Hide()
  1062. self.wndInventory.engelblack3cl.Hide()
  1063. self.wndInventory.engelblack4.Hide()###
  1064. self.wndInventory.engelblack4cl.Hide()
  1065. self.wndInventory.engelblack5.Hide()
  1066. self.wndInventory.engelblack5cl.Hide()
  1067. self.wndInventory.engelblack6.Hide()#open
  1068. self.wndInventory.engelblack6cl.Hide()
  1069. self.wndInventory.engelblack7.Hide()
  1070. self.wndInventory.engelblack7cl.Hide()
  1071. self.wndInventory.engelblack8.Hide()
  1072. self.wndInventory.engelblack8cl.Hide()
  1073. self.wndInventory.engelblack9.Hide()
  1074. self.wndInventory.engelblack9cl.Hide()
  1075. else:
  1076. self.wndInventory.engelblack.Hide()
  1077. self.wndInventory.engelblackcl.Hide()
  1078. self.wndInventory.engelblack2.Hide()
  1079. self.wndInventory.engelblack2cl.Hide()
  1080. self.wndInventory.engelblack3.Hide()
  1081. self.wndInventory.engelblack3cl.Hide()
  1082. self.wndInventory.engelblack4.Hide()
  1083. self.wndInventory.engelblack4cl.Hide()
  1084. self.wndInventory.engelblack5.Hide()
  1085. self.wndInventory.engelblack5cl.Hide()
  1086. self.wndInventory.engelblack6.Hide()
  1087. self.wndInventory.engelblack6cl.Hide()
  1088. self.wndInventory.engelblack7.Hide()
  1089. self.wndInventory.engelblack7cl.Hide()
  1090. self.wndInventory.engelblack8.Hide()
  1091. self.wndInventory.engelblack8cl.Hide()
  1092. self.wndInventory.engelblack9.Hide()
  1093. self.wndInventory.engelblack9cl.Hide()
  1094. self.wndInventory.RefreshBagSlotWindow()
  1095.  
  1096. def RefreshCharacter(self): ## Character 페이지의 얼굴, Inventory 페이지의 전신 그림 등의 Refresh
  1097. self.wndCharacter.RefreshCharacter()
  1098. self.wndTaskBar.RefreshQuickSlot()
  1099.  
  1100. def RefreshQuest(self):
  1101. self.wndCharacter.RefreshQuest()
  1102.  
  1103. def RefreshSafebox(self):
  1104. self.wndSafebox.RefreshSafebox()
  1105.  
  1106. # ITEM_MALL
  1107. def RefreshMall(self):
  1108. self.wndMall.RefreshMall()
  1109.  
  1110. def OpenItemMall(self):
  1111. if not self.mallPageDlg:
  1112. self.mallPageDlg = uiShop.MallPageDialog()
  1113.  
  1114. self.mallPageDlg.Open()
  1115. # END_OF_ITEM_MALL
  1116.  
  1117. def RefreshMessenger(self):
  1118. self.wndMessenger.RefreshMessenger()
  1119.  
  1120. def RefreshGuildInfoPage(self):
  1121. self.wndGuild.RefreshGuildInfoPage()
  1122.  
  1123. def RefreshGuildBoardPage(self):
  1124. self.wndGuild.RefreshGuildBoardPage()
  1125.  
  1126. def RefreshGuildMemberPage(self):
  1127. self.wndGuild.RefreshGuildMemberPage()
  1128.  
  1129. def RefreshGuildMemberPageGradeComboBox(self):
  1130. self.wndGuild.RefreshGuildMemberPageGradeComboBox()
  1131.  
  1132. def RefreshGuildSkillPage(self):
  1133. self.wndGuild.RefreshGuildSkillPage()
  1134.  
  1135. def RefreshGuildGradePage(self):
  1136. self.wndGuild.RefreshGuildGradePage()
  1137.  
  1138. def DeleteGuild(self):
  1139. self.wndMessenger.ClearGuildMember()
  1140. self.wndGuild.DeleteGuild()
  1141.  
  1142. def RefreshMobile(self):
  1143. self.dlgSystem.RefreshMobile()
  1144.  
  1145. def OnMobileAuthority(self):
  1146. self.dlgSystem.OnMobileAuthority()
  1147.  
  1148. def OnBlockMode(self, mode):
  1149. self.dlgSystem.OnBlockMode(mode)
  1150.  
  1151. ## Calling Functions
  1152. # PointReset
  1153. def OpenPointResetDialog(self):
  1154. self.dlgPointReset.Show()
  1155. self.dlgPointReset.SetTop()
  1156.  
  1157. def ClosePointResetDialog(self):
  1158. self.dlgPointReset.Close()
  1159.  
  1160. # Shop
  1161. def OpenShopDialog(self, vid):
  1162. self.wndInventory.Show()
  1163. self.wndInventory.SetTop()
  1164. self.dlgShop.Open(vid)
  1165. self.dlgShop.SetTop()
  1166.  
  1167. def CloseShopDialog(self):
  1168. self.dlgShop.Close()
  1169.  
  1170. def RefreshShopDialog(self):
  1171. self.dlgShop.Refresh()
  1172.  
  1173. ## Quest
  1174. def OpenCharacterWindowQuestPage(self):
  1175. self.wndCharacter.Show()
  1176. self.wndCharacter.SetState("QUEST")
  1177.  
  1178. def OpenQuestWindow(self, skin, idx):
  1179.  
  1180. wnds = ()
  1181.  
  1182. q = uiQuest.QuestDialog(skin, idx)
  1183. q.SetWindowName("QuestWindow" + str(idx))
  1184. q.Show()
  1185. if skin:
  1186. q.Lock()
  1187. wnds = self.__HideWindows()
  1188.  
  1189. # UNKNOWN_UPDATE
  1190. q.AddOnDoneEvent(lambda tmp_self, args=wnds: self.__ShowWindows(args))
  1191. # END_OF_UNKNOWN_UPDATE
  1192.  
  1193. if skin:
  1194. q.AddOnCloseEvent(q.Unlock)
  1195. q.AddOnCloseEvent(lambda key = self.wndQuestWindowNewKey:ui.__mem_func__(self.RemoveQuestDialog)(key))
  1196. self.wndQuestWindow[self.wndQuestWindowNewKey] = q
  1197.  
  1198. self.wndQuestWindowNewKey = self.wndQuestWindowNewKey + 1
  1199.  
  1200. # END_OF_UNKNOWN_UPDATE
  1201.  
  1202. def HideAllQuestWindow(self):
  1203. tempList = []
  1204. for i,v in self.wndQuestWindow.iteritems():
  1205. tempList.append(v)
  1206. for i in tempList:
  1207. i.OnCancel()
  1208.  
  1209. def RemoveQuestDialog(self, key):
  1210. del self.wndQuestWindow[key]
  1211.  
  1212. ## Exchange
  1213. def StartExchange(self):
  1214. self.dlgExchange.OpenDialog()
  1215. self.dlgExchange.Refresh()
  1216.  
  1217. def EndExchange(self):
  1218. self.dlgExchange.CloseDialog()
  1219.  
  1220. def RefreshExchange(self):
  1221. self.dlgExchange.Refresh()
  1222.  
  1223. ## Party
  1224. def AddPartyMember(self, pid, name):
  1225. self.wndParty.AddPartyMember(pid, name)
  1226.  
  1227. self.__ArrangeQuestButton()
  1228.  
  1229. def UpdatePartyMemberInfo(self, pid):
  1230. self.wndParty.UpdatePartyMemberInfo(pid)
  1231.  
  1232. def RemovePartyMember(self, pid):
  1233. self.wndParty.RemovePartyMember(pid)
  1234.  
  1235. ##!! 20061026.levites.퀘스트_위치_보정
  1236. self.__ArrangeQuestButton()
  1237.  
  1238. def LinkPartyMember(self, pid, vid):
  1239. self.wndParty.LinkPartyMember(pid, vid)
  1240.  
  1241. def UnlinkPartyMember(self, pid):
  1242. self.wndParty.UnlinkPartyMember(pid)
  1243.  
  1244. def UnlinkAllPartyMember(self):
  1245. self.wndParty.UnlinkAllPartyMember()
  1246.  
  1247. def ExitParty(self):
  1248. self.wndParty.ExitParty()
  1249.  
  1250. ##!! 20061026.levites.퀘스트_위치_보정
  1251. self.__ArrangeQuestButton()
  1252.  
  1253. def PartyHealReady(self):
  1254. self.wndParty.PartyHealReady()
  1255.  
  1256. def ChangePartyParameter(self, distributionMode):
  1257. self.wndParty.ChangePartyParameter(distributionMode)
  1258.  
  1259. ## Safebox
  1260. def AskSafeboxPassword(self):
  1261. if self.wndSafebox.IsShow():
  1262. return
  1263.  
  1264. # SAFEBOX_PASSWORD
  1265. self.dlgPassword.SetTitle(localeInfo.PASSWORD_TITLE)
  1266. self.dlgPassword.SetSendMessage("/safebox_password ")
  1267. # END_OF_SAFEBOX_PASSWORD
  1268.  
  1269. self.dlgPassword.ShowDialog()
  1270.  
  1271. def OpenSafeboxWindow(self, size):
  1272. self.dlgPassword.CloseDialog()
  1273. self.wndSafebox.ShowWindow(size)
  1274.  
  1275. def RefreshSafeboxMoney(self):
  1276. self.wndSafebox.RefreshSafeboxMoney()
  1277.  
  1278. def CommandCloseSafebox(self):
  1279. self.wndSafebox.CommandCloseSafebox()
  1280.  
  1281. # ITEM_MALL
  1282. def AskMallPassword(self):
  1283. if self.wndMall.IsShow():
  1284. return
  1285. self.dlgPassword.SetTitle(localeInfo.MALL_PASSWORD_TITLE)
  1286. self.dlgPassword.SetSendMessage("/mall_password ")
  1287. self.dlgPassword.ShowDialog()
  1288.  
  1289. def OpenMallWindow(self, size):
  1290. self.dlgPassword.CloseDialog()
  1291. self.wndMall.ShowWindow(size)
  1292.  
  1293. def CommandCloseMall(self):
  1294. self.wndMall.CommandCloseMall()
  1295. # END_OF_ITEM_MALL
  1296.  
  1297. ## Guild
  1298. def OnStartGuildWar(self, guildSelf, guildOpp):
  1299. self.wndGuild.OnStartGuildWar(guildSelf, guildOpp)
  1300.  
  1301. guildWarScoreBoard = uiGuild.GuildWarScoreBoard()
  1302. guildWarScoreBoard.Open(guildSelf, guildOpp)
  1303. guildWarScoreBoard.Show()
  1304. self.guildScoreBoardDict[uiGuild.GetGVGKey(guildSelf, guildOpp)] = guildWarScoreBoard
  1305.  
  1306. def OnEndGuildWar(self, guildSelf, guildOpp):
  1307. self.wndGuild.OnEndGuildWar(guildSelf, guildOpp)
  1308.  
  1309. key = uiGuild.GetGVGKey(guildSelf, guildOpp)
  1310.  
  1311. if not self.guildScoreBoardDict.has_key(key):
  1312. return
  1313.  
  1314. self.guildScoreBoardDict[key].Destroy()
  1315. del self.guildScoreBoardDict[key]
  1316.  
  1317. # GUILDWAR_MEMBER_COUNT
  1318. def UpdateMemberCount(self, gulidID1, memberCount1, guildID2, memberCount2):
  1319. key = uiGuild.GetGVGKey(gulidID1, guildID2)
  1320.  
  1321. if not self.guildScoreBoardDict.has_key(key):
  1322. return
  1323.  
  1324. self.guildScoreBoardDict[key].UpdateMemberCount(gulidID1, memberCount1, guildID2, memberCount2)
  1325. # END_OF_GUILDWAR_MEMBER_COUNT
  1326.  
  1327. def OnRecvGuildWarPoint(self, gainGuildID, opponentGuildID, point):
  1328. key = uiGuild.GetGVGKey(gainGuildID, opponentGuildID)
  1329. if not self.guildScoreBoardDict.has_key(key):
  1330. return
  1331.  
  1332. guildBoard = self.guildScoreBoardDict[key]
  1333. guildBoard.SetScore(gainGuildID, opponentGuildID, point)
  1334.  
  1335. ## PK Mode
  1336. def OnChangePKMode(self):
  1337. self.wndCharacter.RefreshAlignment()
  1338. self.dlgSystem.OnChangePKMode()
  1339.  
  1340. ## Refine
  1341. def OpenRefineDialog(self, targetItemPos, nextGradeItemVnum, cost, prob, type):
  1342. self.dlgRefineNew.Open(targetItemPos, nextGradeItemVnum, cost, prob, type)
  1343.  
  1344. def AppendMaterialToRefineDialog(self, vnum, count):
  1345. self.dlgRefineNew.AppendMaterial(vnum, count)
  1346.  
  1347. ## Show & Hide
  1348. def ShowDefaultWindows(self):
  1349. self.wndTaskBar.Show()
  1350. self.wndMiniMap.Show()
  1351. self.wndMiniMap.ShowMiniMap()
  1352. if self.wndEnergyBar:
  1353. self.wndEnergyBar.Show()
  1354.  
  1355. def ShowAllWindows(self):
  1356. self.wndTaskBar.Show()
  1357. self.wndCharacter.Show()
  1358. self.wndInventory.Show()
  1359. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1360. self.wndDragonSoul.Show()
  1361. self.wndDragonSoulRefine.Show()
  1362. self.wndChat.Show()
  1363. self.wndMiniMap.Show()
  1364. if self.wndEnergyBar:
  1365. self.wndEnergyBar.Show()
  1366. if self.wndExpandedTaskBar:
  1367. self.wndExpandedTaskBar.Show()
  1368. self.wndExpandedTaskBar.SetTop()
  1369.  
  1370. def HideAllWindows(self):
  1371. if self.wndTaskBar:
  1372. self.wndTaskBar.Hide()
  1373.  
  1374. if self.wndEnergyBar:
  1375. self.wndEnergyBar.Hide()
  1376.  
  1377. if self.wndCharacter:
  1378. self.wndCharacter.Hide()
  1379.  
  1380. if self.wndInventory:
  1381. self.wndInventory.Hide()
  1382.  
  1383. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1384. self.wndDragonSoul.Hide()
  1385. self.wndDragonSoulRefine.Hide()
  1386.  
  1387. if self.wndChat:
  1388. self.wndChat.Hide()
  1389.  
  1390. if self.wndMiniMap:
  1391. self.wndMiniMap.Hide()
  1392.  
  1393. if self.wndMessenger:
  1394. self.wndMessenger.Hide()
  1395.  
  1396. if self.wndGuild:
  1397. self.wndGuild.Hide()
  1398.  
  1399. if self.wndExpandedTaskBar:
  1400. self.wndExpandedTaskBar.Hide()
  1401.  
  1402.  
  1403. def ShowMouseImage(self):
  1404. self.wndTaskBar.ShowMouseImage()
  1405.  
  1406. def HideMouseImage(self):
  1407. self.wndTaskBar.HideMouseImage()
  1408.  
  1409. def ToggleChat(self):
  1410. if True == self.wndChat.IsEditMode():
  1411. self.wndChat.CloseChat()
  1412. else:
  1413. # 웹페이지가 열렸을때는 채팅 입력이 안됨
  1414. if self.wndWeb and self.wndWeb.IsShow():
  1415. pass
  1416. else:
  1417. self.wndChat.OpenChat()
  1418.  
  1419. def IsOpenChat(self):
  1420. return self.wndChat.IsEditMode()
  1421.  
  1422. def SetChatFocus(self):
  1423. self.wndChat.SetChatFocus()
  1424.  
  1425. def OpenRestartDialog(self):
  1426. self.dlgRestart.OpenDialog()
  1427. self.dlgRestart.SetTop()
  1428.  
  1429. def CloseRestartDialog(self):
  1430. self.dlgRestart.Close()
  1431.  
  1432. def ToggleSystemDialog(self):
  1433. if False == self.dlgSystem.IsShow():
  1434. self.dlgSystem.OpenDialog()
  1435. self.dlgSystem.SetTop()
  1436. else:
  1437. self.dlgSystem.Close()
  1438.  
  1439. def OpenSystemDialog(self):
  1440. self.dlgSystem.OpenDialog()
  1441. self.dlgSystem.SetTop()
  1442.  
  1443. def ToggleMessenger(self):
  1444. if self.wndMessenger.IsShow():
  1445. self.wndMessenger.Hide()
  1446. else:
  1447. self.wndMessenger.SetTop()
  1448. self.wndMessenger.Show()
  1449.  
  1450. def ToggleMiniMap(self):
  1451. if app.IsPressed(app.DIK_LSHIFT) or app.IsPressed(app.DIK_RSHIFT):
  1452. if False == self.wndMiniMap.isShowMiniMap():
  1453. self.wndMiniMap.ShowMiniMap()
  1454. self.wndMiniMap.SetTop()
  1455. else:
  1456. self.wndMiniMap.HideMiniMap()
  1457.  
  1458. else:
  1459. self.wndMiniMap.ToggleAtlasWindow()
  1460.  
  1461. def PressMKey(self):
  1462. if app.IsPressed(app.DIK_LALT) or app.IsPressed(app.DIK_RALT):
  1463. self.ToggleMessenger()
  1464.  
  1465. else:
  1466. self.ToggleMiniMap()
  1467.  
  1468. def SetMapName(self, mapName):
  1469. self.wndMiniMap.SetMapName(mapName)
  1470.  
  1471. def MiniMapScaleUp(self):
  1472. self.wndMiniMap.ScaleUp()
  1473.  
  1474. def MiniMapScaleDown(self):
  1475. self.wndMiniMap.ScaleDown()
  1476.  
  1477. def ToggleCharacterWindow(self, state):
  1478. if False == player.IsObserverMode():
  1479. if False == self.wndCharacter.IsShow():
  1480. self.OpenCharacterWindowWithState(state)
  1481. else:
  1482. if state == self.wndCharacter.GetState():
  1483. self.wndCharacter.OverOutItem()
  1484. self.wndCharacter.Hide()
  1485. else:
  1486. self.wndCharacter.SetState(state)
  1487.  
  1488. def OpenCharacterWindowWithState(self, state):
  1489. if False == player.IsObserverMode():
  1490. self.wndCharacter.SetState(state)
  1491. self.wndCharacter.Show()
  1492. self.wndCharacter.SetTop()
  1493.  
  1494. def ToggleCharacterWindowStatusPage(self):
  1495. self.ToggleCharacterWindow("STATUS")
  1496.  
  1497. def ToggleInventoryWindow(self):
  1498. if False == player.IsObserverMode():
  1499. if False == self.wndInventory.IsShow():
  1500. self.wndInventory.Show()
  1501. self.wndInventory.SetTop()
  1502. else:
  1503. self.wndInventory.OverOutItem()
  1504. self.wndInventory.Close()
  1505.  
  1506. def TogglePetMain(self):
  1507. if FALSE == player.IsObserverMode():
  1508. if FALSE == self.wndExpandedTaskBar.IsShow():
  1509. self.wndExpandedTaskBar.Show()
  1510. self.wndExpandedTaskBar.SetTop()
  1511. else:
  1512. self.wndExpandedTaskBar.Close()
  1513. net.SendChatPacket("/gift")
  1514.  
  1515. def ToggleExpandedButton(self):
  1516. if False == player.IsObserverMode():
  1517. if False == self.wndExpandedTaskBar.IsShow():
  1518. self.wndExpandedTaskBar.Show()
  1519. self.wndExpandedTaskBar.SetTop()
  1520. else:
  1521. self.wndExpandedTaskBar.Close()
  1522.  
  1523. # 용혼석
  1524. def DragonSoulActivate(self, deck):
  1525. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1526. self.wndDragonSoul.ActivateDragonSoulByExtern(deck)
  1527.  
  1528. def DragonSoulDeactivate(self):
  1529. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1530. self.wndDragonSoul.DeactivateDragonSoul()
  1531.  
  1532. def Highligt_Item(self, inven_type, inven_pos):
  1533. if player.DRAGON_SOUL_INVENTORY == inven_type:
  1534. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1535. self.wndDragonSoul.HighlightSlot(inven_pos)
  1536.  
  1537. def DragonSoulGiveQuilification(self):
  1538. self.DRAGON_SOUL_IS_QUALIFIED = True
  1539. self.wndExpandedTaskBar.SetToolTipText(uiTaskBar.ExpandedTaskBar.BUTTON_DRAGON_SOUL, uiScriptLocale.TASKBAR_DRAGON_SOUL)
  1540.  
  1541. def ToggleDragonSoulWindow(self):
  1542. if False == player.IsObserverMode():
  1543. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1544. if False == self.wndDragonSoul.IsShow():
  1545. if self.DRAGON_SOUL_IS_QUALIFIED:
  1546. self.wndDragonSoul.Show()
  1547. else:
  1548. try:
  1549. self.wndPopupDialog.SetText(localeInfo.DRAGON_SOUL_UNQUALIFIED)
  1550. self.wndPopupDialog.Open()
  1551. except:
  1552. self.wndPopupDialog = uiCommon.PopupDialog()
  1553. self.wndPopupDialog.SetText(localeInfo.DRAGON_SOUL_UNQUALIFIED)
  1554. self.wndPopupDialog.Open()
  1555. else:
  1556. self.wndDragonSoul.Close()
  1557.  
  1558. def ToggleDragonSoulWindowWithNoInfo(self):
  1559. if False == player.IsObserverMode():
  1560. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1561. if False == self.wndDragonSoul.IsShow():
  1562. if self.DRAGON_SOUL_IS_QUALIFIED:
  1563. self.wndDragonSoul.Show()
  1564. else:
  1565. self.wndDragonSoul.Close()
  1566.  
  1567. def FailDragonSoulRefine(self, reason, inven_type, inven_pos):
  1568. if False == player.IsObserverMode():
  1569. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1570. if True == self.wndDragonSoulRefine.IsShow():
  1571. self.wndDragonSoulRefine.RefineFail(reason, inven_type, inven_pos)
  1572.  
  1573. def SucceedDragonSoulRefine(self, inven_type, inven_pos):
  1574. if False == player.IsObserverMode():
  1575. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1576. if True == self.wndDragonSoulRefine.IsShow():
  1577. self.wndDragonSoulRefine.RefineSucceed(inven_type, inven_pos)
  1578.  
  1579. def OpenDragonSoulRefineWindow(self):
  1580. if False == player.IsObserverMode():
  1581. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1582. if False == self.wndDragonSoulRefine.IsShow():
  1583. self.wndDragonSoulRefine.Show()
  1584. if None != self.wndDragonSoul:
  1585. if False == self.wndDragonSoul.IsShow():
  1586. self.wndDragonSoul.Show()
  1587.  
  1588. def CloseDragonSoulRefineWindow(self):
  1589. if False == player.IsObserverMode():
  1590. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1591. if True == self.wndDragonSoulRefine.IsShow():
  1592. self.wndDragonSoulRefine.Close()
  1593.  
  1594. # 용혼석 끝
  1595.  
  1596. def ToggleGuildWindow(self):
  1597. if not self.wndGuild.IsShow():
  1598. if self.wndGuild.CanOpen():
  1599. self.wndGuild.Open()
  1600. else:
  1601. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.GUILD_YOU_DO_NOT_JOIN)
  1602. else:
  1603. self.wndGuild.OverOutItem()
  1604. self.wndGuild.Hide()
  1605.  
  1606. def ToggleChatLogWindow(self):
  1607. if self.wndChatLog.IsShow():
  1608. self.wndChatLog.Hide()
  1609. else:
  1610. self.wndChatLog.Show()
  1611.  
  1612. def CheckGameButton(self):
  1613. if self.wndGameButton:
  1614. self.wndGameButton.CheckGameButton()
  1615.  
  1616. def __OnClickStatusPlusButton(self):
  1617. self.ToggleCharacterWindow("STATUS")
  1618.  
  1619. def __OnClickSkillPlusButton(self):
  1620. self.ToggleCharacterWindow("SKILL")
  1621.  
  1622. def __OnClickQuestButton(self):
  1623. self.ToggleCharacterWindow("QUEST")
  1624.  
  1625. def __OnClickHelpButton(self):
  1626. player.SetPlayTime(1)
  1627. self.CheckGameButton()
  1628. self.OpenHelpWindow()
  1629.  
  1630. def __OnClickBuildButton(self):
  1631. self.BUILD_OpenWindow()
  1632.  
  1633. def OpenHelpWindow(self):
  1634. self.wndUICurtain.Show()
  1635. self.wndHelp.Open()
  1636.  
  1637. def CloseHelpWindow(self):
  1638. self.wndUICurtain.Hide()
  1639. self.wndHelp.Close()
  1640.  
  1641. def OpenWebWindow(self, url):
  1642. self.wndWeb.Open(url)
  1643.  
  1644. # 웹페이지를 열면 채팅을 닫는다
  1645. self.wndChat.CloseChat()
  1646.  
  1647. # show GIFT
  1648. def ShowGift(self):
  1649. self.wndTaskBar.ShowGift()
  1650.  
  1651. def CloseWbWindow(self):
  1652. self.wndWeb.Close()
  1653.  
  1654. if app.ENABLE_SASH_SYSTEM:
  1655. def ActSash(self, iAct, bWindow):
  1656. if iAct == 1:
  1657. if bWindow == True:
  1658. if not self.wndSashCombine.IsOpened():
  1659. self.wndSashCombine.Open()
  1660.  
  1661. if not self.wndInventory.IsShow():
  1662. self.wndInventory.Show()
  1663. else:
  1664. if not self.wndSashAbsorption.IsOpened():
  1665. self.wndSashAbsorption.Open()
  1666.  
  1667. if not self.wndInventory.IsShow():
  1668. self.wndInventory.Show()
  1669.  
  1670. self.wndInventory.RefreshBagSlotWindow()
  1671. elif iAct == 2:
  1672. if bWindow == True:
  1673. if self.wndSashCombine.IsOpened():
  1674. self.wndSashCombine.Close()
  1675. else:
  1676. if self.wndSashAbsorption.IsOpened():
  1677. self.wndSashAbsorption.Close()
  1678.  
  1679. self.wndInventory.RefreshBagSlotWindow()
  1680. elif iAct == 3 or iAct == 4:
  1681. if bWindow == True:
  1682. if self.wndSashCombine.IsOpened():
  1683. self.wndSashCombine.Refresh(iAct)
  1684. else:
  1685. if self.wndSashAbsorption.IsOpened():
  1686. self.wndSashAbsorption.Refresh(iAct)
  1687.  
  1688. self.wndInventory.RefreshBagSlotWindow()
  1689.  
  1690. if app.ENABLE_CHANGELOOK_SYSTEM:
  1691. def ActChangeLook(self, iAct):
  1692. if iAct == 1:
  1693. if not self.wndChangeLook.IsOpened():
  1694. self.wndChangeLook.Open()
  1695.  
  1696. if not self.wndInventory.IsShow():
  1697. self.wndInventory.Show()
  1698.  
  1699. self.wndInventory.RefreshBagSlotWindow()
  1700. elif iAct == 2:
  1701. if self.wndChangeLook.IsOpened():
  1702. self.wndChangeLook.Close()
  1703.  
  1704. self.wndInventory.RefreshBagSlotWindow()
  1705. elif iAct == 3 or iAct == 4:
  1706. if self.wndChangeLook.IsOpened():
  1707. self.wndChangeLook.Refresh()
  1708.  
  1709. self.wndInventory.RefreshBagSlotWindow()
  1710.  
  1711. def OpenCubeWindow(self):
  1712. self.wndCube.Open()
  1713.  
  1714. if FALSE == self.wndInventory.IsShow():
  1715. self.wndInventory.Show()
  1716.  
  1717. def UpdateCubeInfo(self, gold, itemVnum, count):
  1718. self.wndCube.UpdateInfo(gold, itemVnum, count)
  1719.  
  1720. def CloseCubeWindow(self):
  1721. self.wndCube.Close()
  1722.  
  1723. def FailedCubeWork(self):
  1724. self.wndCube.Refresh()
  1725.  
  1726. def SucceedCubeWork(self, itemVnum, count):
  1727. self.wndCube.Clear()
  1728.  
  1729. print "큐브 제작 성공! [%d:%d]" % (itemVnum, count)
  1730.  
  1731. if 0: # 결과 메시지 출력은 생략 한다
  1732. self.wndCubeResult.SetPosition(*self.wndCube.GetGlobalPosition())
  1733. self.wndCubeResult.SetCubeResultItem(itemVnum, count)
  1734. self.wndCubeResult.Open()
  1735. self.wndCubeResult.SetTop()
  1736.  
  1737. def __HideWindows(self):
  1738. hideWindows = self.wndTaskBar,\
  1739. self.wndCharacter,\
  1740. self.wndInventory,\
  1741. self.wndMiniMap,\
  1742. self.wndGuild,\
  1743. self.wndMessenger,\
  1744. self.wndChat,\
  1745. self.wndParty,\
  1746. self.wndGameButton,
  1747.  
  1748. if self.wndEnergyBar:
  1749. hideWindows += self.wndEnergyBar,
  1750.  
  1751. if self.wndExpandedTaskBar:
  1752. hideWindows += self.wndExpandedTaskBar,
  1753.  
  1754. if app.ENABLE_DRAGON_SOUL_SYSTEM:
  1755. hideWindows += self.wndDragonSoul,\
  1756. self.wndDragonSoulRefine,
  1757.  
  1758. hideWindows = filter(lambda x:x.IsShow(), hideWindows)
  1759. map(lambda x:x.Hide(), hideWindows)
  1760. import sys
  1761.  
  1762. self.HideAllQuestButton()
  1763. self.HideAllWhisperButton()
  1764.  
  1765. if self.wndChat.IsEditMode():
  1766. self.wndChat.CloseChat()
  1767.  
  1768. return hideWindows
  1769.  
  1770. def __ShowWindows(self, wnds):
  1771. import sys
  1772. map(lambda x:x.Show(), wnds)
  1773. global IsQBHide
  1774. if not IsQBHide:
  1775. self.ShowAllQuestButton()
  1776. else:
  1777. self.HideAllQuestButton()
  1778.  
  1779. self.ShowAllWhisperButton()
  1780.  
  1781. def BINARY_OpenAtlasWindow(self):
  1782. if self.wndMiniMap:
  1783. self.wndMiniMap.ShowAtlas()
  1784.  
  1785. def BINARY_SetObserverMode(self, flag):
  1786. self.wndGameButton.SetObserverMode(flag)
  1787.  
  1788. # ACCESSORY_REFINE_ADD_METIN_STONE
  1789. def BINARY_OpenSelectItemWindow(self):
  1790. self.wndItemSelect.Open()
  1791. # END_OF_ACCESSORY_REFINE_ADD_METIN_STONE
  1792.  
  1793. #####################################################################################
  1794. ### Private Shop ###
  1795.  
  1796. def OpenPrivateShopInputNameDialog(self):
  1797. #if player.IsInSafeArea():
  1798. # chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CANNOT_OPEN_PRIVATE_SHOP_IN_SAFE_AREA)
  1799. # return
  1800.  
  1801. inputDialog = uiCommon.InputDialog()
  1802. inputDialog.SetTitle(localeInfo.PRIVATE_SHOP_INPUT_NAME_DIALOG_TITLE)
  1803. inputDialog.SetMaxLength(32)
  1804. inputDialog.SetAcceptEvent(ui.__mem_func__(self.OpenPrivateShopBuilder))
  1805. inputDialog.SetCancelEvent(ui.__mem_func__(self.ClosePrivateShopInputNameDialog))
  1806. inputDialog.Open()
  1807. self.inputDialog = inputDialog
  1808.  
  1809. def ClosePrivateShopInputNameDialog(self):
  1810. self.inputDialog = None
  1811. return True
  1812.  
  1813. def OpenPrivateShopBuilder(self):
  1814.  
  1815. if not self.inputDialog:
  1816. return True
  1817.  
  1818. if not len(self.inputDialog.GetText()):
  1819. return True
  1820.  
  1821. self.privateShopBuilder.Open(self.inputDialog.GetText())
  1822. self.ClosePrivateShopInputNameDialog()
  1823. return True
  1824.  
  1825. def AppearPrivateShop(self, vid, text):
  1826.  
  1827. board = uiPrivateShopBuilder.PrivateShopAdvertisementBoard()
  1828. board.Open(vid, text)
  1829.  
  1830. self.privateShopAdvertisementBoardDict[vid] = board
  1831.  
  1832. def DisappearPrivateShop(self, vid):
  1833.  
  1834. if not self.privateShopAdvertisementBoardDict.has_key(vid):
  1835. return
  1836.  
  1837. del self.privateShopAdvertisementBoardDict[vid]
  1838. uiPrivateShopBuilder.DeleteADBoard(vid)
  1839.  
  1840. #####################################################################################
  1841. ### Equipment ###
  1842.  
  1843. def OpenEquipmentDialog(self, vid):
  1844. dlg = uiEquipmentDialog.EquipmentDialog()
  1845. dlg.SetItemToolTip(self.tooltipItem)
  1846. dlg.SetCloseEvent(ui.__mem_func__(self.CloseEquipmentDialog))
  1847. dlg.Open(vid)
  1848.  
  1849. self.equipmentDialogDict[vid] = dlg
  1850.  
  1851. def SetEquipmentDialogItem(self, vid, slotIndex, vnum, count):
  1852. if not vid in self.equipmentDialogDict:
  1853. return
  1854. self.equipmentDialogDict[vid].SetEquipmentDialogItem(slotIndex, vnum, count)
  1855.  
  1856. def SetEquipmentDialogSocket(self, vid, slotIndex, socketIndex, value):
  1857. if not vid in self.equipmentDialogDict:
  1858. return
  1859. self.equipmentDialogDict[vid].SetEquipmentDialogSocket(slotIndex, socketIndex, value)
  1860.  
  1861. def SetEquipmentDialogAttr(self, vid, slotIndex, attrIndex, type, value):
  1862. if not vid in self.equipmentDialogDict:
  1863. return
  1864. self.equipmentDialogDict[vid].SetEquipmentDialogAttr(slotIndex, attrIndex, type, value)
  1865.  
  1866. def CloseEquipmentDialog(self, vid):
  1867. if not vid in self.equipmentDialogDict:
  1868. return
  1869. del self.equipmentDialogDict[vid]
  1870.  
  1871. #####################################################################################
  1872.  
  1873. #####################################################################################
  1874. ### Quest ###
  1875. def BINARY_ClearQuest(self, index):
  1876. btn = self.__FindQuestButton(index)
  1877. if 0 != btn:
  1878. self.__DestroyQuestButton(btn)
  1879.  
  1880. def RecvQuest(self, index, name):
  1881. # QUEST_LETTER_IMAGE
  1882. self.BINARY_RecvQuest(index, name, "file", localeInfo.GetLetterImageName())
  1883. # END_OF_QUEST_LETTER_IMAGE
  1884.  
  1885. def BINARY_RecvQuest(self, index, name, iconType, iconName):
  1886.  
  1887. btn = self.__FindQuestButton(index)
  1888. if 0 != btn:
  1889. self.__DestroyQuestButton(btn)
  1890.  
  1891. btn = uiWhisper.WhisperButton()
  1892.  
  1893. # QUEST_LETTER_IMAGE
  1894. ##!! 20061026.levites.퀘스트_이미지_교체
  1895. import item
  1896. if "item"==iconType:
  1897. item.SelectItem(int(iconName))
  1898. buttonImageFileName=item.GetIconImageFileName()
  1899. else:
  1900. buttonImageFileName=iconName
  1901.  
  1902. if iconName and (iconType not in ("item", "file")): # type "ex" implied
  1903. btn.SetUpVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName.replace("open", "close")))
  1904. btn.SetOverVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName))
  1905. btn.SetDownVisual("d:/ymir work/ui/game/quest/questicon/%s" % (iconName))
  1906. else:
  1907. if localeInfo.IsEUROPE():
  1908. btn.SetUpVisual(localeInfo.GetLetterCloseImageName())
  1909. btn.SetOverVisual(localeInfo.GetLetterOpenImageName())
  1910. btn.SetDownVisual(localeInfo.GetLetterOpenImageName())
  1911. else:
  1912. btn.SetUpVisual(buttonImageFileName)
  1913. btn.SetOverVisual(buttonImageFileName)
  1914. btn.SetDownVisual(buttonImageFileName)
  1915. btn.Flash()
  1916. # END_OF_QUEST_LETTER_IMAGE
  1917.  
  1918. if localeInfo.IsARABIC():
  1919. btn.SetToolTipText(name, 0, 35)
  1920. btn.ToolTipText.SetHorizontalAlignCenter()
  1921. else:
  1922. btn.SetToolTipText(name, -20, 35)
  1923. btn.ToolTipText.SetHorizontalAlignLeft()
  1924.  
  1925. listOfTypes = iconType.split(",")
  1926. if "blink" in listOfTypes:
  1927. btn.Flash()
  1928.  
  1929. listOfColors = {
  1930. "golden": 0xFFffa200,
  1931. "green": 0xFF00e600,
  1932. "blue": 0xFF0099ff,
  1933. "purple": 0xFFcc33ff,
  1934.  
  1935. "fucsia": 0xFFcc0099,
  1936. "aqua": 0xFF00ffff,
  1937. }
  1938. for k,v in listOfColors.iteritems():
  1939. if k in listOfTypes:
  1940. btn.ToolTipText.SetPackedFontColor(v)
  1941.  
  1942. btn.SetEvent(ui.__mem_func__(self.__StartQuest), btn)
  1943. btn.Show()
  1944.  
  1945. btn.index = index
  1946. btn.name = name
  1947.  
  1948. self.questButtonList.insert(0, btn)
  1949. self.__ArrangeQuestButton()
  1950.  
  1951. #chat.AppendChat(chat.CHAT_TYPE_NOTICE, localeInfo.QUEST_APPEND)
  1952.  
  1953. def __ArrangeQuestButton(self):
  1954.  
  1955. screenWidth = wndMgr.GetScreenWidth()
  1956. screenHeight = wndMgr.GetScreenHeight()
  1957.  
  1958. ##!! 20061026.levites.퀘스트_위치_보정
  1959. if self.wndParty.IsShow():
  1960. xPos = 100 + 30
  1961. else:
  1962. xPos = 20
  1963.  
  1964. if localeInfo.IsARABIC():
  1965. xPos = xPos + 15
  1966.  
  1967. yPos = 170 * screenHeight / 600
  1968. yCount = (screenHeight - 330) / 63
  1969.  
  1970. count = 0
  1971. for btn in self.questButtonList:
  1972.  
  1973. btn.SetPosition(xPos + (int(count/yCount) * 100), yPos + (count%yCount * 63))
  1974. count += 1
  1975. global IsQBHide
  1976. if IsQBHide:
  1977. btn.Hide()
  1978. else:
  1979. btn.Show()
  1980.  
  1981. def __StartQuest(self, btn):
  1982. event.QuestButtonClick(btn.index)
  1983. self.__DestroyQuestButton(btn)
  1984.  
  1985. def __FindQuestButton(self, index):
  1986. for btn in self.questButtonList:
  1987. if btn.index == index:
  1988. return btn
  1989.  
  1990. return 0
  1991.  
  1992. def __DestroyQuestButton(self, btn):
  1993. btn.SetEvent(0)
  1994. self.questButtonList.remove(btn)
  1995. self.__ArrangeQuestButton()
  1996.  
  1997. def HideAllQuestButton(self):
  1998. for btn in self.questButtonList:
  1999. btn.Hide()
  2000.  
  2001. def ShowAllQuestButton(self):
  2002. for btn in self.questButtonList:
  2003. btn.Show()
  2004. #####################################################################################
  2005.  
  2006. #####################################################################################
  2007. ### Whisper ###
  2008.  
  2009. def __InitWhisper(self):
  2010. chat.InitWhisper(self)
  2011.  
  2012. ## 채팅창의 "메시지 보내기"를 눌렀을때 이름 없는 대화창을 여는 함수
  2013. ## 이름이 없기 때문에 기존의 WhisperDialogDict 와 별도로 관리된다.
  2014. def OpenWhisperDialogWithoutTarget(self):
  2015. if not self.dlgWhisperWithoutTarget:
  2016. dlgWhisper = uiWhisper.WhisperDialog(self.MinimizeWhisperDialog, self.CloseWhisperDialog)
  2017. dlgWhisper.BindInterface(self)
  2018. dlgWhisper.LoadDialog()
  2019. dlgWhisper.OpenWithoutTarget(self.RegisterTemporaryWhisperDialog)
  2020. dlgWhisper.SetPosition(self.windowOpenPosition*30,self.windowOpenPosition*30)
  2021. dlgWhisper.Show()
  2022. self.dlgWhisperWithoutTarget = dlgWhisper
  2023.  
  2024. self.windowOpenPosition = (self.windowOpenPosition+1) % 5
  2025.  
  2026. else:
  2027. self.dlgWhisperWithoutTarget.SetTop()
  2028. self.dlgWhisperWithoutTarget.OpenWithoutTarget(self.RegisterTemporaryWhisperDialog)
  2029.  
  2030. ## 이름 없는 대화창에서 이름을 결정했을때 WhisperDialogDict에 창을 넣어주는 함수
  2031. def RegisterTemporaryWhisperDialog(self, name):
  2032. if not self.dlgWhisperWithoutTarget:
  2033. return
  2034.  
  2035. btn = self.__FindWhisperButton(name)
  2036. if 0 != btn:
  2037. self.__DestroyWhisperButton(btn)
  2038.  
  2039. elif self.whisperDialogDict.has_key(name):
  2040. oldDialog = self.whisperDialogDict[name]
  2041. oldDialog.Destroy()
  2042. del self.whisperDialogDict[name]
  2043.  
  2044. self.whisperDialogDict[name] = self.dlgWhisperWithoutTarget
  2045. self.dlgWhisperWithoutTarget.OpenWithTarget(name)
  2046. self.dlgWhisperWithoutTarget = None
  2047. self.__CheckGameMaster(name)
  2048.  
  2049. ## 캐릭터 메뉴의 1:1 대화 하기를 눌렀을때 이름을 가지고 바로 창을 여는 함수
  2050. def OpenWhisperDialog(self, name):
  2051. if not self.whisperDialogDict.has_key(name):
  2052. dlg = self.__MakeWhisperDialog(name)
  2053. dlg.OpenWithTarget(name)
  2054. dlg.chatLine.SetFocus()
  2055. dlg.Show()
  2056.  
  2057. self.__CheckGameMaster(name)
  2058. btn = self.__FindWhisperButton(name)
  2059. if 0 != btn:
  2060. self.__DestroyWhisperButton(btn)
  2061.  
  2062. ## 다른 캐릭터로부터 메세지를 받았을때 일단 버튼만 띄워 두는 함수
  2063. def RecvWhisper(self, name):
  2064. if not self.whisperDialogDict.has_key(name):
  2065. btn = self.__FindWhisperButton(name)
  2066. if 0 == btn:
  2067. btn = self.__MakeWhisperButton(name)
  2068. btn.Flash()
  2069.  
  2070. chat.AppendChat(chat.CHAT_TYPE_NOTICE, localeInfo.RECEIVE_MESSAGE % (name))
  2071.  
  2072. else:
  2073. btn.Flash()
  2074. elif self.IsGameMasterName(name):
  2075. dlg = self.whisperDialogDict[name]
  2076. dlg.SetGameMasterLook()
  2077.  
  2078. def MakeWhisperButton(self, name):
  2079. self.__MakeWhisperButton(name)
  2080.  
  2081. ## 버튼을 눌렀을때 창을 여는 함수
  2082. def ShowWhisperDialog(self, btn):
  2083. try:
  2084. self.__MakeWhisperDialog(btn.name)
  2085. dlgWhisper = self.whisperDialogDict[btn.name]
  2086. dlgWhisper.OpenWithTarget(btn.name)
  2087. dlgWhisper.Show()
  2088. self.__CheckGameMaster(btn.name)
  2089. except:
  2090. import dbg
  2091. dbg.TraceError("interface.ShowWhisperDialog - Failed to find key")
  2092.  
  2093. ## 버튼 초기화
  2094. self.__DestroyWhisperButton(btn)
  2095.  
  2096. ## WhisperDialog 창에서 최소화 명령을 수행했을때 호출되는 함수
  2097. ## 창을 최소화 합니다.
  2098. def MinimizeWhisperDialog(self, name):
  2099.  
  2100. if 0 != name:
  2101. self.__MakeWhisperButton(name)
  2102.  
  2103. self.CloseWhisperDialog(name)
  2104.  
  2105. ## WhisperDialog 창에서 닫기 명령을 수행했을때 호출되는 함수
  2106. ## 창을 지웁니다.
  2107. def CloseWhisperDialog(self, name):
  2108.  
  2109. if 0 == name:
  2110.  
  2111. if self.dlgWhisperWithoutTarget:
  2112. self.dlgWhisperWithoutTarget.Destroy()
  2113. self.dlgWhisperWithoutTarget = None
  2114.  
  2115. return
  2116.  
  2117. try:
  2118. dlgWhisper = self.whisperDialogDict[name]
  2119. dlgWhisper.Destroy()
  2120. del self.whisperDialogDict[name]
  2121. except:
  2122. import dbg
  2123. dbg.TraceError("interface.CloseWhisperDialog - Failed to find key")
  2124.  
  2125. ## 버튼의 개수가 바뀌었을때 버튼을 재정렬 하는 함수
  2126. def __ArrangeWhisperButton(self):
  2127.  
  2128. screenWidth = wndMgr.GetScreenWidth()
  2129. screenHeight = wndMgr.GetScreenHeight()
  2130.  
  2131. xPos = screenWidth - 70
  2132. yPos = 170 * screenHeight / 600
  2133. yCount = (screenHeight - 330) / 63
  2134. #yCount = (screenHeight - 285) / 63
  2135.  
  2136. count = 0
  2137. for button in self.whisperButtonList:
  2138.  
  2139. button.SetPosition(xPos + (int(count/yCount) * -50), yPos + (count%yCount * 63))
  2140. count += 1
  2141.  
  2142. ## 이름으로 Whisper 버튼을 찾아 리턴해 주는 함수
  2143. ## 버튼은 딕셔너리로 하지 않는 것은 정렬 되어 버려 순서가 유지 되지 않으며
  2144. ## 이로 인해 ToolTip들이 다른 버튼들에 의해 가려지기 때문이다.
  2145. def __FindWhisperButton(self, name):
  2146. for button in self.whisperButtonList:
  2147. if button.name == name:
  2148. return button
  2149.  
  2150. return 0
  2151.  
  2152. ## 창을 만듭니다.
  2153. def __MakeWhisperDialog(self, name):
  2154. dlgWhisper = uiWhisper.WhisperDialog(self.MinimizeWhisperDialog, self.CloseWhisperDialog)
  2155. dlgWhisper.BindInterface(self)
  2156. dlgWhisper.LoadDialog()
  2157. dlgWhisper.SetPosition(self.windowOpenPosition*30,self.windowOpenPosition*30)
  2158. self.whisperDialogDict[name] = dlgWhisper
  2159.  
  2160. self.windowOpenPosition = (self.windowOpenPosition+1) % 5
  2161.  
  2162. return dlgWhisper
  2163.  
  2164. ## 버튼을 만듭니다.
  2165. def __MakeWhisperDialog(self, name):
  2166. dlgWhisper = uiWhisper.WhisperDialog(self.MinimizeWhisperDialog, self.CloseWhisperDialog)
  2167. dlgWhisper.BindInterface(self)
  2168. dlgWhisper.LoadDialog()
  2169. dlgWhisper.SetPosition(self.windowOpenPosition*30,self.windowOpenPosition*30)
  2170. self.whisperDialogDict[name] = dlgWhisper
  2171.  
  2172. self.windowOpenPosition = (self.windowOpenPosition+1) % 5
  2173.  
  2174. return dlgWhisper
  2175.  
  2176. def __MakeWhisperButton(self, name):
  2177. whisperButton = uiWhisper.WhisperButton()
  2178. whisperButton.SetUpVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
  2179. whisperButton.SetOverVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
  2180. whisperButton.SetDownVisual("d:/ymir work/ui/game/windows/btn_mail_up.sub")
  2181. if self.IsGameMasterName(name):
  2182. whisperButton.SetToolTipTextWithColor(name, 0xffffa200)
  2183. else:
  2184. whisperButton.SetToolTipText(name)
  2185. whisperButton.ToolTipText.SetHorizontalAlignCenter()
  2186. whisperButton.SetEvent(ui.__mem_func__(self.ShowWhisperDialog), whisperButton)
  2187. whisperButton.Show()
  2188. whisperButton.name = name
  2189. self.whisperButtonList.insert(0, whisperButton)
  2190. self.__ArrangeWhisperButton()
  2191. return whisperButton
  2192.  
  2193. def __DestroyWhisperButton(self, button):
  2194. button.SetEvent(0)
  2195. self.whisperButtonList.remove(button)
  2196. self.__ArrangeWhisperButton()
  2197.  
  2198. def HideAllWhisperButton(self):
  2199. for btn in self.whisperButtonList:
  2200. btn.Hide()
  2201.  
  2202. def ShowAllWhisperButton(self):
  2203. for btn in self.whisperButtonList:
  2204. btn.Show()
  2205.  
  2206. def __CheckGameMaster(self, name):
  2207. if not self.listGMName.has_key(name):
  2208. return
  2209. if self.whisperDialogDict.has_key(name):
  2210. dlg = self.whisperDialogDict[name]
  2211. dlg.SetGameMasterLook()
  2212.  
  2213. def RegisterGameMasterName(self, name):
  2214. if self.listGMName.has_key(name):
  2215. return
  2216. self.listGMName[name] = "GM"
  2217.  
  2218. def IsGameMasterName(self, name):
  2219. if self.listGMName.has_key(name):
  2220. return True
  2221. else:
  2222. return False
  2223.  
  2224. #####################################################################################
  2225.  
  2226. #####################################################################################
  2227. ### Guild Building ###
  2228.  
  2229. def BUILD_OpenWindow(self):
  2230. self.wndGuildBuilding = uiGuild.BuildGuildBuildingWindow()
  2231. self.wndGuildBuilding.Open()
  2232. self.wndGuildBuilding.wnds = self.__HideWindows()
  2233. self.wndGuildBuilding.SetCloseEvent(ui.__mem_func__(self.BUILD_CloseWindow))
  2234.  
  2235. def BUILD_CloseWindow(self):
  2236. self.__ShowWindows(self.wndGuildBuilding.wnds)
  2237. self.wndGuildBuilding = None
  2238.  
  2239. def BUILD_OnUpdate(self):
  2240. if not self.wndGuildBuilding:
  2241. return
  2242.  
  2243. if self.wndGuildBuilding.IsPositioningMode():
  2244. import background
  2245. x, y, z = background.GetPickingPoint()
  2246. self.wndGuildBuilding.SetBuildingPosition(x, y, z)
  2247.  
  2248. def BUILD_OnMouseLeftButtonDown(self):
  2249. if not self.wndGuildBuilding:
  2250. return
  2251.  
  2252. # GUILD_BUILDING
  2253. if self.wndGuildBuilding.IsPositioningMode():
  2254. self.wndGuildBuilding.SettleCurrentPosition()
  2255. return True
  2256. elif self.wndGuildBuilding.IsPreviewMode():
  2257. pass
  2258. else:
  2259. return True
  2260. # END_OF_GUILD_BUILDING
  2261. return False
  2262.  
  2263. def BUILD_OnMouseLeftButtonUp(self):
  2264. if not self.wndGuildBuilding:
  2265. return
  2266.  
  2267. if not self.wndGuildBuilding.IsPreviewMode():
  2268. return True
  2269.  
  2270. return False
  2271.  
  2272. def BULID_EnterGuildArea(self, areaID):
  2273. # GUILD_BUILDING
  2274. mainCharacterName = player.GetMainCharacterName()
  2275. masterName = guild.GetGuildMasterName()
  2276.  
  2277. if mainCharacterName != masterName:
  2278. return
  2279.  
  2280. if areaID != player.GetGuildID():
  2281. return
  2282. # END_OF_GUILD_BUILDING
  2283.  
  2284. self.wndGameButton.ShowBuildButton()
  2285.  
  2286. def BULID_ExitGuildArea(self, areaID):
  2287. self.wndGameButton.HideBuildButton()
  2288.  
  2289. #####################################################################################
  2290.  
  2291. def IsEditLineFocus(self):
  2292. if self.ChatWindow.chatLine.IsFocus():
  2293. return 1
  2294.  
  2295. if self.ChatWindow.chatToLine.IsFocus():
  2296. return 1
  2297.  
  2298. return 0
  2299.  
  2300. def EmptyFunction(self):
  2301. pass
  2302.  
  2303. if __name__ == "__main__":
  2304.  
  2305. import app
  2306. import wndMgr
  2307. import systemSetting
  2308. import mouseModule
  2309. import grp
  2310. import ui
  2311. import localeInfo
  2312.  
  2313. app.SetMouseHandler(mouseModule.mouseController)
  2314. app.SetHairColorEnable(True)
  2315. wndMgr.SetMouseHandler(mouseModule.mouseController)
  2316. wndMgr.SetScreenSize(systemSetting.GetWidth(), systemSetting.GetHeight())
  2317. app.Create(localeInfo.APP_TITLE, systemSetting.GetWidth(), systemSetting.GetHeight(), 1)
  2318. mouseModule.mouseController.Create()
  2319.  
  2320. class TestGame(ui.Window):
  2321. def __init__(self):
  2322. ui.Window.__init__(self)
  2323.  
  2324. localeInfo.LoadLocaleData()
  2325. player.SetItemData(0, 27001, 10)
  2326. player.SetItemData(1, 27004, 10)
  2327.  
  2328. self.interface = Interface()
  2329. self.interface.MakeInterface()
  2330. self.interface.ShowDefaultWindows()
  2331. self.interface.RefreshInventory()
  2332. #self.interface.OpenCubeWindow()
  2333.  
  2334. def __del__(self):
  2335. ui.Window.__del__(self)
  2336.  
  2337. def OnUpdate(self):
  2338. app.UpdateGame()
  2339.  
  2340. def OnRender(self):
  2341. app.RenderGame()
  2342. grp.PopState()
  2343. grp.SetInterfaceRenderState()
  2344.  
  2345. game = TestGame()
  2346. game.SetSize(systemSetting.GetWidth(), systemSetting.GetHeight())
  2347. game.Show()
  2348.  
  2349. app.Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement