mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2025-01-10 07:47:35 +01:00
Add upgrade stats check
if upgraded item doesn't have the stat specified in the template, it wouldn't add the stat to the item
This commit is contained in:
parent
e161801662
commit
39520155b0
@ -60,9 +60,9 @@ public class UpgradeTemplate {
|
||||
return stats.get(stat);
|
||||
}
|
||||
|
||||
public void upgrade(MMOItem mmoitem, UpgradeData upgrade) {
|
||||
public void upgrade(MMOItem mmoitem) {
|
||||
for (ItemStat stat : stats.keySet())
|
||||
// if (mmoitem.hasData(stat))
|
||||
((Upgradable) stat).apply(mmoitem, stats.get(stat));
|
||||
if (mmoitem.hasData(stat))
|
||||
((Upgradable) stat).apply(mmoitem, stats.get(stat));
|
||||
}
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ public class Upgrade_Stat extends ItemStat {
|
||||
}
|
||||
|
||||
// apply stat updates
|
||||
getTemplate().upgrade(mmoitem, this);
|
||||
getTemplate().upgrade(mmoitem);
|
||||
|
||||
// increase the level
|
||||
level++;
|
||||
|
Loading…
Reference in New Issue
Block a user