Addition of BonusDropRate effect handler.
This commit is contained in:
@@ -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("BonusDropRate", BonusDropRate::new);
|
||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new);
|
||||
EffectHandler.getInstance().registerHandler("CallParty", CallParty::new);
|
||||
|
@@ -37,6 +37,7 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.util.HtmlUtil;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@@ -400,6 +401,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
|
||||
int leftHeight = 0;
|
||||
int rightHeight = 0;
|
||||
final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
final StringBuilder leftSb = new StringBuilder();
|
||||
final StringBuilder rightSb = new StringBuilder();
|
||||
String limitReachedMsg = "";
|
||||
@@ -499,6 +501,12 @@ public class NpcViewMod implements IBypassHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
|
@@ -40,6 +40,7 @@ import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
|
||||
/**
|
||||
* @author yksdtc
|
||||
@@ -167,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 dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
for (int index = start; index <= end; index++)
|
||||
{
|
||||
CBDropHolder cbDropHolder = list.get(index);
|
||||
@@ -261,6 +263,12 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
builder.append("<tr>");
|
||||
|
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal file
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal 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 BonusDropRate extends AbstractStatEffect
|
||||
{
|
||||
public BonusDropRate(StatsSet params)
|
||||
{
|
||||
super(params, Stats.BONUS_DROP_RATE);
|
||||
}
|
||||
}
|
@@ -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.
|
||||
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
||||
Breath: Underwater breathing stat.
|
||||
BuffBlock: Blocks target from receiving buffs.
|
||||
CallParty: Recalls whole party.
|
||||
|
@@ -43,6 +43,7 @@ import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -714,6 +715,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
final double dropRateEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
// calculate if item will drop
|
||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||
{
|
||||
|
@@ -130,6 +130,7 @@ public enum Stats
|
||||
EXPSP_RATE("rExp"),
|
||||
BONUS_EXP("bonusExp"),
|
||||
BONUS_SP("bonusSp"),
|
||||
BONUS_DROP_RATE("bonusDropRate"),
|
||||
ATTACK_CANCEL("cancel"),
|
||||
|
||||
// ACCURACY & RANGE
|
||||
|
@@ -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("BonusDropRate", BonusDropRate::new);
|
||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new);
|
||||
EffectHandler.getInstance().registerHandler("CallParty", CallParty::new);
|
||||
|
@@ -37,6 +37,7 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.util.HtmlUtil;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@@ -400,6 +401,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
|
||||
int leftHeight = 0;
|
||||
int rightHeight = 0;
|
||||
final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
final StringBuilder leftSb = new StringBuilder();
|
||||
final StringBuilder rightSb = new StringBuilder();
|
||||
String limitReachedMsg = "";
|
||||
@@ -499,6 +501,12 @@ public class NpcViewMod implements IBypassHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
|
@@ -40,6 +40,7 @@ import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
|
||||
/**
|
||||
* @author yksdtc
|
||||
@@ -167,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 dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
for (int index = start; index <= end; index++)
|
||||
{
|
||||
CBDropHolder cbDropHolder = list.get(index);
|
||||
@@ -261,6 +263,12 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
builder.append("<tr>");
|
||||
|
31
L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal file
31
L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal 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 BonusDropRate extends AbstractStatEffect
|
||||
{
|
||||
public BonusDropRate(StatsSet params)
|
||||
{
|
||||
super(params, Stats.BONUS_DROP_RATE);
|
||||
}
|
||||
}
|
@@ -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.
|
||||
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
||||
Breath: Underwater breathing stat.
|
||||
BuffBlock: Blocks target from receiving buffs.
|
||||
CallParty: Recalls whole party.
|
||||
|
@@ -43,6 +43,7 @@ import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -714,6 +715,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
final double dropRateEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
// calculate if item will drop
|
||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||
{
|
||||
|
@@ -130,6 +130,7 @@ public enum Stats
|
||||
EXPSP_RATE("rExp"),
|
||||
BONUS_EXP("bonusExp"),
|
||||
BONUS_SP("bonusSp"),
|
||||
BONUS_DROP_RATE("bonusDropRate"),
|
||||
ATTACK_CANCEL("cancel"),
|
||||
|
||||
// ACCURACY & RANGE
|
||||
|
@@ -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("BonusDropRate", BonusDropRate::new);
|
||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new);
|
||||
EffectHandler.getInstance().registerHandler("CallParty", CallParty::new);
|
||||
|
@@ -37,6 +37,7 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.util.HtmlUtil;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@@ -400,6 +401,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
|
||||
int leftHeight = 0;
|
||||
int rightHeight = 0;
|
||||
final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
final StringBuilder leftSb = new StringBuilder();
|
||||
final StringBuilder rightSb = new StringBuilder();
|
||||
String limitReachedMsg = "";
|
||||
@@ -499,6 +501,12 @@ public class NpcViewMod implements IBypassHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
|
@@ -40,6 +40,7 @@ import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
|
||||
/**
|
||||
* @author yksdtc
|
||||
@@ -167,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 dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
for (int index = start; index <= end; index++)
|
||||
{
|
||||
CBDropHolder cbDropHolder = list.get(index);
|
||||
@@ -261,6 +263,12 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
builder.append("<tr>");
|
||||
|
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal file
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal 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 BonusDropRate extends AbstractStatEffect
|
||||
{
|
||||
public BonusDropRate(StatsSet params)
|
||||
{
|
||||
super(params, Stats.BONUS_DROP_RATE);
|
||||
}
|
||||
}
|
@@ -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.
|
||||
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
||||
Breath: Underwater breathing stat.
|
||||
BuffBlock: Blocks target from receiving buffs.
|
||||
CallParty: Recalls whole party.
|
||||
|
@@ -43,6 +43,7 @@ import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -714,6 +715,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
final double dropRateEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
// calculate if item will drop
|
||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||
{
|
||||
|
@@ -130,6 +130,7 @@ public enum Stats
|
||||
EXPSP_RATE("rExp"),
|
||||
BONUS_EXP("bonusExp"),
|
||||
BONUS_SP("bonusSp"),
|
||||
BONUS_DROP_RATE("bonusDropRate"),
|
||||
ATTACK_CANCEL("cancel"),
|
||||
|
||||
// ACCURACY & RANGE
|
||||
|
@@ -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("BonusDropRate", BonusDropRate::new);
|
||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new);
|
||||
EffectHandler.getInstance().registerHandler("CallParty", CallParty::new);
|
||||
|
@@ -37,6 +37,7 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import com.l2jmobius.gameserver.util.HtmlUtil;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
@@ -400,6 +401,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
|
||||
int leftHeight = 0;
|
||||
int rightHeight = 0;
|
||||
final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
final StringBuilder leftSb = new StringBuilder();
|
||||
final StringBuilder rightSb = new StringBuilder();
|
||||
String limitReachedMsg = "";
|
||||
@@ -499,6 +501,12 @@ public class NpcViewMod implements IBypassHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
|
@@ -40,6 +40,7 @@ import com.l2jmobius.gameserver.model.holders.DropHolder;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.spawns.NpcSpawnTemplate;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
|
||||
/**
|
||||
* @author yksdtc
|
||||
@@ -167,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 dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
for (int index = start; index <= end; index++)
|
||||
{
|
||||
CBDropHolder cbDropHolder = list.get(index);
|
||||
@@ -261,6 +263,12 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
rateAmount *= Config.PREMIUM_RATE_DROP_AMOUNT;
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
}
|
||||
|
||||
builder.append("<tr>");
|
||||
|
31
L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal file
31
L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/BonusDropRate.java
vendored
Normal 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 BonusDropRate extends AbstractStatEffect
|
||||
{
|
||||
public BonusDropRate(StatsSet params)
|
||||
{
|
||||
super(params, Stats.BONUS_DROP_RATE);
|
||||
}
|
||||
}
|
@@ -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.
|
||||
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
||||
Breath: Underwater breathing stat.
|
||||
BuffBlock: Blocks target from receiving buffs.
|
||||
CallParty: Recalls whole party.
|
||||
|
@@ -43,6 +43,7 @@ import com.l2jmobius.gameserver.model.interfaces.IIdentifiable;
|
||||
import com.l2jmobius.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.model.skills.Skill;
|
||||
import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
import com.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
@@ -714,6 +715,13 @@ public final class L2NpcTemplate extends L2CharTemplate implements IIdentifiable
|
||||
}
|
||||
}
|
||||
|
||||
// bonus drop rate effect
|
||||
final double dropRateEffectBonus = killer.getStat().getValue(Stats.BONUS_DROP_RATE, 0);
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
// calculate if item will drop
|
||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||
{
|
||||
|
@@ -130,6 +130,7 @@ public enum Stats
|
||||
EXPSP_RATE("rExp"),
|
||||
BONUS_EXP("bonusExp"),
|
||||
BONUS_SP("bonusSp"),
|
||||
BONUS_DROP_RATE("bonusDropRate"),
|
||||
ATTACK_CANCEL("cancel"),
|
||||
|
||||
// ACCURACY & RANGE
|
||||
|
Reference in New Issue
Block a user