Addition of BonusRaidPoints effect handler.

This commit is contained in:
MobiusDevelopment
2021-09-13 13:08:53 +00:00
parent fd4ad348ab
commit 4baa29f4a0
72 changed files with 528 additions and 24 deletions

View File

@@ -68,6 +68,7 @@ public class EffectMasterHandler
EffectHandler.getInstance().registerHandler("BonusDropAdena", BonusDropAdena::new);
EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::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 org.l2jmobius.gameserver.model.StatSet;
import org.l2jmobius.gameserver.model.stats.Stat;
/**
* @author Mobius
*/
public class BonusRaidPoints extends AbstractStatPercentEffect
{
public BonusRaidPoints(StatSet params)
{
super(params, Stat.BONUS_RAID_POINTS);
}
}

View File

@@ -38,6 +38,7 @@ Bluff: Rotates the target so you face its back.
BonusDropAdena: Bonus amount for dropped adena. (l2jmobius)
BonusDropAmount: Bonus amount for dropped items. (l2jmobius)
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
Breath: Underwater breathing stat.
BuffBlock: Blocks target from receiving buffs.

View File

@@ -484,7 +484,7 @@ public class Attackable extends Npc
members.forEach(p ->
{
final int points = Math.max(raidbossPoints / members.size(), 1);
final int points = (int) (Math.max(raidbossPoints / members.size(), 1) * p.getStat().getValue(Stat.BONUS_RAID_POINTS, 1));
p.increaseRaidbossPoints(points);
p.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1_RAID_POINT_S).addInt(points));
if (p.isNoble())
@@ -495,7 +495,7 @@ public class Attackable extends Npc
}
else
{
final int points = Math.max(raidbossPoints, 1);
final int points = (int) (Math.max(raidbossPoints, 1) * player.getStat().getValue(Stat.BONUS_RAID_POINTS, 1));
player.increaseRaidbossPoints(points);
player.sendPacket(new SystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1_RAID_POINT_S).addInt(points));
if (player.isNoble())

View File

@@ -162,6 +162,7 @@ public enum Stat
BONUS_DROP_AMOUNT("bonusDropAmount"),
BONUS_DROP_RATE("bonusDropRate"),
BONUS_SPOIL_RATE("bonusSpoilRate"),
BONUS_RAID_POINTS("bonusRaidPoints"),
ATTACK_CANCEL("cancel"),
// ACCURACY & RANGE