From 64690e989edd622115cc51cf5d0bb8379afa8e48 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 16 Oct 2017 14:41:23 +0000 Subject: [PATCH] Addition of BonusDropAmount effect. --- .../scripts/handlers/EffectMasterHandler.java | 1 + .../handlers/bypasshandlers/NpcViewMod.java | 7 +++++ .../communityboard/DropSearchBoard.java | 7 +++++ .../effecthandlers/BonusDropAmount.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../model/actor/templates/L2NpcTemplate.java | 7 +++++ .../gameserver/model/stats/Stats.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../handlers/bypasshandlers/NpcViewMod.java | 7 +++++ .../communityboard/DropSearchBoard.java | 7 +++++ .../effecthandlers/BonusDropAmount.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../model/actor/templates/L2NpcTemplate.java | 7 +++++ .../gameserver/model/stats/Stats.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../handlers/bypasshandlers/NpcViewMod.java | 7 +++++ .../communityboard/DropSearchBoard.java | 7 +++++ .../effecthandlers/BonusDropAmount.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../model/actor/templates/L2NpcTemplate.java | 7 +++++ .../gameserver/model/stats/Stats.java | 1 + .../scripts/handlers/EffectMasterHandler.java | 1 + .../handlers/bypasshandlers/NpcViewMod.java | 7 +++++ .../communityboard/DropSearchBoard.java | 7 +++++ .../effecthandlers/BonusDropAmount.java | 31 +++++++++++++++++++ .../game/data/stats/skills/documentation.txt | 1 + .../model/actor/templates/L2NpcTemplate.java | 7 +++++ .../gameserver/model/stats/Stats.java | 1 + 28 files changed, 220 insertions(+) create mode 100644 L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java create mode 100644 L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java create mode 100644 L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java create mode 100644 L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java index 51bb65fc0c..1ebf0e8079 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -59,6 +59,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("BlockSkill", BlockSkill::new); EffectHandler.getInstance().registerHandler("BlockTarget", BlockTarget::new); EffectHandler.getInstance().registerHandler("Bluff", Bluff::new); + EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new); EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new); EffectHandler.getInstance().registerHandler("Breath", Breath::new); EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 51b94e523e..9d944500a0 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -401,6 +401,7 @@ public class NpcViewMod implements IBypassHandler int leftHeight = 0; int rightHeight = 0; + final double dropAmountEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0); final StringBuilder leftSb = new StringBuilder(); final StringBuilder rightSb = new StringBuilder(); @@ -502,6 +503,12 @@ public class NpcViewMod implements IBypassHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index d6833be10e..2c04a03e34 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -168,6 +168,7 @@ public class DropSearchBoard implements IParseBoardHandler int start = (page - 1) * 14; int end = Math.min(list.size() - 1, start + 14); StringBuilder builder = new StringBuilder(); + final double dropAmountEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0); for (int index = start; index <= end; index++) { @@ -264,6 +265,12 @@ public class DropSearchBoard implements IParseBoardHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java new file mode 100644 index 0000000000..7cbb23bff2 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java @@ -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 . + */ +package handlers.effecthandlers; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.stats.Stats; + +/** + * @author Mobius + */ +public class BonusDropAmount extends AbstractStatEffect +{ + public BonusDropAmount(StatsSet params) + { + super(params, Stats.BONUS_DROP_AMOUNT); + } +} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt index 2a690da14d..3abbd62768 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt @@ -27,6 +27,7 @@ BlockResurrection: Blocked target from getting ressurected. BlockSkill: Blocks usage of given skill magic types. Identity Crysis. BlockTarget: Causes the target to become untargetable. Bluff: Rotates the target so you face its back. +BonusDropAmount: Bonus amount for dropped items. (l2jmobius) BonusDropRate: Bonus chance for dropping items. (l2jmobius) Breath: Underwater breathing stat. BuffBlock: Blocks target from receiving buffs. diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 2c8322ea65..969b711b60 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -765,6 +765,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable } } + // bonus drop amount effect + final double dropAmountEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // finally return new ItemHolder(dropItem.getItemId(), (long) (Rnd.get(dropItem.getMin(), dropItem.getMax()) * rateAmount)); } diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java index ef15c95559..70305dd3c9 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/stats/Stats.java @@ -130,6 +130,7 @@ public enum Stats EXPSP_RATE("rExp"), BONUS_EXP("bonusExp"), BONUS_SP("bonusSp"), + BONUS_DROP_AMOUNT("bonusDropAmount"), BONUS_DROP_RATE("bonusDropRate"), ATTACK_CANCEL("cancel"), diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java index 51bb65fc0c..1ebf0e8079 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -59,6 +59,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("BlockSkill", BlockSkill::new); EffectHandler.getInstance().registerHandler("BlockTarget", BlockTarget::new); EffectHandler.getInstance().registerHandler("Bluff", Bluff::new); + EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new); EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new); EffectHandler.getInstance().registerHandler("Breath", Breath::new); EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 51b94e523e..9d944500a0 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -401,6 +401,7 @@ public class NpcViewMod implements IBypassHandler int leftHeight = 0; int rightHeight = 0; + final double dropAmountEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0); final StringBuilder leftSb = new StringBuilder(); final StringBuilder rightSb = new StringBuilder(); @@ -502,6 +503,12 @@ public class NpcViewMod implements IBypassHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index d6833be10e..2c04a03e34 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -168,6 +168,7 @@ public class DropSearchBoard implements IParseBoardHandler int start = (page - 1) * 14; int end = Math.min(list.size() - 1, start + 14); StringBuilder builder = new StringBuilder(); + final double dropAmountEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0); for (int index = start; index <= end; index++) { @@ -264,6 +265,12 @@ public class DropSearchBoard implements IParseBoardHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java new file mode 100644 index 0000000000..7cbb23bff2 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java @@ -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 . + */ +package handlers.effecthandlers; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.stats.Stats; + +/** + * @author Mobius + */ +public class BonusDropAmount extends AbstractStatEffect +{ + public BonusDropAmount(StatsSet params) + { + super(params, Stats.BONUS_DROP_AMOUNT); + } +} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt index 2a690da14d..3abbd62768 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt @@ -27,6 +27,7 @@ BlockResurrection: Blocked target from getting ressurected. BlockSkill: Blocks usage of given skill magic types. Identity Crysis. BlockTarget: Causes the target to become untargetable. Bluff: Rotates the target so you face its back. +BonusDropAmount: Bonus amount for dropped items. (l2jmobius) BonusDropRate: Bonus chance for dropping items. (l2jmobius) Breath: Underwater breathing stat. BuffBlock: Blocks target from receiving buffs. diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 2c8322ea65..969b711b60 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -765,6 +765,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable } } + // bonus drop amount effect + final double dropAmountEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // finally return new ItemHolder(dropItem.getItemId(), (long) (Rnd.get(dropItem.getMin(), dropItem.getMax()) * rateAmount)); } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java index ef15c95559..70305dd3c9 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/stats/Stats.java @@ -130,6 +130,7 @@ public enum Stats EXPSP_RATE("rExp"), BONUS_EXP("bonusExp"), BONUS_SP("bonusSp"), + BONUS_DROP_AMOUNT("bonusDropAmount"), BONUS_DROP_RATE("bonusDropRate"), ATTACK_CANCEL("cancel"), diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java index 51bb65fc0c..1ebf0e8079 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -59,6 +59,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("BlockSkill", BlockSkill::new); EffectHandler.getInstance().registerHandler("BlockTarget", BlockTarget::new); EffectHandler.getInstance().registerHandler("Bluff", Bluff::new); + EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new); EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new); EffectHandler.getInstance().registerHandler("Breath", Breath::new); EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 51b94e523e..9d944500a0 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -401,6 +401,7 @@ public class NpcViewMod implements IBypassHandler int leftHeight = 0; int rightHeight = 0; + final double dropAmountEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0); final StringBuilder leftSb = new StringBuilder(); final StringBuilder rightSb = new StringBuilder(); @@ -502,6 +503,12 @@ public class NpcViewMod implements IBypassHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index d6833be10e..2c04a03e34 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -168,6 +168,7 @@ public class DropSearchBoard implements IParseBoardHandler int start = (page - 1) * 14; int end = Math.min(list.size() - 1, start + 14); StringBuilder builder = new StringBuilder(); + final double dropAmountEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0); for (int index = start; index <= end; index++) { @@ -264,6 +265,12 @@ public class DropSearchBoard implements IParseBoardHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java new file mode 100644 index 0000000000..7cbb23bff2 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java @@ -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 . + */ +package handlers.effecthandlers; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.stats.Stats; + +/** + * @author Mobius + */ +public class BonusDropAmount extends AbstractStatEffect +{ + public BonusDropAmount(StatsSet params) + { + super(params, Stats.BONUS_DROP_AMOUNT); + } +} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt index 2a690da14d..3abbd62768 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt @@ -27,6 +27,7 @@ BlockResurrection: Blocked target from getting ressurected. BlockSkill: Blocks usage of given skill magic types. Identity Crysis. BlockTarget: Causes the target to become untargetable. Bluff: Rotates the target so you face its back. +BonusDropAmount: Bonus amount for dropped items. (l2jmobius) BonusDropRate: Bonus chance for dropping items. (l2jmobius) Breath: Underwater breathing stat. BuffBlock: Blocks target from receiving buffs. diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 2c8322ea65..969b711b60 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -765,6 +765,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable } } + // bonus drop amount effect + final double dropAmountEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // finally return new ItemHolder(dropItem.getItemId(), (long) (Rnd.get(dropItem.getMin(), dropItem.getMax()) * rateAmount)); } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java index ef15c95559..70305dd3c9 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/stats/Stats.java @@ -130,6 +130,7 @@ public enum Stats EXPSP_RATE("rExp"), BONUS_EXP("bonusExp"), BONUS_SP("bonusSp"), + BONUS_DROP_AMOUNT("bonusDropAmount"), BONUS_DROP_RATE("bonusDropRate"), ATTACK_CANCEL("cancel"), diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java index 51bb65fc0c..1ebf0e8079 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -59,6 +59,7 @@ public final class EffectMasterHandler EffectHandler.getInstance().registerHandler("BlockSkill", BlockSkill::new); EffectHandler.getInstance().registerHandler("BlockTarget", BlockTarget::new); EffectHandler.getInstance().registerHandler("Bluff", Bluff::new); + EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new); EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new); EffectHandler.getInstance().registerHandler("Breath", Breath::new); EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index 51b94e523e..9d944500a0 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -401,6 +401,7 @@ public class NpcViewMod implements IBypassHandler int leftHeight = 0; int rightHeight = 0; + final double dropAmountEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0); final StringBuilder leftSb = new StringBuilder(); final StringBuilder rightSb = new StringBuilder(); @@ -502,6 +503,12 @@ public class NpcViewMod implements IBypassHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java index d6833be10e..2c04a03e34 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/communityboard/DropSearchBoard.java @@ -168,6 +168,7 @@ public class DropSearchBoard implements IParseBoardHandler int start = (page - 1) * 14; int end = Math.min(list.size() - 1, start + 14); StringBuilder builder = new StringBuilder(); + final double dropAmountEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); final double dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0); for (int index = start; index <= end; index++) { @@ -264,6 +265,12 @@ public class DropSearchBoard implements IParseBoardHandler } } + // bonus drop amount effect + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // bonus drop rate effect if (dropRateEffectBonus > 0) { diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java new file mode 100644 index 0000000000..7cbb23bff2 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BonusDropAmount.java @@ -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 . + */ +package handlers.effecthandlers; + +import com.l2jmobius.gameserver.model.StatsSet; +import com.l2jmobius.gameserver.model.stats.Stats; + +/** + * @author Mobius + */ +public class BonusDropAmount extends AbstractStatEffect +{ + public BonusDropAmount(StatsSet params) + { + super(params, Stats.BONUS_DROP_AMOUNT); + } +} diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt index 2a690da14d..3abbd62768 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt @@ -27,6 +27,7 @@ BlockResurrection: Blocked target from getting ressurected. BlockSkill: Blocks usage of given skill magic types. Identity Crysis. BlockTarget: Causes the target to become untargetable. Bluff: Rotates the target so you face its back. +BonusDropAmount: Bonus amount for dropped items. (l2jmobius) BonusDropRate: Bonus chance for dropping items. (l2jmobius) Breath: Underwater breathing stat. BuffBlock: Blocks target from receiving buffs. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java index 2c8322ea65..969b711b60 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/actor/templates/L2NpcTemplate.java @@ -765,6 +765,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable } } + // bonus drop amount effect + final double dropAmountEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 0); + if (dropAmountEffectBonus > 0) + { + rateAmount += rateAmount * dropAmountEffectBonus; + } + // finally return new ItemHolder(dropItem.getItemId(), (long) (Rnd.get(dropItem.getMin(), dropItem.getMax()) * rateAmount)); } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java index ef15c95559..70305dd3c9 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/stats/Stats.java @@ -130,6 +130,7 @@ public enum Stats EXPSP_RATE("rExp"), BONUS_EXP("bonusExp"), BONUS_SP("bonusSp"), + BONUS_DROP_AMOUNT("bonusDropAmount"), BONUS_DROP_RATE("bonusDropRate"), ATTACK_CANCEL("cancel"),