Fixed armour so that it properly increments the upgrade points for extended play sessions.

This commit is contained in:
WayofTime 2016-02-20 13:46:53 -05:00
parent 8e8562e5a0
commit c364ebf6ae

View file

@ -78,6 +78,7 @@ public class LivingArmour implements ILivingArmour
if (upgradePointDifference >= 0 && totalUpgradePoints + upgradePointDifference <= maxUpgradePoints) if (upgradePointDifference >= 0 && totalUpgradePoints + upgradePointDifference <= maxUpgradePoints)
{ {
upgradeMap.put(key, upgrade); upgradeMap.put(key, upgrade);
totalUpgradePoints += upgradePointDifference;
notifyPlayerOfUpgrade(user, upgrade); notifyPlayerOfUpgrade(user, upgrade);
return true; return true;
} }
@ -88,6 +89,7 @@ public class LivingArmour implements ILivingArmour
if (totalUpgradePoints + upgradePoints <= maxUpgradePoints) if (totalUpgradePoints + upgradePoints <= maxUpgradePoints)
{ {
upgradeMap.put(key, upgrade); upgradeMap.put(key, upgrade);
totalUpgradePoints += upgradePoints;
notifyPlayerOfUpgrade(user, upgrade); notifyPlayerOfUpgrade(user, upgrade);
return true; return true;
} }