Various fixes

This commit is contained in:
Mind Rapist
2026-02-15 21:42:17 +02:00
parent d61c0dc0dd
commit 74c416e9ed
41 changed files with 233 additions and 127 deletions

View File

@@ -758,7 +758,6 @@ class GameWindow(ui.ScriptWindow):
if chr.NEW_AFFECT_DRAGON_SOUL_DECK1 == type or chr.NEW_AFFECT_DRAGON_SOUL_DECK2 == type:
self.interface.DragonSoulActivate(type - chr.NEW_AFFECT_DRAGON_SOUL_DECK1)
elif chr.NEW_AFFECT_DRAGON_SOUL_QUALIFIED == type:
self.BINARY_DragonSoulGiveQuilification()

View File

@@ -996,20 +996,21 @@ class Interface(object):
self.DRAGON_SOUL_IS_QUALIFIED = True
self.wndExpandedTaskBar.SetToolTipText(uiTaskBar.ExpandedTaskBar.BUTTON_DRAGON_SOUL, uiScriptLocale.TASKBAR_DRAGON_SOUL)
# MR-12: Enable Dragon Soul window opening without completing the quest
def ToggleDragonSoulWindow(self):
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if False == self.wndDragonSoul.IsShow():
if self.DRAGON_SOUL_IS_QUALIFIED:
self.wndDragonSoul.Show()
else:
try:
self.wndPopupDialog.SetText(localeInfo.DRAGON_SOUL_UNQUALIFIED)
self.wndPopupDialog.Open()
except:
self.wndPopupDialog = uiCommon.PopupDialog()
self.wndPopupDialog.SetText(localeInfo.DRAGON_SOUL_UNQUALIFIED)
self.wndPopupDialog.Open()
# if self.DRAGON_SOUL_IS_QUALIFIED:
self.wndDragonSoul.Show()
# else:
# try:
# self.wndPopupDialog.SetText(localeInfo.DRAGON_SOUL_UNQUALIFIED)
# self.wndPopupDialog.Open()
# except:
# self.wndPopupDialog = uiCommon.PopupDialog()
# self.wndPopupDialog.SetText(localeInfo.DRAGON_SOUL_UNQUALIFIED)
# self.wndPopupDialog.Open()
else:
self.wndDragonSoul.Close()
@@ -1017,10 +1018,11 @@ class Interface(object):
if False == player.IsObserverMode():
if app.ENABLE_DRAGON_SOUL_SYSTEM:
if False == self.wndDragonSoul.IsShow():
if self.DRAGON_SOUL_IS_QUALIFIED:
self.wndDragonSoul.Show()
# if self.DRAGON_SOUL_IS_QUALIFIED:
self.wndDragonSoul.Show()
else:
self.wndDragonSoul.Close()
# MR-12: -- END OF -- Enable Dragon Soul window opening without completing the quest
def FailDragonSoulRefine(self, reason, inven_type, inven_pos):
if False == player.IsObserverMode():

View File

@@ -7,6 +7,7 @@ import skill
import player
import uiToolTip
import math
import dbg
# WEDDING
class LovePointImage(ui.ExpandedImageBox):
@@ -378,9 +379,13 @@ class AffectImage(ui.ExpandedImageBox):
# MR-10: Add toolTip support and real-time countdown for affects
def UpdateDescription(self):
# MR-12: Fix realtime countdown auto-start
if self.__IsDragonSoulAffect():
minRemain = self.__GetDragonSoulMinRemainSec()
if self.isHover:
self.__UpdateDragonSoulDescription()
self.__UpdateDragonSoulDescription(minRemain)
# MR-12: -- END OF -- Fix realtime countdown auto-start
if self.toolTip:
self.toolTip.ShowToolTip()
@@ -481,11 +486,13 @@ class AffectImage(ui.ExpandedImageBox):
return minRemain
def __UpdateDragonSoulDescription(self):
# MR-12: Fix realtime countdown auto-start
def __UpdateDragonSoulDescription(self, minRemain = None):
if not self.description:
return
minRemain = self.__GetDragonSoulMinRemainSec()
if minRemain is None:
minRemain = self.__GetDragonSoulMinRemainSec()
self.__EnsureToolTip()
self.toolTip.ClearToolTip()
@@ -495,7 +502,7 @@ class AffectImage(ui.ExpandedImageBox):
self.toolTip.AppendTextLine("(%s : %s)" % (localeInfo.LEFT_TIME, localeInfo.RTSecondToDHMS(minRemain)))
self.toolTip.ResizeToolTip()
# MR-10: -- END OF -- Add toolTip support and real-time countdown for affects
# MR-12: -- END OF -- Fix realtime countdown auto-start
def SetSkillAffectFlag(self, flag):
self.isSkillAffect = flag
@@ -548,67 +555,71 @@ class AffectShower(ui.Window):
INFINITE_AFFECT_DURATION = 0x1FFFFFFF
AFFECT_DATA_DICT = {
chr.AFFECT_POISON : (localeInfo.SKILL_TOXICDIE, "d:/ymir work/ui/skill/common/affect/poison.sub"),
chr.AFFECT_SLOW : (localeInfo.SKILL_SLOW, "d:/ymir work/ui/skill/common/affect/slow.sub"),
chr.AFFECT_STUN : (localeInfo.SKILL_STUN, "d:/ymir work/ui/skill/common/affect/stun.sub"),
chr.AFFECT_POISON : (localeInfo.SKILL_TOXICDIE, "d:/ymir work/ui/skill/common/affect/poison.sub"),
chr.AFFECT_SLOW : (localeInfo.SKILL_SLOW, "d:/ymir work/ui/skill/common/affect/slow.sub"),
chr.AFFECT_STUN : (localeInfo.SKILL_STUN, "d:/ymir work/ui/skill/common/affect/stun.sub"),
chr.AFFECT_ATT_SPEED_POTION : (localeInfo.SKILL_INC_ATKSPD, "d:/ymir work/ui/skill/common/affect/Increase_Attack_Speed.sub"),
chr.AFFECT_MOV_SPEED_POTION : (localeInfo.SKILL_INC_MOVSPD, "d:/ymir work/ui/skill/common/affect/Increase_Move_Speed.sub"),
chr.AFFECT_FISH_MIND : (localeInfo.SKILL_FISHMIND, "d:/ymir work/ui/skill/common/affect/fishmind.sub"),
chr.AFFECT_ATT_SPEED_POTION : (localeInfo.SKILL_INC_ATKSPD, "d:/ymir work/ui/skill/common/affect/Increase_Attack_Speed.sub"),
chr.AFFECT_MOV_SPEED_POTION : (localeInfo.SKILL_INC_MOVSPD, "d:/ymir work/ui/skill/common/affect/Increase_Move_Speed.sub"),
chr.AFFECT_FISH_MIND : (localeInfo.SKILL_FISHMIND, "d:/ymir work/ui/skill/common/affect/fishmind.sub"),
chr.AFFECT_JEONGWI : (localeInfo.SKILL_JEONGWI, "d:/ymir work/ui/skill/warrior/jeongwi_03.sub",),
chr.AFFECT_GEOMGYEONG : (localeInfo.SKILL_GEOMGYEONG, "d:/ymir work/ui/skill/warrior/geomgyeong_03.sub",),
chr.AFFECT_CHEONGEUN : (localeInfo.SKILL_CHEONGEUN, "d:/ymir work/ui/skill/warrior/cheongeun_03.sub",),
chr.AFFECT_GYEONGGONG : (localeInfo.SKILL_GYEONGGONG, "d:/ymir work/ui/skill/assassin/gyeonggong_03.sub",),
chr.AFFECT_EUNHYEONG : (localeInfo.SKILL_EUNHYEONG, "d:/ymir work/ui/skill/assassin/eunhyeong_03.sub",),
chr.AFFECT_GWIGEOM : (localeInfo.SKILL_GWIGEOM, "d:/ymir work/ui/skill/sura/gwigeom_03.sub",),
chr.AFFECT_GONGPO : (localeInfo.SKILL_GONGPO, "d:/ymir work/ui/skill/sura/gongpo_03.sub",),
chr.AFFECT_JUMAGAP : (localeInfo.SKILL_JUMAGAP, "d:/ymir work/ui/skill/sura/jumagap_03.sub"),
chr.AFFECT_HOSIN : (localeInfo.SKILL_HOSIN, "d:/ymir work/ui/skill/shaman/hosin_03.sub",),
chr.AFFECT_BOHO : (localeInfo.SKILL_BOHO, "d:/ymir work/ui/skill/shaman/boho_03.sub",),
chr.AFFECT_KWAESOK : (localeInfo.SKILL_KWAESOK, "d:/ymir work/ui/skill/shaman/kwaesok_03.sub",),
chr.AFFECT_HEUKSIN : (localeInfo.SKILL_HEUKSIN, "d:/ymir work/ui/skill/sura/heuksin_03.sub",),
chr.AFFECT_MUYEONG : (localeInfo.SKILL_MUYEONG, "d:/ymir work/ui/skill/sura/muyeong_03.sub",),
chr.AFFECT_GICHEON : (localeInfo.SKILL_GICHEON, "d:/ymir work/ui/skill/shaman/gicheon_03.sub",),
chr.AFFECT_JEUNGRYEOK : (localeInfo.SKILL_JEUNGRYEOK, "d:/ymir work/ui/skill/shaman/jeungryeok_03.sub",),
chr.AFFECT_PABEOP : (localeInfo.SKILL_PABEOP, "d:/ymir work/ui/skill/sura/pabeop_03.sub",),
chr.AFFECT_FALLEN_CHEONGEUN : (localeInfo.SKILL_CHEONGEUN, "d:/ymir work/ui/skill/warrior/cheongeun_03.sub",),
28 : (localeInfo.SKILL_FIRE, "d:/ymir work/ui/skill/sura/hwayeom_03.sub",),
chr.AFFECT_CHINA_FIREWORK : (localeInfo.SKILL_POWERFUL_STRIKE, "d:/ymir work/ui/skill/common/affect/powerfulstrike.sub",),
chr.AFFECT_JEONGWI : (localeInfo.SKILL_JEONGWI, "d:/ymir work/ui/skill/warrior/jeongwi_03.sub",),
chr.AFFECT_GEOMGYEONG : (localeInfo.SKILL_GEOMGYEONG, "d:/ymir work/ui/skill/warrior/geomgyeong_03.sub",),
chr.AFFECT_CHEONGEUN : (localeInfo.SKILL_CHEONGEUN, "d:/ymir work/ui/skill/warrior/cheongeun_03.sub",),
chr.AFFECT_GYEONGGONG : (localeInfo.SKILL_GYEONGGONG, "d:/ymir work/ui/skill/assassin/gyeonggong_03.sub",),
chr.AFFECT_EUNHYEONG : (localeInfo.SKILL_EUNHYEONG, "d:/ymir work/ui/skill/assassin/eunhyeong_03.sub",),
chr.AFFECT_GWIGEOM : (localeInfo.SKILL_GWIGEOM, "d:/ymir work/ui/skill/sura/gwigeom_03.sub",),
chr.AFFECT_GONGPO : (localeInfo.SKILL_GONGPO, "d:/ymir work/ui/skill/sura/gongpo_03.sub",),
chr.AFFECT_JUMAGAP : (localeInfo.SKILL_JUMAGAP, "d:/ymir work/ui/skill/sura/jumagap_03.sub"),
chr.AFFECT_HOSIN : (localeInfo.SKILL_HOSIN, "d:/ymir work/ui/skill/shaman/hosin_03.sub",),
chr.AFFECT_BOHO : (localeInfo.SKILL_BOHO, "d:/ymir work/ui/skill/shaman/boho_03.sub",),
chr.AFFECT_KWAESOK : (localeInfo.SKILL_KWAESOK, "d:/ymir work/ui/skill/shaman/kwaesok_03.sub",),
chr.AFFECT_HEUKSIN : (localeInfo.SKILL_HEUKSIN, "d:/ymir work/ui/skill/sura/heuksin_03.sub",),
chr.AFFECT_MUYEONG : (localeInfo.SKILL_MUYEONG, "d:/ymir work/ui/skill/sura/muyeong_03.sub",),
chr.AFFECT_GICHEON : (localeInfo.SKILL_GICHEON, "d:/ymir work/ui/skill/shaman/gicheon_03.sub",),
chr.AFFECT_JEUNGRYEOK : (localeInfo.SKILL_JEUNGRYEOK, "d:/ymir work/ui/skill/shaman/jeungryeok_03.sub",),
chr.AFFECT_PABEOP : (localeInfo.SKILL_PABEOP, "d:/ymir work/ui/skill/sura/pabeop_03.sub",),
chr.AFFECT_FALLEN_CHEONGEUN : (localeInfo.SKILL_CHEONGEUN, "d:/ymir work/ui/skill/warrior/cheongeun_03.sub",),
28 : (localeInfo.SKILL_FIRE, "d:/ymir work/ui/skill/sura/hwayeom_03.sub",),
chr.AFFECT_CHINA_FIREWORK : (localeInfo.SKILL_POWERFUL_STRIKE, "d:/ymir work/ui/skill/common/affect/powerfulstrike.sub",),
#64 - END
chr.NEW_AFFECT_EXP_BONUS : (localeInfo.TOOLTIP_MALL_EXPBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/exp_bonus.sub",),
#64 - END
chr.NEW_AFFECT_EXP_BONUS : (localeInfo.TOOLTIP_MALL_EXPBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/exp_bonus.sub",),
chr.NEW_AFFECT_ITEM_BONUS : (localeInfo.TOOLTIP_MALL_ITEMBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/item_bonus.sub",),
chr.NEW_AFFECT_SAFEBOX : (localeInfo.TOOLTIP_MALL_SAFEBOX, "d:/ymir work/ui/skill/common/affect/safebox.sub",),
chr.NEW_AFFECT_AUTOLOOT : (localeInfo.TOOLTIP_MALL_AUTOLOOT, "d:/ymir work/ui/skill/common/affect/autoloot.sub",),
chr.NEW_AFFECT_FISH_MIND : (localeInfo.TOOLTIP_MALL_FISH_MIND, "d:/ymir work/ui/skill/common/affect/fishmind.sub",),
chr.NEW_AFFECT_MARRIAGE_FAST : (localeInfo.TOOLTIP_MALL_MARRIAGE_FAST, "d:/ymir work/ui/skill/common/affect/marriage_fast.sub",),
chr.NEW_AFFECT_GOLD_BONUS : (localeInfo.TOOLTIP_MALL_GOLDBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/gold_bonus.sub",),
chr.NEW_AFFECT_ITEM_BONUS : (localeInfo.TOOLTIP_MALL_ITEMBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/item_bonus.sub",),
chr.NEW_AFFECT_SAFEBOX : (localeInfo.TOOLTIP_MALL_SAFEBOX, "d:/ymir work/ui/skill/common/affect/safebox.sub",),
chr.NEW_AFFECT_AUTOLOOT : (localeInfo.TOOLTIP_MALL_AUTOLOOT, "d:/ymir work/ui/skill/common/affect/autoloot.sub",),
chr.NEW_AFFECT_FISH_MIND : (localeInfo.TOOLTIP_MALL_FISH_MIND, "d:/ymir work/ui/skill/common/affect/fishmind.sub",),
chr.NEW_AFFECT_MARRIAGE_FAST : (localeInfo.TOOLTIP_MALL_MARRIAGE_FAST, "d:/ymir work/ui/skill/common/affect/marriage_fast.sub",),
chr.NEW_AFFECT_GOLD_BONUS : (localeInfo.TOOLTIP_MALL_GOLDBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/gold_bonus.sub",),
chr.NEW_AFFECT_NO_DEATH_PENALTY : (localeInfo.TOOLTIP_APPLY_NO_DEATH_PENALTY, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
chr.NEW_AFFECT_SKILL_BOOK_BONUS : (localeInfo.TOOLTIP_APPLY_SKILL_BOOK_BONUS, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
chr.NEW_AFFECT_SKILL_BOOK_NO_DELAY : (localeInfo.TOOLTIP_APPLY_SKILL_BOOK_NO_DELAY, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
# <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> hp, sp
chr.NEW_AFFECT_AUTO_HP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/pattern/auto_hpgauge/05.dds"),
chr.NEW_AFFECT_AUTO_SP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/pattern/auto_spgauge/05.dds"),
#chr.NEW_AFFECT_AUTO_HP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
#chr.NEW_AFFECT_AUTO_SP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/skill/common/affect/gold_bonus.sub"),
chr.NEW_AFFECT_NO_DEATH_PENALTY : (localeInfo.TOOLTIP_APPLY_NO_DEATH_PENALTY, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
chr.NEW_AFFECT_SKILL_BOOK_BONUS : (localeInfo.TOOLTIP_APPLY_SKILL_BOOK_BONUS, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
chr.NEW_AFFECT_SKILL_BOOK_NO_DELAY : (localeInfo.TOOLTIP_APPLY_SKILL_BOOK_NO_DELAY, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
# <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> hp, sp
chr.NEW_AFFECT_AUTO_HP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/pattern/auto_hpgauge/05.dds"),
chr.NEW_AFFECT_AUTO_SP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/pattern/auto_spgauge/05.dds"),
#chr.NEW_AFFECT_AUTO_HP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
#chr.NEW_AFFECT_AUTO_SP_RECOVERY : (localeInfo.TOOLTIP_AUTO_POTION_REST, "d:/ymir work/ui/skill/common/affect/gold_bonus.sub"),
MALL_DESC_IDX_START+player.POINT_MALL_ATTBONUS : (localeInfo.TOOLTIP_MALL_ATTBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/att_bonus.sub",),
MALL_DESC_IDX_START+player.POINT_MALL_DEFBONUS : (localeInfo.TOOLTIP_MALL_DEFBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/def_bonus.sub",),
MALL_DESC_IDX_START+player.POINT_MALL_EXPBONUS : (localeInfo.TOOLTIP_MALL_EXPBONUS, "d:/ymir work/ui/skill/common/affect/exp_bonus.sub",),
MALL_DESC_IDX_START+player.POINT_MALL_ITEMBONUS : (localeInfo.TOOLTIP_MALL_ITEMBONUS, "d:/ymir work/ui/skill/common/affect/item_bonus.sub",),
MALL_DESC_IDX_START+player.POINT_MALL_GOLDBONUS : (localeInfo.TOOLTIP_MALL_GOLDBONUS, "d:/ymir work/ui/skill/common/affect/gold_bonus.sub",),
MALL_DESC_IDX_START+player.POINT_CRITICAL_PCT : (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,"d:/ymir work/ui/skill/common/affect/critical.sub"),
MALL_DESC_IDX_START+player.POINT_PENETRATE_PCT : (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
MALL_DESC_IDX_START+player.POINT_MAX_HP_PCT : (localeInfo.TOOLTIP_MAX_HP_PCT, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
MALL_DESC_IDX_START+player.POINT_MAX_SP_PCT : (localeInfo.TOOLTIP_MAX_SP_PCT, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
MALL_DESC_IDX_START + player.POINT_MALL_ATTBONUS : (localeInfo.TOOLTIP_MALL_ATTBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/att_bonus.sub",),
MALL_DESC_IDX_START + player.POINT_MALL_DEFBONUS : (localeInfo.TOOLTIP_MALL_DEFBONUS_STATIC, "d:/ymir work/ui/skill/common/affect/def_bonus.sub",),
MALL_DESC_IDX_START + player.POINT_MALL_EXPBONUS : (localeInfo.TOOLTIP_MALL_EXPBONUS, "d:/ymir work/ui/skill/common/affect/exp_bonus.sub",),
MALL_DESC_IDX_START + player.POINT_MALL_ITEMBONUS : (localeInfo.TOOLTIP_MALL_ITEMBONUS, "d:/ymir work/ui/skill/common/affect/item_bonus.sub",),
MALL_DESC_IDX_START + player.POINT_MALL_GOLDBONUS : (localeInfo.TOOLTIP_MALL_GOLDBONUS, "d:/ymir work/ui/skill/common/affect/gold_bonus.sub",),
MALL_DESC_IDX_START + player.POINT_CRITICAL_PCT : (localeInfo.TOOLTIP_APPLY_CRITICAL_PCT,"d:/ymir work/ui/skill/common/affect/critical.sub"),
MALL_DESC_IDX_START + player.POINT_PENETRATE_PCT : (localeInfo.TOOLTIP_APPLY_PENETRATE_PCT, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
MALL_DESC_IDX_START + player.POINT_MAX_HP_PCT : (localeInfo.TOOLTIP_MAX_HP_PCT, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
MALL_DESC_IDX_START + player.POINT_MAX_SP_PCT : (localeInfo.TOOLTIP_MAX_SP_PCT, "d:/ymir work/ui/skill/common/affect/gold_premium.sub"),
MALL_DESC_IDX_START+player.POINT_PC_BANG_EXP_BONUS : (localeInfo.TOOLTIP_MALL_EXPBONUS_P_STATIC, "d:/ymir work/ui/skill/common/affect/EXP_Bonus_p_on.sub",),
MALL_DESC_IDX_START+player.POINT_PC_BANG_DROP_BONUS: (localeInfo.TOOLTIP_MALL_ITEMBONUS_P_STATIC, "d:/ymir work/ui/skill/common/affect/Item_Bonus_p_on.sub",),
MALL_DESC_IDX_START + player.POINT_PC_BANG_EXP_BONUS : (localeInfo.TOOLTIP_MALL_EXPBONUS_P_STATIC, "d:/ymir work/ui/skill/common/affect/EXP_Bonus_p_on.sub",),
MALL_DESC_IDX_START + player.POINT_PC_BANG_DROP_BONUS: (localeInfo.TOOLTIP_MALL_ITEMBONUS_P_STATIC, "d:/ymir work/ui/skill/common/affect/Item_Bonus_p_on.sub",),
# MR-12: Add Mall Attack speed affect
MALL_DESC_IDX_START + player.POINT_ATT_SPEED : (localeInfo.TOOLTIP_MALL_ATT_SPEED, "d:/ymir work/ui/skill/common/affect/Increase_Attack_Speed.sub",),
# MR-12: -- END OF -- Add Mall Attack speed affect
}
if app.ENABLE_DRAGON_SOUL_SYSTEM:
# <20><>ȥ<EFBFBD><C8A5> õ, <20><> <20><>.
AFFECT_DATA_DICT[chr.NEW_AFFECT_DRAGON_SOUL_DECK1] = (localeInfo.TOOLTIP_DRAGON_SOUL_DECK1, "d:/ymir work/ui/dragonsoul/buff_ds_sky1.tga")
@@ -617,22 +628,24 @@ class AffectShower(ui.Window):
def __init__(self):
ui.Window.__init__(self)
self.serverPlayTime=0
self.clientPlayTime=0
self.serverPlayTime = 0
self.clientPlayTime = 0
self.lastUpdateTime=0
self.affectImageDict={}
self.horseImage=None
self.lovePointImage=None
self.lastUpdateTime = 0
self.affectImageDict = {}
self.horseImage = None
self.lovePointImage = None
self.autoPotionImageHP = AutoPotionImage()
self.autoPotionImageSP = AutoPotionImage()
self.SetPosition(10, 10)
self.Show()
def ClearAllAffects(self):
self.horseImage=None
self.lovePointImage=None
self.affectImageDict={}
self.horseImage = None
self.lovePointImage = None
self.affectImageDict = {}
self.__ArrangeImageList()
def ClearAffects(self): ## <20><>ų <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>۴ϴ<DBB4>.
@@ -644,7 +657,6 @@ class AffectShower(ui.Window):
self.__ArrangeImageList()
def BINARY_NEW_AddAffect(self, type, pointIdx, value, duration):
print(("BINARY_NEW_AddAffect", type, pointIdx, value, duration))
if type < 500:
@@ -678,6 +690,7 @@ class AffectShower(ui.Window):
value = 1 + float(value) / 100.0
trashValue = 123
#if affect == chr.NEW_AFFECT_AUTO_SP_RECOVERY or affect == chr.NEW_AFFECT_AUTO_HP_RECOVERY:
if trashValue == 1:
try:
@@ -699,24 +712,26 @@ class AffectShower(ui.Window):
image.OnUpdateAutoPotionImage()
self.affectImageDict[affect] = image
self.__ArrangeImageList()
except Exception as e:
print(("except Aff auto potion affect ", e))
pass
pass
else:
if affect != chr.NEW_AFFECT_AUTO_SP_RECOVERY and affect != chr.NEW_AFFECT_AUTO_HP_RECOVERY:
description = description(float(value))
try:
print(("Add affect %s" % affect))
image = AffectImage()
image.SetParent(self)
image.LoadImage(filename)
image.SetDescription(description)
image.SetDuration(duration)
image.SetAffect(affect)
if affect == chr.NEW_AFFECT_EXP_BONUS_EURO_FREE or\
affect == chr.NEW_AFFECT_EXP_BONUS_EURO_FREE_UNDER_15 or\
self.INFINITE_AFFECT_DURATION < duration:
@@ -731,6 +746,7 @@ class AffectShower(ui.Window):
image.SetScale(1, 1)
else:
image.SetScale(0.7, 0.7)
image.SetSkillAffectFlag(False)
image.Show()
self.affectImageDict[affect] = image
@@ -873,26 +889,17 @@ class AffectShower(ui.Window):
image.SetPosition(xPos, 0)
xPos += self.IMAGE_STEP
# MR-12: Fix realtime countdown auto-start
def OnUpdate(self):
try:
# MR-10: Add toolTip support and real-time countdown for affects
curTime = app.GetGlobalTime()
if curTime < self.lastUpdateTime:
self.lastUpdateTime = 0
if curTime - self.lastUpdateTime > 500:
#if 0 < app.GetGlobalTime():
self.lastUpdateTime = curTime
# MR-10: -- END OF -- Add toolTip support and real-time countdown for affects
for image in list(self.affectImageDict.values()):
if image.GetAffect() == chr.NEW_AFFECT_AUTO_HP_RECOVERY or image.GetAffect() == chr.NEW_AFFECT_AUTO_SP_RECOVERY:
image.UpdateAutoPotionDescription()
continue
if not image.IsSkillAffect():
image.UpdateDescription()
for image in list(self.affectImageDict.values()):
if image.GetAffect() == chr.NEW_AFFECT_AUTO_HP_RECOVERY or image.GetAffect() == chr.NEW_AFFECT_AUTO_SP_RECOVERY:
image.UpdateAutoPotionDescription()
continue
if not image.IsSkillAffect():
image.UpdateDescription()
except Exception as e:
print(("AffectShower::OnUpdate error : ", e))
# MR-12: -- END OF -- Fix realtime countdown auto-start

View File

@@ -36,17 +36,21 @@ class AttachMetinDialog(ui.ScriptWindow):
exception.Abort("AttachStoneDialog.__LoadScript.BindObject")
oldToolTip = uiToolTip.ItemToolTip()
oldToolTip.SetParent(self)
oldToolTip.SetPosition(15, 38)
oldToolTip.SetFollow(False)
oldToolTip.Show()
self.oldToolTip = oldToolTip
newToolTip = uiToolTip.ItemToolTip()
newToolTip.SetParent(self)
newToolTip.SetPosition(230 + 20, 38)
newToolTip.SetFollow(False)
newToolTip.Show()
self.newToolTip = newToolTip
self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
@@ -88,24 +92,37 @@ class AttachMetinDialog(ui.ScriptWindow):
except:
dbg.TraceError("AttachMetinDialog.Open.LoadImage - Failed to find item data")
# MR-12: Fix attribute and metin socket order display in tooltip
# Get actual item attributes/bonuses for display
attrSlot = []
for i in range(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(player.GetItemAttribute(targetItemPos, i))
metinSlot = []
for i in range(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(player.GetItemMetinSocket(targetItemPos, i))
for i in range(player.METIN_SOCKET_MAX_NUM):
slotData = metinSlot[i]
if self.CanAttachMetin(slotData, metinSubType):
metinSlot[i] = metinIndex
break
self.newToolTip.AddItemData(itemIndex, metinSlot)
break
self.newToolTip.AddItemData(itemIndex, metinSlot, attrSlot)
item.SelectItem(metinIndex)
metinSlot = []
for i in range(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(player.GetItemMetinSocket(targetItemPos, i))
self.oldToolTip.ResizeToolTipWidth(self.newToolTip.GetWidth())
self.oldToolTip.AddItemData(itemIndex, metinSlot)
self.oldToolTip.AddItemData(itemIndex, metinSlot, attrSlot)
# MR-12: -- END OF -- Fix attribute and metin socket order display in tooltip
self.UpdateDialog()
self.SetTop()

View File

@@ -702,7 +702,15 @@ class DragonSoulWindow(ui.ScriptWindow):
deckIndex = self.deckPageIndex
if not self.isActivated or self.deckPageIndex != deckIndex:
if self.__CanActivateDeck():
# MR-12: Improve keyboard shortcut functionality for deck toggling
if self.deckPageIndex != deckIndex:
self.deckPageIndex = deckIndex
self.deckTab[deckIndex].Down()
self.deckTab[(deckIndex + 1) % 2].SetUp()
self.RefreshEquipSlotWindow()
# Now validate the deck we switched to
if self.__CanActivateDeck(deckIndex):
net.SendChatPacket("/dragon_soul activate " + str(deckIndex))
self.isActivated = True
@@ -712,18 +720,31 @@ class DragonSoulWindow(ui.ScriptWindow):
else:
self.isActivated = False
self.activateButton.SetUp()
# MR-12: -- END OF -- Improve keyboard shortcut functionality for deck toggling
else:
net.SendChatPacket("/dragon_soul deactivate")
self.isActivated = False
self.activateButton.SetUp()
# Clear the tooltip cache when deactivating
if self.tooltipItem:
self.tooltipItem.ClearDragonSoulTimeCache()
# MR-3: -- END OF -- Keyboard-enabled deck toggling
def __CanActivateDeck(self):
# MR-12: Fix activation of decks with expired dragon souls
def __CanActivateDeck(self, deckIndex = None):
# If deckIndex not specified, check the current deck page
if deckIndex is None:
deckIndex = self.deckPageIndex
canActiveNum = 0
for i in range(6):
slotNumber = self.__InventoryLocalSlotPosToGlobalSlotPos(player.INVENTORY, player.DRAGON_SOUL_EQUIPMENT_SLOT_START + i)
itemVnum = player.GetItemIndex(slotNumber)
# Calculate the slot number for the specified deck
equipSlotPos = player.DRAGON_SOUL_EQUIPMENT_SLOT_START + deckIndex * player.DRAGON_SOUL_EQUIPMENT_FIRST_SIZE + i
slotNumber = equipSlotPos
itemVnum = player.GetItemIndex(player.INVENTORY, slotNumber)
# MR-12: -- END OF -- Fix activation of decks with expired dragon souls
if itemVnum != 0:
item.SelectItem(itemVnum)

View File

@@ -10,7 +10,6 @@ import uiCommon
import constInfo
class RefineDialog(ui.ScriptWindow):
makeSocketSuccessPercentage = ( 100, 33, 20, 15, 10, 5, 0 )
upgradeStoneSuccessPercentage = ( 30, 29, 28, 27, 26, 25, 24, 23, 22 )
upgradeArmorSuccessPercentage = ( 99, 66, 33, 33, 33, 33, 33, 33, 33 )
@@ -89,24 +88,21 @@ class RefineDialog(ui.ScriptWindow):
self.dlgQuestion = 0
def GetRefineSuccessPercentage(self, scrollSlotIndex, itemSlotIndex):
if -1 != scrollSlotIndex:
if player.IsRefineGradeScroll(scrollSlotIndex):
curGrade = player.GetItemGrade(itemSlotIndex)
itemIndex = player.GetItemIndex(itemSlotIndex)
item.SelectItem(itemIndex)
itemType = item.GetItemType()
itemSubType = item.GetItemSubType()
if item.ITEM_TYPE_METIN == itemType:
if curGrade >= len(self.upgradeStoneSuccessPercentage):
return 0
return self.upgradeStoneSuccessPercentage[curGrade]
elif item.ITEM_TYPE_ARMOR == itemType:
if item.ARMOR_BODY == itemSubType:
if curGrade >= len(self.upgradeArmorSuccessPercentage):
return 0
@@ -115,11 +111,10 @@ class RefineDialog(ui.ScriptWindow):
if curGrade >= len(self.upgradeAccessorySuccessPercentage):
return 0
return self.upgradeAccessorySuccessPercentage[curGrade]
else:
if curGrade >= len(self.upgradeSuccessPercentage):
return 0
return self.upgradeSuccessPercentage[curGrade]
for i in range(player.METIN_SOCKET_MAX_NUM+1):
@@ -133,15 +128,19 @@ class RefineDialog(ui.ScriptWindow):
self.targetItemPos = targetItemPos
percentage = self.GetRefineSuccessPercentage(scrollItemPos, targetItemPos)
if 0 == percentage:
return
self.successPercentage.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (percentage))
itemIndex = player.GetItemIndex(targetItemPos)
self.toolTip.ClearToolTip()
metinSlot = []
for i in range(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(player.GetItemMetinSocket(targetItemPos, i))
self.toolTip.AddItemData(itemIndex, metinSlot)
self.UpdateDialog()
@@ -151,17 +150,21 @@ class RefineDialog(ui.ScriptWindow):
def UpdateDialog(self):
newWidth = self.toolTip.GetWidth() + 30
newHeight = self.toolTip.GetHeight() + 98
self.board.SetSize(newWidth, newHeight)
self.titleBar.SetWidth(newWidth-15)
self.SetSize(newWidth, newHeight)
(x, y) = self.GetLocalPosition()
self.SetPosition(x, y)
def OpenQuestionDialog(self):
percentage = self.GetRefineSuccessPercentage(-1, self.targetItemPos)
if 100 == percentage:
self.Accept()
return
self.dlgQuestion.SetTop()
@@ -197,11 +200,9 @@ class RefineDialogNew(ui.ScriptWindow):
self.type = 0
def __LoadScript(self):
try:
pyScrLoader = ui.PythonScriptLoader()
pyScrLoader.LoadScriptFile(self, "uiscript/refinedialog.py")
except:
import exception
exception.Abort("RefineDialog.__LoadScript.LoadObject")
@@ -228,8 +229,10 @@ class RefineDialogNew(ui.ScriptWindow):
self.toolTip = toolTip
self.slotList = []
for i in range(3):
slot = self.__MakeSlot()
slot.SetParent(toolTip)
slot.SetWindowVerticalAlignCenter()
self.slotList.append(slot)
@@ -248,26 +251,33 @@ class RefineDialogNew(ui.ScriptWindow):
def __MakeSlot(self):
slot = ui.ImageBox()
slot.LoadImage("d:/ymir work/ui/public/slot_base.sub")
slot.Show()
self.children.append(slot)
return slot
def __MakeItemImage(self):
itemImage = ui.ImageBox()
itemImage.Show()
self.children.append(itemImage)
return itemImage
def __MakeThinBoard(self):
thinBoard = ui.ThinBoard()
thinBoard.SetParent(self)
thinBoard.Show()
self.children.append(thinBoard)
return thinBoard
def Destroy(self):
self.ClearDictionary()
self.dlgQuestion = None
self.board = 0
self.probText = 0
@@ -279,7 +289,6 @@ class RefineDialogNew(ui.ScriptWindow):
self.children = []
def Open(self, targetItemPos, nextGradeItemVnum, cost, prob, type):
if False == self.isLoaded:
self.__LoadScript()
@@ -296,12 +305,15 @@ class RefineDialogNew(ui.ScriptWindow):
self.toolTip.ClearToolTip()
metinSlot = []
for i in range(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(player.GetItemMetinSocket(targetItemPos, i))
attrSlot = []
for i in range(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(player.GetItemAttribute(targetItemPos, i))
self.toolTip.AddRefineItemData(nextGradeItemVnum, metinSlot, attrSlot)
item.SelectItem(nextGradeItemVnum)
@@ -309,6 +321,7 @@ class RefineDialogNew(ui.ScriptWindow):
xSlotCount, ySlotCount = item.GetItemSize()
for slot in self.slotList:
slot.Hide()
for i in range(min(3, ySlotCount)):
self.slotList[i].SetPosition(-35, i*32 - (ySlotCount-1)*16)
self.slotList[i].Show()
@@ -325,19 +338,23 @@ class RefineDialogNew(ui.ScriptWindow):
def AppendMaterial(self, vnum, count):
slot = self.__MakeSlot()
slot.SetParent(self)
slot.SetPosition(15, self.dialogHeight)
itemImage = self.__MakeItemImage()
itemImage.SetParent(slot)
item.SelectItem(vnum)
itemImage.LoadImage(item.GetIconImageFileName())
thinBoard = self.__MakeThinBoard()
thinBoard.SetPosition(50, self.dialogHeight)
thinBoard.SetSize(self.toolTip.GetWidth(), 20)
textLine = ui.TextLine()
textLine.SetParent(thinBoard)
textLine.SetFontName(localeInfo.UI_DEF_FONT)
textLine.SetPackedFontColor(0xffdddddd)

View File

@@ -918,16 +918,41 @@ class ItemToolTip(ToolTip):
for i in range(player.ATTRIBUTE_SLOT_MAX_NUM):
type = attrSlot[i][0]
if 0 != type:
return True
return False
# MR-12: Fix broken metin stones showing as empty sockets in item tooltip
def AddRefineItemData(self, itemVnum, metinSlot, attrSlot = 0):
# Separate metin slots into filled (non-broken) and empty slots
filledSlots = []
emptySlots = []
for i in range(player.METIN_SOCKET_MAX_NUM):
metinSlotData=metinSlot[i]
if self.GetMetinItemIndex(metinSlotData) == constInfo.ERROR_METIN_STONE:
metinSlot[i]=player.METIN_SOCKET_TYPE_SILVER
metinSlotData = metinSlot[i]
metin_index = self.GetMetinItemIndex(metinSlotData)
if metin_index == constInfo.ERROR_METIN_STONE:
# Broken stone - convert to empty silver socket
emptySlots.append(player.METIN_SOCKET_TYPE_SILVER)
elif metin_index == 0:
# Empty slot
emptySlots.append(metinSlotData)
else:
# Valid metin stone
filledSlots.append(metinSlotData)
# Rebuild metinSlot with filled slots first, then empty slots
newSlots = filledSlots + emptySlots
for i in range(player.METIN_SOCKET_MAX_NUM):
if i < len(newSlots):
metinSlot[i] = newSlots[i]
else:
metinSlot[i] = 0
# MR-12: -- END OF -- Fix broken metin stones showing as empty sockets in item tooltip
self.AddItemData(itemVnum, metinSlot, attrSlot)