@@ -80,22 +80,22 @@ class HorseImage(ui.ExpandedImageBox):
|
||||
FILE_PATH = "d:/ymir work/ui/pattern/HorseState/"
|
||||
|
||||
FILE_DICT = {
|
||||
00 : FILE_PATH+"00.dds",
|
||||
0o1 : FILE_PATH+"00.dds",
|
||||
0o2 : FILE_PATH+"00.dds",
|
||||
0o3 : FILE_PATH+"00.dds",
|
||||
10 : FILE_PATH+"10.dds",
|
||||
11 : FILE_PATH+"11.dds",
|
||||
12 : FILE_PATH+"12.dds",
|
||||
13 : FILE_PATH+"13.dds",
|
||||
20 : FILE_PATH+"20.dds",
|
||||
21 : FILE_PATH+"21.dds",
|
||||
22 : FILE_PATH+"22.dds",
|
||||
23 : FILE_PATH+"23.dds",
|
||||
30 : FILE_PATH+"30.dds",
|
||||
31 : FILE_PATH+"31.dds",
|
||||
32 : FILE_PATH+"32.dds",
|
||||
33 : FILE_PATH+"33.dds",
|
||||
00 : FILE_PATH + "00.dds",
|
||||
0o1 : FILE_PATH + "00.dds",
|
||||
0o2 : FILE_PATH + "00.dds",
|
||||
0o3 : FILE_PATH + "00.dds",
|
||||
10 : FILE_PATH + "10.dds",
|
||||
11 : FILE_PATH + "11.dds",
|
||||
12 : FILE_PATH + "12.dds",
|
||||
13 : FILE_PATH + "13.dds",
|
||||
20 : FILE_PATH + "20.dds",
|
||||
21 : FILE_PATH + "21.dds",
|
||||
22 : FILE_PATH + "22.dds",
|
||||
23 : FILE_PATH + "23.dds",
|
||||
30 : FILE_PATH + "30.dds",
|
||||
31 : FILE_PATH + "31.dds",
|
||||
32 : FILE_PATH + "32.dds",
|
||||
33 : FILE_PATH + "33.dds",
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
@@ -115,8 +115,7 @@ class HorseImage(ui.ExpandedImageBox):
|
||||
#self.textLineList=[]
|
||||
self.toolTip.ClearToolTip()
|
||||
|
||||
if level>0:
|
||||
|
||||
if level > 0:
|
||||
try:
|
||||
grade = self.__GetHorseGrade(level)
|
||||
self.__AppendText(localeInfo.LEVEL_LIST[int(grade)])
|
||||
@@ -125,19 +124,19 @@ class HorseImage(ui.ExpandedImageBox):
|
||||
return
|
||||
|
||||
try:
|
||||
healthName=localeInfo.HEALTH_LIST[health]
|
||||
if len(healthName)>0:
|
||||
healthName = localeInfo.HEALTH_LIST[health]
|
||||
if len(healthName) > 0:
|
||||
self.__AppendText(healthName)
|
||||
except IndexError:
|
||||
print(("HorseImage.SetState(level=%d, health=%d, battery=%d) - Unknown Index" % (level, health, battery)))
|
||||
return
|
||||
|
||||
if health>0:
|
||||
if battery==0:
|
||||
if health > 0:
|
||||
if battery == 0:
|
||||
self.__AppendText(localeInfo.NEEFD_REST)
|
||||
|
||||
try:
|
||||
fileName=self.FILE_DICT[health*10+battery]
|
||||
fileName = self.FILE_DICT[health*10 + battery]
|
||||
except KeyError:
|
||||
print(("HorseImage.SetState(level=%d, health=%d, battery=%d) - KeyError" % (level, health, battery)))
|
||||
|
||||
@@ -906,7 +905,7 @@ class AffectShower(ui.Window):
|
||||
self.lovePointImage.OnUpdateLovePoint(lovePoint)
|
||||
|
||||
def SetHorseState(self, level, health, battery):
|
||||
if level==0:
|
||||
if level == 0:
|
||||
self.horseImage=None
|
||||
else:
|
||||
image = HorseImage()
|
||||
@@ -914,8 +913,11 @@ class AffectShower(ui.Window):
|
||||
image.SetState(level, health, battery)
|
||||
image.Show()
|
||||
|
||||
self.horseImage=image
|
||||
self.__ArrangeImageList()
|
||||
self.horseImage = image
|
||||
|
||||
# MR-17: Fix icons not re-arranging after horse state changes
|
||||
self.__ArrangeImageList()
|
||||
# MR-17: -- END OF -- Fix icons not re-arranging after horse state changes
|
||||
|
||||
def SetPlayTime(self, playTime):
|
||||
self.serverPlayTime = playTime
|
||||
|
||||
@@ -254,13 +254,37 @@ class DragonSoulWindow(ui.ScriptWindow):
|
||||
|
||||
self.wndEquip.RefreshSlot()
|
||||
|
||||
# MR-17: Improve slot activation for active Dragon Soul deck
|
||||
if self.isActivated:
|
||||
self.ActivateEquipSlotWindow(self.deckPageIndex)
|
||||
# MR-17: -- END OF -- Improve slot activation for active Dragon Soul deck
|
||||
|
||||
# MR-17: Improve slot activation for active Dragon Soul deck
|
||||
def ActivateEquipSlotWindow(self, deck):
|
||||
for i in range(6):
|
||||
if deck == 2:
|
||||
plusCount = 6
|
||||
else:
|
||||
plusCount = 0
|
||||
self.wndEquip.ActivateSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i + plusCount)
|
||||
slotNumber = player.DRAGON_SOUL_EQUIPMENT_SLOT_START + deck * player.DRAGON_SOUL_EQUIPMENT_FIRST_SIZE + i
|
||||
itemVnum = player.GetItemIndex(slotNumber)
|
||||
|
||||
if itemVnum == 0:
|
||||
continue
|
||||
|
||||
item.SelectItem(itemVnum)
|
||||
remain_time = 999
|
||||
|
||||
for j in range(item.LIMIT_MAX_NUM):
|
||||
(limitType, limitValue) = item.GetLimit(j)
|
||||
if item.LIMIT_REAL_TIME == limitType:
|
||||
remain_time = player.GetItemMetinSocket(player.INVENTORY, slotNumber, 0) - app.GetGlobalTimeStamp()
|
||||
elif item.LIMIT_REAL_TIME_START_FIRST_USE == limitType:
|
||||
remain_time = player.GetItemMetinSocket(player.INVENTORY, slotNumber, 0) - app.GetGlobalTimeStamp()
|
||||
elif item.LIMIT_TIMER_BASED_ON_WEAR == limitType:
|
||||
remain_time = player.GetItemMetinSocket(player.INVENTORY, slotNumber, 0)
|
||||
if remain_time <= 0:
|
||||
break
|
||||
|
||||
if remain_time > 0:
|
||||
self.wndEquip.ActivateSlot(player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i)
|
||||
# MR-17: -- END OF -- Improve slot activation for active Dragon Soul deck
|
||||
|
||||
def DeactivateEquipSlotWindow(self):
|
||||
for i in range(12):
|
||||
@@ -719,6 +743,10 @@ class DragonSoulWindow(ui.ScriptWindow):
|
||||
if deckIndex is None:
|
||||
deckIndex = self.deckPageIndex
|
||||
|
||||
# MR-17: Improve slot activation for active Dragon Soul deck
|
||||
was_activated = self.isActivated
|
||||
# MR-17: -- END OF -- Improve slot activation for active Dragon Soul deck
|
||||
|
||||
if not self.isActivated or self.deckPageIndex != deckIndex:
|
||||
# MR-12: Improve keyboard shortcut functionality for deck toggling
|
||||
if self.deckPageIndex != deckIndex:
|
||||
@@ -737,7 +765,16 @@ class DragonSoulWindow(ui.ScriptWindow):
|
||||
self.__WarmDragonSoulTimeCache(deckIndex)
|
||||
else:
|
||||
self.isActivated = False
|
||||
|
||||
self.activateButton.SetUp()
|
||||
|
||||
# MR-17: Improve slot activation for active Dragon Soul deck
|
||||
if was_activated:
|
||||
net.SendChatPacket("/dragon_soul deactivate")
|
||||
|
||||
if self.tooltipItem:
|
||||
self.tooltipItem.ClearDragonSoulTimeCache()
|
||||
# MR-17: -- END OF -- Improve slot activation for active Dragon Soul deck
|
||||
# MR-12: -- END OF -- Improve keyboard shortcut functionality for deck toggling
|
||||
else:
|
||||
net.SendChatPacket("/dragon_soul deactivate")
|
||||
|
||||
@@ -41,6 +41,9 @@ class PasswordDialog(ui.ScriptWindow):
|
||||
self.passwordValue.OnPressEscapeKey = self.OnCancel
|
||||
self.acceptButton.SetEvent(ui.__mem_func__(self.OnAccept))
|
||||
self.cancelButton.SetEvent(ui.__mem_func__(self.OnCancel))
|
||||
# MR-17: Set secret mode for password input
|
||||
self.passwordValue.SetSecretMode(1)
|
||||
# MR-17: -- END OF -- Set secret mode for password input
|
||||
|
||||
def Destroy(self):
|
||||
self.ClearDictionary()
|
||||
@@ -123,6 +126,12 @@ class ChangePasswordDialog(ui.ScriptWindow):
|
||||
newPassword.OnPressEscapeKey = self.OnCancel
|
||||
newPasswordCheck.OnPressEscapeKey = self.OnCancel
|
||||
|
||||
# MR-17: Set secret mode for password input
|
||||
oldPassword.SetSecretMode(1)
|
||||
newPassword.SetSecretMode(1)
|
||||
newPasswordCheck.SetSecretMode(1)
|
||||
# MR-17: -- END OF -- Set secret mode for password input
|
||||
|
||||
self.oldPassword = oldPassword
|
||||
self.newPassword = newPassword
|
||||
self.newPasswordCheck = newPasswordCheck
|
||||
|
||||
Reference in New Issue
Block a user