1. import ui
  2. import net
  3. import item
  4. import skill
  5. import localeInfo
  6. import wndMgr
  7. import player
  8. import constInfo
  9. import mouseModule
  10. import uiScriptLocale
  11. import app
  12. MOUSE_SETTINGS = [0, 0]
  13. def InitMouseButtonSettings(left, right):
  14. global MOUSE_SETTINGS
  15. MOUSE_SETTINGS = [left, right]
  16. def SetMouseButtonSetting(dir, event):
  17. global MOUSE_SETTINGS
  18. MOUSE_SETTINGS[dir] = event
  19. def GetMouseButtonSettings():
  20. global MOUSE_SETTINGS
  21. return MOUSE_SETTINGS
  22. def SaveMouseButtonSettings():
  23. global MOUSE_SETTINGS
  24. open("mouse.cfg", "w").write("%s\t%s" % tuple(MOUSE_SETTINGS))
  25. def LoadMouseButtonSettings():
  26. global MOUSE_SETTINGS
  27. tokens = open("mouse.cfg", "r").read().split()
  28. if len(tokens) != 2:
  29. raise RuntimeError, "MOUSE_SETTINGS_FILE_ERROR"
  30. MOUSE_SETTINGS[0] = int(tokens[0])
  31. MOUSE_SETTINGS[1] = int(tokens[1])
  32. def unsigned32(n):
  33. return n & 0xFFFFFFFFL
  34. #-------------------Giftbox Begin------------------------------
  35. class GiftBox(ui.ScriptWindow):
  36. class TextToolTip(ui.Window):
  37. def __init__(self):
  38. ui.Window.__init__(self, "TOP_MOST")
  39. self.SetWindowName("GiftBox")
  40. textLine = ui.TextLine()
  41. textLine.SetParent(self)
  42. textLine.SetHorizontalAlignCenter()
  43. textLine.SetOutline()
  44. textLine.Show()
  45. self.textLine = textLine
  46. def __del__(self):
  47. ui.Window.__del__(self)
  48. def SetText(self, text):
  49. self.textLine.SetText(text)
  50. def OnRender(self):
  51. (mouseX, mouseY) = wndMgr.GetMousePosition()
  52. self.textLine.SetPosition(mouseX, mouseY - 15)
  53. def __init__(self):
  54. #print "NEW TASKBAR ----------------------------------------------------------------------------"
  55. ui.ScriptWindow.__init__(self)
  56. self.tooltipGift = self.TextToolTip()
  57. self.tooltipGift.Show()
  58. def __del__(self):
  59. #print "---------------------------------------------------------------------------- DELETE TASKBAR"
  60. ui.ScriptWindow.__del__(self)
  61. def LoadWindow(self):
  62. try:
  63. pyScrLoader = ui.PythonScriptLoader()
  64. pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "giftbox.py")
  65. except:
  66. import exception
  67. exception.Abort("GiftBox.LoadWindow.LoadObject")
  68. self.giftBoxIcon = self.GetChild("GiftBox_Icon")
  69. self.giftBoxToolTip = self.GetChild("GiftBox_ToolTip")
  70. def Destroy(self):
  71. self.giftBoxIcon = 0
  72. self.giftBoxToolTip = 0
  73. #-------------------Giftbox End------------------------------
  74. class EnergyBar(ui.ScriptWindow):
  75. class TextToolTip(ui.Window):
  76. def __init__(self):
  77. ui.Window.__init__(self, "TOP_MOST")
  78. self.SetWindowName("EnergyBar")
  79. textLine = ui.TextLine()
  80. textLine.SetParent(self)
  81. textLine.SetHorizontalAlignCenter()
  82. textLine.SetOutline()
  83. textLine.Show()
  84. self.textLine = textLine
  85. def __del__(self):
  86. ui.Window.__del__(self)
  87. def SetText(self, text):
  88. self.textLine.SetText(text)
  89. def OnRender(self):
  90. (mouseX, mouseY) = wndMgr.GetMousePosition()
  91. self.textLine.SetPosition(mouseX, mouseY - 15)
  92. def __init__(self):
  93. #print "NEW TASKBAR ----------------------------------------------------------------------------"
  94. ui.ScriptWindow.__init__(self)
  95. self.tooltipEnergy = self.TextToolTip()
  96. self.tooltipEnergy.Show()
  97. def __del__(self):
  98. #print "---------------------------------------------------------------------------- DELETE TASKBAR"
  99. ui.ScriptWindow.__del__(self)
  100. def LoadWindow(self):
  101. try:
  102. pyScrLoader = ui.PythonScriptLoader()
  103. pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "EnergyBar.py")
  104. except:
  105. import exception
  106. exception.Abort("EnergyBar.LoadWindow.LoadObject")
  107. self.energyEmpty = self.GetChild("EnergyGauge_Empty")
  108. self.energyHungry = self.GetChild("EnergyGauge_Hungry")
  109. self.energyFull = self.GetChild("EnergyGauge_Full")
  110. self.energyGaugeBoard = self.GetChild("EnergyGauge_Board")
  111. self.energyGaugeToolTip = self.GetChild("EnergyGauge_ToolTip")
  112. def Destroy(self):
  113. self.energyEmpty = None
  114. self.energyHungry = None
  115. self.energyFull = None
  116. self.energyGaugeBoard = 0
  117. self.energyGaugeToolTip = 0
  118. self.tooltipEnergy = 0
  119. ## Gauge
  120. def RefreshStatus(self):
  121. pointEnergy = player.GetStatus (player.ENERGY)
  122. leftTimeEnergy = player.GetStatus (player.ENERGY_END_TIME) - app.GetGlobalTimeStamp()
  123. # Ãæ±âȯ Áö¼Ó ½Ã°£ = 2½Ã°£.
  124. self.SetEnergy (pointEnergy, leftTimeEnergy, 7200)
  125. def SetEnergy (self, point, leftTime, maxTime):
  126. leftTime = max (leftTime, 0)
  127. maxTime = max (maxTime, 0)
  128. self.energyEmpty.Hide()
  129. self.energyHungry.Hide()
  130. self.energyFull.Hide()
  131. if leftTime == 0:
  132. self.energyEmpty.Show()
  133. elif ((leftTime * 100) / maxTime) < 15:
  134. self.energyHungry.Show()
  135. else:
  136. self.energyFull.Show()
  137. self.tooltipEnergy.SetText("%s" % (localeInfo.TOOLTIP_ENERGY(point)))
  138. def OnUpdate(self):
  139. if True == self.energyGaugeToolTip.IsIn():
  140. self.RefreshStatus()
  141. self.tooltipEnergy.Show()
  142. else:
  143. self.tooltipEnergy.Hide()
  144. class ExpandedTaskBar(ui.ScriptWindow):
  145. BUTTON_DRAGON_SOUL = 0
  146. def __init__(self):
  147. ui.Window.__init__(self)
  148. self.SetWindowName("ExpandedTaskBar")
  149. def LoadWindow(self):
  150. try:
  151. pyScrLoader = ui.PythonScriptLoader()
  152. pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "ExpandedTaskBar.py")
  153. except:
  154. import exception
  155. exception.Abort("ExpandedTaskBar.LoadWindow.LoadObject")
  156. self.expandedTaskBarBoard = self.GetChild("ExpanedTaskBar_Board")
  157. self.toggleButtonDict = {}
  158. self.toggleButtonDict[ExpandedTaskBar.BUTTON_DRAGON_SOUL] = self.GetChild("DragonSoulButton")
  159. self.toggleButtonDict[ExpandedTaskBar.BUTTON_DRAGON_SOUL].SetParent(self)
  160. def SetTop(self):
  161. super(ExpandedTaskBar, self).SetTop()
  162. for button in self.toggleButtonDict.values():
  163. button.SetTop()
  164. def Show(self):
  165. ui.ScriptWindow.Show(self)
  166. def Close(self):
  167. self.Hide()
  168. def SetToolTipText(self, eButton, text):
  169. self.toggleButtonDict[eButton].SetToolTipText(text)
  170. def SetToggleButtonEvent(self, eButton, kEventFunc):
  171. self.toggleButtonDict[eButton].SetEvent(kEventFunc)
  172. def OnPressEscapeKey(self):
  173. self.Close()
  174. return True
  175. class TaskBar(ui.ScriptWindow):
  176. BUTTON_CHARACTER = 0
  177. BUTTON_INVENTORY = 1
  178. BUTTON_MESSENGER = 2
  179. BUTTON_SYSTEM = 3
  180. BUTTON_CHAT = 4
  181. BUTTON_EXPAND = 4
  182. IS_EXPANDED = False
  183. MOUSE_BUTTON_LEFT = 0
  184. MOUSE_BUTTON_RIGHT = 1
  185. NONE = 255
  186. EVENT_MOVE = 0
  187. EVENT_ATTACK = 1
  188. EVENT_MOVE_AND_ATTACK = 2
  189. EVENT_CAMERA = 3
  190. EVENT_SKILL = 4
  191. EVENT_AUTO = 5
  192. GAUGE_WIDTH = 95
  193. GAUGE_HEIGHT = 13
  194. QUICKPAGE_NUMBER_FILENAME = [
  195. "d:/ymir work/ui/game/taskbar/1.sub",
  196. "d:/ymir work/ui/game/taskbar/2.sub",
  197. "d:/ymir work/ui/game/taskbar/3.sub",
  198. "d:/ymir work/ui/game/taskbar/4.sub",
  199. ]
  200. #gift icon show and hide
  201. def ShowGift(self):
  202. if not localeInfo.IsBRAZIL():
  203. self.wndGiftBox.Show()
  204. def HideGift(self):
  205. self.wndGiftBox.Hide()
  206. class TextToolTip(ui.Window):
  207. def __init__(self):
  208. ui.Window.__init__(self, "TOP_MOST")
  209. textLine = ui.TextLine()
  210. textLine.SetParent(self)
  211. textLine.SetHorizontalAlignCenter()
  212. textLine.SetOutline()
  213. textLine.Show()
  214. self.textLine = textLine
  215. def __del__(self):
  216. ui.Window.__del__(self)
  217. def SetText(self, text):
  218. self.textLine.SetText(text)
  219. def OnRender(self):
  220. (mouseX, mouseY) = wndMgr.GetMousePosition()
  221. self.textLine.SetPosition(mouseX, mouseY - 15)
  222. class SkillButton(ui.SlotWindow):
  223. def __init__(self):
  224. ui.SlotWindow.__init__(self)
  225. self.event = 0
  226. self.arg = 0
  227. self.slotIndex = 0
  228. self.skillIndex = 0
  229. slotIndex = 0
  230. wndMgr.SetSlotBaseImage(self.hWnd, "d:/ymir work/ui/public/slot_base.sub", 1.0, 1.0, 1.0, 1.0)
  231. wndMgr.AppendSlot(self.hWnd, slotIndex, 0, 0, 32, 32)
  232. self.SetCoverButton(slotIndex, "d:/ymir work/ui/public/slot_cover_button_01.sub",\
  233. "d:/ymir work/ui/public/slot_cover_button_02.sub",\
  234. "d:/ymir work/ui/public/slot_cover_button_03.sub",\
  235. "d:/ymir work/ui/public/slot_cover_button_04.sub", True, False)
  236. self.SetSize(32, 32)
  237. def __del__(self):
  238. ui.SlotWindow.__del__(self)
  239. def Destroy(self):
  240. if 0 != self.tooltipSkill:
  241. self.tooltipSkill.HideToolTip()
  242. def RefreshSkill(self):
  243. if 0 != self.slotIndex:
  244. self.SetSkill(self.slotIndex)
  245. def SetSkillToolTip(self, tooltip):
  246. self.tooltipSkill = tooltip
  247. def SetSkill(self, skillSlotNumber):
  248. slotNumber = 0
  249. skillIndex = player.GetSkillIndex(skillSlotNumber)
  250. skillGrade = player.GetSkillGrade(skillSlotNumber)
  251. skillLevel = player.GetSkillLevel(skillSlotNumber)
  252. skillType = skill.GetSkillType(skillIndex)
  253. self.skillIndex = skillIndex
  254. if 0 == self.skillIndex:
  255. self.ClearSlot(slotNumber)
  256. return
  257. self.slotIndex = skillSlotNumber
  258. self.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel)
  259. self.SetSlotCountNew(slotNumber, skillGrade, skillLevel)
  260. ## NOTE : CoolTime üũ
  261. if player.IsSkillCoolTime(skillSlotNumber):
  262. (coolTime, elapsedTime) = player.GetSkillCoolTime(skillSlotNumber)
  263. self.SetSlotCoolTime(slotNumber, coolTime, elapsedTime)
  264. ## NOTE : Activate µÇ¾î ÀÖ´Ù¸é ¾ÆÀÌÄܵµ ¾÷µ¥ÀÌÆ®
  265. if player.IsSkillActive(skillSlotNumber):
  266. self.ActivateSlot(slotNumber)
  267. def SetSkillEvent(self, event, arg=0):
  268. self.event = event
  269. self.arg = arg
  270. def GetSkillIndex(self):
  271. return self.skillIndex
  272. def GetSlotIndex(self):
  273. return self.slotIndex
  274. def Activate(self, coolTime):
  275. self.SetSlotCoolTime(0, coolTime)
  276. if skill.IsToggleSkill(self.skillIndex):
  277. self.ActivateSlot(0)
  278. def Deactivate(self):
  279. if skill.IsToggleSkill(self.skillIndex):
  280. self.DeactivateSlot(0)
  281. def OnOverInItem(self, dummy):
  282. self.tooltipSkill.SetSkill(self.skillIndex)
  283. def OnOverOutItem(self):
  284. self.tooltipSkill.HideToolTip()
  285. def OnSelectItemSlot(self, dummy):
  286. if 0 != self.event:
  287. if 0 != self.arg:
  288. self.event(self.arg)
  289. else:
  290. self.event()
  291. def __init__(self):
  292. #print "NEW TASKBAR ----------------------------------------------------------------------------"
  293. ui.ScriptWindow.__init__(self, "TOP_MOST")
  294. self.quickPageNumImageBox = None
  295. self.tooltipItem = 0
  296. self.tooltipSkill = 0
  297. self.mouseModeButtonList = [ ui.ScriptWindow("TOP_MOST"), ui.ScriptWindow("TOP_MOST") ]
  298. self.tooltipHP = self.TextToolTip()
  299. self.tooltipHP.Show()
  300. self.tooltipSP = self.TextToolTip()
  301. self.tooltipSP.Show()
  302. self.tooltipST = self.TextToolTip()
  303. self.tooltipST.Show()
  304. self.tooltipEXP = self.TextToolTip()
  305. self.tooltipEXP.Show()
  306. self.skillCategoryNameList = [ "ACTIVE_1", "ACTIVE_2", "ACTIVE_3" ]
  307. self.skillPageStartSlotIndexDict = {
  308. "ACTIVE_1" : 1,
  309. "ACTIVE_2" : 21,
  310. "ACTIVE_3" : 41,
  311. }
  312. self.selectSkillButtonList = []
  313. self.lastUpdateQuickSlot = 0
  314. self.SetWindowName("TaskBar")
  315. def __del__(self):
  316. #print "---------------------------------------------------------------------------- DELETE TASKBAR"
  317. ui.ScriptWindow.__del__(self)
  318. def LoadWindow(self):
  319. try:
  320. pyScrLoader = ui.PythonScriptLoader()
  321. if constInfo.IN_GAME_SHOP_ENABLE:
  322. pyScrLoader.LoadScriptFile(self, uiScriptLocale.LOCALE_UISCRIPT_PATH + "TaskBar.py")
  323. else:
  324. pyScrLoader.LoadScriptFile(self, "UIScript/TaskBar.py")
  325. pyScrLoader.LoadScriptFile(self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT], "UIScript/MouseButtonWindow.py")
  326. pyScrLoader.LoadScriptFile(self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT], "UIScript/RightMouseButtonWindow.py")
  327. except:
  328. import exception
  329. exception.Abort("TaskBar.LoadWindow.LoadObject")
  330. self.quickslot = []
  331. self.quickslot.append(self.GetChild("quick_slot_1"))
  332. self.quickslot.append(self.GetChild("quick_slot_2"))
  333. for slot in self.quickslot:
  334. slot.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
  335. slot.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptyQuickSlot))
  336. slot.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemQuickSlot))
  337. slot.SetUnselectItemSlotEvent(ui.__mem_func__(self.UnselectItemQuickSlot))
  338. slot.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
  339. slot.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
  340. toggleButtonDict = {}
  341. toggleButtonDict[TaskBar.BUTTON_CHARACTER]=self.GetChild("CharacterButton")
  342. toggleButtonDict[TaskBar.BUTTON_INVENTORY]=self.GetChild("InventoryButton")
  343. toggleButtonDict[TaskBar.BUTTON_MESSENGER]=self.GetChild("MessengerButton")
  344. toggleButtonDict[TaskBar.BUTTON_SYSTEM]=self.GetChild("SystemButton")
  345. # ChatButton, ExpandButton µÑ Áß Çϳª´Â ¹İµå½Ã Á¸ÀçÇÑ´Ù.
  346. try:
  347. toggleButtonDict[TaskBar.BUTTON_CHAT]=self.GetChild("ChatButton")
  348. except:
  349. toggleButtonDict[TaskBar.BUTTON_EXPAND]=self.GetChild("ExpandButton")
  350. TaskBar.IS_EXPANDED = True
  351. if localeInfo.IsARABIC():
  352. systemButton = toggleButtonDict[TaskBar.BUTTON_SYSTEM]
  353. if systemButton.ToolTipText:
  354. tx, ty = systemButton.ToolTipText.GetLocalPosition()
  355. tw = systemButton.ToolTipText.GetWidth()
  356. systemButton.ToolTipText.SetPosition(-tw/2, ty)
  357. expGauge = []
  358. expGauge.append(self.GetChild("EXPGauge_01"))
  359. expGauge.append(self.GetChild("EXPGauge_02"))
  360. expGauge.append(self.GetChild("EXPGauge_03"))
  361. expGauge.append(self.GetChild("EXPGauge_04"))
  362. for exp in expGauge:
  363. exp.SetSize(0, 0)
  364. self.quickPageNumImageBox=self.GetChild("QuickPageNumber")
  365. self.GetChild("QuickPageUpButton").SetEvent(ui.__mem_func__(self.__OnClickQuickPageUpButton))
  366. self.GetChild("QuickPageDownButton").SetEvent(ui.__mem_func__(self.__OnClickQuickPageDownButton))
  367. mouseLeftButtonModeButton = self.GetChild("LeftMouseButton")
  368. mouseRightButtonModeButton = self.GetChild("RightMouseButton")
  369. mouseLeftButtonModeButton.SetEvent(ui.__mem_func__(self.ToggleLeftMouseButtonModeWindow))
  370. mouseRightButtonModeButton.SetEvent(ui.__mem_func__(self.ToggleRightMouseButtonModeWindow))
  371. self.curMouseModeButton = [ mouseLeftButtonModeButton, mouseRightButtonModeButton ]
  372. (xLocalRight, yLocalRight) = mouseRightButtonModeButton.GetLocalPosition()
  373. self.curSkillButton = self.SkillButton()
  374. self.curSkillButton.SetParent(self)
  375. self.curSkillButton.SetPosition(xLocalRight, 3)
  376. self.curSkillButton.SetSkillEvent(ui.__mem_func__(self.ToggleRightMouseButtonModeWindow))
  377. self.curSkillButton.Hide()
  378. (xLeft, yLeft) = mouseLeftButtonModeButton.GetGlobalPosition()
  379. (xRight, yRight) = mouseRightButtonModeButton.GetGlobalPosition()
  380. leftModeButtonList = self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT]
  381. leftModeButtonList.SetPosition(xLeft, yLeft - leftModeButtonList.GetHeight()-5)
  382. rightModeButtonList = self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT]
  383. rightModeButtonList.SetPosition(xRight - rightModeButtonList.GetWidth() + 32, yRight - rightModeButtonList.GetHeight()-5)
  384. rightModeButtonList.GetChild("button_skill").SetEvent(lambda adir=self.MOUSE_BUTTON_RIGHT, aevent=self.EVENT_SKILL: self.SelectMouseButtonEvent(adir, aevent))
  385. rightModeButtonList.GetChild("button_skill").Hide()
  386. mouseImage = ui.ImageBox("TOP_MOST")
  387. mouseImage.AddFlag("float")
  388. mouseImage.LoadImage("d:/ymir work/ui/game/taskbar/mouse_button_camera_01.sub")
  389. mouseImage.SetPosition(xRight, wndMgr.GetScreenHeight() - 34)
  390. mouseImage.Hide()
  391. self.mouseImage = mouseImage
  392. dir = self.MOUSE_BUTTON_LEFT
  393. wnd = self.mouseModeButtonList[dir]
  394. wnd.GetChild("button_move_and_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_MOVE_AND_ATTACK: self.SelectMouseButtonEvent(adir, aevent))
  395. wnd.GetChild("button_auto_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_AUTO: self.SelectMouseButtonEvent(adir, aevent))
  396. wnd.GetChild("button_camera").SetEvent(lambda adir=dir, aevent=self.EVENT_CAMERA: self.SelectMouseButtonEvent(adir, aevent))
  397. dir = self.MOUSE_BUTTON_RIGHT
  398. wnd = self.mouseModeButtonList[dir]
  399. wnd.GetChild("button_move_and_attack").SetEvent(lambda adir=dir, aevent=self.EVENT_MOVE_AND_ATTACK: self.SelectMouseButtonEvent(adir, aevent))
  400. wnd.GetChild("button_camera").SetEvent(lambda adir=dir, aevent=self.EVENT_CAMERA: self.SelectMouseButtonEvent(adir, aevent))
  401. self.toggleButtonDict = toggleButtonDict
  402. self.expGauge = expGauge
  403. if constInfo.IN_GAME_SHOP_ENABLE:
  404. self.rampageGauge1 = self.GetChild("RampageGauge")
  405. self.rampageGauge1.OnMouseOverIn = ui.__mem_func__(self.__RampageGauge_OverIn)
  406. self.rampageGauge2 = self.GetChild("RampageGauge2")
  407. self.rampageGauge2.OnMouseOverOut = ui.__mem_func__(self.__RampageGauge_OverOut)
  408. self.rampageGauge2.OnMouseLeftButtonUp = ui.__mem_func__(self.__RampageGauge_Click)
  409. print "[DEBUG]: constInfo.IN_GAME_SHOP_ENABLE / self.rampageGauge1",constInfo.IN_GAME_SHOP_ENABLE, self.rampageGauge1
  410. self.__RampageGauge_OverOut()
  411. self.hpGauge = self.GetChild("HPGauge")
  412. self.mpGauge = self.GetChild("SPGauge")
  413. self.stGauge = self.GetChild("STGauge")
  414. self.hpRecoveryGaugeBar = self.GetChild("HPRecoveryGaugeBar")
  415. self.spRecoveryGaugeBar = self.GetChild("SPRecoveryGaugeBar")
  416. self.hpGaugeBoard=self.GetChild("HPGauge_Board")
  417. self.mpGaugeBoard=self.GetChild("SPGauge_Board")
  418. self.stGaugeBoard=self.GetChild("STGauge_Board")
  419. self.expGaugeBoard=self.GetChild("EXP_Gauge_Board")
  420. #giftbox object
  421. wndGiftBox = GiftBox()
  422. wndGiftBox.LoadWindow()
  423. self.wndGiftBox = wndGiftBox
  424. self.__LoadMouseSettings()
  425. self.RefreshStatus()
  426. self.RefreshQuickSlot()
  427. def __RampageGauge_OverIn(self):
  428. print "rampage_over_in"
  429. self.rampageGauge2.Show()
  430. self.rampageGauge1.Hide()
  431. def __RampageGauge_OverOut(self):
  432. print "rampage_over_out"
  433. self.rampageGauge2.Hide()
  434. self.rampageGauge1.Show()
  435. def __RampageGauge_Click(self):
  436. print "rampage_up"
  437. net.SendChatPacket("/in_game_mall")
  438. # gift icon hide when click mall icon
  439. self.wndGiftBox.Hide()
  440. def __LoadMouseSettings(self):
  441. try:
  442. LoadMouseButtonSettings()
  443. (mouseLeftButtonEvent, mouseRightButtonEvent) = GetMouseButtonSettings()
  444. if not self.__IsInSafeMouseButtonSettingRange(mouseLeftButtonEvent) or not self.__IsInSafeMouseButtonSettingRange(mouseRightButtonEvent):
  445. raise RuntimeError, "INVALID_MOUSE_BUTTON_SETTINGS"
  446. except:
  447. InitMouseButtonSettings(self.EVENT_MOVE_AND_ATTACK, self.EVENT_CAMERA)
  448. (mouseLeftButtonEvent, mouseRightButtonEvent) = GetMouseButtonSettings()
  449. try:
  450. self.SelectMouseButtonEvent(self.MOUSE_BUTTON_LEFT, mouseLeftButtonEvent)
  451. self.SelectMouseButtonEvent(self.MOUSE_BUTTON_RIGHT, mouseRightButtonEvent)
  452. except:
  453. InitMouseButtonSettings(self.EVENT_MOVE_AND_ATTACK, self.EVENT_CAMERA)
  454. (mouseLeftButtonEvent, mouseRightButtonEvent) = GetMouseButtonSettings()
  455. self.SelectMouseButtonEvent(self.MOUSE_BUTTON_LEFT, mouseLeftButtonEvent)
  456. self.SelectMouseButtonEvent(self.MOUSE_BUTTON_RIGHT, mouseRightButtonEvent)
  457. def __IsInSafeMouseButtonSettingRange(self, arg):
  458. return arg >= self.EVENT_MOVE and arg <= self.EVENT_AUTO
  459. def Destroy(self):
  460. SaveMouseButtonSettings()
  461. self.ClearDictionary()
  462. self.mouseModeButtonList[0].ClearDictionary()
  463. self.mouseModeButtonList[1].ClearDictionary()
  464. self.mouseModeButtonList = 0
  465. self.curMouseModeButton = 0
  466. self.curSkillButton = 0
  467. self.selectSkillButtonList = 0
  468. self.expGauge = None
  469. self.hpGauge = None
  470. self.mpGauge = None
  471. self.stGauge = None
  472. self.hpRecoveryGaugeBar = None
  473. self.spRecoveryGaugeBar = None
  474. self.tooltipItem = 0
  475. self.tooltipSkill = 0
  476. self.quickslot = 0
  477. self.toggleButtonDict = 0
  478. self.hpGaugeBoard = 0
  479. self.mpGaugeBoard = 0
  480. self.stGaugeBoard = 0
  481. self.expGaugeBoard = 0
  482. self.tooltipHP = 0
  483. self.tooltipSP = 0
  484. self.tooltipST = 0
  485. self.tooltipEXP = 0
  486. self.mouseImage = None
  487. def __OnClickQuickPageUpButton(self):
  488. player.SetQuickPage(player.GetQuickPage()-1)
  489. def __OnClickQuickPageDownButton(self):
  490. player.SetQuickPage(player.GetQuickPage()+1)
  491. def SetToggleButtonEvent(self, eButton, kEventFunc):
  492. self.toggleButtonDict[eButton].SetEvent(kEventFunc)
  493. def SetItemToolTip(self, tooltipItem):
  494. self.tooltipItem = tooltipItem
  495. def SetSkillToolTip(self, tooltipSkill):
  496. self.tooltipSkill = tooltipSkill
  497. self.curSkillButton.SetSkillToolTip(self.tooltipSkill)
  498. ## Mouse Image
  499. def ShowMouseImage(self):
  500. self.mouseImage.SetTop()
  501. self.mouseImage.Show()
  502. def HideMouseImage(self):
  503. player.SetQuickCameraMode(False)
  504. self.mouseImage.Hide()
  505. ## Gauge
  506. def RefreshStatus(self):
  507. curHP = player.GetStatus(player.HP)
  508. maxHP = player.GetStatus(player.MAX_HP)
  509. curSP = player.GetStatus(player.SP)
  510. maxSP = player.GetStatus(player.MAX_SP)
  511. curEXP = unsigned32(player.GetStatus(player.EXP))
  512. nextEXP = unsigned32(player.GetStatus(player.NEXT_EXP))
  513. recoveryHP = player.GetStatus(player.HP_RECOVERY)
  514. recoverySP = player.GetStatus(player.SP_RECOVERY)
  515. self.RefreshStamina()
  516. self.SetHP(curHP, recoveryHP, maxHP)
  517. self.SetSP(curSP, recoverySP, maxSP)
  518. self.SetExperience(curEXP, nextEXP)
  519. def RefreshStamina(self):
  520. curST = player.GetStatus(player.STAMINA)
  521. maxST = player.GetStatus(player.MAX_STAMINA)
  522. self.SetST(curST, maxST)
  523. def RefreshSkill(self):
  524. self.curSkillButton.RefreshSkill()
  525. for button in self.selectSkillButtonList:
  526. button.RefreshSkill()
  527. if app.SKILL_COOLTIME_UPDATE:
  528. def SkillClearCoolTime(self, usedSlotIndex):
  529. QUICK_SLOT_SLOT_COUNT = 4
  530. slotIndex = 0
  531. for slotWindow in self.quickslot:
  532. for i in xrange(QUICK_SLOT_SLOT_COUNT):
  533. (Type, Position) = player.GetLocalQuickSlot(slotIndex)
  534. if Type == player.SLOT_TYPE_SKILL:
  535. if usedSlotIndex == Position:
  536. slotWindow.SetSlotCoolTime(slotIndex, 0)
  537. return
  538. slotIndex += 1
  539. def SetHP(self, curPoint, recoveryPoint, maxPoint):
  540. curPoint = min(curPoint, maxPoint)
  541. if maxPoint > 0:
  542. self.hpGauge.SetPercentage(curPoint, maxPoint)
  543. self.tooltipHP.SetText("%s : %d / %d" % (localeInfo.TASKBAR_HP, curPoint, maxPoint))
  544. if 0 == recoveryPoint:
  545. self.hpRecoveryGaugeBar.Hide()
  546. else:
  547. destPoint = min(maxPoint, curPoint + recoveryPoint)
  548. newWidth = int(self.GAUGE_WIDTH * (float(destPoint) / float(maxPoint)))
  549. self.hpRecoveryGaugeBar.SetSize(newWidth, self.GAUGE_HEIGHT)
  550. self.hpRecoveryGaugeBar.Show()
  551. def SetSP(self, curPoint, recoveryPoint, maxPoint):
  552. curPoint = min(curPoint, maxPoint)
  553. if maxPoint > 0:
  554. self.mpGauge.SetPercentage(curPoint, maxPoint)
  555. self.tooltipSP.SetText("%s : %d / %d" % (localeInfo.TASKBAR_SP, curPoint, maxPoint))
  556. if 0 == recoveryPoint:
  557. self.spRecoveryGaugeBar.Hide()
  558. else:
  559. destPoint = min(maxPoint, curPoint + recoveryPoint)
  560. newWidth = int(self.GAUGE_WIDTH * (float(destPoint) / float(maxPoint)))
  561. self.spRecoveryGaugeBar.SetSize(newWidth, self.GAUGE_HEIGHT)
  562. self.spRecoveryGaugeBar.Show()
  563. def SetST(self, curPoint, maxPoint):
  564. curPoint = min(curPoint, maxPoint)
  565. if maxPoint > 0:
  566. self.stGauge.SetPercentage(curPoint, maxPoint)
  567. self.tooltipST.SetText("%s : %d / %d" % (localeInfo.TASKBAR_ST, curPoint, maxPoint))
  568. def SetExperience(self, curPoint, maxPoint):
  569. curPoint = min(curPoint, maxPoint)
  570. curPoint = max(curPoint, 0)
  571. maxPoint = max(maxPoint, 0)
  572. quarterPoint = maxPoint / 4
  573. FullCount = 0
  574. if 0 != quarterPoint:
  575. FullCount = min(4, curPoint / quarterPoint)
  576. for i in xrange(4):
  577. self.expGauge[i].Hide()
  578. for i in xrange(FullCount):
  579. self.expGauge[i].SetRenderingRect(0.0, 0.0, 0.0, 0.0)
  580. self.expGauge[i].Show()
  581. if 0 != quarterPoint:
  582. if FullCount < 4:
  583. Percentage = float(curPoint % quarterPoint) / quarterPoint - 1.0
  584. self.expGauge[FullCount].SetRenderingRect(0.0, Percentage, 0.0, 0.0)
  585. self.expGauge[FullCount].Show()
  586. #####
  587. self.tooltipEXP.SetText("%s : %.2f%%" % (localeInfo.TASKBAR_EXP, float(curPoint) / max(1, float(maxPoint)) * 100))
  588. ## QuickSlot
  589. def RefreshQuickSlot(self):
  590. pageNum = player.GetQuickPage()
  591. try:
  592. self.quickPageNumImageBox.LoadImage(TaskBar.QUICKPAGE_NUMBER_FILENAME[pageNum])
  593. except:
  594. pass
  595. startNumber = 0
  596. for slot in self.quickslot:
  597. for i in xrange(4):
  598. slotNumber = i+startNumber
  599. (Type, Position) = player.GetLocalQuickSlot(slotNumber)
  600. if player.SLOT_TYPE_NONE == Type:
  601. slot.ClearSlot(slotNumber)
  602. continue
  603. if player.SLOT_TYPE_INVENTORY == Type:
  604. itemIndex = player.GetItemIndex(Position)
  605. itemCount = player.GetItemCount(Position)
  606. if itemCount <= 1:
  607. itemCount = 0
  608. ## ÀÚµ¿¹°¾à (#72723, #72724) Ư¼öó¸® - ¾ÆÀÌÅÛÀε¥µµ ½½·Ô¿¡ Ȱ¼ºÈ­/ºñȰ¼ºÈ­ Ç¥½Ã¸¦ À§ÇÑ ÀÛ¾÷ÀÓ - [hyo]
  609. if constInfo.IS_AUTO_POTION(itemIndex):
  610. # metinSocket - [0] : Ȱ¼ºÈ­ ¿©ºÎ, [1] : »ç¿ëÇÑ ¾ç, [2] : ÃÖ´ë ¿ë·®
  611. metinSocket = [player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]
  612. if 0 != int(metinSocket[0]):
  613. slot.ActivateSlot(slotNumber)
  614. else:
  615. slot.DeactivateSlot(slotNumber)
  616. slot.SetItemSlot(slotNumber, itemIndex, itemCount)
  617. elif player.SLOT_TYPE_SKILL == Type:
  618. skillIndex = player.GetSkillIndex(Position)
  619. if 0 == skillIndex:
  620. slot.ClearSlot(slotNumber)
  621. continue
  622. skillType = skill.GetSkillType(skillIndex)
  623. if skill.SKILL_TYPE_GUILD == skillType:
  624. import guild
  625. skillGrade = 0
  626. skillLevel = guild.GetSkillLevel(Position)
  627. else:
  628. skillGrade = player.GetSkillGrade(Position)
  629. skillLevel = player.GetSkillLevel(Position)
  630. slot.SetSkillSlotNew(slotNumber, skillIndex, skillGrade, skillLevel)
  631. slot.SetSlotCountNew(slotNumber, skillGrade, skillLevel)
  632. slot.SetCoverButton(slotNumber)
  633. ## NOTE : CoolTime üũ
  634. if player.IsSkillCoolTime(Position):
  635. (coolTime, elapsedTime) = player.GetSkillCoolTime(Position)
  636. slot.SetSlotCoolTime(slotNumber, coolTime, elapsedTime)
  637. ## NOTE : Activate µÇ¾î ÀÖ´Ù¸é ¾ÆÀÌÄܵµ ¾÷µ¥ÀÌÆ®
  638. if player.IsSkillActive(Position):
  639. slot.ActivateSlot(slotNumber)
  640. elif player.SLOT_TYPE_EMOTION == Type:
  641. emotionIndex = Position
  642. slot.SetEmotionSlot(slotNumber, emotionIndex)
  643. slot.SetCoverButton(slotNumber)
  644. slot.SetSlotCount(slotNumber, 0)
  645. slot.RefreshSlot()
  646. startNumber += 4
  647. def canAddQuickSlot(self, Type, slotNumber):
  648. if player.SLOT_TYPE_INVENTORY == Type:
  649. itemIndex = player.GetItemIndex(slotNumber)
  650. return item.CanAddToQuickSlotItem(itemIndex)
  651. return True
  652. def AddQuickSlot(self, localSlotIndex):
  653. AttachedSlotType = mouseModule.mouseController.GetAttachedType()
  654. AttachedSlotNumber = mouseModule.mouseController.GetAttachedSlotNumber()
  655. AttachedItemIndex = mouseModule.mouseController.GetAttachedItemIndex()
  656. if player.SLOT_TYPE_QUICK_SLOT == AttachedSlotType:
  657. player.RequestMoveGlobalQuickSlotToLocalQuickSlot(AttachedSlotNumber, localSlotIndex)
  658. elif player.SLOT_TYPE_EMOTION == AttachedSlotType:
  659. player.RequestAddLocalQuickSlot(localSlotIndex, AttachedSlotType, AttachedItemIndex)
  660. elif True == self.canAddQuickSlot(AttachedSlotType, AttachedSlotNumber):
  661. ## Online Code
  662. player.RequestAddLocalQuickSlot(localSlotIndex, AttachedSlotType, AttachedSlotNumber)
  663. mouseModule.mouseController.DeattachObject()
  664. self.RefreshQuickSlot()
  665. def SelectEmptyQuickSlot(self, slotIndex):
  666. if True == mouseModule.mouseController.isAttached():
  667. self.AddQuickSlot(slotIndex)
  668. def SelectItemQuickSlot(self, localQuickSlotIndex):
  669. if True == mouseModule.mouseController.isAttached():
  670. self.AddQuickSlot(localQuickSlotIndex)
  671. else:
  672. globalQuickSlotIndex=player.LocalQuickSlotIndexToGlobalQuickSlotIndex(localQuickSlotIndex)
  673. mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_QUICK_SLOT, globalQuickSlotIndex, globalQuickSlotIndex)
  674. def UnselectItemQuickSlot(self, localSlotIndex):
  675. if False == mouseModule.mouseController.isAttached():
  676. player.RequestUseLocalQuickSlot(localSlotIndex)
  677. return
  678. elif mouseModule.mouseController.isAttached():
  679. mouseModule.mouseController.DeattachObject()
  680. return
  681. def OnUseSkill(self, usedSlotIndex, coolTime):
  682. QUICK_SLOT_SLOT_COUNT = 4
  683. slotIndex = 0
  684. ## Current Skill Button
  685. if usedSlotIndex == self.curSkillButton.GetSlotIndex():
  686. self.curSkillButton.Activate(coolTime)
  687. ## Quick Slot
  688. for slotWindow in self.quickslot:
  689. for i in xrange(QUICK_SLOT_SLOT_COUNT):
  690. (Type, Position) = player.GetLocalQuickSlot(slotIndex)
  691. if Type == player.SLOT_TYPE_SKILL:
  692. if usedSlotIndex == Position:
  693. slotWindow.SetSlotCoolTime(slotIndex, coolTime)
  694. return
  695. slotIndex += 1
  696. def OnActivateSkill(self, usedSlotIndex):
  697. slotIndex = 0
  698. ## Current Skill Button
  699. if usedSlotIndex == self.curSkillButton.GetSlotIndex():
  700. self.curSkillButton.Deactivate()
  701. ## Quick Slot
  702. for slotWindow in self.quickslot:
  703. for i in xrange(4):
  704. (Type, Position) = player.GetLocalQuickSlot(slotIndex)
  705. if Type == player.SLOT_TYPE_SKILL:
  706. if usedSlotIndex == Position:
  707. slotWindow.ActivateSlot(slotIndex)
  708. return
  709. slotIndex += 1
  710. def OnDeactivateSkill(self, usedSlotIndex):
  711. slotIndex = 0
  712. ## Current Skill Button
  713. if usedSlotIndex == self.curSkillButton.GetSlotIndex():
  714. self.curSkillButton.Deactivate()
  715. ## Quick Slot
  716. for slotWindow in self.quickslot:
  717. for i in xrange(4):
  718. (Type, Position) = player.GetLocalQuickSlot(slotIndex)
  719. if Type == player.SLOT_TYPE_SKILL:
  720. if usedSlotIndex == Position:
  721. slotWindow.DeactivateSlot(slotIndex)
  722. return
  723. slotIndex += 1
  724. ## ToolTip
  725. def OverInItem(self, slotNumber):
  726. if mouseModule.mouseController.isAttached():
  727. return
  728. (Type, Position) = player.GetLocalQuickSlot(slotNumber)
  729. if player.SLOT_TYPE_INVENTORY == Type:
  730. self.tooltipItem.SetInventoryItem(Position)
  731. self.tooltipSkill.HideToolTip()
  732. elif player.SLOT_TYPE_SKILL == Type:
  733. skillIndex = player.GetSkillIndex(Position)
  734. skillType = skill.GetSkillType(skillIndex)
  735. if skill.SKILL_TYPE_GUILD == skillType:
  736. import guild
  737. skillGrade = 0
  738. skillLevel = guild.GetSkillLevel(Position)
  739. else:
  740. skillGrade = player.GetSkillGrade(Position)
  741. skillLevel = player.GetSkillLevel(Position)
  742. self.tooltipSkill.SetSkillNew(Position, skillIndex, skillGrade, skillLevel)
  743. self.tooltipItem.HideToolTip()
  744. def OverOutItem(self):
  745. if 0 != self.tooltipItem:
  746. self.tooltipItem.HideToolTip()
  747. if 0 != self.tooltipSkill:
  748. self.tooltipSkill.HideToolTip()
  749. def OnUpdate(self):
  750. if app.GetGlobalTime() - self.lastUpdateQuickSlot > 500:
  751. self.lastUpdateQuickSlot = app.GetGlobalTime()
  752. self.RefreshQuickSlot()
  753. if True == self.hpGaugeBoard.IsIn():
  754. self.tooltipHP.Show()
  755. else:
  756. self.tooltipHP.Hide()
  757. if True == self.mpGaugeBoard.IsIn():
  758. self.tooltipSP.Show()
  759. else:
  760. self.tooltipSP.Hide()
  761. if True == self.stGaugeBoard.IsIn():
  762. self.tooltipST.Show()
  763. else:
  764. self.tooltipST.Hide()
  765. if True == self.expGaugeBoard.IsIn():
  766. self.tooltipEXP.Show()
  767. else:
  768. self.tooltipEXP.Hide()
  769. ## Skill
  770. def ToggleLeftMouseButtonModeWindow(self):
  771. wndMouseButtonMode = self.mouseModeButtonList[self.MOUSE_BUTTON_LEFT]
  772. if True == wndMouseButtonMode.IsShow():
  773. wndMouseButtonMode.Hide()
  774. else:
  775. wndMouseButtonMode.Show()
  776. def ToggleRightMouseButtonModeWindow(self):
  777. wndMouseButtonMode = self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT]
  778. if True == wndMouseButtonMode.IsShow():
  779. wndMouseButtonMode.Hide()
  780. self.CloseSelectSkill()
  781. else:
  782. wndMouseButtonMode.Show()
  783. self.OpenSelectSkill()
  784. def OpenSelectSkill(self):
  785. PAGE_SLOT_COUNT = 6
  786. (xSkillButton, y) = self.curSkillButton.GetGlobalPosition()
  787. y -= (37 + 32 + 1)
  788. for key in self.skillCategoryNameList:
  789. appendCount = 0
  790. startNumber = self.skillPageStartSlotIndexDict[key]
  791. x = xSkillButton
  792. getSkillIndex=player.GetSkillIndex
  793. getSkillLevel=player.GetSkillLevel
  794. for i in xrange(PAGE_SLOT_COUNT):
  795. skillIndex = getSkillIndex(startNumber+i)
  796. skillLevel = getSkillLevel(startNumber+i)
  797. if 0 == skillIndex:
  798. continue
  799. if 0 == skillLevel:
  800. continue
  801. if skill.IsStandingSkill(skillIndex):
  802. continue
  803. ## FIXME : ½ºÅ³ Çϳª´ç ½½·Ô Çϳª¾¿ ÇÒ´çÇÏ´Â°Ç ¾Æ¹«¸® ºÁµµ ºÎÇϰ¡ Å©´Ù.
  804. ## ÀÌ ºÎºĞÀº ½Ã°£À» ³ª¸é °íÄ¡µµ·Ï. - [levites]
  805. skillButton = self.SkillButton()
  806. skillButton.SetSkill(startNumber+i)
  807. skillButton.SetPosition(x, y)
  808. skillButton.SetSkillEvent(ui.__mem_func__(self.CloseSelectSkill), startNumber+i+1)
  809. skillButton.SetSkillToolTip(self.tooltipSkill)
  810. skillButton.SetTop()
  811. skillButton.Show()
  812. self.selectSkillButtonList.append(skillButton)
  813. appendCount += 1
  814. x -= 32
  815. if appendCount > 0:
  816. y -= 32
  817. def CloseSelectSkill(self, slotIndex=-1):
  818. self.mouseModeButtonList[self.MOUSE_BUTTON_RIGHT].Hide()
  819. for button in self.selectSkillButtonList:
  820. button.Destroy()
  821. self.selectSkillButtonList = []
  822. if -1 != slotIndex:
  823. self.curSkillButton.Show()
  824. self.curMouseModeButton[self.MOUSE_BUTTON_RIGHT].Hide()
  825. player.SetMouseFunc(player.MBT_RIGHT, player.MBF_SKILL)
  826. player.ChangeCurrentSkillNumberOnly(slotIndex-1)
  827. else:
  828. self.curSkillButton.Hide()
  829. self.curMouseModeButton[self.MOUSE_BUTTON_RIGHT].Show()
  830. def SelectMouseButtonEvent(self, dir, event):
  831. SetMouseButtonSetting(dir, event)
  832. self.CloseSelectSkill()
  833. self.mouseModeButtonList[dir].Hide()
  834. btn = 0
  835. type = self.NONE
  836. func = self.NONE
  837. tooltip_text = ""
  838. if self.MOUSE_BUTTON_LEFT == dir:
  839. type = player.MBT_LEFT
  840. elif self.MOUSE_BUTTON_RIGHT == dir:
  841. type = player.MBT_RIGHT
  842. if self.EVENT_MOVE == event:
  843. btn = self.mouseModeButtonList[dir].GetChild("button_move")
  844. func = player.MBF_MOVE
  845. tooltip_text = localeInfo.TASKBAR_MOVE
  846. elif self.EVENT_ATTACK == event:
  847. btn = self.mouseModeButtonList[dir].GetChild("button_attack")
  848. func = player.MBF_ATTACK
  849. tooltip_text = localeInfo.TASKBAR_ATTACK
  850. elif self.EVENT_AUTO == event:
  851. btn = self.mouseModeButtonList[dir].GetChild("button_auto_attack")
  852. func = player.MBF_AUTO
  853. tooltip_text = localeInfo.TASKBAR_AUTO
  854. elif self.EVENT_MOVE_AND_ATTACK == event:
  855. btn = self.mouseModeButtonList[dir].GetChild("button_move_and_attack")
  856. func = player.MBF_SMART
  857. tooltip_text = localeInfo.TASKBAR_ATTACK
  858. elif self.EVENT_CAMERA == event:
  859. btn = self.mouseModeButtonList[dir].GetChild("button_camera")
  860. func = player.MBF_CAMERA
  861. tooltip_text = localeInfo.TASKBAR_CAMERA
  862. elif self.EVENT_SKILL == event:
  863. btn = self.mouseModeButtonList[dir].GetChild("button_skill")
  864. func = player.MBF_SKILL
  865. tooltip_text = localeInfo.TASKBAR_SKILL
  866. if 0 != btn:
  867. self.curMouseModeButton[dir].SetToolTipText(tooltip_text, 0, -18)
  868. self.curMouseModeButton[dir].SetUpVisual(btn.GetUpVisualFileName())
  869. self.curMouseModeButton[dir].SetOverVisual(btn.GetOverVisualFileName())
  870. self.curMouseModeButton[dir].SetDownVisual(btn.GetDownVisualFileName())
  871. self.curMouseModeButton[dir].Show()
  872. player.SetMouseFunc(type, func)
  873. def OnChangeCurrentSkill(self, skillSlotNumber):
  874. self.curSkillButton.SetSkill(skillSlotNumber)
  875. self.curSkillButton.Show()
  876. self.curMouseModeButton[self.MOUSE_BUTTON_RIGHT].Hide()