Fixed VitalityConsumeByBoss configuration.
Contributed by nasseka.
This commit is contained in:
@@ -1797,7 +1797,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1738,7 +1738,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1738,7 +1738,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1738,7 +1738,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1724,7 +1724,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1724,7 +1724,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1724,7 +1724,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1735,7 +1735,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1735,7 +1735,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1735,7 +1735,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1735,7 +1735,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1730,7 +1730,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1730,7 +1730,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1730,7 +1730,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1751,7 +1751,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1751,7 +1751,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1751,7 +1751,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1784,7 +1784,7 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1756,13 +1756,12 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
final int points = Math.max((int) ((exp / (isBoss ? Config.VITALITY_CONSUME_BY_BOSS : Config.VITALITY_CONSUME_BY_MOB)) * Math.max(level - getLevel(), 1)), level < 40 ? 5 : 100);
|
||||
|
||||
return -points;
|
||||
}
|
||||
|
||||
|
@@ -1761,13 +1761,12 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
final int points = Math.max((int) ((exp / (isBoss ? Config.VITALITY_CONSUME_BY_BOSS : Config.VITALITY_CONSUME_BY_MOB)) * Math.max(level - getLevel(), 1)), level < 40 ? 5 : 100);
|
||||
|
||||
return -points;
|
||||
}
|
||||
|
||||
|
@@ -1761,13 +1761,12 @@ public class Attackable extends Npc
|
||||
*/
|
||||
public int getVitalityPoints(int level, double exp, boolean isBoss)
|
||||
{
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0))
|
||||
if ((getLevel() <= 0) || (getExpReward() <= 0) || (isBoss && (Config.VITALITY_CONSUME_BY_BOSS == 0)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
final int points = Math.max((int) ((exp / (isBoss ? Config.VITALITY_CONSUME_BY_BOSS : Config.VITALITY_CONSUME_BY_MOB)) * Math.max(level - getLevel(), 1)), level < 40 ? 5 : 100);
|
||||
|
||||
return -points;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user