Sfoglia il codice sorgente

Adding/removing augmentation bonuses for armor too (will be needed for accessory augmentation).

_DS_ 15 anni fa
parent
commit
64f504b726

+ 8 - 0
L2_GameServer/java/net/sf/l2j/gameserver/model/itemcontainer/Inventory.java

@@ -342,6 +342,10 @@ public abstract class Inventory extends ItemContainer
 			}
 			else if (it instanceof L2Armor)
 			{
+				// Remove augmentation bonuses on unequip
+				if (item.isAugmented())
+					item.getAugmentation().removeBonus(player);
+
 				if (item.getElementals() != null)
 					item.getElementals().removeBonus(player);
 				
@@ -488,6 +492,10 @@ public abstract class Inventory extends ItemContainer
 			}
 			else if (it instanceof L2Armor)
 			{
+				// Apply augmentation bonuses on equip
+				if (item.isAugmented()) 
+					item.getAugmentation().applyBonus(player); 
+				
 				if (item.getElementals() != null)
 					item.getElementals().applyBonus(player, true);