v2.5.0: fixed unknown rings revealing their stats in upgrade window
This commit is contained in:
@@ -352,6 +352,7 @@ windows.wndtradeitem.sell_all=Sell all for %dg
|
|||||||
windows.wndupgrade.title=Upgrade an Item
|
windows.wndupgrade.title=Upgrade an Item
|
||||||
windows.wndupgrade.desc=Upgrading an item permanently improves it:
|
windows.wndupgrade.desc=Upgrading an item permanently improves it:
|
||||||
windows.wndupgrade.unided=You don't know the properties of this item, its un-upgraded state is shown here.
|
windows.wndupgrade.unided=You don't know the properties of this item, its un-upgraded state is shown here.
|
||||||
|
windows.wndupgrade.unknown_ring=You don't know what this ring's effect is, and so have no idea what upgrading it will do.
|
||||||
windows.wndupgrade.cursed=Upgrading this item also has a 33% chance to cleanse its curse.
|
windows.wndupgrade.cursed=Upgrading this item also has a 33% chance to cleanse its curse.
|
||||||
windows.wndupgrade.cursed_weaken=Upgrading this item will also weaken its curse, and has a 33% chance to cleanse it entirely.
|
windows.wndupgrade.cursed_weaken=Upgrading this item will also weaken its curse, and has a 33% chance to cleanse it entirely.
|
||||||
windows.wndupgrade.curse_infusion=If the curse is cleansed, the item will no longer benefit from curse infusion!
|
windows.wndupgrade.curse_infusion=If the curse is cleansed, the item will no longer benefit from curse infusion!
|
||||||
|
|||||||
+24
-18
@@ -280,23 +280,25 @@ public class WndUpgrade extends Window {
|
|||||||
|
|
||||||
//Various ring stats (varies by ring)
|
//Various ring stats (varies by ring)
|
||||||
if (toUpgrade instanceof Ring){
|
if (toUpgrade instanceof Ring){
|
||||||
if (((Ring) toUpgrade).upgradeStat1(levelFrom) != null){
|
if (((Ring) toUpgrade).isKnown()) {
|
||||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_1"),
|
if (((Ring) toUpgrade).upgradeStat1(levelFrom) != null) {
|
||||||
((Ring) toUpgrade).upgradeStat1(levelFrom),
|
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_1"),
|
||||||
((Ring) toUpgrade).upgradeStat1(levelTo),
|
((Ring) toUpgrade).upgradeStat1(levelFrom),
|
||||||
bottom);
|
((Ring) toUpgrade).upgradeStat1(levelTo),
|
||||||
}
|
bottom);
|
||||||
if (((Ring) toUpgrade).upgradeStat2(levelFrom) != null){
|
}
|
||||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_2"),
|
if (((Ring) toUpgrade).upgradeStat2(levelFrom) != null) {
|
||||||
((Ring) toUpgrade).upgradeStat2(levelFrom),
|
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_2"),
|
||||||
((Ring) toUpgrade).upgradeStat2(levelTo),
|
((Ring) toUpgrade).upgradeStat2(levelFrom),
|
||||||
bottom);
|
((Ring) toUpgrade).upgradeStat2(levelTo),
|
||||||
}
|
bottom);
|
||||||
if (((Ring) toUpgrade).upgradeStat3(levelFrom) != null){
|
}
|
||||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_3"),
|
if (((Ring) toUpgrade).upgradeStat3(levelFrom) != null) {
|
||||||
((Ring) toUpgrade).upgradeStat3(levelFrom),
|
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_3"),
|
||||||
((Ring) toUpgrade).upgradeStat3(levelTo),
|
((Ring) toUpgrade).upgradeStat3(levelFrom),
|
||||||
bottom);
|
((Ring) toUpgrade).upgradeStat3(levelTo),
|
||||||
|
bottom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -317,7 +319,11 @@ public class WndUpgrade extends Window {
|
|||||||
|
|
||||||
//warning relating to identification
|
//warning relating to identification
|
||||||
if (!toUpgrade.isIdentified()){
|
if (!toUpgrade.isIdentified()){
|
||||||
bottom = addMessage(Messages.get(this, "unided"), CharSprite.WARNING, bottom);
|
if (toUpgrade instanceof Ring && !((Ring) toUpgrade).isKnown()){
|
||||||
|
bottom = addMessage(Messages.get(this, "unknown_ring"), CharSprite.WARNING, bottom);
|
||||||
|
} else {
|
||||||
|
bottom = addMessage(Messages.get(this, "unided"), CharSprite.WARNING, bottom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// various messages relating to enchantments and curses
|
// various messages relating to enchantments and curses
|
||||||
|
|||||||
Reference in New Issue
Block a user