killRights.py (23363B)
1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\killRights.py 2 import blue 3 import carbonui.control.button 4 import carbonui.control.buttonIcon 5 import inventorycommon.const as invconst 6 import inventorycommon.util 7 import localization 8 import uthread 9 from carbon.common.script.sys.serviceConst import ROLE_PROGRAMMER 10 from carbonui import uiconst 11 from carbonui.control.singlelineedits.singleLineEditInteger import SingleLineEditInteger 12 from carbonui.control.singlelineedits.singleLineEditText import SingleLineEditText 13 from carbonui.control.window import Window 14 from carbonui.primitives.container import Container 15 from carbonui.primitives.containerAutoSize import ContainerAutoSize 16 from carbonui.primitives.sprite import Sprite 17 from carbonui.uicore import uicore 18 from eve.client.script.ui.control import eveIcon, eveLabel, utilMenu 19 from eve.client.script.ui.control.entries.generic import Generic 20 from eve.client.script.ui.shared.stateFlag import AddAndSetFlagIconFromData 21 from eve.client.script.ui.util import searchUtil 22 from eve.common.script.search.const import ResultType 23 from eve.common.script.sys import idCheckers 24 from eve.common.script.util import eveFormat 25 from eve.common.lib import appConst 26 from eveuniverse.security import is_safe_sec_solar_system 27 from eveservices.menu import GetMenuService 28 from player_messaging.client.ui_message import prompt_player_fsd_dialog 29 30 class KillRightsEntry(Generic): 31 __guid__ = 'listentry.KillRightsEntry' 32 __notifyevents__ = ['OnContactLoggedOn', 33 'OnContactLoggedOff', 34 'OnContactNoLongerContact', 35 'OnContactChange', 36 'OnClientContactChangeOnBlockContacts', 37 'OnUnblockContacts'] 38 39 def Startup(self, *args): 40 Generic.Startup(self, *args) 41 sm.RegisterNotify(self) 42 self.portraitCont = Container(name='portraitCont', parent=self, align=uiconst.TOLEFT, width=64) 43 self.utilMenuCont = Container(name='utilMenuCont', parent=self, align=uiconst.TORIGHT, width=28) 44 self.utilMenuCont.display = False 45 myTextCont = Container(name='myTextCont', parent=self, align=uiconst.TOALL, padLeft=2 * appConst.defaultPadding, clipChildren=True) 46 self.textCont = ContainerAutoSize(name='textCont', parent=myTextCont, align=uiconst.CENTERLEFT) 47 self.nameLabel = eveLabel.EveLabelMedium(text='', parent=self.textCont, maxLines=1, align=uiconst.TOPLEFT, state=uiconst.UI_NORMAL) 48 self.saleLabel = eveLabel.EveLabelSmall(text='', parent=self.textCont, maxLines=1, align=uiconst.TOPLEFT, top=19, state=uiconst.UI_NORMAL) 49 self.availableLabel = eveLabel.EveLabelSmall(text='', parent=self.textCont, maxLines=1, align=uiconst.TOPLEFT, top=32, state=uiconst.UI_NORMAL) 50 51 def Load(self, node): 52 Generic.Load(self, node) 53 self.portraitCont.Flush() 54 self.utilMenuCont.Flush() 55 data = self.data = node 56 charID = self.charID = data.charID 57 killRight = data.killRight 58 self.killRightID = killRight.killRightID 59 self.price = killRight.price 60 self.restrictedTo = killRight.restrictedTo 61 isMine = data.isMine 62 self.inWatchlist = sm.GetService('addressbook').IsInWatchlist(charID) 63 charName = cfg.eveowners.Get(charID).name 64 self.nameText = localization.GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=charName, info=('showinfo', invconst.typeCharacter, charID)) 65 portrait = Sprite(parent=self.portraitCont, align=uiconst.TOPRIGHT, pos=(0, 2, 64, 64), state=uiconst.UI_PICKCHILDREN) 66 sm.GetService('photo').GetPortrait(charID, 64, portrait) 67 self.SetRelationship(data) 68 self.statusIcon = Sprite(parent=self.portraitCont, name='statusIcon', pos=(2, 3, 10, 10), state=uiconst.UI_NORMAL, texturePath='res:/UI/Texture/classes/Chat/Status.png', idx=0) 69 if not self.inWatchlist: 70 self.statusIcon.display = False 71 else: 72 self.statusIcon.display = False 73 online = sm.GetService('onlineStatus').GetOnlineStatus(charID, fetch=False) 74 self.SetOnline(online) 75 uthread.new(self.SetTimeRemaining) 76 if self.price is not None: 77 self.saleLabel.display = True 78 self.availableLabel.display = True 79 saleText, availableText = self.GetForSaleText() 80 if self.price > 0: 81 self.saleLabel.text = saleText 82 else: 83 self.availableLabel.top = 19 84 self.availableLabel.text = availableText 85 else: 86 self.saleLabel.display = False 87 self.availableLabel.display = False 88 if isMine: 89 self.utilMenuCont.display = True 90 utilMenu.UtilMenu(menuAlign=uiconst.TOPRIGHT, parent=self.utilMenuCont, align=uiconst.CENTERRIGHT, GetUtilMenu=self.SellKillRight, texturePath='res:/UI/Texture/Icons/73_16_50.png', left=2) 91 92 def SellKillRight(self, menuParent): 93 if self.price is None: 94 menuParent.AddIconEntry(icon='res:/UI/Texture/Icons/KillRightsIcon.png', text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SellToPublic'), callback=(self.OpenSellKillRightWindow, 'open')) 95 menuParent.AddIconEntry(icon='res:/UI/Texture/Icons/KillRightsIcon.png', text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SellToMyCorporation'), callback=(self.OpenSellKillRightWindow, session.corpid)) 96 if session.allianceid: 97 menuParent.AddIconEntry(icon='res:/UI/Texture/Icons/KillRightsIcon.png', text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SellToMyAlliance'), callback=(self.OpenSellKillRightWindow, session.allianceid)) 98 menuParent.AddIconEntry(icon='res:/UI/Texture/Icons/KillRightsIcon.png', text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SellToSpecific'), callback=(self.OpenSellKillRightWindow, None)) 99 else: 100 menuParent.AddIconEntry(icon='res:/UI/Texture/Icons/KillRightsIcon.png', text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/MakeUnavailable'), callback=self.MakeUnavailable) 101 102 def MakeUnavailable(self, *args): 103 if self.restrictedTo is None: 104 questionLabel = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/MakeUnavailableQuestionAll') 105 else: 106 entityName = cfg.eveowners.Get(self.restrictedTo).name 107 questionLabel = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/MakeUnavailableQuestion', entityName=entityName) 108 ret = prompt_player_fsd_dialog('CustomQuestion', {'header': localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/MakeUnavailable'), 109 'question': questionLabel}, uiconst.YESNO) 110 if ret != uiconst.ID_YES: 111 return 112 sm.GetService('bountySvc').CancelSellKillRight(self.killRightID, self.charID) 113 114 def OpenSellKillRightWindow(self, sellToID): 115 SellKillRightWnd.CloseIfOpen() 116 SellKillRightWnd.Open(sellToID=sellToID, killRightID=self.killRightID) 117 118 def SetTimeRemaining(self): 119 while self and not self.destroyed: 120 timeEnd = self.data.expiryTime 121 timeLeft = timeEnd - blue.os.GetWallclockTime() 122 if timeLeft < 0: 123 timeLeftText = '' 124 sm.ScatterEvent('OnKillRightExpired', self.killRightID) 125 else: 126 timeLeftText = localization.formatters.FormatTimeIntervalShortWritten(long(timeLeft), showFrom='day', showTo='minute') 127 self.nameLabel.text = self.nameText + ' ' + localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/TimeRemaining', timeRemaining=timeLeftText) 128 blue.pyos.synchro.SleepWallclock(60000) 129 130 def GetForSaleText(self): 131 amount = eveFormat.FmtISK(self.price, 0) 132 saleText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/ForSale', amount=amount) 133 if self.restrictedTo is None: 134 availableText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/AvailableToAll') 135 else: 136 entityName = cfg.eveowners.Get(self.restrictedTo).name 137 entityType = cfg.eveowners.Get(self.restrictedTo).typeID 138 entityText = localization.GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=entityName, info=('showinfo', entityType, self.restrictedTo)) 139 if idCheckers.IsCorporation(self.restrictedTo) and not inventorycommon.util.IsNPC(self.restrictedTo): 140 corpInfo = sm.RemoteSvc('corpmgr').GetPublicInfo(self.restrictedTo) 141 allianceID = corpInfo.allianceID 142 if allianceID: 143 allianceName = cfg.allianceshortnames.Get(allianceID).shortName 144 allianceType = invconst.typeAlliance 145 allianceText = localization.GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=allianceName, info=('showinfo', allianceType, allianceID)) 146 entityText += ' [%s]' % allianceText 147 availableText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/AvailableToSpecific', entityName=entityText) 148 return (saleText, availableText) 149 150 def SetOnline(self, online): 151 if online is None or not self.inWatchlist: 152 self.statusIcon.display = False 153 else: 154 self.statusIcon.SetRGB(float(not online) * 0.75, float(online) * 0.75, 0.0) 155 if online: 156 self.statusIcon.hint = localization.GetByLabel('UI/Common/Online') 157 else: 158 self.statusIcon.hint = localization.GetByLabel('UI/Common/Offline') 159 self.statusIcon.display = True 160 161 def SetRelationship(self, data): 162 AddAndSetFlagIconFromData(parentCont=self.portraitCont, data=data, top=54, left=52) 163 164 def SetBlocked(self, blocked): 165 isBlocked = sm.GetService('addressbook').IsBlocked(self.charID) 166 if blocked and isBlocked: 167 self.statusIcon.SetTexturePath('res:/UI/Texture/classes/Chat/Blocked.png') 168 self.statusIcon.display = True 169 elif self.inWatchlist: 170 self.statusIcon.SetTexturePath('res:/UI/Texture/classes/Chat/Status.png') 171 self.statusIcon.display = True 172 else: 173 self.statusIcon.display = False 174 175 def OnContactLoggedOn(self, charID): 176 if charID == self.charID: 177 self.SetOnline(1) 178 179 def OnClientContactChange(self, charID, online): 180 if online: 181 self.OnContactLoggedOn(charID) 182 else: 183 self.OnContactLoggedOff(charID) 184 185 def OnContactLoggedOff(self, charID): 186 if charID == self.charID: 187 self.SetOnline(0) 188 189 def OnContactNoLongerContact(self, charID): 190 if charID == self.charID: 191 self.SetOnline(None) 192 193 def OnContactChange(self, contactIDs, contactType = None): 194 if self.destroyed: 195 return 196 self.SetRelationship(self.data) 197 if self.charID in contactIDs: 198 self.inWatchlist = sm.GetService('addressbook').IsInWatchlist(self.charID) 199 if not self.inWatchlist: 200 isBlocked = sm.GetService('addressbook').IsBlocked(self.charID) 201 if isBlocked: 202 self.statusIcon.display = True 203 self.statusIcon.SetRGB(1.0, 1.0, 1.0) 204 else: 205 self.statusIcon.display = False 206 else: 207 self.statusIcon.display = True 208 209 def OnBlockContacts(self, contactIDs): 210 if self.charID in contactIDs: 211 self.SetBlocked(1) 212 213 def OnUnblockContacts(self, contactIDs): 214 if self.charID in contactIDs: 215 self.SetBlocked(0) 216 217 def GetHeight(self, *args): 218 node, width = args 219 node.height = 68 220 return node.height 221 222 def GetMenu(self): 223 m = GetMenuService().GetMenuFromItemIDTypeID(self.charID, invconst.typeCharacter) 224 if m is not None and session.role & ROLE_PROGRAMMER == ROLE_PROGRAMMER: 225 m.append(('PROG: Activate KillRight', self.ActivateKillRight)) 226 return m 227 228 def OnDblClick(self, *args): 229 sm.GetService('info').ShowInfo(invconst.typeCharacter, self.charID) 230 231 def OnMouseEnter(self, *args): 232 pass 233 234 def OnMouseExit(self, *args): 235 pass 236 237 def OnClick(self, *args): 238 pass 239 240 def ActivateKillRight(self): 241 sm.RemoteSvc('killRightMgr').ActivateKillRight(self.killRightID) 242 243 244 class SellKillRightWnd(Window): 245 __guid__ = 'form.SellKillRightWnd' 246 __notifyevents__ = [] 247 default_windowID = 'SellKillRightWnd' 248 default_fixedWidth = 350 249 default_fixedHeight = 180 250 default_minSize = (default_fixedWidth, default_fixedHeight) 251 default_isMinimizable = False 252 253 def ApplyAttributes(self, attributes): 254 super(SellKillRightWnd, self).ApplyAttributes(attributes) 255 self.sellToID = attributes.get('sellToID', None) 256 self.killRightID = attributes.get('killRightID', None) 257 self.ownerID = None 258 self.searchingKillRights = False 259 self.SetCaption(localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SellKillRight')) 260 self.ConstructLayout() 261 262 def ConstructLayout(self): 263 mainCont = Container(name='mainCont', parent=self.sr.main, padding=appConst.defaultPadding) 264 headerText = eveLabel.EveLabelMedium(text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/Availability'), parent=mainCont, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, bold=True, padBottom=appConst.defaultPadding) 265 self.searchCont = Container(name='searchCont', parent=mainCont, align=uiconst.TOTOP, height=30) 266 self.verifiedCont = Container(name='verifiedCont', parent=mainCont, align=uiconst.TOTOP, height=30) 267 self.verifiedCont.display = False 268 imgCont = Container(name='imgCont', parent=self.searchCont, width=30, align=uiconst.TOLEFT) 269 killerLogo = Sprite(parent=imgCont, align=uiconst.TOALL, idx=0, texturePath='res:/UI/Texture/silhouette_64.png') 270 self.searchEdit = SingleLineEditText(name='searchEdit', parent=self.searchCont, maxLength=32, align=uiconst.TOALL, hintText=localization.GetByLabel('UI/Station/BountyOffice/SearchForUser'), pos=(0, 0, 0, 0)) 271 self.searchEdit.OnReturn = self.SearchKillRights 272 self.imgCont = Container(name='imgCont', parent=self.verifiedCont, width=30, align=uiconst.TOLEFT) 273 clearCont = Container(name='clearCont', parent=self.verifiedCont, width=24, align=uiconst.TORIGHT) 274 textCont = Container(name='textCont', parent=self.verifiedCont, align=uiconst.TOALL, padLeft=appConst.defaultPadding) 275 self.killRightOwner = Sprite(parent=self.imgCont, align=uiconst.TOALL, idx=0, texturePath='res:/UI/Texture/silhouette_64.png') 276 self.clearBtn = carbonui.control.buttonIcon.ButtonIcon(name='surrenderBtn', parent=clearCont, align=uiconst.CENTER, width=16, iconSize=16, texturePath='res:/UI/Texture/Icons/73_16_210.png', hint=localization.GetByLabel('UI/Inventory/Clear'), func=self.ClearKillRight) 277 self.nameLabel = eveLabel.EveLabelMedium(name='bountyName', parent=textCont, align=uiconst.CENTERLEFT, state=uiconst.UI_NORMAL, maxLines=1) 278 amountCont = Container(parent=mainCont, align=uiconst.TOBOTTOM, height=20) 279 self.sellKillRightBtn = carbonui.control.button.Button(parent=amountCont, label=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/SellKillRightBtn'), align=uiconst.TORIGHT, func=self.SellKillRight) 280 self.killRightAmount = SingleLineEditInteger(name='sellEdit', parent=amountCont, align=uiconst.TOALL, width=0, maxValue=appConst.MAX_BOUNTY_AMOUNT, hintText=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/EnterAmount'), padRight=appConst.defaultPadding, top=0) 281 self.killRightAmount.OnReturn = self.SellKillRight 282 if self.sellToID == 'open': 283 self.searchCont.display = False 284 openForPublicText = eveLabel.EveCaptionSmall(text=localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/Everyone'), parent=mainCont, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, top=appConst.defaultPadding) 285 elif self.sellToID is not None: 286 self.ownerID = self.sellToID 287 self.ShowResult(self.ownerID) 288 else: 289 self.sellKillRightBtn.Disable() 290 291 def SellKillRight(self, *args): 292 if not self.killRightID: 293 return 294 amount = self.killRightAmount.GetValue() 295 try: 296 sm.GetService('bountySvc').SellKillRight(self.killRightID, amount, self.ownerID) 297 finally: 298 sm.ScatterEvent('OnKillRightSold', self.killRightID) 299 self.CloseByUser() 300 301 def SearchKillRights(self, *args): 302 if self.searchEdit.GetValue() == '': 303 return 304 if self.searchingKillRights: 305 return 306 if self.verifiedCont.display == True: 307 return 308 self.searchingKillRights = True 309 self.ownerID = self.Search(self.searchEdit) 310 self.searchingKillRights = False 311 if self.ownerID: 312 self.ShowResult(self.ownerID) 313 314 def Search(self, edit): 315 searchString = edit.GetValue() 316 if not searchString or searchString == '': 317 return None 318 groupIDList = [ResultType.character, ResultType.corporation, ResultType.alliance] 319 searchResult = searchUtil.GetResultsList(searchString.strip(), groupIDList, hideNPC=False) 320 if not len(searchResult): 321 edit.SetValue('') 322 edit.SetHintText(localization.GetByLabel('UI/Station/BountyOffice/NoOneFound')) 323 else: 324 if len(searchResult) == 1: 325 ownerID = searchResult[0] 326 return ownerID 327 from eve.client.script.ui.shared.bountyWindow import BountyPicker 328 dlg = BountyPicker.Open(resultList=searchResult) 329 dlg.ShowModal() 330 if dlg.ownerID: 331 return dlg.ownerID 332 edit.SetValue('') 333 return None 334 335 def ShowResult(self, ownerID): 336 if ownerID: 337 self.imgCont.Flush() 338 self.verifiedCont.display = True 339 self.sellKillRightBtn.Enable() 340 self.searchCont.display = False 341 ownerType = cfg.eveowners.Get(ownerID).typeID 342 if idCheckers.IsCharacter(ownerID): 343 ownerPortrait = Sprite(parent=self.imgCont, align=uiconst.TOALL, idx=0, texturePath='res:/UI/Texture/silhouette_64.png') 344 sm.GetService('photo').GetPortrait(ownerID, 30, ownerPortrait) 345 else: 346 ownerPortrait = eveIcon.GetLogoIcon(itemID=ownerID, parent=self.imgCont, acceptNone=False, align=uiconst.TOPRIGHT, height=30, width=30, state=uiconst.UI_NORMAL) 347 ownerPortrait.SetSize(30, 30) 348 ownerPortrait.OnClick = (self.ShowInfo, ownerID, ownerType) 349 ownerName = cfg.eveowners.Get(ownerID).name 350 self.killRightOwner.hint = ownerName 351 self.nameLabel.text = localization.GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=ownerName, info=('showinfo', ownerType, ownerID)) 352 uicore.registry.SetFocus(self.killRightAmount) 353 354 def ClearKillRight(self, *args): 355 self.ownerID = None 356 self.searchEdit.SetValue('') 357 self.searchCont.display = True 358 self.verifiedCont.display = False 359 self.killRightAmount.SetValue('') 360 self.killRightAmount.SetHintText(localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/EnterAmount')) 361 self.sellKillRightBtn.Disable() 362 363 def ShowInfo(self, ownerID, typeID, *args): 364 sm.GetService('info').ShowInfo(typeID, ownerID) 365 366 367 class KillRightsUtilMenu(utilMenu.UtilMenu): 368 default_menuAlign = uiconst.TOPRIGHT 369 default_align = uiconst.BOTTOMRIGHT 370 default_texturePath = 'res:/UI/Texture/Icons/KillRightsIcon.png' 371 372 def ApplyAttributes(self, attributes): 373 attributes.GetUtilMenu = self.ActivateKillRightMenu 374 utilMenu.UtilMenu.ApplyAttributes(self, attributes) 375 self.killRightID = attributes.get('killRightID', None) 376 377 def ActivateKillRightMenu(self, menuParent): 378 cont = menuParent.AddContainer(align=uiconst.TOTOP, padding=appConst.defaultPadding) 379 cont.GetEntryWidth = lambda mc = cont: 230 380 charName = cfg.eveowners.Get(self.charID).name 381 charNamelabel = localization.GetByLabel('UI/Contracts/ContractsWindow/ShowInfoLink', showInfoName=charName, info=('showinfo', invconst.typeCharacter, self.charID)) 382 if self.price is not None: 383 headerText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/BuyKillRight') 384 explainText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/PurchaseLabel', charName=charNamelabel) 385 priceText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/AcativationCost', costAmount=eveFormat.FmtISK(self.price, 0)) 386 else: 387 headerText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight') 388 explainText = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/ActivateLabel', charName=charNamelabel) 389 priceText = '' 390 headerLabel = eveLabel.EveLabelLarge(text=headerText, parent=cont, align=uiconst.TOTOP, state=uiconst.UI_NORMAL, bold=True) 391 helpTextCont = Container(name='helpTextCont', parent=cont, align=uiconst.TOTOP, height=40, padTop=appConst.defaultPadding) 392 helpText = eveLabel.EveLabelMedium(text=explainText, parent=helpTextCont, state=uiconst.UI_NORMAL, align=uiconst.TOTOP, color=(1.0, 0.0, 0.0, 0.8)) 393 buttonCont = Container(name='buttonCont', parent=cont, align=uiconst.TOTOP, height=20) 394 priceLabel = eveLabel.EveLabelMedium(text=priceText, parent=buttonCont) 395 buttonLabel = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/Activate') 396 if self.price is None: 397 self.func = 'ActivateKillRight' 398 self.params = (self.killRightID, self.charID, self.shipID) 399 else: 400 self.func = 'BuyKillRight' 401 self.params = (self.killRightID, 402 self.charID, 403 self.shipID, 404 self.price) 405 self.activateBtn = carbonui.control.button.Button(parent=buttonCont, label=buttonLabel, align=uiconst.TORIGHT, func=self.ActivateKillRight) 406 if is_safe_sec_solar_system(session.solarsystemid): 407 self.activateBtn.Disable() 408 self.activateBtn.hint = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/KillRightActivateBlockedExordium') 409 410 def ActivateKillRight(self, *args): 411 try: 412 if not is_safe_sec_solar_system(session.solarsystemid): 413 getattr(sm.GetService('bountySvc'), self.func)(*self.params) 414 finally: 415 self.CloseMenu() 416 417 def UpdateKillRightInfo(self, killRightID, price, charID, shipID): 418 self.killRightID = killRightID 419 self.price = price 420 self.charID = charID 421 self.shipID = shipID 422 if price is None: 423 self.hint = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/ActivateKillRight') 424 else: 425 self.hint = localization.GetByLabel('UI/CharacterSheet/CharacterSheetWindow/BuyKillRight')