Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.60 KB | None | 0 0
  1. import app
  2. import ui
  3. import player
  4. import net
  5. import wndMgr
  6. import messenger
  7. import guild
  8. import chr
  9. import nonplayer
  10. import localeInfo
  11. import constInfo
  12.  
  13. class TargetBoard(ui.ThinBoard):
  14.  
  15. BUTTON_NAME_LIST = (
  16. localeInfo.TARGET_BUTTON_WHISPER,
  17. localeInfo.TARGET_BUTTON_EXCHANGE,
  18. localeInfo.TARGET_BUTTON_FIGHT,
  19. localeInfo.TARGET_BUTTON_ACCEPT_FIGHT,
  20. localeInfo.TARGET_BUTTON_AVENGE,
  21. localeInfo.TARGET_BUTTON_FRIEND,
  22. localeInfo.TARGET_BUTTON_INVITE_PARTY,
  23. localeInfo.TARGET_BUTTON_LEAVE_PARTY,
  24. localeInfo.TARGET_BUTTON_EXCLUDE,
  25. localeInfo.TARGET_BUTTON_INVITE_GUILD,
  26. localeInfo.TARGET_BUTTON_DISMOUNT,
  27. localeInfo.TARGET_BUTTON_EXIT_OBSERVER,
  28. localeInfo.TARGET_BUTTON_VIEW_EQUIPMENT,
  29. localeInfo.TARGET_BUTTON_REQUEST_ENTER_PARTY,
  30. localeInfo.TARGET_BUTTON_BUILDING_DESTROY,
  31. localeInfo.TARGET_BUTTON_EMOTION_ALLOW,
  32. localeInfo.TARGET_BUTTON_DICE,
  33. "VOTE_BLOCK_CHAT",
  34. )
  35.  
  36. GRADE_NAME = {
  37. nonplayer.PAWN : localeInfo.TARGET_LEVEL_PAWN,
  38. nonplayer.S_PAWN : localeInfo.TARGET_LEVEL_S_PAWN,
  39. nonplayer.KNIGHT : localeInfo.TARGET_LEVEL_KNIGHT,
  40. nonplayer.S_KNIGHT : localeInfo.TARGET_LEVEL_S_KNIGHT,
  41. nonplayer.BOSS : localeInfo.TARGET_LEVEL_BOSS,
  42. nonplayer.KING : localeInfo.TARGET_LEVEL_KING,
  43. }
  44. EXCHANGE_LIMIT_RANGE = 3000
  45.  
  46. DICE_LIMIT_RANGE = 3000
  47.  
  48. def __init__(self):
  49. ui.ThinBoard.__init__(self)
  50.  
  51. name = ui.TextLine()
  52. name.SetParent(self)
  53. name.SetDefaultFontName()
  54. name.SetOutline()
  55. name.Show()
  56.  
  57. hpGauge = ui.Gauge()
  58. hpGauge.SetParent(self)
  59. hpGauge.MakeGauge(130, "red")
  60. hpGauge.Hide()
  61. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  62. hpDecimal = ui.TextLine()
  63. hpDecimal.SetParent(hpGauge)
  64. hpDecimal.SetDefaultFontName()
  65. hpDecimal.SetPosition(5, 5)
  66. hpDecimal.SetOutline()
  67. hpDecimal.Hide()
  68.  
  69. closeButton = ui.Button()
  70. closeButton.SetParent(self)
  71. closeButton.SetUpVisual("d:/ymir work/ui/public/close_button_01.sub")
  72. closeButton.SetOverVisual("d:/ymir work/ui/public/close_button_02.sub")
  73. closeButton.SetDownVisual("d:/ymir work/ui/public/close_button_03.sub")
  74. closeButton.SetPosition(30, 13)
  75.  
  76. hpGauge.SetPosition(175, 17)
  77. hpGauge.SetWindowHorizontalAlignRight()
  78. closeButton.SetWindowHorizontalAlignRight()
  79.  
  80. closeButton.SetEvent(ui.__mem_func__(self.OnPressedCloseButton))
  81. closeButton.Show()
  82.  
  83. self.buttonDict = {}
  84. self.showingButtonList = []
  85. for buttonName in self.BUTTON_NAME_LIST:
  86. button = ui.Button()
  87. button.SetParent(self)
  88.  
  89. button.SetUpVisual("d:/ymir work/ui/public/small_thin_button_01.sub")
  90. button.SetOverVisual("d:/ymir work/ui/public/small_thin_button_02.sub")
  91. button.SetDownVisual("d:/ymir work/ui/public/small_thin_button_03.sub")
  92.  
  93. button.SetWindowHorizontalAlignCenter()
  94. button.SetText(buttonName)
  95. button.Hide()
  96. self.buttonDict[buttonName] = button
  97. self.showingButtonList.append(button)
  98.  
  99. self.buttonDict[localeInfo.TARGET_BUTTON_WHISPER].SetEvent(ui.__mem_func__(self.OnWhisper))
  100. self.buttonDict[localeInfo.TARGET_BUTTON_EXCHANGE].SetEvent(ui.__mem_func__(self.OnExchange))
  101. self.buttonDict[localeInfo.TARGET_BUTTON_DICE].SetEvent(ui.__mem_func__(self.OnDice))
  102. self.buttonDict[localeInfo.TARGET_BUTTON_FIGHT].SetEvent(ui.__mem_func__(self.OnPVP))
  103. self.buttonDict[localeInfo.TARGET_BUTTON_ACCEPT_FIGHT].SetEvent(ui.__mem_func__(self.OnPVP))
  104. self.buttonDict[localeInfo.TARGET_BUTTON_AVENGE].SetEvent(ui.__mem_func__(self.OnPVP))
  105. self.buttonDict[localeInfo.TARGET_BUTTON_FRIEND].SetEvent(ui.__mem_func__(self.OnAppendToMessenger))
  106. self.buttonDict[localeInfo.TARGET_BUTTON_FRIEND].SetEvent(ui.__mem_func__(self.OnAppendToMessenger))
  107. self.buttonDict[localeInfo.TARGET_BUTTON_INVITE_PARTY].SetEvent(ui.__mem_func__(self.OnPartyInvite))
  108. self.buttonDict[localeInfo.TARGET_BUTTON_LEAVE_PARTY].SetEvent(ui.__mem_func__(self.OnPartyExit))
  109. self.buttonDict[localeInfo.TARGET_BUTTON_EXCLUDE].SetEvent(ui.__mem_func__(self.OnPartyRemove))
  110.  
  111. self.buttonDict[localeInfo.TARGET_BUTTON_INVITE_GUILD].SAFE_SetEvent(self.__OnGuildAddMember)
  112. self.buttonDict[localeInfo.TARGET_BUTTON_DISMOUNT].SAFE_SetEvent(self.__OnDismount)
  113. self.buttonDict[localeInfo.TARGET_BUTTON_EXIT_OBSERVER].SAFE_SetEvent(self.__OnExitObserver)
  114. self.buttonDict[localeInfo.TARGET_BUTTON_VIEW_EQUIPMENT].SAFE_SetEvent(self.__OnViewEquipment)
  115. self.buttonDict[localeInfo.TARGET_BUTTON_REQUEST_ENTER_PARTY].SAFE_SetEvent(self.__OnRequestParty)
  116. self.buttonDict[localeInfo.TARGET_BUTTON_BUILDING_DESTROY].SAFE_SetEvent(self.__OnDestroyBuilding)
  117. self.buttonDict[localeInfo.TARGET_BUTTON_EMOTION_ALLOW].SAFE_SetEvent(self.__OnEmotionAllow)
  118.  
  119. self.buttonDict["VOTE_BLOCK_CHAT"].SetEvent(ui.__mem_func__(self.__OnVoteBlockChat))
  120.  
  121. self.name = name
  122. self.hpGauge = hpGauge
  123. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  124. self.hpDecimal = hpDecimal
  125. self.closeButton = closeButton
  126. self.nameString = 0
  127. self.nameLength = 0
  128. self.vid = 0
  129. self.eventWhisper = None
  130. self.isShowButton = FALSE
  131.  
  132. self.__Initialize()
  133. self.ResetTargetBoard()
  134.  
  135. def __del__(self):
  136. ui.ThinBoard.__del__(self)
  137.  
  138. print "===================================================== DESTROYED TARGET BOARD"
  139.  
  140. def __Initialize(self):
  141. self.nameString = ""
  142. self.nameLength = 0
  143. self.vid = 0
  144. self.isShowButton = FALSE
  145.  
  146. def Destroy(self):
  147. self.eventWhisper = None
  148. self.closeButton = None
  149. self.showingButtonList = None
  150. self.buttonDict = None
  151. self.name = None
  152. self.hpGauge = None
  153. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  154. self.hpDecimal = None
  155. self.__Initialize()
  156.  
  157. def OnPressedCloseButton(self):
  158. player.ClearTarget()
  159. self.Close()
  160.  
  161. def Close(self):
  162. self.__Initialize()
  163. self.Hide()
  164.  
  165. def Open(self, vid, name):
  166. if vid:
  167. if not constInfo.GET_VIEW_OTHER_EMPIRE_PLAYER_TARGET_BOARD():
  168. if not player.IsSameEmpire(vid):
  169. self.Hide()
  170. return
  171.  
  172. if vid != self.GetTargetVID():
  173. self.ResetTargetBoard()
  174. self.SetTargetVID(vid)
  175. self.SetTargetName(name)
  176.  
  177. if player.IsMainCharacterIndex(vid):
  178. self.__ShowMainCharacterMenu()
  179. elif chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(self.vid):
  180. self.Hide()
  181. else:
  182. self.RefreshButton()
  183. self.Show()
  184. else:
  185. self.HideAllButton()
  186. self.__ShowButton(localeInfo.TARGET_BUTTON_WHISPER)
  187. self.__ShowButton("VOTE_BLOCK_CHAT")
  188. self.__ArrangeButtonPosition()
  189. self.SetTargetName(name)
  190. self.Show()
  191.  
  192. def Refresh(self):
  193. if self.IsShow():
  194. if self.IsShowButton():
  195. self.RefreshButton()
  196.  
  197. def RefreshByVID(self, vid):
  198. if vid == self.GetTargetVID():
  199. self.Refresh()
  200.  
  201. def RefreshByName(self, name):
  202. if name == self.GetTargetName():
  203. self.Refresh()
  204.  
  205. def __ShowMainCharacterMenu(self):
  206. canShow=0
  207.  
  208. self.HideAllButton()
  209.  
  210. if player.IsMountingHorse():
  211. self.__ShowButton(localeInfo.TARGET_BUTTON_DISMOUNT)
  212. canShow=1
  213.  
  214. if player.IsObserverMode():
  215. self.__ShowButton(localeInfo.TARGET_BUTTON_EXIT_OBSERVER)
  216. canShow=1
  217.  
  218. if canShow:
  219. self.__ArrangeButtonPosition()
  220. self.Show()
  221. else:
  222. self.Hide()
  223.  
  224. def __ShowNameOnlyMenu(self):
  225. self.HideAllButton()
  226.  
  227. def SetWhisperEvent(self, event):
  228. self.eventWhisper = event
  229.  
  230. def UpdatePosition(self):
  231. self.SetPosition(wndMgr.GetScreenWidth()/2 - self.GetWidth()/2, 10)
  232.  
  233. def ResetTargetBoard(self):
  234.  
  235. for btn in self.buttonDict.values():
  236. btn.Hide()
  237.  
  238. self.__Initialize()
  239.  
  240. self.name.SetPosition(0, 13)
  241. self.name.SetHorizontalAlignCenter()
  242. self.name.SetWindowHorizontalAlignCenter()
  243. self.hpGauge.Hide()
  244. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  245. self.hpDecimal.Hide()
  246. self.SetSize(250, 40)
  247.  
  248. def SetTargetVID(self, vid):
  249. self.vid = vid
  250.  
  251. def SetEnemyVID(self, vid):
  252. self.SetTargetVID(vid)
  253.  
  254. name = chr.GetNameByVID(vid)
  255. level = nonplayer.GetLevelByVID(vid)
  256. grade = nonplayer.GetGradeByVID(vid)
  257.  
  258. nameFront = ""
  259. if -1 != level:
  260. nameFront += "Lv." + str(level) + " "
  261. if self.GRADE_NAME.has_key(grade):
  262. nameFront += "(" + self.GRADE_NAME[grade] + ") "
  263.  
  264. self.SetTargetName(nameFront + name)
  265.  
  266. def GetTargetVID(self):
  267. return self.vid
  268.  
  269. def GetTargetName(self):
  270. return self.nameString
  271.  
  272. def SetTargetName(self, name):
  273. self.nameString = name
  274. self.nameLength = len(name)
  275. self.name.SetText(name)
  276.  
  277. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  278. def SetHP(self, hpPercentage, iMinHP, iMaxHP):
  279. if not self.hpGauge.IsShow():
  280. if app.ENABLE_VIEW_TARGET_PLAYER_HP:
  281. showingButtonCount = len(self.showingButtonList)
  282. if showingButtonCount > 0:
  283. if chr.GetInstanceType(self.vid) == chr.INSTANCE_TYPE_PLAYER:
  284. self.SetSize(max(150 + 75 * 3, showingButtonCount * 75), self.GetHeight())
  285. else:
  286. self.SetSize(200 + 7*self.nameLength, self.GetHeight())
  287. else:
  288. self.SetSize(200 + 7*self.nameLength, self.GetHeight())
  289. else:
  290. self.SetSize(200 + 7*self.nameLength, self.GetHeight())
  291.  
  292. self.name.SetPosition(23, 13)
  293. self.name.SetWindowHorizontalAlignLeft()
  294. self.name.SetHorizontalAlignLeft()
  295. self.hpGauge.Show()
  296. self.UpdatePosition()
  297.  
  298. self.hpGauge.SetPercentage(hpPercentage, 100)
  299. if app.ENABLE_VIEW_TARGET_DECIMAL_HP:
  300. iMinHPText = '.'.join([i - 3 < 0 and str(iMinHP)[:i] or str(iMinHP)[i-3:i] for i in range(len(str(iMinHP)) % 3, len(str(iMinHP))+1, 3) if i])
  301. iMaxHPText = '.'.join([i - 3 < 0 and str(iMaxHP)[:i] or str(iMaxHP)[i-3:i] for i in range(len(str(iMaxHP)) % 3, len(str(iMaxHP))+1, 3) if i])
  302. self.hpDecimal.SetText(str(iMinHPText) + "/" + str(iMaxHPText))
  303. (textWidth, textHeight)=self.hpDecimal.GetTextSize()
  304. self.hpDecimal.SetPosition(130 / 2 - textWidth / 2, -13)
  305. self.hpDecimal.Show()
  306. else:
  307. def SetHP(self, hpPercentage):
  308. if not self.hpGauge.IsShow():
  309. if app.ENABLE_VIEW_TARGET_PLAYER_HP:
  310. showingButtonCount = len(self.showingButtonList)
  311. if showingButtonCount > 0:
  312. if chr.GetInstanceType(self.GetTargetVID) != chr.INSTANCE_TYPE_PLAYER:
  313. if showingButtonCount != 1:
  314. self.SetSize(max(150, showingButtonCount * 75), self.GetHeight())
  315. else:
  316. self.SetSize(max(150, 2 * 75), self.GetHeight())
  317. else:
  318. self.SetSize(200 + 7*self.nameLength, self.GetHeight())
  319. else:
  320. self.SetSize(200 + 7*self.nameLength, self.GetHeight())
  321. else:
  322. self.SetSize(200 + 7*self.nameLength, self.GetHeight())
  323.  
  324. self.name.SetPosition(23, 13)
  325. self.name.SetWindowHorizontalAlignLeft()
  326. self.name.SetHorizontalAlignLeft()
  327. self.hpGauge.Show()
  328. self.UpdatePosition()
  329.  
  330. self.hpGauge.SetPercentage(hpPercentage, 100)
  331.  
  332. def ShowDefaultButton(self):
  333.  
  334. self.isShowButton = TRUE
  335. self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_WHISPER])
  336. self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_EXCHANGE])
  337. self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_DICE])
  338. self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_FIGHT])
  339. self.showingButtonList.append(self.buttonDict[localeInfo.TARGET_BUTTON_EMOTION_ALLOW])
  340. for button in self.showingButtonList:
  341. button.Show()
  342.  
  343. def HideAllButton(self):
  344. self.isShowButton = FALSE
  345. for button in self.showingButtonList:
  346. button.Hide()
  347. self.showingButtonList = []
  348.  
  349. def __ShowButton(self, name):
  350.  
  351. if not self.buttonDict.has_key(name):
  352. return
  353.  
  354. self.buttonDict[name].Show()
  355. self.showingButtonList.append(self.buttonDict[name])
  356.  
  357. def __HideButton(self, name):
  358.  
  359. if not self.buttonDict.has_key(name):
  360. return
  361.  
  362. button = self.buttonDict[name]
  363. button.Hide()
  364.  
  365. for btnInList in self.showingButtonList:
  366. if btnInList == button:
  367. self.showingButtonList.remove(button)
  368. break
  369.  
  370. def OnWhisper(self):
  371. if None != self.eventWhisper:
  372. self.eventWhisper(self.nameString)
  373.  
  374. def OnExchange(self):
  375. net.SendExchangeStartPacket(self.vid)
  376.  
  377. def OnDice(self):
  378. net.SendDiceStartPacket(self.vid)
  379.  
  380. def OnPVP(self):
  381. net.SendChatPacket("/pvp %d" % (self.vid))
  382.  
  383. def OnAppendToMessenger(self):
  384. net.SendMessengerAddByVIDPacket(self.vid)
  385.  
  386. def OnPartyInvite(self):
  387. net.SendPartyInvitePacket(self.vid)
  388.  
  389. def OnPartyExit(self):
  390. net.SendPartyExitPacket()
  391.  
  392. def OnPartyRemove(self):
  393. net.SendPartyRemovePacket(self.vid)
  394.  
  395. def __OnGuildAddMember(self):
  396. net.SendGuildAddMemberPacket(self.vid)
  397.  
  398. def __OnDismount(self):
  399. net.SendChatPacket("/unmount")
  400.  
  401. def __OnExitObserver(self):
  402. net.SendChatPacket("/observer_exit")
  403.  
  404. def __OnViewEquipment(self):
  405. net.SendChatPacket("/view_equip " + str(self.vid))
  406.  
  407. def __OnRequestParty(self):
  408. net.SendChatPacket("/party_request " + str(self.vid))
  409.  
  410. def __OnDestroyBuilding(self):
  411. net.SendChatPacket("/build d %d" % (self.vid))
  412.  
  413. def __OnEmotionAllow(self):
  414. net.SendChatPacket("/emotion_allow %d" % (self.vid))
  415.  
  416. def __OnVoteBlockChat(self):
  417. cmd = "/vote_block_chat %s" % (self.nameString)
  418. net.SendChatPacket(cmd)
  419.  
  420. def OnPressEscapeKey(self):
  421. self.OnPressedCloseButton()
  422. return TRUE
  423.  
  424. def IsShowButton(self):
  425. return self.isShowButton
  426.  
  427. def RefreshButton(self):
  428.  
  429. self.HideAllButton()
  430.  
  431. if chr.INSTANCE_TYPE_BUILDING == chr.GetInstanceType(self.vid):
  432. #self.__ShowButton(localeInfo.TARGET_BUTTON_BUILDING_DESTROY)
  433. #self.__ArrangeButtonPosition()
  434. return
  435.  
  436. if player.IsPVPInstance(self.vid) or player.IsObserverMode():
  437. # PVP_INFO_SIZE_BUG_FIX
  438. self.SetSize(200 + 7*self.nameLength, 40)
  439. self.UpdatePosition()
  440. # END_OF_PVP_INFO_SIZE_BUG_FIX
  441. return
  442.  
  443. self.ShowDefaultButton()
  444.  
  445. if guild.MainPlayerHasAuthority(guild.AUTH_ADD_MEMBER):
  446. if not guild.IsMemberByName(self.nameString):
  447. if 0 == chr.GetGuildID(self.vid):
  448. self.__ShowButton(localeInfo.TARGET_BUTTON_INVITE_GUILD)
  449.  
  450. if not messenger.IsFriendByName(self.nameString):
  451. self.__ShowButton(localeInfo.TARGET_BUTTON_FRIEND)
  452.  
  453. if player.IsPartyMember(self.vid):
  454.  
  455. self.__HideButton(localeInfo.TARGET_BUTTON_FIGHT)
  456.  
  457. if player.IsPartyLeader(self.vid):
  458. self.__ShowButton(localeInfo.TARGET_BUTTON_LEAVE_PARTY)
  459. elif player.IsPartyLeader(player.GetMainCharacterIndex()):
  460. self.__ShowButton(localeInfo.TARGET_BUTTON_EXCLUDE)
  461.  
  462. else:
  463. if player.IsPartyMember(player.GetMainCharacterIndex()):
  464. if player.IsPartyLeader(player.GetMainCharacterIndex()):
  465. self.__ShowButton(localeInfo.TARGET_BUTTON_INVITE_PARTY)
  466. else:
  467. if chr.IsPartyMember(self.vid):
  468. self.__ShowButton(localeInfo.TARGET_BUTTON_REQUEST_ENTER_PARTY)
  469. else:
  470. self.__ShowButton(localeInfo.TARGET_BUTTON_INVITE_PARTY)
  471.  
  472. if player.IsRevengeInstance(self.vid):
  473. self.__HideButton(localeInfo.TARGET_BUTTON_FIGHT)
  474. self.__ShowButton(localeInfo.TARGET_BUTTON_AVENGE)
  475. elif player.IsChallengeInstance(self.vid):
  476. self.__HideButton(localeInfo.TARGET_BUTTON_FIGHT)
  477. self.__ShowButton(localeInfo.TARGET_BUTTON_ACCEPT_FIGHT)
  478. elif player.IsCantFightInstance(self.vid):
  479. self.__HideButton(localeInfo.TARGET_BUTTON_FIGHT)
  480.  
  481. if not player.IsSameEmpire(self.vid):
  482. self.__HideButton(localeInfo.TARGET_BUTTON_INVITE_PARTY)
  483. self.__HideButton(localeInfo.TARGET_BUTTON_FRIEND)
  484. self.__HideButton(localeInfo.TARGET_BUTTON_FIGHT)
  485.  
  486. distance = player.GetCharacterDistance(self.vid)
  487. if distance > self.EXCHANGE_LIMIT_RANGE:
  488. self.__HideButton(localeInfo.TARGET_BUTTON_EXCHANGE)
  489. self.__ArrangeButtonPosition()
  490.  
  491. self.__ArrangeButtonPosition()
  492.  
  493. def __ArrangeButtonPosition(self):
  494. showingButtonCount = len(self.showingButtonList)
  495. pos = -(showingButtonCount / 2) * 68
  496. if 0 == showingButtonCount % 2:
  497. pos += 34
  498.  
  499. for button in self.showingButtonList:
  500. button.SetPosition(pos, 33)
  501. pos += 68
  502.  
  503. if app.ENABLE_VIEW_TARGET_PLAYER_HP:
  504. if showingButtonCount <= 2:
  505. self.SetSize(max(150 + 125, showingButtonCount * 75), 65)
  506. else:
  507. self.SetSize(max(150, showingButtonCount * 75), 65)
  508. else:
  509. self.SetSize(max(150, showingButtonCount * 75), 65)
  510.  
  511. self.UpdatePosition()
  512.  
  513. def OnUpdate(self):
  514. if self.isShowButton:
  515.  
  516. exchangeButton = self.buttonDict[localeInfo.TARGET_BUTTON_EXCHANGE]
  517. distance = player.GetCharacterDistance(self.vid)
  518.  
  519. if distance > self.DICE_LIMIT_RANGE:
  520. self.__HideButton(localeInfo.TARGET_BUTTON_DICE)
  521. self.__ArrangeButtonPosition()
  522.  
  523. if distance < 0:
  524. return
  525.  
  526. diceButton = self.buttonDict[localeInfo.TARGET_BUTTON_DICE]
  527. if diceButton.IsShow():
  528. if distance > self.DICE_LIMIT_RANGE:
  529. self.RefreshButton()
  530.  
  531. else:
  532. if distance < self.DICE_LIMIT_RANGE:
  533. self.RefreshButton()
  534.  
  535. if exchangeButton.IsShow():
  536. if distance > self.EXCHANGE_LIMIT_RANGE:
  537. self.RefreshButton()
  538.  
  539. else:
  540. if distance < self.EXCHANGE_LIMIT_RANGE:
  541. self.RefreshButton()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement