Fixed vitality system bonus calculations.
This commit is contained in:
2
trunk/dist/game/config/Rates.ini
vendored
2
trunk/dist/game/config/Rates.ini
vendored
@@ -105,7 +105,7 @@ RateVitalityExpMultiplier = 2.
|
|||||||
# These options are to be used if you want to increase the vitality gain/lost for each mob you kills
|
# These options are to be used if you want to increase the vitality gain/lost for each mob you kills
|
||||||
# Default values are 1.
|
# Default values are 1.
|
||||||
RateVitalityGain = 1.
|
RateVitalityGain = 1.
|
||||||
RateVitalityLost = 1.
|
RateVitalityLost = 0.5
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
@@ -65,7 +65,7 @@ public class PcStat extends PlayableStat
|
|||||||
private boolean _cloakSlot = false;
|
private boolean _cloakSlot = false;
|
||||||
|
|
||||||
public static final int MAX_VITALITY_POINTS = 140000;
|
public static final int MAX_VITALITY_POINTS = 140000;
|
||||||
public static final int MIN_VITALITY_POINTS = 1;
|
public static final int MIN_VITALITY_POINTS = 0;
|
||||||
public static String VITALITY_VARIABLE = "vitality_points";
|
public static String VITALITY_VARIABLE = "vitality_points";
|
||||||
|
|
||||||
public PcStat(L2PcInstance activeChar)
|
public PcStat(L2PcInstance activeChar)
|
||||||
@@ -192,7 +192,7 @@ public class PcStat extends PlayableStat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((addToExp - baseExp) > 0)
|
if (addToExp > baseExp)
|
||||||
{
|
{
|
||||||
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_ACQUIRED_S1_XP_BONUS_S2_AND_S3_SP_BONUS_S4);
|
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_ACQUIRED_S1_XP_BONUS_S2_AND_S3_SP_BONUS_S4);
|
||||||
sm.addLong(addToExp);
|
sm.addLong(addToExp);
|
||||||
@@ -742,7 +742,7 @@ public class PcStat extends PlayableStat
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
points = Math.max(getActiveChar().getVitalityPoints() + points, MIN_VITALITY_POINTS);
|
points = MIN_VITALITY_POINTS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Math.abs(points - getActiveChar().getVitalityPoints()) <= 1e-6)
|
if (Math.abs(points - getActiveChar().getVitalityPoints()) <= 1e-6)
|
||||||
@@ -755,7 +755,7 @@ public class PcStat extends PlayableStat
|
|||||||
|
|
||||||
public double getVitalityMultiplier()
|
public double getVitalityMultiplier()
|
||||||
{
|
{
|
||||||
return Config.ENABLE_VITALITY ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1;
|
return Config.ENABLE_VITALITY && (getActiveChar().getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getExpBonusMultiplier()
|
public double getExpBonusMultiplier()
|
||||||
|
Reference in New Issue
Block a user