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.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.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_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!
|
||||
|
||||
@@ -280,23 +280,25 @@ public class WndUpgrade extends Window {
|
||||
|
||||
//Various ring stats (varies by ring)
|
||||
if (toUpgrade instanceof Ring){
|
||||
if (((Ring) toUpgrade).upgradeStat1(levelFrom) != null){
|
||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_1"),
|
||||
((Ring) toUpgrade).upgradeStat1(levelFrom),
|
||||
((Ring) toUpgrade).upgradeStat1(levelTo),
|
||||
bottom);
|
||||
}
|
||||
if (((Ring) toUpgrade).upgradeStat2(levelFrom) != null){
|
||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_2"),
|
||||
((Ring) toUpgrade).upgradeStat2(levelFrom),
|
||||
((Ring) toUpgrade).upgradeStat2(levelTo),
|
||||
bottom);
|
||||
}
|
||||
if (((Ring) toUpgrade).upgradeStat3(levelFrom) != null){
|
||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_3"),
|
||||
((Ring) toUpgrade).upgradeStat3(levelFrom),
|
||||
((Ring) toUpgrade).upgradeStat3(levelTo),
|
||||
bottom);
|
||||
if (((Ring) toUpgrade).isKnown()) {
|
||||
if (((Ring) toUpgrade).upgradeStat1(levelFrom) != null) {
|
||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_1"),
|
||||
((Ring) toUpgrade).upgradeStat1(levelFrom),
|
||||
((Ring) toUpgrade).upgradeStat1(levelTo),
|
||||
bottom);
|
||||
}
|
||||
if (((Ring) toUpgrade).upgradeStat2(levelFrom) != null) {
|
||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_2"),
|
||||
((Ring) toUpgrade).upgradeStat2(levelFrom),
|
||||
((Ring) toUpgrade).upgradeStat2(levelTo),
|
||||
bottom);
|
||||
}
|
||||
if (((Ring) toUpgrade).upgradeStat3(levelFrom) != null) {
|
||||
bottom = fillFields(Messages.get(toUpgrade, "upgrade_stat_name_3"),
|
||||
((Ring) toUpgrade).upgradeStat3(levelFrom),
|
||||
((Ring) toUpgrade).upgradeStat3(levelTo),
|
||||
bottom);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +319,11 @@ public class WndUpgrade extends Window {
|
||||
|
||||
//warning relating to identification
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user