Guest User

Untitled

a guest
Feb 26th, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 66.25 KB | None | 0 0
  1. import uvvY2sBNvVcbJz4jvDr6fSWYdmqv9NPQ as pythonApi
  2. app = __import__(pythonApi.GetModuleName("app"))
  3. chr = __import__(pythonApi.GetModuleName("chr"))
  4. player = __import__(pythonApi.GetModuleName("player"))
  5. net = __import__(pythonApi.GetModuleName("net"))
  6. skill = __import__(pythonApi.GetModuleName("skill"))
  7. quest = __import__(pythonApi.GetModuleName("quest"))
  8. event = __import__(pythonApi.GetModuleName("event"))
  9. chat = __import__(pythonApi.GetModuleName("chat"))
  10. systemSetting = __import__(pythonApi.GetModuleName("systemSetting"))
  11. import ui
  12. import uiScriptLocale
  13.  
  14.  
  15. import dbg
  16. import snd
  17.  
  18. import mouseModule
  19. import wndMgr
  20.  
  21. import playerSettingModule
  22.  
  23. import localeInfo
  24. import uiToolTip
  25. import constInfo
  26. import emotion
  27. import grp
  28. import uiCommon
  29.  
  30.  
  31.  
  32. if app.ENABLE_DETAILS_UI:
  33. import uiCharacterDetails
  34. import uiQuest
  35. import interfaceModule
  36. import math
  37.  
  38. #Hizli-Menu#
  39. import gameInfo
  40. import uiskybox
  41. import uiesyaislem
  42. import uiefsunlar
  43. # import uiswitchbot
  44. import uikeyboardsettings
  45. import guvenli
  46. import uifastequip
  47. import uiisinlanma
  48. import uiinterfececolor
  49. if app.ENABLE_SKILL_COLOR_SYSTEM:
  50. import uiSkillColor
  51. import uiRutbeBilgi
  52.  
  53. SHOW_ONLY_ACTIVE_SKILL = FALSE
  54. SHOW_LIMIT_SUPPORT_SKILL_LIST = []
  55. HIDE_SUPPORT_SKILL_POINT = TRUE
  56.  
  57.  
  58. SHOW_LIMIT_SUPPORT_SKILL_LIST = [121, 122, 123, 124, 126, 127, 129, 128, 131, 137, 138, 139, 140, 141, 142]
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. FACE_IMAGE_DICT = {
  69. playerSettingModule.RACE_WARRIOR_M : "icon/face/warrior_m.tga",
  70. playerSettingModule.RACE_WARRIOR_W : "icon/face/warrior_w.tga",
  71. playerSettingModule.RACE_ASSASSIN_M : "icon/face/assassin_m.tga",
  72. playerSettingModule.RACE_ASSASSIN_W : "icon/face/assassin_w.tga",
  73. playerSettingModule.RACE_SURA_M : "icon/face/sura_m.tga",
  74. playerSettingModule.RACE_SURA_W : "icon/face/sura_w.tga",
  75. playerSettingModule.RACE_SHAMAN_M : "icon/face/shaman_m.tga",
  76. playerSettingModule.RACE_SHAMAN_W : "icon/face/shaman_w.tga",
  77. playerSettingModule.RACE_WOLFMAN_M : "icon/face/wolfman_m.tga",
  78. }
  79. def unsigned32(n):
  80. return n & 0xFFFFFFFFL
  81.  
  82. quest_slot_listbar = {
  83. "name" : "Quest_Slot",
  84. "type" : "listbar",
  85.  
  86. "x" : 0,
  87. "y" : 0,
  88.  
  89. "width" : 210,
  90. "height" : 20,
  91. "text" : "Quest title",
  92. "align" : "left",
  93. "horizontal_align" : "left",
  94. "vertical_align" : "left",
  95. "text_horizontal_align" : "left",
  96. "all_align" : "left",
  97. "text_height": 20
  98. }
  99.  
  100. class CharacterWindow(ui.ScriptWindow):
  101.  
  102. ACTIVE_PAGE_SLOT_COUNT = 8
  103. SUPPORT_PAGE_SLOT_COUNT = 12
  104.  
  105. PAGE_SLOT_COUNT = 12
  106. PAGE_HORSE = 2
  107.  
  108. SKILL_GROUP_NAME_DICT = {
  109. playerSettingModule.JOB_WARRIOR : { 1 : localeInfo.SKILL_GROUP_WARRIOR_1, 2 : localeInfo.SKILL_GROUP_WARRIOR_2, },
  110. playerSettingModule.JOB_ASSASSIN : { 1 : localeInfo.SKILL_GROUP_ASSASSIN_1, 2 : localeInfo.SKILL_GROUP_ASSASSIN_2, },
  111. playerSettingModule.JOB_SURA : { 1 : localeInfo.SKILL_GROUP_SURA_1, 2 : localeInfo.SKILL_GROUP_SURA_2, },
  112. playerSettingModule.JOB_SHAMAN : { 1 : localeInfo.SKILL_GROUP_SHAMAN_1, 2 : localeInfo.SKILL_GROUP_SHAMAN_2, },
  113. playerSettingModule.JOB_WOLFMAN : { 1 : "έη Gόdό", 2 : "N.A", },
  114. }
  115.  
  116. STAT_DESCRIPTION = {
  117. "HTH" : localeInfo.STAT_TOOLTIP_CON,
  118. "INT" : localeInfo.STAT_TOOLTIP_INT,
  119. "STR" : localeInfo.STAT_TOOLTIP_STR,
  120. "DEX" : localeInfo.STAT_TOOLTIP_DEX,
  121. "HTH_QUICK" : localeInfo.STAT_TOOLTIP_CON_QUICK,
  122. "INT_QUICK" : localeInfo.STAT_TOOLTIP_INT_QUICK,
  123. "STR_QUICK" : localeInfo.STAT_TOOLTIP_STR_QUICK,
  124. "DEX_QUICK" : localeInfo.STAT_TOOLTIP_DEX_QUICK,
  125. }
  126.  
  127. MAX_QUEST_HEIGHT = 275
  128.  
  129. STAT_MINUS_DESCRIPTION = localeInfo.STAT_MINUS_DESCRIPTION
  130.  
  131. def __init__(self):
  132.  
  133. if app.ENABLE_DETAILS_UI:
  134. self.chDetailsWnd = None
  135. self.isOpenedDetailsWnd = False
  136.  
  137. if app.ENABLE_SKILL_COLOR_SYSTEM:
  138. self.skillColorWnd = None
  139. self.skillColorButton = []
  140.  
  141. ui.ScriptWindow.__init__(self)
  142.  
  143. self.state = "STATUS"
  144. self.isLoaded = 0
  145. self.finishFirstLoad = False
  146.  
  147. self.toolTipSkill = 0
  148.  
  149. self.__Initialize()
  150. self.__LoadWindow()
  151.  
  152. #Hizli-Menu#
  153. self.keyboardsettings = uikeyboardsettings.KeyChangeWindow()
  154. self.keyboardsettings.Hide()
  155. #Hizli-Menu#
  156.  
  157. self.statusPlusCommandDict={
  158. "HTH" : "/stat ht",
  159. "INT" : "/stat iq",
  160. "STR" : "/stat st",
  161. "DEX" : "/stat dx",
  162. }
  163.  
  164. self.statusHizliPlusCommandDict={
  165. "HTH_QUICK" : "/hizlistatuver ht",
  166. "INT_QUICK" : "/hizlistatuver iq",
  167. "STR_QUICK" : "/hizlistatuver st",
  168. "DEX_QUICK" : "/hizlistatuver dx",
  169. }
  170.  
  171. self.statusMinusCommandDict={
  172. "HTH-" : "/stat- ht",
  173. "INT-" : "/stat- iq",
  174. "STR-" : "/stat- st",
  175. "DEX-" : "/stat- dx",
  176. }
  177.  
  178. def __del__(self):
  179. ui.ScriptWindow.__del__(self)
  180.  
  181. def __Initialize(self):
  182. self.refreshToolTip = 0
  183. self.curSelectedSkillGroup = 0
  184. self.canUseHorseSkill = -1
  185.  
  186. self.toolTip = None
  187. self.toolTipJob = None
  188. self.toolTipAlignment = None
  189. self.toolTipSkill = None
  190.  
  191. self.faceImage = None
  192. self.statusPlusLabel = None
  193. self.statusPlusValue = None
  194. self.activeSlot = None
  195. self.tabDict = None
  196. self.tabButtonDict = None
  197. self.pageDict = None
  198. self.titleBarDict = None
  199. self.statusPlusButtonDict = None
  200. self.statusHizliPlusButtonDict = None
  201. self.statusMinusButtonDict = None
  202.  
  203. self.skillPageDict = None
  204.  
  205.  
  206.  
  207.  
  208.  
  209.  
  210. self.skillGroupButton = ()
  211.  
  212. self.activeSlot = None
  213. self.activeSkillPointValue = None
  214. self.supportSkillPointValue = None
  215. self.skillGroupButton1 = None
  216. self.skillGroupButton2 = None
  217. self.activeSkillGroupName = None
  218.  
  219. self.guildNameSlot = None
  220. self.guildNameValue = None
  221. self.characterNameSlot = None
  222. self.characterNameValue = None
  223.  
  224. self.emotionToolTip = None
  225. self.soloEmotionSlot = None
  226. self.dualEmotionSlot = None
  227.  
  228.  
  229.  
  230.  
  231. self.questScrollBar = None
  232. self.lastScrollPosition = 0
  233. self.questBoard = None
  234. self.questPage = None
  235. self.questTitleBar = None
  236. self.questShowingStartIndex = 0
  237. self.wndQuestSlideWindow = {}
  238. self.wndQuestSlideWindowNewKey = 0
  239. self.category_flag = -1
  240. self.cnt = -1
  241. #self.lp_x = 0
  242. #self.lp_y = 0
  243. self.slotIndex = 0
  244. self.questCategoryList = None
  245. #self.IsOpenCategoryList = None
  246. self.IsSameFlag = False
  247. self.willOpenCategory = None
  248.  
  249. # Colored quests/categories
  250. self.qColorList = {'green': 0xFF83C055, 'blue': 0xFF45678D, 'golden': 0xFFCAB62F, 'default_title': 0xFFFFE3AD}
  251.  
  252. # New quest stuff
  253. self.maxConcurrentCategories = 1 # NOTE! The current implementation of the system assumes at some places that
  254. # there can only be one category open at a given time (as the original did)
  255. self.openCategories = []
  256. self.clickedQuests = []
  257. self.questIndexMap = {}
  258. self.displayY = 0
  259. self.extraSpace = 0
  260. self.counterList = []
  261. self.clockList = []
  262. self.catPositionRender = []
  263. self.baseCutY = 0
  264.  
  265. #Hizli-Menu#
  266. self.HizliIsinlanma = None
  267. self.HizliEfsunBotu = None
  268. self.HizliMarketAra = None
  269. self.HizliAtCagir = None
  270. self.HizliEkipman = None
  271. self.HizliTicaretGecmis = None
  272. self.HizliPet = None
  273. self.HizliAfrodit = None
  274. self.HizliYoutuber = None
  275. self.HizliGuvenliPc = None
  276. self.HizliUzakMarket = None
  277. self.HizliBossSiralamasi = None
  278. self.HizliStatus = None
  279. self.HizliTamEkran = None
  280. self.HizliOtoTopla = None
  281. self.HizliOtoYang = None
  282. self.HizliGeceGunduz = None
  283. self.HizliKarliZemin = None
  284. self.HizliKarYagdirma = None
  285. self.HizliBonusPenceresi = None
  286. #Hizli-Menu#
  287.  
  288. if app.ENABLE_DETAILS_UI:
  289. def OnTop(self):
  290. if self.chDetailsWnd:
  291. self.chDetailsWnd.SetTop()
  292.  
  293. if app.ENABLE_DETAILS_UI:
  294. def Hide(self):
  295. if self.chDetailsWnd:
  296. self.isOpenedDetailsWnd = self.chDetailsWnd.IsShow()
  297. self.chDetailsWnd.Close()
  298. wndMgr.Hide(self.hWnd)
  299.  
  300. def Show(self):
  301. self.__LoadWindow()
  302.  
  303. if app.ENABLE_DETAILS_UI:
  304. self.__InitCharacterDetailsUIButton()
  305. if self.chDetailsWnd and self.isOpenedDetailsWnd:
  306. self.chDetailsWnd.Show()
  307.  
  308. ui.ScriptWindow.Show(self)
  309.  
  310. def __LoadScript(self, fileName):
  311. pyScrLoader = ui.PythonScriptLoader()
  312. pyScrLoader.LoadScriptFile(self, fileName)
  313.  
  314. def __BindObject(self):
  315. self.toolTip = uiToolTip.ToolTip()
  316. self.toolTipJob = uiToolTip.ToolTip()
  317. self.toolTipAlignment = uiToolTip.ToolTip(130)
  318.  
  319. self.faceImage = self.GetChild("Face_Image")
  320.  
  321. faceSlot=self.GetChild("Face_Slot")
  322. if 949 == app.GetDefaultCodePage():
  323. faceSlot.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowJobToolTip)
  324. faceSlot.SAFE_SetStringEvent("MOUSE_OVER_OUT", self.__HideJobToolTip)
  325.  
  326. self.statusPlusLabel = self.GetChild("Status_Plus_Label")
  327. self.statusPlusValue = self.GetChild("Status_Plus_Value")
  328.  
  329. self.characterNameSlot = self.GetChild("Character_Name_Slot")
  330. self.characterNameValue = self.GetChild("Character_Name")
  331. self.guildNameSlot = self.GetChild("Guild_Name_Slot")
  332. self.guildNameValue = self.GetChild("Guild_Name")
  333. self.characterNameSlot.SAFE_SetStringEvent("MOUSE_OVER_IN", self.__ShowAlignmentToolTip)
  334. self.characterNameSlot.SAFE_SetStringEvent("MOUSE_OVER_OUT", self.__HideAlignmentToolTip)
  335.  
  336. self.activeSlot = self.GetChild("Skill_Active_Slot")
  337. self.activeSkillPointValue = self.GetChild("Active_Skill_Point_Value")
  338. self.supportSkillPointValue = self.GetChild("Support_Skill_Point_Value")
  339. self.skillGroupButton1 = self.GetChild("Skill_Group_Button_1")
  340. self.skillGroupButton2 = self.GetChild("Skill_Group_Button_2")
  341. self.activeSkillGroupName = self.GetChild("Active_Skill_Group_Name")
  342.  
  343. self.questBoard = self.GetChild("board")
  344. self.questPage = self.GetChild("Quest_Page")
  345. self.questTitleBar = self.GetChild("Quest_TitleBar")
  346. self.questShowingStartIndex = 0
  347. self.questSlotList = []
  348. self.questCategoryList=[]
  349.  
  350. self.tabDict = {
  351. "STATUS" : self.GetChild("Tab_01"),
  352. "SKILL" : self.GetChild("Tab_02"),
  353. "EMOTICON" : self.GetChild("Tab_03"),
  354. "QUEST" : self.GetChild("Tab_04"),
  355. "BUTON" : self.GetChild("Tab_05")
  356. }
  357.  
  358. self.tabButtonDict = {
  359. "STATUS" : self.GetChild("Tab_Button_01"),
  360. "SKILL" : self.GetChild("Tab_Button_02"),
  361. "EMOTICON" : self.GetChild("Tab_Button_03"),
  362. "QUEST" : self.GetChild("Tab_Button_04")
  363. }
  364.  
  365. self.pageDict = {
  366. "STATUS" : self.GetChild("Character_Page"),
  367. "SKILL" : self.GetChild("Skill_Page"),
  368. "EMOTICON" : self.GetChild("Emoticon_Page"),
  369. "QUEST" : self.GetChild("Quest_Page"),
  370. "BUTON" : self.GetChild("Buton_Page")
  371. }
  372.  
  373. self.titleBarDict = {
  374. "STATUS" : self.GetChild("Character_TitleBar"),
  375. "SKILL" : self.GetChild("Skill_TitleBar"),
  376. "EMOTICON" : self.GetChild("Emoticon_TitleBar"),
  377. "QUEST" : self.GetChild("Quest_TitleBar"),
  378. "BUTON" : self.GetChild("Buton_TitleBar")
  379. }
  380.  
  381. self.statusPlusButtonDict = {
  382. "HTH" : self.GetChild("HTH_Plus"),
  383. "INT" : self.GetChild("INT_Plus"),
  384. "STR" : self.GetChild("STR_Plus"),
  385. "DEX" : self.GetChild("DEX_Plus"),
  386. }
  387.  
  388. self.statusHizliPlusButtonDict = {
  389. "HTH_QUICK" : self.GetChild("HTH_HizliPlus"),
  390. "INT_QUICK" : self.GetChild("INT_HizliPlus"),
  391. "STR_QUICK" : self.GetChild("STR_HizliPlus"),
  392. "DEX_QUICK" : self.GetChild("DEX_HizliPlus"),
  393. }
  394.  
  395. self.statusMinusButtonDict = {
  396. "HTH-" : self.GetChild("HTH_Minus"),
  397. "INT-" : self.GetChild("INT_Minus"),
  398. "STR-" : self.GetChild("STR_Minus"),
  399. "DEX-" : self.GetChild("DEX_Minus"),
  400. }
  401.  
  402. self.skillPageDict = {
  403. "ACTIVE" : self.GetChild("Skill_Active_Slot"),
  404. "SUPPORT" : self.GetChild("Skill_ETC_Slot"),
  405. "HORSE" : self.GetChild("Skill_Active_Slot"),
  406. }
  407.  
  408. self.skillPageStatDict = {
  409. "SUPPORT" : player.SKILL_SUPPORT,
  410. "ACTIVE" : player.SKILL_ACTIVE,
  411. "HORSE" : player.SKILL_HORSE,
  412. }
  413.  
  414. self.skillGroupButton = (
  415. self.GetChild("Skill_Group_Button_1"),
  416. self.GetChild("Skill_Group_Button_2"),
  417. )
  418.  
  419.  
  420. global SHOW_ONLY_ACTIVE_SKILL
  421. global HIDE_SUPPORT_SKILL_POINT
  422. if SHOW_ONLY_ACTIVE_SKILL or HIDE_SUPPORT_SKILL_POINT:
  423. self.GetChild("Support_Skill_Point_Label").Hide()
  424.  
  425. self.soloEmotionSlot = self.GetChild("SoloEmotionSlot")
  426. self.dualEmotionSlot = self.GetChild("DualEmotionSlot")
  427. self.__SetEmotionSlot()
  428.  
  429.  
  430.  
  431.  
  432.  
  433. for i in xrange(quest.QUEST_CATEGORY_MAX_NUM):
  434. self.questCategoryList.append(self.GetChild("Quest_Category_0" + str(i)))
  435. self.catPositionRender.append(0)
  436.  
  437.  
  438.  
  439.  
  440.  
  441. self.RearrangeCategories(xrange(quest.QUEST_CATEGORY_MAX_NUM))
  442.  
  443. #Hizli-Menu#
  444. self.HizliIsinlanma = self.GetChild("Isinlanma")
  445. self.HizliIsinlanma.SetEvent(ui.__mem_func__(self.HizliMenu), 1)
  446.  
  447. self.HizliEfsunBotu = self.GetChild("EfsunBotu")
  448. self.HizliEfsunBotu.SetEvent(ui.__mem_func__(self.HizliMenu), 2)
  449.  
  450. # self.HizliMarketAra = self.GetChild("MarketArama")
  451. # self.HizliMarketAra.SetEvent(ui.__mem_func__(self.HizliMenu), 3)
  452.  
  453. # self.HizliAtCagir = self.GetChild("AtCagirma")
  454. # self.HizliAtCagir.SetEvent(ui.__mem_func__(self.HizliMenu), 4)
  455.  
  456. # self.HizliEkipman = self.GetChild("HizliEkipman")
  457. # self.HizliEkipman.SetEvent(ui.__mem_func__(self.HizliMenu), 5)
  458.  
  459. # self.HizliTicaretGecmis = self.GetChild("TicaretGecmisi")
  460. # self.HizliTicaretGecmis.SetEvent(ui.__mem_func__(self.HizliMenu), 6)
  461.  
  462. # self.HizliPet = self.GetChild("PetEkran")
  463. # self.HizliPet.SetEvent(ui.__mem_func__(self.HizliMenu), 7)
  464.  
  465. # self.HizliAfrodit = self.GetChild("AfroditEkran")
  466. # self.HizliAfrodit.SetEvent(ui.__mem_func__(self.HizliMenu), 8)
  467.  
  468. # self.HizliYoutuber = self.GetChild("Youtuber")
  469. # self.HizliYoutuber.SetEvent(ui.__mem_func__(self.HizliMenu), 9)
  470.  
  471. # self.HizliGuvenliPc = self.GetChild("GuvenliPc")
  472. # self.HizliGuvenliPc.SetEvent(ui.__mem_func__(self.HizliMenu), 10)
  473.  
  474. self.HizliUzakMarket = self.GetChild("UzakMarket")
  475. self.HizliUzakMarket.SetEvent(ui.__mem_func__(self.HizliMenu), 11)
  476.  
  477. # self.HizliBossSiralamasi = self.GetChild("BossSiralamasi")
  478. # self.HizliBossSiralamasi.SetEvent(ui.__mem_func__(self.HizliMenu), 12)
  479.  
  480. # self.HizliStatus = self.GetChild("HizliStatus")
  481. # self.HizliStatus.SetEvent(ui.__mem_func__(self.HizliMenu), 13)
  482.  
  483. # self.HizliTamEkran = self.GetChild("TamEkran")
  484. # self.HizliTamEkran.SetEvent(ui.__mem_func__(self.HizliMenu), 14)
  485.  
  486. # self.HizliOtoTopla = self.GetChild("OtoTopla")
  487. # self.HizliOtoTopla.SetEvent(ui.__mem_func__(self.HizliMenu), 15)
  488.  
  489. # self.HizliOtoYang = self.GetChild("OtoYangTopla")
  490. # self.HizliOtoYang.SetEvent(ui.__mem_func__(self.HizliMenu), 16)
  491.  
  492. # self.HizliGeceGunduz = self.GetChild("GeceGunduzModu")
  493. # self.HizliGeceGunduz.SetEvent(ui.__mem_func__(self.HizliMenu), 17)
  494.  
  495. # self.HizliKarliZemin = self.GetChild("KarliZemin")
  496. # self.HizliKarliZemin.SetEvent(ui.__mem_func__(self.HizliMenu), 18)
  497.  
  498. # self.HizliKarYagdirma = self.GetChild("KarYagdirma")
  499. # self.HizliKarYagdirma.SetEvent(ui.__mem_func__(self.HizliMenu), 19)
  500.  
  501. self.HizliBonusPenceresi = self.GetChild("BonusPenceresi")
  502. self.HizliBonusPenceresi.SetEvent(ui.__mem_func__(self.HizliMenu), 20)
  503. #Hizli-Menu#
  504.  
  505. if app.ENABLE_DETAILS_UI:
  506. self.MainBoard = self.GetChild("board")
  507. self.ExpandBtn = ui.MakeButton(self.MainBoard, 240, 120, "", "d:/ymir work/ui/game/belt_inventory/", "btn_minimize_normal.tga", "btn_minimize_over.tga", "btn_minimize_down.tga")
  508. self.ExpandBtn.SetEvent(ui.__mem_func__(self.__ClickExpandButton))
  509. self.MinimizeBtn = ui.MakeButton(self.MainBoard, 240, 120, "", "d:/ymir work/ui/game/belt_inventory/", "btn_expand_normal.tga", "btn_expand_over.tga", "btn_expand_down.tga")
  510. self.MinimizeBtn.SetEvent(ui.__mem_func__(self.__ClickMinimizeButton))
  511.  
  512. #Hizli-Menu#
  513. def HizliMenu(self, type):
  514. if type == 1:
  515. gameInfo.SYSTEMS_PAKET0=1
  516.  
  517. elif type == 2:
  518. self.EfsunBotDialog = uiefsunlar.OptionDialog()
  519.  
  520.  
  521.  
  522. self.EfsunBotDialog.Show()
  523.  
  524.  
  525.  
  526. elif type == 3:
  527. player.OpenKeychangeWindow()
  528.  
  529. elif type == 4:
  530. net.SendChatPacket("/horse_summon_user")
  531.  
  532.  
  533.  
  534. elif type == 5:
  535. self.EkipmanButton = uifastequip.changeequip()
  536. self.EkipmanButton.Show()
  537.  
  538. elif type == 6:
  539. gameInfo.SYSTEMS_PAKET1=1
  540.  
  541.  
  542. elif type == 7:
  543. gameInfo.SYSTEMS_PAKET2=1
  544.  
  545. elif type == 8:
  546. gameInfo.SYSTEMS_PAKET3=1
  547.  
  548. elif type == 9:
  549. self.EsyaBotDialog = uiesyaislem.OptionDialog()
  550. self.EsyaBotDialog.Show()
  551.  
  552. elif type == 10:
  553. self.GuvenliPC = guvenli.GuvenliDialog()
  554. self.GuvenliPC.Show()
  555.  
  556. elif type == 11:
  557. gameInfo.SYSTEMS_PAKET4=1
  558.  
  559. elif type == 12:
  560. namem=str(player.GetName())
  561. self.KoyDialog = uiCommon.QuestionDialog2()
  562. self.KoyDialog.SetText1("Hi,"+constInfo.bosluk+namem+constInfo.bosluk+constInfo.normalrenk)
  563. self.KoyDialog.SetText2("Do you want to teleport to your sheep?")
  564. self.KoyDialog.SetAcceptEvent(lambda arg = True: self.OnWarpStart(1))
  565. self.KoyDialog.SetCancelEvent(lambda arg = False: self.OnWarpStart(2))
  566. self.KoyDialog.Open()
  567.  
  568. elif type == 13:
  569. gameInfo.SYSTEMS_PAKET5=1
  570.  
  571. elif type == 14:
  572. gameInfo.SYSTEMS_PAKET6=1
  573.  
  574. elif type == 15:
  575. qid = constInfo.kilitqin
  576. event.QuestButtonClick(qid)
  577.  
  578. elif type == 16:
  579. self.isinlanmaxdd = uiisinlanma.Isinlanma()
  580. self.isinlanmaxdd.Show()
  581.  
  582. elif type == 17:
  583. gameInfo.SYSTEMS_PAKET9=1
  584.  
  585. elif type == 18:
  586. self.RutbeBilgiGoster = uiRutbeBilgi.Rutbe_Bilgi()
  587. self.RutbeBilgiGoster.Show()
  588. #import os
  589. #os.system('start VideoRecord/screenrecorder.exe')
  590. #chat.AppendChat(chat.CHAT_TYPE_INFO, '1- Kirmizi butona basarak kaydedebilirsiniz.')
  591. #chat.AppendChat(chat.CHAT_TYPE_INFO, '2- Tam ekran video almak icin : Ayar isaretine tiklayarak Full Screen secin')
  592. #chat.AppendChat(chat.CHAT_TYPE_INFO, '3- Kaydedilen videolar, metin2 klasorundeki Video-Recording klasorune kaydedilir.')
  593.  
  594. elif type == 19:
  595. gameInfo.SYSTEMS_PAKET8=1
  596. #if constInfo.balikbot == 0:
  597. #execfile('balikbot.py',{})
  598.  
  599. elif type == 20:
  600. gameInfo.BOSS_TRACKING=1
  601.  
  602. def OnWarpStart(self, gelen):
  603. self.KoyDialog.Close()
  604. if gelen == 1:
  605. net.SendChatPacket("/koye_git")
  606.  
  607. #Hizli-Menu#
  608.  
  609. if app.ENABLE_DETAILS_UI:
  610. def __InitCharacterDetailsUIButton(self):
  611. self.ExpandBtn.Show()
  612. self.MinimizeBtn.Hide()
  613.  
  614. def __ClickExpandButton(self):
  615. if not self.chDetailsWnd:
  616. self.chDetailsWnd = uiCharacterDetails.CharacterDetailsUI(self)
  617. self.chDetailsWnd.Show()
  618. else:
  619. self.chDetailsWnd.Show()
  620.  
  621. self.ExpandBtn.Hide()
  622. self.MinimizeBtn.Show()
  623.  
  624. if app.ENABLE_SKILL_COLOR_SYSTEM:
  625. if self.skillColorWnd and self.skillColorWnd.IsShow():
  626. self.skillColorWnd.Hide()
  627.  
  628. def __ClickMinimizeButton(self):
  629. self.chDetailsWnd.Hide()
  630. self.MinimizeBtn.Hide()
  631. self.ExpandBtn.Show()
  632.  
  633. def OnMoveWindow(self, x, y):
  634. if self.chDetailsWnd:
  635. self.chDetailsWnd.AdjustPosition(x, y)
  636.  
  637. def __SetSkillSlotEvent(self):
  638. for skillPageValue in self.skillPageDict.itervalues():
  639. skillPageValue.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
  640. skillPageValue.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectSkill))
  641. skillPageValue.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectEmptySlot))
  642. skillPageValue.SetUnselectItemSlotEvent(ui.__mem_func__(self.ClickSkillSlot))
  643. skillPageValue.SetUseSlotEvent(ui.__mem_func__(self.ClickSkillSlot))
  644. skillPageValue.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
  645. skillPageValue.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
  646. skillPageValue.SetPressedSlotButtonEvent(ui.__mem_func__(self.OnPressedSlotButton))
  647. skillPageValue.AppendSlotButton("d:/ymir work/ui/game/windows/btn_plus_up.sub",\
  648. "d:/ymir work/ui/game/windows/btn_plus_over.sub",\
  649. "d:/ymir work/ui/game/windows/btn_plus_down.sub")
  650.  
  651. def __SetEmotionSlot(self):
  652.  
  653. self.emotionToolTip = uiToolTip.ToolTip()
  654.  
  655. for slot in (self.soloEmotionSlot, self.dualEmotionSlot):
  656. slot.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
  657. slot.SetSelectItemSlotEvent(ui.__mem_func__(self.__SelectEmotion))
  658. slot.SetUnselectItemSlotEvent(ui.__mem_func__(self.__ClickEmotionSlot))
  659. slot.SetUseSlotEvent(ui.__mem_func__(self.__ClickEmotionSlot))
  660. slot.SetOverInItemEvent(ui.__mem_func__(self.__OverInEmotion))
  661. slot.SetOverOutItemEvent(ui.__mem_func__(self.__OverOutEmotion))
  662. slot.AppendSlotButton("d:/ymir work/ui/game/windows/btn_plus_up.sub",\
  663. "d:/ymir work/ui/game/windows/btn_plus_over.sub",\
  664. "d:/ymir work/ui/game/windows/btn_plus_down.sub")
  665.  
  666. for slotIdx, datadict in emotion.EMOTION_DICT.items():
  667. emotionIdx = slotIdx
  668.  
  669. slot = self.soloEmotionSlot
  670. if slotIdx > 50:
  671. slot = self.dualEmotionSlot
  672.  
  673. slot.SetEmotionSlot(slotIdx, emotionIdx)
  674. slot.SetCoverButton(slotIdx)
  675.  
  676. def __SelectEmotion(self, slotIndex):
  677. if not slotIndex in emotion.EMOTION_DICT:
  678. return
  679.  
  680. if app.IsPressed(app.DIK_LCONTROL):
  681. player.RequestAddToEmptyLocalQuickSlot(player.SLOT_TYPE_EMOTION, slotIndex)
  682. return
  683.  
  684. mouseModule.mouseController.AttachObject(self, player.SLOT_TYPE_EMOTION, slotIndex, slotIndex)
  685.  
  686. def __ClickEmotionSlot(self, slotIndex):
  687.  
  688. if not slotIndex in emotion.EMOTION_DICT:
  689. return
  690.  
  691. print "check acting"
  692. if player.IsActingEmotion():
  693. return
  694.  
  695. command = emotion.EMOTION_DICT[slotIndex]["command"]
  696. print "command", command
  697.  
  698. if slotIndex > 50:
  699. vid = player.GetTargetVID()
  700.  
  701. if 0 == vid or vid == player.GetMainCharacterIndex() or chr.IsNPC(vid) or chr.IsEnemy(vid):
  702. chat = __import__(pythonApi.GetModuleName("chat"))
  703. chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.EMOTION_CHOOSE_ONE)
  704. return
  705.  
  706. command += " " + chr.GetNameByVID(vid)
  707.  
  708. print "send_command", command
  709. net.SendChatPacket(command)
  710.  
  711. def ActEmotion(self, emotionIndex):
  712. self.__ClickEmotionSlot(emotionIndex)
  713.  
  714. def __OverInEmotion(self, slotIndex):
  715. if self.emotionToolTip:
  716.  
  717. if not slotIndex in emotion.EMOTION_DICT:
  718. return
  719.  
  720. self.emotionToolTip.ClearToolTip()
  721. self.emotionToolTip.SetTitle(emotion.EMOTION_DICT[slotIndex]["name"])
  722. self.emotionToolTip.AlignHorizonalCenter()
  723. self.emotionToolTip.ShowToolTip()
  724.  
  725. def __OverOutEmotion(self):
  726. if self.emotionToolTip:
  727. self.emotionToolTip.HideToolTip()
  728.  
  729. def __BindEvent(self):
  730. for i in xrange(len(self.skillGroupButton)):
  731. self.skillGroupButton[i].SetEvent(lambda arg=i: self.__SelectSkillGroup(arg))
  732.  
  733. self.RefreshQuest()
  734. self.__HideJobToolTip()
  735.  
  736. for (tabKey, tabButton) in self.tabButtonDict.items():
  737. tabButton.SetEvent(ui.__mem_func__(self.__OnClickTabButton), tabKey)
  738.  
  739. for (statusPlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
  740. statusPlusButton.SAFE_SetEvent(self.__OnClickStatusPlusButton, statusPlusKey)
  741. statusPlusButton.ShowToolTip = lambda arg=statusPlusKey: self.__OverInStatButton(arg)
  742. statusPlusButton.HideToolTip = lambda arg=statusPlusKey: self.__OverOutStatButton()
  743.  
  744. for (statusHizliPlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
  745. statusHizliPlusButton.SAFE_SetEvent(self.__OnClickHizliStatusPlusButton, statusHizliPlusKey)
  746. statusHizliPlusButton.ShowToolTip = lambda arg=statusHizliPlusKey: self.__OverInStatButton(arg)
  747. statusHizliPlusButton.HideToolTip = lambda arg=statusHizliPlusKey: self.__OverOutStatButton()
  748.  
  749. for (statusMinusKey, statusMinusButton) in self.statusMinusButtonDict.items():
  750. statusMinusButton.SAFE_SetEvent(self.__OnClickStatusMinusButton, statusMinusKey)
  751. statusMinusButton.ShowToolTip = lambda arg=statusMinusKey: self.__OverInStatMinusButton(arg)
  752. statusMinusButton.HideToolTip = lambda arg=statusMinusKey: self.__OverOutStatMinusButton()
  753.  
  754. for titleBarValue in self.titleBarDict.itervalues():
  755. if app.ENABLE_DETAILS_UI:
  756. titleBarValue.SetCloseEvent(ui.__mem_func__(self.Close))
  757. else:
  758. titleBarValue.SetCloseEvent(ui.__mem_func__(self.Hide))
  759.  
  760. self.questTitleBar.SetCloseEvent(ui.__mem_func__(self.Close))
  761.  
  762. for i in xrange(quest.QUEST_CATEGORY_MAX_NUM):
  763. self.questCategoryList[i].SetEvent(ui.__mem_func__(self.__OnClickQuestCategoryButton),i)
  764.  
  765. def __LoadWindow(self):
  766. if self.isLoaded == 1:
  767. return
  768.  
  769. self.isLoaded = 1
  770.  
  771. try:
  772. if localeInfo.IsARABIC() or localeInfo.IsVIETNAM() or localeInfo.IsJAPAN():
  773. self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "CharacterWindow.py")
  774. else:
  775. self.__LoadScript("UIScript/CharacterWindow.py")
  776.  
  777. self.__BindObject()
  778. self.__BindEvent()
  779. self.questScrollBar = self.GetChild("QuestScrollBar")
  780. self.questScrollBar.SetScrollEvent(ui.__mem_func__(self.__OnScrollQuest))
  781. except:
  782. import exception
  783. exception.Abort("CharacterWindow.__LoadWindow")
  784.  
  785. #self.tabButtonDict["EMOTICON"].Disable()
  786. self.SetState("STATUS")
  787.  
  788. def Destroy(self):
  789. self.Hide()
  790. self.ClearDictionary()
  791.  
  792. self.__Initialize()
  793.  
  794. def Close(self):
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801. if app.ENABLE_SKILL_COLOR_SYSTEM:
  802. if self.skillColorWnd and self.skillColorWnd.IsShow():
  803. self.skillColorWnd.Hide()
  804.  
  805. self.Hide()
  806. if None != self.toolTipSkill:
  807. self.toolTipSkill.Hide()
  808.  
  809.  
  810. if app.ENABLE_DETAILS_UI:
  811. if self.chDetailsWnd and self.chDetailsWnd.IsShow():
  812. self.chDetailsWnd.Hide()
  813.  
  814. if self.wndQuestSlideWindowNewKey>0:
  815. if self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1] is not None:
  816. self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1].CloseSelf()
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837. def SetSkillToolTip(self, toolTipSkill):
  838. self.toolTipSkill = toolTipSkill
  839.  
  840. def __OnClickStatusPlusButton(self, statusKey):
  841. try:
  842.  
  843.  
  844.  
  845.  
  846. statusPlusCommand=self.statusPlusCommandDict[statusKey]
  847. net.SendChatPacket(statusPlusCommand)
  848.  
  849. except KeyError, msg:
  850. dbg.TraceError("CharacterWindow.__OnClickStatusPlusButton KeyError: %s", msg)
  851.  
  852. def __OnClickHizliStatusPlusButton(self, statusKey):
  853. try:
  854. statusHizliPlusCommand=self.statusHizliPlusCommandDict[statusKey]
  855. net.SendChatPacket(statusHizliPlusCommand)
  856. except KeyError, msg:
  857. dbg.TraceError("CharacterWindow.__OnClickStatusHizliPlusButton KeyError: %s", msg)
  858.  
  859. def __OnClickStatusMinusButton(self, statusKey):
  860. try:
  861. statusMinusCommand=self.statusMinusCommandDict[statusKey]
  862. net.SendChatPacket(statusMinusCommand)
  863. except KeyError, msg:
  864. dbg.TraceError("CharacterWindow.__OnClickStatusMinusButton KeyError: %s", msg)
  865.  
  866.  
  867. def __OnClickTabButton(self, stateKey):
  868. self.SetState(stateKey)
  869.  
  870. def SetState(self, stateKey):
  871. if self.tabButtonDict == None:
  872. return
  873.  
  874. self.state = stateKey
  875.  
  876. if stateKey != "QUEST":
  877. self.questPage.Hide()
  878. if self.wndQuestSlideWindowNewKey > 0:
  879. if self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1] is not None:
  880. self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1].CloseSelf()
  881. else:
  882. self.__LoadQuestCat()
  883.  
  884. for (tabKey, tabButton) in self.tabButtonDict.items():
  885. if stateKey!=tabKey:
  886. tabButton.SetUp()
  887.  
  888. for tabValue in self.tabDict.itervalues():
  889. tabValue.Hide()
  890.  
  891. for pageValue in self.pageDict.itervalues():
  892. pageValue.Hide()
  893.  
  894. for titleBarValue in self.titleBarDict.itervalues():
  895. titleBarValue.Hide()
  896.  
  897. self.titleBarDict[stateKey].Show()
  898. self.tabDict[stateKey].Show()
  899. self.pageDict[stateKey].Show()
  900.  
  901.  
  902. def GetState(self):
  903. return self.state
  904.  
  905. def __GetTotalAtkText(self):
  906. minAtk=player.GetStatus(player.ATT_MIN)
  907. maxAtk=player.GetStatus(player.ATT_MAX)
  908. atkBonus=player.GetStatus(player.ATT_BONUS)
  909. attackerBonus=player.GetStatus(player.ATTACKER_BONUS)
  910. min = int(minAtk+atkBonus+attackerBonus)
  911. max = int(maxAtk+atkBonus+attackerBonus)
  912. if minAtk==maxAtk:
  913. return "%s" % (localeInfo.NumberToString2(min))
  914. else:
  915. return "%s-%s" % (localeInfo.NumberToString2(min), localeInfo.NumberToString2(max))
  916.  
  917. def __GetTotalMagAtkText(self):
  918. minMagAtk=player.GetStatus(player.MAG_ATT)+player.GetStatus(player.MIN_MAGIC_WEP)
  919. maxMagAtk=player.GetStatus(player.MAG_ATT)+player.GetStatus(player.MAX_MAGIC_WEP)
  920.  
  921. if minMagAtk==maxMagAtk:
  922. return "%d" % (minMagAtk)
  923. else:
  924. return "%d-%d" % (minMagAtk, maxMagAtk)
  925.  
  926. def __GetTotalDefText(self):
  927. defValue=player.GetStatus(player.DEF_GRADE)
  928. if constInfo.ADD_DEF_BONUS_ENABLE:
  929. defValue+=player.GetStatus(player.DEF_BONUS)
  930. return "%s" % (localeInfo.NumberToString2(defValue))
  931.  
  932. def RefreshStatus(self):
  933. if self.isLoaded==0:
  934. return
  935.  
  936. try:
  937. self.GetChild("Level_Value").SetText(str(player.GetStatus(player.LEVEL)))
  938. self.GetChild("Exp_Value").SetText(str(unsigned32(player.GetEXP())))
  939. self.GetChild("RestExp_Value").SetText(str(unsigned32(player.GetStatus(player.NEXT_EXP)) - unsigned32(player.GetStatus(player.EXP))))
  940. #self.GetChild("HP_Value").SetText(str(player.GetStatus(player.HP)) + '/' + str(player.GetStatus(player.MAX_HP)))
  941. #self.GetChild("SP_Value").SetText(str(player.GetStatus(player.SP)) + '/' + str(player.GetStatus(player.MAX_SP)))
  942. self.GetChild("HP_Value").SetText(localeInfo.NumberToString2(str(player.GetStatus(player.HP))) + '/' + localeInfo.NumberToString2(str(player.GetStatus(player.MAX_HP))))
  943. self.GetChild("SP_Value").SetText(localeInfo.NumberToString2(str(player.GetStatus(player.SP))) + '/' + localeInfo.NumberToString2(str(player.GetStatus(player.MAX_SP))))
  944.  
  945. self.GetChild("STR_Value").SetText(str(player.GetStatus(player.ST)))
  946. self.GetChild("DEX_Value").SetText(str(player.GetStatus(player.DX)))
  947. self.GetChild("HTH_Value").SetText(str(player.GetStatus(player.HT)))
  948. self.GetChild("INT_Value").SetText(str(player.GetStatus(player.IQ)))
  949.  
  950. self.GetChild("ATT_Value").SetText(self.__GetTotalAtkText())
  951. self.GetChild("DEF_Value").SetText(self.__GetTotalDefText())
  952.  
  953. self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
  954. #self.GetChild("MATT_Value").SetText(str(player.GetStatus(player.MAG_ATT)))
  955.  
  956. self.GetChild("MDEF_Value").SetText(str(player.GetStatus(player.MAG_DEF)))
  957. self.GetChild("ASPD_Value").SetText(str(player.GetStatus(player.ATT_SPEED)))
  958. self.GetChild("MSPD_Value").SetText(str(player.GetStatus(player.MOVING_SPEED)))
  959. self.GetChild("CSPD_Value").SetText(str(player.GetStatus(player.CASTING_SPEED)))
  960. self.GetChild("ER_Value").SetText(str(player.GetStatus(player.EVADE_RATE)))
  961.  
  962. except:
  963. #import exception
  964. #exception.Abort("CharacterWindow.RefreshStatus.BindObject")
  965. ## °ΤΐΣΐΜ Ζ¨°ά ΉφΈ²
  966. pass
  967.  
  968. self.__RefreshStatusPlusButtonList()
  969. self.__RefreshStatusMinusButtonList()
  970. self.RefreshAlignment()
  971.  
  972. if self.refreshToolTip:
  973. self.refreshToolTip()
  974.  
  975. if app.ENABLE_DETAILS_UI:
  976. if self.chDetailsWnd and self.chDetailsWnd.IsShow():
  977. self.chDetailsWnd.RefreshLabel()
  978.  
  979. def __RefreshStatusPlusButtonList(self):
  980. if self.isLoaded==0:
  981. return
  982.  
  983. statusPlusPoint=player.GetStatus(player.STAT)
  984.  
  985. if statusPlusPoint>0:
  986. self.statusPlusValue.SetText(str(statusPlusPoint))
  987. self.statusPlusLabel.Show()
  988. self.ShowStatusPlusButtonList()
  989. self.ShowStatusHizliPlusButtonList()
  990. else:
  991. self.statusPlusValue.SetText(str(0))
  992. self.statusPlusLabel.Hide()
  993. self.HideStatusPlusButtonList()
  994. self.HideStatusHizliPlusButtonList()
  995.  
  996. def __RefreshStatusMinusButtonList(self):
  997. if self.isLoaded==0:
  998. return
  999.  
  1000. statusMinusPoint=self.__GetStatMinusPoint()
  1001.  
  1002. if statusMinusPoint>0:
  1003. self.__ShowStatusMinusButtonList()
  1004. else:
  1005. self.__HideStatusMinusButtonList()
  1006.  
  1007. def RefreshAlignment(self):
  1008. point, grade = player.GetAlignmentData()
  1009.  
  1010. import colorInfo
  1011. COLOR_DICT = { 0 : colorInfo.TITLE_RGB_GOOD_7,
  1012. 1 : colorInfo.TITLE_RGB_GOOD_6,
  1013. 2 : colorInfo.TITLE_RGB_GOOD_5,
  1014. 3 : colorInfo.TITLE_RGB_GOOD_4,
  1015. 4 : colorInfo.TITLE_RGB_GOOD_3,
  1016. 5 : colorInfo.TITLE_RGB_GOOD_2,
  1017. 6 : colorInfo.TITLE_RGB_GOOD_1,
  1018. 7 : colorInfo.TITLE_RGB_NORMAL,
  1019. 8 : colorInfo.TITLE_RGB_EVIL_1,
  1020. 9 : colorInfo.TITLE_RGB_EVIL_2,
  1021. 10 : colorInfo.TITLE_RGB_EVIL_3,
  1022. 11 : colorInfo.TITLE_RGB_EVIL_4, }
  1023. colorList = COLOR_DICT.get(grade, colorInfo.TITLE_RGB_NORMAL)
  1024. gradeColor = ui.GenerateColor(colorList[0], colorList[1], colorList[2])
  1025.  
  1026. self.toolTipAlignment.ClearToolTip()
  1027. self.toolTipAlignment.AutoAppendTextLine(localeInfo.TITLE_NAME_LIST[grade], gradeColor)
  1028. self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGNMENT_NAME + str(point))
  1029. #self.toolTipAlignment.AppendSpace(2)
  1030. #self.toolTipAlignment.AutoAppendTextLine(localeInfo.YEAR_ROUND_NAME + str(player.GetYearRoundPoint()))
  1031. #self.toolTipAlignment.AppendSpace(2)
  1032. #self.toolTipAlignment.AutoAppendTextLine(localeInfo.ACHIEVEMENT_NAME + str(player.GetAchievementPoint()))
  1033. #self.toolTipAlignment.AppendSpace(2)
  1034. #self.toolTipAlignment.AutoAppendTextLine(localeInfo.BOSS_EVENT_NAME + str(player.GetBossEventPoint()))
  1035. #self.toolTipAlignment.AppendSpace(2)
  1036. #self.toolTipAlignment.AutoAppendTextLine(localeInfo.RAMADAN_EVENT_NAME + str(player.GetRamadanEventPoint()))
  1037. self.toolTipAlignment.AppendSpace(2)
  1038. self.toolTipAlignment.AlignHorizonalCenter()
  1039.  
  1040.  
  1041. def __ShowStatusMinusButtonList(self):
  1042. for (stateMinusKey, statusMinusButton) in self.statusMinusButtonDict.items():
  1043. statusMinusButton.Show()
  1044.  
  1045. def __HideStatusMinusButtonList(self):
  1046. for (stateMinusKey, statusMinusButton) in self.statusMinusButtonDict.items():
  1047. statusMinusButton.Hide()
  1048.  
  1049. def ShowStatusPlusButtonList(self):
  1050. for (statePlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
  1051. statusPlusButton.Show()
  1052.  
  1053. def HideStatusPlusButtonList(self):
  1054. for (statePlusKey, statusPlusButton) in self.statusPlusButtonDict.items():
  1055. statusPlusButton.Hide()
  1056.  
  1057. def ShowStatusHizliPlusButtonList(self):
  1058. for (statePlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
  1059. statusHizliPlusButton.Show()
  1060.  
  1061. def HideStatusHizliPlusButtonList(self):
  1062. for (statePlusKey, statusHizliPlusButton) in self.statusHizliPlusButtonDict.items():
  1063. statusHizliPlusButton.Hide()
  1064.  
  1065. def SelectSkill(self, skillSlotIndex):
  1066.  
  1067. mouseController = mouseModule.mouseController
  1068.  
  1069. if FALSE == mouseController.isAttached():
  1070.  
  1071. srcSlotIndex = self.__RealSkillSlotToSourceSlot(skillSlotIndex)
  1072. selectedSkillIndex = player.GetSkillIndex(srcSlotIndex)
  1073.  
  1074. if skill.CanUseSkill(selectedSkillIndex):
  1075.  
  1076. if app.IsPressed(app.DIK_LCONTROL):
  1077.  
  1078. player.RequestAddToEmptyLocalQuickSlot(player.SLOT_TYPE_SKILL, srcSlotIndex)
  1079. return
  1080.  
  1081. mouseController.AttachObject(self, player.SLOT_TYPE_SKILL, srcSlotIndex, selectedSkillIndex)
  1082.  
  1083. else:
  1084.  
  1085. mouseController.DeattachObject()
  1086.  
  1087. def SelectEmptySlot(self, SlotIndex):
  1088. mouseModule.mouseController.DeattachObject()
  1089.  
  1090. ## ToolTip
  1091. def OverInItem(self, slotNumber):
  1092.  
  1093. if mouseModule.mouseController.isAttached():
  1094. return
  1095.  
  1096. if not self.toolTipSkill:
  1097. return
  1098.  
  1099. srcSlotIndex = self.__RealSkillSlotToSourceSlot(slotNumber)
  1100. skillIndex = player.GetSkillIndex(srcSlotIndex)
  1101. skillLevel = player.GetSkillLevel(srcSlotIndex)
  1102. skillGrade = player.GetSkillGrade(srcSlotIndex)
  1103. skillType = skill.GetSkillType(skillIndex)
  1104.  
  1105. ## ACTIVE
  1106. if skill.SKILL_TYPE_ACTIVE == skillType:
  1107. overInSkillGrade = self.__GetSkillGradeFromSlot(slotNumber)
  1108.  
  1109. if overInSkillGrade == skill.SKILL_GRADE_COUNT-1 and skillGrade == skill.SKILL_GRADE_COUNT:
  1110. self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, skillGrade, skillLevel)
  1111. elif overInSkillGrade == skillGrade:
  1112. if app.ENABLE_SKILLS_LEVEL_OVER_P and skillGrade == 2:
  1113. self.toolTipSkill.SetSkillOnlyName(srcSlotIndex, skillIndex, overInSkillGrade + 1)
  1114. else:
  1115. self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, overInSkillGrade, skillLevel)
  1116. elif app.ENABLE_SKILLS_LEVEL_OVER_P and overInSkillGrade == skill.SKILL_GRADE_COUNT-2 and skillGrade >= skill.SKILL_GRADE_COUNT-1:
  1117. self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, skillGrade, skillLevel)
  1118. else:
  1119. if app.ENABLE_SKILLS_LEVEL_OVER_P and overInSkillGrade == 1 and skillGrade == 2:
  1120. self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, overInSkillGrade + 1, skillLevel)
  1121. elif app.ENABLE_SKILLS_LEVEL_OVER_P and overInSkillGrade == 2 and skillGrade < 3:
  1122. self.toolTipSkill.SetSkillOnlyName(srcSlotIndex, skillIndex, overInSkillGrade + 1)
  1123. else:
  1124. self.toolTipSkill.SetSkillOnlyName(srcSlotIndex, skillIndex, overInSkillGrade)
  1125.  
  1126. else:
  1127. self.toolTipSkill.SetSkillNew(srcSlotIndex, skillIndex, skillGrade, skillLevel)
  1128.  
  1129. def OverOutItem(self):
  1130. if None == self.toolTipSkill:
  1131. return
  1132.  
  1133. if 0 != self.toolTipSkill:
  1134. self.toolTipSkill.HideToolTip()
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.  
  1207.  
  1208.  
  1209.  
  1210. def __GetStatMinusPoint(self):
  1211. POINT_STAT_RESET_COUNT = 112
  1212. return player.GetStatus(POINT_STAT_RESET_COUNT)
  1213.  
  1214. def __OverInStatMinusButton(self, stat):
  1215. try:
  1216. self.__ShowStatToolTip(self.STAT_MINUS_DESCRIPTION[stat] % self.__GetStatMinusPoint())
  1217. except KeyError:
  1218. pass
  1219.  
  1220. self.refreshToolTip = lambda arg=stat: self.__OverInStatMinusButton(arg)
  1221.  
  1222. def __OverOutStatMinusButton(self):
  1223. self.__HideStatToolTip()
  1224. self.refreshToolTip = 0
  1225.  
  1226. def __OverInStatButton(self, stat):
  1227. try:
  1228. self.__ShowStatToolTip(self.STAT_DESCRIPTION[stat])
  1229. except KeyError:
  1230. pass
  1231.  
  1232. def __OverInStatButton2(self):
  1233. try:
  1234. self.__ShowStatToolTip("statu")
  1235. except KeyError:
  1236. pass
  1237.  
  1238. def __OverOutStatButton(self):
  1239. self.__HideStatToolTip()
  1240.  
  1241. def __ShowStatToolTip(self, statDesc):
  1242. if self.toolTip:
  1243. self.toolTip.ClearToolTip()
  1244. self.toolTip.AppendTextLine(statDesc)
  1245. self.toolTip.Show()
  1246.  
  1247. def __HideStatToolTip(self):
  1248. if self.toolTip:
  1249. self.toolTip.Hide()
  1250.  
  1251. def OnPressEscapeKey(self):
  1252. self.Close()
  1253. return TRUE
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261. ## Skill Process
  1262. def __RefreshSkillPage(self, name, slotCount):
  1263. global SHOW_LIMIT_SUPPORT_SKILL_LIST
  1264.  
  1265. skillPage = self.skillPageDict[name]
  1266.  
  1267. startSlotIndex = skillPage.GetStartIndex()
  1268. if name == "ACTIVE":
  1269. if self.PAGE_HORSE == self.curSelectedSkillGroup:
  1270. startSlotIndex += slotCount
  1271.  
  1272. getSkillType = skill.GetSkillType
  1273. getSkillIndex = player.GetSkillIndex
  1274. getSkillGrade = player.GetSkillGrade
  1275. getSkillLevel = player.GetSkillLevel
  1276. getSkillMaxLevel = skill.GetSkillMaxLevel
  1277. getSkillLevelUpPoint = skill.GetSkillLevelUpPoint
  1278. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1279. refresh = 0
  1280.  
  1281. for i in xrange(slotCount + 1):
  1282.  
  1283. slotIndex = i + startSlotIndex
  1284. skillIndex = getSkillIndex(slotIndex)
  1285. if not app.ENABLE_SKILLS_LEVEL_OVER_P:
  1286. for j in xrange(skill.SKILL_GRADE_COUNT):
  1287. skillPage.ClearSlot(self.__GetRealSkillSlot(j, i))
  1288. else:
  1289. if not refresh and skillIndex >= 137 and skillIndex <= 140:
  1290. for w in xrange(slotCount + 1):
  1291. for q in xrange(skill.SKILL_GRADE_COUNT):
  1292. skillPage.ClearSlot(self.__GetRealSkillSlot(q, w))
  1293.  
  1294. refresh = 1
  1295.  
  1296. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1297. if slotIndex == 7 or slotIndex == 8:
  1298. for j in xrange(skill.SKILL_GRADE_COUNT):
  1299. skillPage.ClearSlot(self.__GetRealSkillSlot(j, slotIndex))
  1300.  
  1301. if not skillIndex:
  1302. continue
  1303.  
  1304. skillType = getSkillType(skillIndex)
  1305. skillGrade = getSkillGrade(slotIndex)
  1306. skillLevel = getSkillLevel(slotIndex)
  1307.  
  1308.  
  1309.  
  1310. if skillIndex == player.SKILL_INDEX_RIDING:
  1311. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1312. skGrade = 0
  1313. if skillLevel >= 11 and skillLevel < 20:
  1314. skGrade = 1
  1315. elif skillGrade == 1:
  1316. skGrade = 2
  1317.  
  1318. if skillGrade == 1:
  1319. skillLevel += 19
  1320. elif skillGrade == 2:
  1321. skillLevel += 29
  1322. elif skillGrade == 3:
  1323. skillLevel = 40
  1324.  
  1325. skGr = max(skillLevel - 1, 0)
  1326. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1327. skGr = skGrade
  1328.  
  1329. skillPage.SetSkillSlotNew(slotIndex, skillIndex, skGr, skillLevel)
  1330. skillPage.SetSlotCount(slotIndex, skillLevel)
  1331.  
  1332.  
  1333. elif skillType == skill.SKILL_TYPE_ACTIVE:
  1334. for j in xrange(skill.SKILL_GRADE_COUNT):
  1335. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1336. if j == 2 and skillGrade == 1:
  1337. continue
  1338.  
  1339. realSlotIndex = self.__GetRealSkillSlot(j, slotIndex)
  1340. skillPage.SetSkillSlotNew(realSlotIndex, skillIndex, j, skillLevel)
  1341. skillPage.SetCoverButton(realSlotIndex)
  1342.  
  1343. if (skillGrade == skill.SKILL_GRADE_COUNT) and j == (skill.SKILL_GRADE_COUNT - 1):
  1344. skillPage.SetSlotCountNew(realSlotIndex, skillGrade, skillLevel)
  1345. elif (not self.__CanUseSkillNow()) or (skillGrade != j):
  1346. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1347. if j != 2 and skillGrade != 2:
  1348. skillPage.ClearSlot(realSlotIndex)
  1349. skillPage.SetSkillSlotNew(realSlotIndex, skillIndex, j, skillLevel)
  1350. skillPage.SetCoverButton(realSlotIndex)
  1351. elif skillGrade == 2 and j >= 3:
  1352. skillPage.ClearSlot(realSlotIndex)
  1353. skillPage.SetSkillSlotNew(realSlotIndex, skillIndex, j, skillLevel)
  1354. skillPage.SetCoverButton(realSlotIndex)
  1355.  
  1356. skillPage.SetSlotCount(realSlotIndex, 0)
  1357. skillPage.DisableCoverButton(realSlotIndex)
  1358. else:
  1359. skillPage.SetSlotCountNew(realSlotIndex, skillGrade, skillLevel)
  1360.  
  1361.  
  1362. else:
  1363. if not SHOW_LIMIT_SUPPORT_SKILL_LIST or skillIndex in SHOW_LIMIT_SUPPORT_SKILL_LIST:
  1364. realSlotIndex = self.__GetETCSkillRealSlotIndex(slotIndex)
  1365. skillPage.SetSkillSlot(realSlotIndex, skillIndex, skillLevel)
  1366. skillPage.SetSlotCountNew(realSlotIndex, skillGrade, skillLevel)
  1367.  
  1368. if skill.CanUseSkill(skillIndex):
  1369. skillPage.SetCoverButton(realSlotIndex)
  1370.  
  1371. skillPage.RefreshSlot()
  1372.  
  1373. if app.ENABLE_SKILL_COLOR_SYSTEM:
  1374. if "ACTIVE" == name:
  1375. if self.PAGE_HORSE != self.curSelectedSkillGroup:
  1376. self.__CreateSkillColorButton(skillPage)
  1377. else:
  1378. self.skillColorButton = []
  1379.  
  1380.  
  1381.  
  1382. def RefreshSkill(self):
  1383.  
  1384. if self.isLoaded==0:
  1385. return
  1386.  
  1387. if self.__IsChangedHorseRidingSkillLevel():
  1388. self.RefreshCharacter()
  1389. return
  1390.  
  1391.  
  1392. global SHOW_ONLY_ACTIVE_SKILL
  1393. if SHOW_ONLY_ACTIVE_SKILL:
  1394. self.__RefreshSkillPage("ACTIVE", self.ACTIVE_PAGE_SLOT_COUNT)
  1395. else:
  1396. self.__RefreshSkillPage("ACTIVE", self.ACTIVE_PAGE_SLOT_COUNT)
  1397. self.__RefreshSkillPage("SUPPORT", self.SUPPORT_PAGE_SLOT_COUNT)
  1398.  
  1399. self.RefreshSkillPlusButtonList()
  1400.  
  1401. def CanShowPlusButton(self, skillIndex, skillLevel, curStatPoint):
  1402.  
  1403. ## ½ΊΕ³ΐΜ ΐΦΐΈΈι
  1404. if 0 == skillIndex:
  1405. return FALSE
  1406.  
  1407. ## ·ΉΊ§Ύχ Α¶°Ηΐ» ΈΈΑ·ΗΡ΄ΩΈι
  1408. if not skill.CanLevelUpSkill(skillIndex, skillLevel):
  1409. return FALSE
  1410.  
  1411. return TRUE
  1412.  
  1413. def __RefreshSkillPlusButton(self, name):
  1414. global HIDE_SUPPORT_SKILL_POINT
  1415. if HIDE_SUPPORT_SKILL_POINT and "SUPPORT" == name:
  1416. return
  1417.  
  1418. slotWindow = self.skillPageDict[name]
  1419. slotWindow.HideAllSlotButton()
  1420.  
  1421. slotStatType = self.skillPageStatDict[name]
  1422. if 0 == slotStatType:
  1423. return
  1424.  
  1425. statPoint = player.GetStatus(slotStatType)
  1426. startSlotIndex = slotWindow.GetStartIndex()
  1427. if "HORSE" == name:
  1428. startSlotIndex += self.ACTIVE_PAGE_SLOT_COUNT
  1429.  
  1430. if statPoint > 0:
  1431. for i in xrange(self.PAGE_SLOT_COUNT):
  1432. slotIndex = i + startSlotIndex
  1433. skillIndex = player.GetSkillIndex(slotIndex)
  1434. skillGrade = player.GetSkillGrade(slotIndex)
  1435. skillLevel = player.GetSkillLevel(slotIndex)
  1436.  
  1437. if skillIndex == 0:
  1438. continue
  1439. if skillGrade != 0:
  1440. continue
  1441.  
  1442. if name == "HORSE":
  1443. if player.GetStatus(player.LEVEL) >= skill.GetSkillLevelLimit(skillIndex):
  1444. if skillLevel < 20:
  1445. slotWindow.ShowSlotButton(self.__GetETCSkillRealSlotIndex(slotIndex))
  1446.  
  1447. else:
  1448. if "SUPPORT" == name:
  1449. if not SHOW_LIMIT_SUPPORT_SKILL_LIST or skillIndex in SHOW_LIMIT_SUPPORT_SKILL_LIST:
  1450. if self.CanShowPlusButton(skillIndex, skillLevel, statPoint):
  1451. slotWindow.ShowSlotButton(slotIndex)
  1452. else:
  1453. if self.CanShowPlusButton(skillIndex, skillLevel, statPoint):
  1454. slotWindow.ShowSlotButton(slotIndex)
  1455.  
  1456.  
  1457. if app.ENABLE_SKILL_COLOR_SYSTEM:
  1458. def __CreateSkillColorButton(self, parent):
  1459. self.skillColorButton = []
  1460.  
  1461. xPos, yPos = 0, 0
  1462. for idx in xrange(self.PAGE_SLOT_COUNT):
  1463. skillSlot = idx
  1464. if skillSlot < 6:
  1465. if (skillSlot % 2) == 0:
  1466. xPos = 75
  1467. yPos = 4 + (skillSlot / 2 * 36)
  1468. else:
  1469. xPos = 187
  1470. yPos = 4 + (skillSlot / 2 * 36)
  1471.  
  1472. skillIndex = player.GetSkillIndex(skillSlot + 1)
  1473. skillMaxGrade = 3
  1474.  
  1475. if len(self.skillColorButton) == skillSlot:
  1476. self.skillColorButton.append([])
  1477. self.skillColorButton[skillSlot] = ui.Button()
  1478. self.skillColorButton[skillSlot].SetParent(parent)
  1479. self.skillColorButton[skillSlot].SetUpVisual("d:/ymir work/ui/skillcolor/skill_color_button_default.tga")
  1480. self.skillColorButton[skillSlot].SetOverVisual("d:/ymir work/ui/skillcolor/skill_color_button_over.tga")
  1481. self.skillColorButton[skillSlot].SetDownVisual("d:/ymir work/ui/skillcolor/skill_color_button_down.tga")
  1482. self.skillColorButton[skillSlot].SetPosition(xPos, yPos)
  1483. self.skillColorButton[skillSlot].SetEvent(lambda arg = skillSlot, arg2 = skillIndex: self.__OnPressSkillColorButton(arg, arg2))
  1484. if player.GetSkillGrade(skillSlot + 1) >= skillMaxGrade:
  1485. self.skillColorButton[skillSlot].Show()
  1486. else:
  1487. self.skillColorButton[skillSlot].Hide()
  1488. else:
  1489. self.skillColorButton[skillSlot].SetPosition(xPos, yPos)
  1490.  
  1491. def __UpdateSkillColorPosition(self):
  1492. x, y = self.GetGlobalPosition()
  1493. self.skillColorWnd.SetPosition(x + 250, y)
  1494.  
  1495. def __OnPressSkillColorButton(self, skillSlot, skillIndex):
  1496. self.skillColorWnd = uiSkillColor.SkillColorWindow(skillSlot, skillIndex)
  1497. if self.skillColorWnd and not self.skillColorWnd.IsShow():
  1498. self.skillColorWnd.Show()
  1499.  
  1500. def RefreshSkillPlusButtonList(self):
  1501.  
  1502. if self.isLoaded==0:
  1503. return
  1504.  
  1505. self.RefreshSkillPlusPointLabel()
  1506.  
  1507. if not self.__CanUseSkillNow():
  1508. return
  1509.  
  1510. try:
  1511. if self.PAGE_HORSE == self.curSelectedSkillGroup:
  1512. self.__RefreshSkillPlusButton("HORSE")
  1513. else:
  1514. self.__RefreshSkillPlusButton("ACTIVE")
  1515.  
  1516. self.__RefreshSkillPlusButton("SUPPORT")
  1517.  
  1518. except:
  1519. import exception
  1520. exception.Abort("CharacterWindow.RefreshSkillPlusButtonList.BindObject")
  1521.  
  1522. def RefreshSkillPlusPointLabel(self):
  1523. if self.isLoaded==0:
  1524. return
  1525.  
  1526. if self.PAGE_HORSE == self.curSelectedSkillGroup:
  1527. activeStatPoint = player.GetStatus(player.SKILL_HORSE)
  1528. self.activeSkillPointValue.SetText(str(activeStatPoint))
  1529.  
  1530. else:
  1531. activeStatPoint = player.GetStatus(player.SKILL_ACTIVE)
  1532. self.activeSkillPointValue.SetText(str(activeStatPoint))
  1533.  
  1534. supportStatPoint = max(0, player.GetStatus(player.SKILL_SUPPORT))
  1535. self.supportSkillPointValue.SetText(str(supportStatPoint))
  1536.  
  1537. ## Skill Level Up Button
  1538. def OnPressedSlotButton(self, slotNumber):
  1539. srcSlotIndex = self.__RealSkillSlotToSourceSlot(slotNumber)
  1540.  
  1541. skillIndex = player.GetSkillIndex(srcSlotIndex)
  1542. curLevel = player.GetSkillLevel(srcSlotIndex)
  1543. maxLevel = skill.GetSkillMaxLevel(skillIndex)
  1544.  
  1545. net.SendChatPacket("/skillup " + str(skillIndex))
  1546.  
  1547. ## Use Skill
  1548. def ClickSkillSlot(self, slotIndex):
  1549.  
  1550. srcSlotIndex = self.__RealSkillSlotToSourceSlot(slotIndex)
  1551. skillIndex = player.GetSkillIndex(srcSlotIndex)
  1552. skillType = skill.GetSkillType(skillIndex)
  1553.  
  1554. if not self.__CanUseSkillNow():
  1555. if skill.SKILL_TYPE_ACTIVE == skillType:
  1556. return
  1557.  
  1558. for slotWindow in self.skillPageDict.values():
  1559. if slotWindow.HasSlot(slotIndex):
  1560. if skill.CanUseSkill(skillIndex):
  1561. player.ClickSkillSlot(srcSlotIndex)
  1562. return
  1563.  
  1564. mouseModule.mouseController.DeattachObject()
  1565.  
  1566. ## FIXME : ½ΊΕ³ΐ» »ηΏλΗίΐ»¶§ ½½·Τ ΉψΘ£Έ¦ °΅Αφ°ν ΗΨ΄η ½½·Τΐ» Γ£ΎΖΌ­ Ύχµ¥ΐΜΖ® ΗΡ΄Ω.
  1567. ## ΈΕΏμ ΊΗΥΈ®. ±ΈΑ¶ ΐΪΓΌΈ¦ °³Ό±ΗΨΎί Ηµν.
  1568. def OnUseSkill(self, slotIndex, coolTime):
  1569.  
  1570. skillIndex = player.GetSkillIndex(slotIndex)
  1571. skillType = skill.GetSkillType(skillIndex)
  1572.  
  1573. ## ACTIVE
  1574. if skill.SKILL_TYPE_ACTIVE == skillType:
  1575. skillGrade = player.GetSkillGrade(slotIndex)
  1576. slotIndex = self.__GetRealSkillSlot(skillGrade, slotIndex)
  1577. ## ETC
  1578. else:
  1579. slotIndex = self.__GetETCSkillRealSlotIndex(slotIndex)
  1580.  
  1581. for slotWindow in self.skillPageDict.values():
  1582. if slotWindow.HasSlot(slotIndex):
  1583. slotWindow.SetSlotCoolTime(slotIndex, coolTime)
  1584. return
  1585.  
  1586. def OnActivateSkill(self, slotIndex):
  1587. skillGrade = player.GetSkillGrade(slotIndex)
  1588. slotIndex = self.__GetRealSkillSlot(skillGrade, slotIndex)
  1589. for slotWindow in self.skillPageDict.values():
  1590. if slotWindow.HasSlot(slotIndex):
  1591.  
  1592.  
  1593.  
  1594. slotWindow.ActivateSlot(slotIndex)
  1595.  
  1596. return
  1597.  
  1598. def OnDeactivateSkill(self, slotIndex):
  1599. skillGrade = player.GetSkillGrade(slotIndex)
  1600. slotIndex = self.__GetRealSkillSlot(skillGrade, slotIndex)
  1601. for slotWindow in self.skillPageDict.values():
  1602. if slotWindow.HasSlot(slotIndex):
  1603.  
  1604.  
  1605.  
  1606. slotWindow.DeactivateSlot(slotIndex)
  1607.  
  1608. return
  1609.  
  1610. def __ShowJobToolTip(self):
  1611. self.toolTipJob.ShowToolTip()
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620. def __HideJobToolTip(self):
  1621. self.toolTipJob.HideToolTip()
  1622.  
  1623. def __SetJobText(self, mainJob, subJob):
  1624. if player.GetStatus(player.LEVEL)<5:
  1625. subJob=0
  1626.  
  1627. if 949 == app.GetDefaultCodePage():
  1628. self.toolTipJob.ClearToolTip()
  1629.  
  1630. try:
  1631. jobInfoTitle=localeInfo.JOBINFO_TITLE[mainJob][subJob]
  1632. jobInfoData=localeInfo.JOBINFO_DATA_LIST[mainJob][subJob]
  1633. except IndexError:
  1634. print "uiCharacter.CharacterWindow.__SetJobText(mainJob=%d, subJob=%d)" % (mainJob, subJob)
  1635. return
  1636.  
  1637. self.toolTipJob.AutoAppendTextLine(jobInfoTitle)
  1638. self.toolTipJob.AppendSpace(5)
  1639.  
  1640. for jobInfoDataLine in jobInfoData:
  1641. self.toolTipJob.AutoAppendTextLine(jobInfoDataLine)
  1642.  
  1643. self.toolTipJob.AlignHorizonalCenter()
  1644.  
  1645. def __ShowAlignmentToolTip(self):
  1646. if self.toolTipAlignment:
  1647. self.toolTipAlignment.ShowToolTip()
  1648.  
  1649. def __HideAlignmentToolTip(self):
  1650. if self.toolTipAlignment:
  1651. self.toolTipAlignment.HideToolTip()
  1652.  
  1653. def RefreshCharacter(self):
  1654.  
  1655. if self.isLoaded==0:
  1656. return
  1657.  
  1658. ## Name
  1659. try:
  1660. characterName = player.GetName()
  1661. guildName = player.GetGuildName()
  1662. self.characterNameValue.SetText(characterName)
  1663. self.guildNameValue.SetText(guildName)
  1664. if not guildName:
  1665. if localeInfo.IsARABIC():
  1666. self.characterNameSlot.SetPosition(19, 34)
  1667. else:
  1668. self.characterNameSlot.SetPosition(109, 34)
  1669.  
  1670. self.guildNameSlot.Hide()
  1671. else:
  1672. if localeInfo.IsJAPAN():
  1673. self.characterNameSlot.SetPosition(143, 34)
  1674. else:
  1675. self.characterNameSlot.SetPosition(148, 34)
  1676. self.guildNameSlot.Show()
  1677. except:
  1678. import exception
  1679. exception.Abort("CharacterWindow.RefreshCharacter.BindObject")
  1680.  
  1681. race = net.GetMainActorRace()
  1682. group = net.GetMainActorSkillGroup()
  1683. empire = net.GetMainActorEmpire()
  1684.  
  1685. ## Job Text
  1686. job = chr.RaceToJob(race)
  1687. self.__SetJobText(job, group)
  1688.  
  1689. ## FaceImage
  1690. try:
  1691. faceImageName = FACE_IMAGE_DICT[race]
  1692.  
  1693. try:
  1694. self.faceImage.LoadImage(faceImageName)
  1695. except:
  1696. print "CharacterWindow.RefreshCharacter(race=%d, faceImageName=%s)" % (race, faceImageName)
  1697. self.faceImage.Hide()
  1698.  
  1699. except KeyError:
  1700. self.faceImage.Hide()
  1701.  
  1702. ## GroupName
  1703. self.__SetSkillGroupName(race, group)
  1704.  
  1705. ## Skill
  1706. if 0 == group:
  1707. self.__SelectSkillGroup(0)
  1708.  
  1709. else:
  1710. self.__SetSkillSlotData(race, group, empire)
  1711.  
  1712. if self.__CanUseHorseSkill():
  1713. self.__SelectSkillGroup(0)
  1714.  
  1715. def __SetSkillGroupName(self, race, group):
  1716.  
  1717. job = chr.RaceToJob(race)
  1718.  
  1719. if not self.SKILL_GROUP_NAME_DICT.has_key(job):
  1720. return
  1721.  
  1722. nameList = self.SKILL_GROUP_NAME_DICT[job]
  1723.  
  1724. if 0 == group:
  1725. self.skillGroupButton1.SetText(nameList[1])
  1726. self.skillGroupButton2.SetText(nameList[2])
  1727. self.skillGroupButton1.Show()
  1728. self.skillGroupButton2.Show()
  1729. self.activeSkillGroupName.Hide()
  1730.  
  1731. else:
  1732.  
  1733. if self.__CanUseHorseSkill():
  1734. self.activeSkillGroupName.Hide()
  1735. self.skillGroupButton1.SetText(nameList.get(group, "Noname"))
  1736. self.skillGroupButton2.SetText(localeInfo.SKILL_GROUP_HORSE)
  1737. self.skillGroupButton1.Show()
  1738. self.skillGroupButton2.Show()
  1739.  
  1740. else:
  1741. self.activeSkillGroupName.SetText(nameList.get(group, "Noname"))
  1742. self.activeSkillGroupName.Show()
  1743. self.skillGroupButton1.Hide()
  1744. self.skillGroupButton2.Hide()
  1745.  
  1746. def __SetSkillSlotData(self, race, group, empire=0):
  1747.  
  1748. ## SkillIndex
  1749. playerSettingModule.RegisterSkill(race, group, empire)
  1750.  
  1751. ## Event
  1752. self.__SetSkillSlotEvent()
  1753.  
  1754. ## Refresh
  1755. self.RefreshSkill()
  1756.  
  1757. def __SelectSkillGroup(self, index):
  1758. for btn in self.skillGroupButton:
  1759. btn.SetUp()
  1760. self.skillGroupButton[index].Down()
  1761.  
  1762. if self.__CanUseHorseSkill():
  1763. if 0 == index:
  1764. index = net.GetMainActorSkillGroup()-1
  1765. elif 1 == index:
  1766. index = self.PAGE_HORSE
  1767.  
  1768. self.curSelectedSkillGroup = index
  1769. self.__SetSkillSlotData(net.GetMainActorRace(), index+1, net.GetMainActorEmpire())
  1770.  
  1771. def __CanUseSkillNow(self):
  1772. if 0 == net.GetMainActorSkillGroup():
  1773. return FALSE
  1774.  
  1775. return TRUE
  1776.  
  1777. def __CanUseHorseSkill(self):
  1778.  
  1779. slotIndex = player.GetSkillSlotIndex(player.SKILL_INDEX_RIDING)
  1780.  
  1781. if not slotIndex:
  1782. return FALSE
  1783.  
  1784. grade = player.GetSkillGrade(slotIndex)
  1785. level = player.GetSkillLevel(slotIndex)
  1786. if level < 0:
  1787. level *= -1
  1788. if grade >= 1 and level >= 1:
  1789. return TRUE
  1790.  
  1791. return FALSE
  1792.  
  1793. def __IsChangedHorseRidingSkillLevel(self):
  1794. ret = FALSE
  1795.  
  1796. if -1 == self.canUseHorseSkill:
  1797. self.canUseHorseSkill = self.__CanUseHorseSkill()
  1798.  
  1799. if self.canUseHorseSkill != self.__CanUseHorseSkill():
  1800. ret = TRUE
  1801.  
  1802. self.canUseHorseSkill = self.__CanUseHorseSkill()
  1803. return ret
  1804.  
  1805. def __GetRealSkillSlot(self, skillGrade, skillSlot):
  1806. _min = skill.SKILL_GRADE_COUNT - 1
  1807. if app.ENABLE_SKILLS_LEVEL_OVER_P:
  1808. _min -= 1
  1809. if skillGrade == 2:
  1810. skillGrade -= 1
  1811.  
  1812. __calc = skillSlot + min(_min, skillGrade) * skill.SKILL_GRADE_STEP_COUNT
  1813. return __calc
  1814.  
  1815. def __GetETCSkillRealSlotIndex(self, skillSlot):
  1816. if skillSlot > 100:
  1817. return skillSlot
  1818. return skillSlot % self.ACTIVE_PAGE_SLOT_COUNT
  1819.  
  1820. def __RealSkillSlotToSourceSlot(self, realSkillSlot):
  1821. if realSkillSlot > 100:
  1822. return realSkillSlot
  1823. if self.PAGE_HORSE == self.curSelectedSkillGroup:
  1824. return realSkillSlot + self.ACTIVE_PAGE_SLOT_COUNT
  1825. return realSkillSlot % skill.SKILL_GRADE_STEP_COUNT
  1826.  
  1827. def __GetSkillGradeFromSlot(self, skillSlot):
  1828. return int(skillSlot / skill.SKILL_GRADE_STEP_COUNT)
  1829.  
  1830. def SelectSkillGroup(self, index):
  1831. self.__SelectSkillGroup(index)
  1832.  
  1833. ###################################
  1834. ############# QUESTS ##############
  1835. ###################################
  1836.  
  1837. def __OnScrollQuest(self):
  1838. if self.state != "QUEST":
  1839. return
  1840.  
  1841.  
  1842. curPos = self.questScrollBar.GetPos()
  1843. if math.fabs(curPos - self.lastScrollPosition) >= 0.001:
  1844. self.RerenderArea()
  1845. self.lastScrollPosition = curPos
  1846.  
  1847. def ResetQuestScroll(self):
  1848. self.questScrollBar.Hide()
  1849.  
  1850. if self.questScrollBar.GetPos() != 0:
  1851. self.questScrollBar.SetPos(0)
  1852.  
  1853. def RerenderArea(self):
  1854. overflowingY = self.displayY - self.MAX_QUEST_HEIGHT
  1855. if overflowingY < 0:
  1856. overflowingY = 0
  1857.  
  1858. self.baseCutY = math.ceil(overflowingY * self.questScrollBar.GetPos()/20) * 20
  1859. print "OverflowingY: ",overflowingY, "baseCutY: ", self.baseCutY
  1860. self.displayY = 0
  1861. self.RearrangeCategories(xrange(quest.QUEST_CATEGORY_MAX_NUM))
  1862. self.RefreshCategory()
  1863.  
  1864. if overflowingY > 0:
  1865. self.questScrollBar.Show()
  1866. else:
  1867. self.ResetQuestScroll()
  1868.  
  1869. def __LoadQuestCat(self):
  1870. self.questPage.Show()
  1871.  
  1872. if self.isLoaded==0:
  1873. return
  1874.  
  1875. for i in xrange(quest.QUEST_CATEGORY_MAX_NUM):
  1876. cat = self.questCategoryList[i]
  1877.  
  1878. catName = cat.GetProperty("name")
  1879. if not catName:
  1880. cat.SetProperty("name", cat.GetText())
  1881. catName = cat.GetText()
  1882.  
  1883. count = self.GetCountQuestInCategory(i)
  1884. print "Loading quests: "+catName+", "+str(count)
  1885. self.questCategoryList[i].SetTextAlignLeft(catName + " (" + str(count) + ")")
  1886. self.questCategoryList[i].SetTextColor(self.GetCategoryColor(i))
  1887. self.questCategoryList[i].Show()
  1888.  
  1889. self.RefreshCategory()
  1890. if self.finishFirstLoad == False:
  1891. self.questScrollBar.Hide()
  1892. else:
  1893. self.RerenderArea()
  1894. self.finishFirstLoad = True
  1895.  
  1896. def GetCategoryColor(self, cat):
  1897. return self.qColorList['default_title']
  1898.  
  1899. def GetQuestProperties(self, questName):
  1900. # If it finds one of the tokens in the list it colors the whole quest that way
  1901. find = {"&": "green",
  1902. "*": "blue",
  1903. "~": "golden"}
  1904.  
  1905. if questName[0] in find:
  1906. return (questName[1:], find[questName[0]])
  1907.  
  1908. return (questName, None)
  1909.  
  1910. def IsCategoryOpen(self, cat):
  1911. return (cat in self.openCategories)
  1912.  
  1913. def ToggleCategory(self, cat):
  1914. if self.IsCategoryOpen(cat):
  1915. print "Toggle:close"
  1916. self.CloseCategory(cat)
  1917. else:
  1918. print "Toggle:Open"
  1919. self.OpenCategory(cat)
  1920.  
  1921. def RearrangeCategories(self, catRange):
  1922. i = 0
  1923. for i in catRange:
  1924. if self.displayY - self.baseCutY >= 0 and self.displayY - self.baseCutY < self.MAX_QUEST_HEIGHT:
  1925. self.questCategoryList[i].SetPosition(7, self.displayY - self.baseCutY)
  1926. self.questCategoryList[i].Show()
  1927. else:
  1928. self.questCategoryList[i].Hide()
  1929.  
  1930. self.displayY += 20
  1931. self.catPositionRender[i] = self.displayY
  1932.  
  1933. def CloseCategory(self, cat):
  1934. if cat in self.openCategories:
  1935. self.openCategories.remove(cat)
  1936.  
  1937. for curSlot in self.questSlotList:
  1938. if curSlot.GetProperty("category") == cat:
  1939. curSlot.Hide()
  1940. self.displayY -= curSlot.GetHeight()
  1941.  
  1942. self.RerenderArea()
  1943.  
  1944. def OpenCategory(self, cat):
  1945. print "Opening category "+str(cat)
  1946.  
  1947. while len(self.openCategories) >= self.maxConcurrentCategories: #close opened ones if we go over the limit
  1948. ccat = self.openCategories.pop()
  1949. self.CloseCategory(ccat)
  1950. print "Closing category "+str(ccat)
  1951.  
  1952. self.openCategories.append(cat)
  1953. self.RefreshCategory(cat)
  1954. self.RerenderArea()
  1955.  
  1956. def __SelectQuest(self, slotIndex):
  1957. questIndex = self.questIndexMap[slotIndex]
  1958.  
  1959. if not questIndex in self.clickedQuests:
  1960. self.clickedQuests.append(questIndex)
  1961.  
  1962. event = __import__(pythonApi.GetModuleName("event"))
  1963. event.QuestButtonClick(-2147483648 + questIndex)
  1964.  
  1965. def RefreshCategory(self, cat = -1):
  1966. if self.isLoaded == 0 or self.state != "QUEST":
  1967. return
  1968.  
  1969. cats = []
  1970. if cat == -1:
  1971. cats = self.openCategories
  1972. elif not cat in self.openCategories:
  1973. self.OpenCategory(cat)
  1974. return
  1975. else:
  1976. cats.append(cat)
  1977.  
  1978. for curCat in cats:
  1979. self.displayY = self.catPositionRender[curCat]
  1980. print "Rendering category "+str(curCat)+", position: "+str(self.displayY)
  1981. # Load
  1982. self.LoadCategory(curCat)
  1983. # Rearrange
  1984. self.RearrangeCategories(xrange(curCat+1, quest.QUEST_CATEGORY_MAX_NUM))
  1985.  
  1986. def ReceiveNewQuest(self, idx):
  1987. if not self.finishFirstLoad:
  1988. return
  1989.  
  1990. for cat in xrange(quest.QUEST_CATEGORY_MAX_NUM):
  1991. for q in self.GetQuestsInCategory(cat):
  1992. (questID, questIndex, questName, questCategory, questIcon, questCounterName, questCounterValue) = q
  1993. if questIndex == idx:
  1994. self.RefreshCategory(cat)
  1995. self.RefreshCategoriesCount()
  1996. self.RerenderArea()
  1997.  
  1998. def RefreshCategoriesCount(self):
  1999. for cat in xrange(quest.QUEST_CATEGORY_MAX_NUM):
  2000. # Refresh category count
  2001. catName = self.questCategoryList[cat].GetProperty("name")
  2002. count = self.GetCountQuestInCategory(cat)
  2003. print "Refreshing cat count:",cat,",",count
  2004. self.questCategoryList[cat].SetTextAlignLeft(catName + " (" + str(count) + ")")
  2005.  
  2006. def RefreshQuest(self):
  2007. if self.isLoaded == 0 or self.state != "QUEST":
  2008. return
  2009.  
  2010. print "Refreshing ALL"
  2011. for cat in self.openCategories:
  2012. print "Refreshing cat:",cat
  2013. self.RefreshCategory(cat)
  2014.  
  2015. self.RefreshCategoriesCount()
  2016.  
  2017. def CreateQuestSlot(self, name):
  2018. for cSlot in self.questSlotList:
  2019. if cSlot.GetWindowName() == name:
  2020. return cSlot
  2021.  
  2022. pyScrLoader = ui.PythonScriptLoader()
  2023. slot = ui.ListBar()
  2024. pyScrLoader.LoadElementListBar(slot, quest_slot_listbar, self.questPage)
  2025.  
  2026. slot.SetParent(self.questPage)
  2027. slot.SetWindowName(name)
  2028. slot.Hide()
  2029.  
  2030. # Store it
  2031. self.questSlotList.append(slot)
  2032.  
  2033. return slot
  2034.  
  2035. def SetQuest(self, slot, questID, questName, questCounterName, questCounterValue):
  2036. (name, color) = self.GetQuestProperties(questName)
  2037. slot.SetTextAlignLeft(name)
  2038. #if color:
  2039. #slot.SetTextColor(self.qColorList[color])
  2040. slot.SetEvent(ui.__mem_func__(self.__SelectQuest), questID)
  2041. slot.SetWindowHorizontalAlignLeft()
  2042. slot.Show()
  2043.  
  2044. def LoadCategory(self, cat):
  2045. # Reinitialize everything
  2046. self.slotIndex = 0
  2047. self.questIndexMap = {}
  2048. self.extraSpace = 0
  2049. self.counterList = []
  2050. self.clockList = []
  2051.  
  2052. # Hidea all the slots first
  2053. for slot in self.questSlotList:
  2054. slot.Hide()
  2055.  
  2056. qPos = 0
  2057. for q in self.GetQuestsInCategory(cat):
  2058. (questID, questIndex, questName, questCategory, _, questCounterName, questCounterValue) = q
  2059. (questClockName, questClockTime) = quest.GetQuestLastTime(questID)
  2060.  
  2061. # Generate slot
  2062. slot = self.CreateQuestSlot("QuestSlotList_"+str(questCategory)+"_"+str(questID))
  2063.  
  2064. # Position it
  2065. slot.SetPosition(10, self.displayY - self.baseCutY)
  2066. baseDisplayY = self.displayY
  2067.  
  2068. # Set counters if any
  2069. hasCounter = False
  2070. if questCounterName != "":
  2071. self.displayY += 15
  2072.  
  2073. counter = ui.TextLine()
  2074. counter.SetParent(slot)
  2075. counter.SetPosition(35, 20)
  2076. counter.SetText(questCounterName+": "+str(questCounterValue))
  2077. counter.Show()
  2078.  
  2079. self.counterList.append(counter)
  2080. hasCounter = True
  2081.  
  2082. # Show clocks if any
  2083. if len(questClockName) > 1:
  2084. if questClockTime <= 0:
  2085. clockText = localeInfo.QUEST_TIMEOVER
  2086. else:
  2087. questLastMinute = questClockTime / 60
  2088. questLastSecond = questClockTime % 60
  2089.  
  2090. clockText = questClockName + ": "
  2091.  
  2092. if questLastMinute > 0:
  2093. clockText += str(questLastMinute) + localeInfo.QUEST_MIN
  2094. if questLastSecond > 0:
  2095. clockText += " "
  2096.  
  2097. if questLastSecond > 0:
  2098. clockText += str(questLastSecond) + localeInfo.QUEST_SEC
  2099.  
  2100. clock = ui.TextLine()
  2101. clock.SetParent(slot)
  2102. clock.SetPosition(35, 20 + int(hasCounter)*14)
  2103. clock.SetText(clockText)
  2104. clock.SetProperty("idx", questID)
  2105. clock.Show()
  2106.  
  2107. self.clockList.append(clock)
  2108.  
  2109. self.displayY += 20
  2110.  
  2111. slot.SetProperty("category", questCategory)
  2112.  
  2113. if questIndex in self.clickedQuests:
  2114. slot.OnClickEvent() # mark it
  2115.  
  2116. # Display and save it if necessary
  2117. if baseDisplayY - self.baseCutY >= 0 and baseDisplayY - self.baseCutY < self.MAX_QUEST_HEIGHT:
  2118. # print "Saved "+questName+" at "+str(self.slotIndex)+", id "+str(self.questIndexMap[questID])
  2119. self.questIndexMap[questID] = questIndex
  2120. self.SetQuest(slot, questID, questName, questCounterName, questCounterValue)
  2121.  
  2122. self.displayY += 20
  2123.  
  2124. # Clean non-displayed slots!
  2125. oldList = self.questSlotList
  2126. newList = []
  2127. for slot in self.questSlotList:
  2128. if slot.IsShow():
  2129. newList.append(slot)
  2130.  
  2131. self.questSlotList = newList
  2132.  
  2133. def __UpdateQuestClock(self):
  2134. if "QUEST" == self.state:
  2135. for clock in self.clockList:
  2136. if not clock.GetProperty("idx"):
  2137. print "Invalid clock property"
  2138. return
  2139.  
  2140. (questClockName, questClockTime) = quest.GetQuestLastTime(clock.GetProperty("idx"))
  2141.  
  2142. if questClockTime <= 0:
  2143. clockText = localeInfo.QUEST_TIMEOVER
  2144. else:
  2145. questLastMinute = questClockTime / 60
  2146. questLastSecond = questClockTime % 60
  2147.  
  2148. clockText = questClockName + ": "
  2149.  
  2150. if questLastMinute > 0:
  2151. clockText += str(questLastMinute) + localeInfo.QUEST_MIN
  2152. if questLastSecond > 0:
  2153. clockText += " "
  2154.  
  2155. if questLastSecond > 0:
  2156. clockText += str(questLastSecond) + localeInfo.QUEST_SEC
  2157.  
  2158. clock.SetText(clockText)
  2159.  
  2160. def __OnClickQuestCategoryButton(self, category):
  2161. self.ToggleCategory(category)
  2162.  
  2163. def GetQuestsInCategory(self, category, retCount = False):
  2164. qlist = []
  2165. count = 0
  2166. for i in xrange(quest.GetQuestCount()):
  2167. (questIndex, questName, questCategory, questIcon, questCounterName, questCounterValue) = quest.GetQuestData(i)
  2168. if questCategory == category:
  2169. count += 1
  2170. qlist.append((i, questIndex, questName, questCategory, questIcon, questCounterName, questCounterValue))
  2171.  
  2172. if retCount:
  2173. return count
  2174.  
  2175. return qlist
  2176.  
  2177. def GetCountQuestInCategory(self, category):
  2178. return self.GetQuestsInCategory(category, True)
  2179.  
  2180. def OpenQuestSlideWindow(self, skin, idx):
  2181. #wnds = ()
  2182. #
  2183. #if self.IsShow() == False:
  2184. # return
  2185. #q = uiQuest.QuestSlideDialog(self, skin, idx)
  2186. #q.SetWindowName("QuestSlideWindow" + str(idx))
  2187. #self.SetTop()
  2188. #q.Show()
  2189. #
  2190. ##?? ???? ????? ? ??? ??? ???? ??? ??? ??
  2191. #if self.wndQuestSlideWindowNewKey > 0 and self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1] is not None:
  2192. # self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1].CloseSelf()
  2193. #
  2194. #self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey] = q
  2195. #
  2196. #self.wndQuestSlideWindowNewKey = self.wndQuestSlideWindowNewKey + 1
  2197. #if self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1] is not None:
  2198. # self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1].AddOnCloseEvent(lambda key = self.wndQuestSlideWindowNewKey:ui.__mem_func__(self.RemoveQuestSlideDialog)(key-1))
  2199. return
  2200.  
  2201. def OnUpdate(self):
  2202. self.__UpdateQuestClock()
  2203. if app.ENABLE_SKILL_COLOR_SYSTEM:
  2204. if self.skillColorWnd:
  2205. self.__UpdateSkillColorPosition()
  2206.  
  2207. def OnMoveWindow(self, x, y):
  2208. if self.wndQuestSlideWindowNewKey-1 >= 0:
  2209. if self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1] is not None:
  2210. self.wndQuestSlideWindow[self.wndQuestSlideWindowNewKey-1].AdjustPositionAndSize()
  2211.  
  2212. def RemoveQuestSlideDialog(self,key):
  2213. if self.wndQuestSlideWindow[key]:
  2214. self.wndQuestSlideWindow[key] = None
Add Comment
Please, Sign In to add comment