Addition of VitalityExpRate effect handler.

This commit is contained in:
MobiusDev 2017-09-22 19:47:49 +00:00
parent 9532027f0e
commit c5cbd4100e
20 changed files with 140 additions and 4 deletions

View File

@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.stats.Stats;
/**
* @author Mobius
*/
public class VitalityExpRate extends AbstractStatEffect
{
public VitalityExpRate(StatsSet params)
{
super(params, Stats.VITALITY_EXP_RATE);
}
}

View File

@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.

View File

@ -474,7 +474,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)

View File

@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),

View File

@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.stats.Stats;
/**
* @author Mobius
*/
public class VitalityExpRate extends AbstractStatEffect
{
public VitalityExpRate(StatsSet params)
{
super(params, Stats.VITALITY_EXP_RATE);
}
}

View File

@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.

View File

@ -476,7 +476,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)

View File

@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),

View File

@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.stats.Stats;
/**
* @author Mobius
*/
public class VitalityExpRate extends AbstractStatEffect
{
public VitalityExpRate(StatsSet params)
{
super(params, Stats.VITALITY_EXP_RATE);
}
}

View File

@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.

View File

@ -476,7 +476,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)

View File

@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),

View File

@ -342,6 +342,7 @@ public final class EffectMasterHandler
EffectHandler.getInstance().registerHandler("Untargetable", Untargetable::new);
EffectHandler.getInstance().registerHandler("VampiricAttack", VampiricAttack::new);
EffectHandler.getInstance().registerHandler("VampiricDefence", VampiricDefence::new);
EffectHandler.getInstance().registerHandler("VitalityExpRate", VitalityExpRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointsRate", VitalityPointsRate::new);
EffectHandler.getInstance().registerHandler("VitalityPointUp", VitalityPointUp::new);
EffectHandler.getInstance().registerHandler("WeightLimit", WeightLimit::new);

View File

@ -0,0 +1,31 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package handlers.effecthandlers;
import com.l2jmobius.gameserver.model.StatsSet;
import com.l2jmobius.gameserver.model.stats.Stats;
/**
* @author Mobius
*/
public class VitalityExpRate extends AbstractStatEffect
{
public VitalityExpRate(StatsSet params)
{
super(params, Stats.VITALITY_EXP_RATE);
}
}

View File

@ -308,6 +308,7 @@ UnsummonServitors: Unsummons target servitors.
Untargetable: Becomes untargetable.
VampiricAttack: Increases current HP when dealing damage.
VampiricDefence: Resist stat towards VampiricAttack
VitalityExpRate: Sets the vitality exp rate. (l2jmobius)
VitalityPointsRate: Vitality points consume rate.
VitalityPointUp: Increases vitality points.
WeightLimit: Maximum weight stat.

View File

@ -476,7 +476,7 @@ public class PcStat extends PlayableStat
public double getVitalityExpBonus()
{
return (getVitalityPoints() > 0) ? Config.RATE_VITALITY_EXP_MULTIPLIER : 1.0;
return (getVitalityPoints() > 0) ? getValue(Stats.VITALITY_EXP_RATE, Config.RATE_VITALITY_EXP_MULTIPLIER) : 1.0;
}
public void setVitalityPoints(int value)

View File

@ -223,6 +223,7 @@ public enum Stats
// Vitality
VITALITY_CONSUME_RATE("vitalityConsumeRate"),
VITALITY_EXP_RATE("vitalityExpRate"),
// Souls
MAX_SOULS("maxSouls"),