Addition of BonusDropAmount effect.

This commit is contained in:
MobiusDev
2017-10-16 14:41:23 +00:00
parent 239ff51f88
commit 64690e989e
28 changed files with 220 additions and 0 deletions

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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)
{

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 BonusDropAmount extends AbstractStatEffect
{
public BonusDropAmount(StatsSet params)
{
super(params, Stats.BONUS_DROP_AMOUNT);
}
}

View File

@@ -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.

View File

@@ -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));
}

View File

@@ -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"),

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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)
{

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 BonusDropAmount extends AbstractStatEffect
{
public BonusDropAmount(StatsSet params)
{
super(params, Stats.BONUS_DROP_AMOUNT);
}
}

View File

@@ -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.

View File

@@ -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));
}

View File

@@ -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"),

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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)
{

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 BonusDropAmount extends AbstractStatEffect
{
public BonusDropAmount(StatsSet params)
{
super(params, Stats.BONUS_DROP_AMOUNT);
}
}

View File

@@ -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.

View File

@@ -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));
}

View File

@@ -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"),

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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)
{

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 BonusDropAmount extends AbstractStatEffect
{
public BonusDropAmount(StatsSet params)
{
super(params, Stats.BONUS_DROP_AMOUNT);
}
}

View File

@@ -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.

View File

@@ -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));
}

View File

@@ -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"),