Gain HP bonus only from enchanted armor items.
This commit is contained in:
parent
25ff6eca69
commit
e57da86a58
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final int bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final int bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final int bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final int bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final long bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final long bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,6 @@ public enum ArmorType implements ItemType
|
||||
HEAVY,
|
||||
MAGIC,
|
||||
SIGIL,
|
||||
RING,
|
||||
EARRING,
|
||||
NECKLACE,
|
||||
|
||||
// L2J CUSTOM
|
||||
SHIELD;
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final int bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,6 @@ public enum ArmorType implements ItemType
|
||||
HEAVY,
|
||||
MAGIC,
|
||||
SIGIL,
|
||||
RING,
|
||||
EARRING,
|
||||
NECKLACE,
|
||||
|
||||
// L2J CUSTOM
|
||||
SHIELD;
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final int bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,6 @@ public enum ArmorType implements ItemType
|
||||
HEAVY,
|
||||
MAGIC,
|
||||
SIGIL,
|
||||
RING,
|
||||
EARRING,
|
||||
NECKLACE,
|
||||
|
||||
// L2J CUSTOM
|
||||
SHIELD;
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final long bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,9 +26,6 @@ public enum ArmorType implements ItemType
|
||||
HEAVY,
|
||||
MAGIC,
|
||||
SIGIL,
|
||||
RING,
|
||||
EARRING,
|
||||
NECKLACE,
|
||||
|
||||
// L2J CUSTOM
|
||||
SHIELD;
|
||||
|
@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.data.xml.impl.EnchantItemHPBonusData;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PetInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.items.instance.L2ItemInstance;
|
||||
import com.l2jmobius.gameserver.model.stats.BaseStats;
|
||||
import com.l2jmobius.gameserver.model.stats.IStatsFunction;
|
||||
@ -53,7 +54,14 @@ public class MaxHpFinalizer implements IStatsFunction
|
||||
// Apply enchanted item's bonus HP
|
||||
for (L2ItemInstance item : player.getInventory().getPaperdollItems(L2ItemInstance::isEnchanted))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
if (item.isArmor())
|
||||
{
|
||||
final long bodyPart = item.getItem().getBodyPart();
|
||||
if ((bodyPart != L2Item.SLOT_NECK) && (bodyPart != L2Item.SLOT_LR_EAR) && (bodyPart != L2Item.SLOT_LR_FINGER))
|
||||
{
|
||||
baseValue += EnchantItemHPBonusData.getInstance().getHPBonus(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user