diff --git a/README.md b/README.md index 9a6312c3..3b6ef64f 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,13 @@ This repository contains all client-side data, including locale files, configura ## 📋 Changelog ### 🐛 Bug Fixes - - **Python 3 division compatibility**: Migrated a lot of divisions in a lot of files to `int` divisions instead of `floats` for Python 3 compatibility. This will be fixing a lot of bugs caused by the upgrade such as target board button centering, Dragon stones Grade in tooltip and more. - - **Completed the map names dictionary**: This improves functionality for all maps within the client, and fixes **the "invisible affects in dungeon" bug! - - **Dragon stone countdown in tooltip**: The countdown auto-starts and responds perfectly to all situations without waiting for the "first hover" from the player. - - **Quest refreshing**: Prevented the quest letters from appearing on top of the dialog curtain (if currently chatting with an NPC or item). - - **Minor translation improvements** - - **Several missing item icons added** + - **Refining**: The window now sorts empty slots (from broken stones) to the end of the list, displaying an exact preview of how the item will look like after successful attaching. + - **Affects**: Added affect shower support for Mall Attack Speed. + - **Dragonsoul Alchemy**: + - Fixed the deck affect countdown not auto-updating when time is increased in one of the equipped items. + - Fixed the affect countdown requiring a check for remaining time in 500ms-intervals. + - The window now opens without the player being qualified (consistency with the official). + - **Spirit stone attachment**: The window now displays the item's existing attributes.

diff --git a/assets/locale/locale/ae/item_proto b/assets/locale/locale/ae/item_proto index 82be3700..08d3306c 100644 Binary files a/assets/locale/locale/ae/item_proto and b/assets/locale/locale/ae/item_proto differ diff --git a/assets/locale/locale/ae/locale_game.txt b/assets/locale/locale/ae/locale_game.txt index 4dd0553a..fa8454c8 100644 --- a/assets/locale/locale/ae/locale_game.txt +++ b/assets/locale/locale/ae/locale_game.txt @@ -802,6 +802,7 @@ TOOLTIP_MAGIC_ATT_GRADE قيمة الهجوم السحري +%d SA TOOLTIP_MAGIC_DEF_GRADE دفاع سحري +%d SA TOOLTIP_MALL_ATTBONUS قيمة الهجوم +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC قيمة الهجوم SNA +TOOLTIP_MALL_ATT_SPEED ارتفاع سرعة الهجوم +%d%% SA TOOLTIP_MALL_AUTOLOOT سيتم تلقائياً تسجيل اليانغ. SNA TOOLTIP_MALL_DEFBONUS الدفاع +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC دفاع SNA diff --git a/assets/locale/locale/br/locale_game.txt b/assets/locale/locale/br/locale_game.txt index db735001..fe1670d0 100644 --- a/assets/locale/locale/br/locale_game.txt +++ b/assets/locale/locale/br/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Ataque Mágico: +%d SA TOOLTIP_MAGIC_DEF_GRADE Proteção Mágica: +%d SA TOOLTIP_MALL_ATTBONUS Ataque: +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Ataque: +20% SNA +TOOLTIP_MALL_ATT_SPEED Bônus na Velocidade de Ataque +%d%% SA TOOLTIP_MALL_AUTOLOOT Adquire Gold automaticamente SNA TOOLTIP_MALL_DEFBONUS Defesa:+%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Defesa: +12~15% SNA diff --git a/assets/locale/locale/cz/item_proto b/assets/locale/locale/cz/item_proto index fa36686e..67d81309 100644 Binary files a/assets/locale/locale/cz/item_proto and b/assets/locale/locale/cz/item_proto differ diff --git a/assets/locale/locale/cz/locale_game.txt b/assets/locale/locale/cz/locale_game.txt index 18cf4057..95a4b4b5 100644 --- a/assets/locale/locale/cz/locale_game.txt +++ b/assets/locale/locale/cz/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Magická hodnota útoku +%d SA TOOLTIP_MAGIC_DEF_GRADE Magická obrana +%d SA TOOLTIP_MALL_ATTBONUS Hodnota útoku +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Hodnota útoku +12~15 % SNA +TOOLTIP_MALL_ATT_SPEED Rychlost útoku zvýšena +%d%% SA TOOLTIP_MALL_AUTOLOOT Yangy se automaticky sesbírají. SNA TOOLTIP_MALL_DEFBONUS Obrana +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Obrana +12~15 % SNA diff --git a/assets/locale/locale/de/item_proto b/assets/locale/locale/de/item_proto index 6d9af982..259bdb0f 100644 Binary files a/assets/locale/locale/de/item_proto and b/assets/locale/locale/de/item_proto differ diff --git a/assets/locale/locale/de/locale_game.txt b/assets/locale/locale/de/locale_game.txt index d522a70d..994cf83d 100644 --- a/assets/locale/locale/de/locale_game.txt +++ b/assets/locale/locale/de/locale_game.txt @@ -708,6 +708,7 @@ TOOLTIP_MAGIC_ATT_GRADE Magischer Angriffswert +%d SA TOOLTIP_MAGIC_DEF_GRADE Magische Verteidigung +%d SA TOOLTIP_MALL_ATTBONUS Angriffswert +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Angriffswert +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Angriffsgeschwindigkeit erhöht +%d%% SA TOOLTIP_MALL_AUTOLOOT Autom. wird das Yang aufgenommen. SNA TOOLTIP_MALL_DEFBONUS Verteidigung +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Verteidigung +12~15% SNA diff --git a/assets/locale/locale/dk/item_proto b/assets/locale/locale/dk/item_proto index 2e14d7dc..20cef8e6 100644 Binary files a/assets/locale/locale/dk/item_proto and b/assets/locale/locale/dk/item_proto differ diff --git a/assets/locale/locale/dk/locale_game.txt b/assets/locale/locale/dk/locale_game.txt index a95125f0..b6b4bcd1 100644 --- a/assets/locale/locale/dk/locale_game.txt +++ b/assets/locale/locale/dk/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Magisk angrebsværdi +%d SA TOOLTIP_MAGIC_DEF_GRADE Magisk forsvar +%d SA TOOLTIP_MALL_ATTBONUS Angrebsværdi +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Angrebsværdi +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Angrebshastighed øges +%d%% SA TOOLTIP_MALL_AUTOLOOT Automatisk samles alt Yang. SNA TOOLTIP_MALL_DEFBONUS Forsvar +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Forsvar +12~15% SNA diff --git a/assets/locale/locale/en/item_proto b/assets/locale/locale/en/item_proto index 5f3f835f..18c6ecef 100644 Binary files a/assets/locale/locale/en/item_proto and b/assets/locale/locale/en/item_proto differ diff --git a/assets/locale/locale/en/locale_game.txt b/assets/locale/locale/en/locale_game.txt index aa18f526..b0926ed4 100644 --- a/assets/locale/locale/en/locale_game.txt +++ b/assets/locale/locale/en/locale_game.txt @@ -708,6 +708,7 @@ TOOLTIP_MAGIC_ATT_GRADE Magical Attack Value +%d SA TOOLTIP_MAGIC_DEF_GRADE Magical Defence +%d SA TOOLTIP_MALL_ATTBONUS Attack Value +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Attack Value +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Attack speed raised +%d%% SA TOOLTIP_MALL_AUTOLOOT A hand that picks up dropped Yang automatically SNA TOOLTIP_MALL_DEFBONUS Defence +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Defence +12~15% SNA diff --git a/assets/locale/locale/es/item_proto b/assets/locale/locale/es/item_proto index 04726de4..2714f540 100644 Binary files a/assets/locale/locale/es/item_proto and b/assets/locale/locale/es/item_proto differ diff --git a/assets/locale/locale/es/locale_game.txt b/assets/locale/locale/es/locale_game.txt index 4fc8cd9a..2ba4f242 100644 --- a/assets/locale/locale/es/locale_game.txt +++ b/assets/locale/locale/es/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Valor de Ataque Mágico +%d SA TOOLTIP_MAGIC_DEF_GRADE Defensa Mágica +%d SA TOOLTIP_MALL_ATTBONUS Valor de Ataque +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Valor de Ataque +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Velocidad de ataque aumentada +%d%% SA TOOLTIP_MALL_AUTOLOOT Una mano que recoge automáticamente el Yang tirado SNA TOOLTIP_MALL_DEFBONUS Defensa +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Defensa +12~15% SNA diff --git a/assets/locale/locale/fr/item_proto b/assets/locale/locale/fr/item_proto index 6c5a1cb4..1efa77e5 100644 Binary files a/assets/locale/locale/fr/item_proto and b/assets/locale/locale/fr/item_proto differ diff --git a/assets/locale/locale/fr/locale_game.txt b/assets/locale/locale/fr/locale_game.txt index a9377ac8..b6f9bec7 100644 --- a/assets/locale/locale/fr/locale_game.txt +++ b/assets/locale/locale/fr/locale_game.txt @@ -708,6 +708,7 @@ TOOLTIP_MAGIC_ATT_GRADE Valeur d'attaque magique +%d SA TOOLTIP_MAGIC_DEF_GRADE Défense magique +%d SA TOOLTIP_MALL_ATTBONUS Valeur d'attaque +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Valeur d'attaque +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Vitesse d'attaque augmentée +%d%% SA TOOLTIP_MALL_AUTOLOOT Une main qui ramasse les Yangs automatiquement. SNA TOOLTIP_MALL_DEFBONUS Défense +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Défense +12~15% SNA diff --git a/assets/locale/locale/gr/item_proto b/assets/locale/locale/gr/item_proto index 9d84fbee..e6297ae6 100644 Binary files a/assets/locale/locale/gr/item_proto and b/assets/locale/locale/gr/item_proto differ diff --git a/assets/locale/locale/gr/locale_game.txt b/assets/locale/locale/gr/locale_game.txt index 64786502..0e23d7c2 100644 --- a/assets/locale/locale/gr/locale_game.txt +++ b/assets/locale/locale/gr/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Αξία Μαγικής άμυνας +%d SA TOOLTIP_MAGIC_DEF_GRADE Μαγική άμυνα +%d SA TOOLTIP_MALL_ATTBONUS Αξία Επίθεσης +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Αξία Επίθεσης +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Αυξημένη ταχύτητα επίθεσης +%d%% SA TOOLTIP_MALL_AUTOLOOT Χέρι που μαζεύει αυτόματα τα πεσμένα Yang SNA TOOLTIP_MALL_DEFBONUS Άμυνα +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Άμυνα +12~15% SNA diff --git a/assets/locale/locale/hu/item_proto b/assets/locale/locale/hu/item_proto index 05ca89d6..dfcf2dd9 100644 Binary files a/assets/locale/locale/hu/item_proto and b/assets/locale/locale/hu/item_proto differ diff --git a/assets/locale/locale/hu/locale_game.txt b/assets/locale/locale/hu/locale_game.txt index 0bfde340..9ae0ac82 100644 --- a/assets/locale/locale/hu/locale_game.txt +++ b/assets/locale/locale/hu/locale_game.txt @@ -708,6 +708,7 @@ TOOLTIP_MAGIC_ATT_GRADE Mágikus támadó érték +%d SA TOOLTIP_MAGIC_DEF_GRADE Mágikus védelem +%d SA TOOLTIP_MALL_ATTBONUS Támadó érték +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Támadó érték +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Megnövelt támadósebesség +%d%% SA TOOLTIP_MALL_AUTOLOOT Automatikusan felszedi a Yangokat. SNA TOOLTIP_MALL_DEFBONUS Védekezés +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Védekezés +12~15% SNA diff --git a/assets/locale/locale/it/item_proto b/assets/locale/locale/it/item_proto index 56ea57d1..0a44c419 100644 Binary files a/assets/locale/locale/it/item_proto and b/assets/locale/locale/it/item_proto differ diff --git a/assets/locale/locale/it/locale_game.txt b/assets/locale/locale/it/locale_game.txt index 79244d58..25e28d30 100644 --- a/assets/locale/locale/it/locale_game.txt +++ b/assets/locale/locale/it/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Valore d'attacco magico +%d SA TOOLTIP_MAGIC_DEF_GRADE Difesa magica +%d SA TOOLTIP_MALL_ATTBONUS Valore d'attacco +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Valore d'attacco +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Velocità di attacco aumentata +%d%% SA TOOLTIP_MALL_AUTOLOOT Drop di Yang vengono raccolti automaticamete. SNA TOOLTIP_MALL_DEFBONUS Difesa +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Difesa +12~15% SNA diff --git a/assets/locale/locale/nl/item_proto b/assets/locale/locale/nl/item_proto index ef5ebcc8..b85d5dab 100644 Binary files a/assets/locale/locale/nl/item_proto and b/assets/locale/locale/nl/item_proto differ diff --git a/assets/locale/locale/nl/locale_game.txt b/assets/locale/locale/nl/locale_game.txt index 75779953..cdd5d729 100644 --- a/assets/locale/locale/nl/locale_game.txt +++ b/assets/locale/locale/nl/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Magische Aanvals Waarde +%d SA TOOLTIP_MAGIC_DEF_GRADE Magische Verdediging +%d SA TOOLTIP_MALL_ATTBONUS Aanvals Waarde +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Aanvals Waarde +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Aanvals snelheid verhoogd +%d%% SA TOOLTIP_MALL_AUTOLOOT Een hand die automatisch gevallen Yang opraapt. SNA TOOLTIP_MALL_DEFBONUS Verdediging +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Verdediging +12~15% SNA diff --git a/assets/locale/locale/pl/item_proto b/assets/locale/locale/pl/item_proto index 8985d067..6aff3e2b 100644 Binary files a/assets/locale/locale/pl/item_proto and b/assets/locale/locale/pl/item_proto differ diff --git a/assets/locale/locale/pl/locale_game.txt b/assets/locale/locale/pl/locale_game.txt index a73bf5cd..4efc2f73 100644 --- a/assets/locale/locale/pl/locale_game.txt +++ b/assets/locale/locale/pl/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Wartość Magicznego Ataku: +%d SA TOOLTIP_MAGIC_DEF_GRADE Magiczna Obrona: +%d SA TOOLTIP_MALL_ATTBONUS Wartość Ataku: +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Wartość Ataku: +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Zwiększona Szybkość Ataku +%d%% SA TOOLTIP_MALL_AUTOLOOT Ręka, która automatycznie podnosi upuszczone Yang. SNA TOOLTIP_MALL_DEFBONUS Obrona: +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Obrona +12~15% SNA diff --git a/assets/locale/locale/pt/item_proto b/assets/locale/locale/pt/item_proto index dea7380e..1d192cdb 100644 Binary files a/assets/locale/locale/pt/item_proto and b/assets/locale/locale/pt/item_proto differ diff --git a/assets/locale/locale/pt/locale_game.txt b/assets/locale/locale/pt/locale_game.txt index a289d84c..f04b8139 100644 --- a/assets/locale/locale/pt/locale_game.txt +++ b/assets/locale/locale/pt/locale_game.txt @@ -722,6 +722,7 @@ TOOLTIP_MAGIC_ATT_GRADE Valor de Ataque Mágico: +%d SA TOOLTIP_MAGIC_DEF_GRADE Defesa vs Magias: +%d SA TOOLTIP_MALL_ATTBONUS Valor de Ataque: +%d SA TOOLTIP_MALL_ATTBONUS_STATIC Valor de Ataque: +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Aumento da Velocidade de Ataque +%d%% SA TOOLTIP_MALL_AUTOLOOT Mão que apanha automaticamente o Yang caído. SNA TOOLTIP_MALL_DEFBONUS Defesa: +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Defesa: +12~15% SNA diff --git a/assets/locale/locale/ro/item_proto b/assets/locale/locale/ro/item_proto index 2e9fc523..5192fdc5 100644 Binary files a/assets/locale/locale/ro/item_proto and b/assets/locale/locale/ro/item_proto differ diff --git a/assets/locale/locale/ro/locale_game.txt b/assets/locale/locale/ro/locale_game.txt index 8952c95c..7f7c3604 100644 --- a/assets/locale/locale/ro/locale_game.txt +++ b/assets/locale/locale/ro/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Valoarea atacului magic +%d SA TOOLTIP_MAGIC_DEF_GRADE Apărare magică +%d SA TOOLTIP_MALL_ATTBONUS Valoarea atacului +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Valoarea atacului +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Viteza de atac a crescut +%d%% SA TOOLTIP_MALL_AUTOLOOT Yang este însușit automat. SNA TOOLTIP_MALL_DEFBONUS Apărare +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Apărare +12~15% SNA diff --git a/assets/locale/locale/ru/item_proto b/assets/locale/locale/ru/item_proto index 3fc8862f..e8c718b4 100644 Binary files a/assets/locale/locale/ru/item_proto and b/assets/locale/locale/ru/item_proto differ diff --git a/assets/locale/locale/ru/locale_game.txt b/assets/locale/locale/ru/locale_game.txt index 55943104..aa797a66 100644 --- a/assets/locale/locale/ru/locale_game.txt +++ b/assets/locale/locale/ru/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Показатель магической атаки +%d TOOLTIP_MAGIC_DEF_GRADE Магическая защита +%d SA TOOLTIP_MALL_ATTBONUS Показатель атаки +%d%% SA TOOLTIP_MALL_ATTBONUS_STATIC Показатель атаки +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Скорость атаки повышена +%d%% SA TOOLTIP_MALL_AUTOLOOT Янг принимается автом. SNA TOOLTIP_MALL_DEFBONUS Защита +%d%% SA TOOLTIP_MALL_DEFBONUS_STATIC Защита +12~15% SNA diff --git a/assets/locale/locale/tr/item_proto b/assets/locale/locale/tr/item_proto index a3a6e151..9b7295eb 100644 Binary files a/assets/locale/locale/tr/item_proto and b/assets/locale/locale/tr/item_proto differ diff --git a/assets/locale/locale/tr/locale_game.txt b/assets/locale/locale/tr/locale_game.txt index 4647c58c..7127923b 100644 --- a/assets/locale/locale/tr/locale_game.txt +++ b/assets/locale/locale/tr/locale_game.txt @@ -710,6 +710,7 @@ TOOLTIP_MAGIC_ATT_GRADE Büyülü Saldırı Değeri +%d SA TOOLTIP_MAGIC_DEF_GRADE Büyü Savunması +%d SA TOOLTIP_MALL_ATTBONUS Saldırı Değeri +%%%d SA TOOLTIP_MALL_ATTBONUS_STATIC Saldırı Değeri +12~15% SNA +TOOLTIP_MALL_ATT_SPEED Saldırı hızı arttırıldı +%d%% SA TOOLTIP_MALL_AUTOLOOT Yerdeki mevcut Yang`ın otomatik olarak toplanmasını sağlayan el. SNA TOOLTIP_MALL_DEFBONUS Savunma +%%%d SA TOOLTIP_MALL_DEFBONUS_STATIC Savunma +12~15% SNA diff --git a/assets/root/game.py b/assets/root/game.py index 79c89cba..cbcd6502 100644 --- a/assets/root/game.py +++ b/assets/root/game.py @@ -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() diff --git a/assets/root/interfacemodule.py b/assets/root/interfacemodule.py index 498b6f2d..fd678c96 100644 --- a/assets/root/interfacemodule.py +++ b/assets/root/interfacemodule.py @@ -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(): diff --git a/assets/root/uiaffectshower.py b/assets/root/uiaffectshower.py index af49942f..305e2b55 100644 --- a/assets/root/uiaffectshower.py +++ b/assets/root/uiaffectshower.py @@ -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"), - - # �ڵ����� 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"), + + # �ڵ����� 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: # ��ȥ�� õ, �� ��. 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): ## ��ų ����Ʈ�� ���۴ϴ�. @@ -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 diff --git a/assets/root/uiattachmetin.py b/assets/root/uiattachmetin.py index f1d29d37..941c63c7 100644 --- a/assets/root/uiattachmetin.py +++ b/assets/root/uiattachmetin.py @@ -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() diff --git a/assets/root/uidragonsoul.py b/assets/root/uidragonsoul.py index 52efa1dc..fe1669ed 100644 --- a/assets/root/uidragonsoul.py +++ b/assets/root/uidragonsoul.py @@ -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) diff --git a/assets/root/uirefine.py b/assets/root/uirefine.py index 8d6ea2af..e0488ae4 100644 --- a/assets/root/uirefine.py +++ b/assets/root/uirefine.py @@ -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) diff --git a/assets/root/uitooltip.py b/assets/root/uitooltip.py index b7672628..e526a260 100644 --- a/assets/root/uitooltip.py +++ b/assets/root/uitooltip.py @@ -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)