Addition of BonusDropRateLCoin effect.
This commit is contained in:
@@ -69,6 +69,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("BonusDropAdena", BonusDropAdena::new);
|
EffectHandler.getInstance().registerHandler("BonusDropAdena", BonusDropAdena::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
|
EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
|
EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("BonusDropRateLCoin", BonusDropRateLCoin::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
|
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
|
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||||
|
|||||||
@@ -500,6 +500,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= dropRateEffectBonus;
|
rateChance *= dropRateEffectBonus;
|
||||||
|
if (item.getId() == Inventory.LCOIN_ID)
|
||||||
|
{
|
||||||
|
rateChance *= player.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||||
|
|||||||
@@ -278,6 +278,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= dropRateEffectBonus;
|
rateChance *= dropRateEffectBonus;
|
||||||
|
if (item.getId() == Inventory.LCOIN_ID)
|
||||||
|
{
|
||||||
|
rateChance *= player.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.append("<tr>");
|
builder.append("<tr>");
|
||||||
|
|||||||
@@ -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 BonusDropRateLCoin extends AbstractStatPercentEffect
|
||||||
|
{
|
||||||
|
public BonusDropRateLCoin(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.BONUS_DROP_RATE_LCOIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -216,6 +216,9 @@
|
|||||||
<magicCriticalRate>5</magicCriticalRate>
|
<magicCriticalRate>5</magicCriticalRate>
|
||||||
<hitCancelTime>0</hitCancelTime>
|
<hitCancelTime>0</hitCancelTime>
|
||||||
<effects>
|
<effects>
|
||||||
|
<effect name="BonusDropRateLCoin">
|
||||||
|
<amount>100</amount>
|
||||||
|
</effect>
|
||||||
<effect name="ExpModify">
|
<effect name="ExpModify">
|
||||||
<amount>
|
<amount>
|
||||||
<value level="1">10</value>
|
<value level="1">10</value>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ Bluff: Rotates the target so you face its back.
|
|||||||
BonusDropAdena: Bonus amount for dropped adena. (l2jmobius)
|
BonusDropAdena: Bonus amount for dropped adena. (l2jmobius)
|
||||||
BonusDropAmount: Bonus amount for dropped items. (l2jmobius)
|
BonusDropAmount: Bonus amount for dropped items. (l2jmobius)
|
||||||
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
||||||
|
BonusDropRateLCoin: Bonus chance for LCoins. (l2jmobius)
|
||||||
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
|
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
|
||||||
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
|
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
|
||||||
Breath: Underwater breathing stat.
|
Breath: Underwater breathing stat.
|
||||||
|
|||||||
@@ -849,6 +849,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
if (item.getId() == Inventory.LCOIN_ID)
|
||||||
|
{
|
||||||
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ public enum Stat
|
|||||||
BONUS_DROP_ADENA("bonusDropAdena"),
|
BONUS_DROP_ADENA("bonusDropAdena"),
|
||||||
BONUS_DROP_AMOUNT("bonusDropAmount"),
|
BONUS_DROP_AMOUNT("bonusDropAmount"),
|
||||||
BONUS_DROP_RATE("bonusDropRate"),
|
BONUS_DROP_RATE("bonusDropRate"),
|
||||||
|
BONUS_DROP_RATE_LCOIN("bonusDropRateLCoin"),
|
||||||
BONUS_SPOIL_RATE("bonusSpoilRate"),
|
BONUS_SPOIL_RATE("bonusSpoilRate"),
|
||||||
BONUS_RAID_POINTS("bonusRaidPoints"),
|
BONUS_RAID_POINTS("bonusRaidPoints"),
|
||||||
ATTACK_CANCEL("cancel"),
|
ATTACK_CANCEL("cancel"),
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("BonusDropAdena", BonusDropAdena::new);
|
EffectHandler.getInstance().registerHandler("BonusDropAdena", BonusDropAdena::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
|
EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
|
EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("BonusDropRateLCoin", BonusDropRateLCoin::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
|
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
|
||||||
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
|
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||||
|
|||||||
@@ -500,6 +500,10 @@ public class NpcViewMod implements IBypassHandler
|
|||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= dropRateEffectBonus;
|
rateChance *= dropRateEffectBonus;
|
||||||
|
if (item.getId() == Inventory.LCOIN_ID)
|
||||||
|
{
|
||||||
|
rateChance *= player.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||||
|
|||||||
@@ -278,6 +278,10 @@ public class DropSearchBoard implements IParseBoardHandler
|
|||||||
}
|
}
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= dropRateEffectBonus;
|
rateChance *= dropRateEffectBonus;
|
||||||
|
if (item.getId() == Inventory.LCOIN_ID)
|
||||||
|
{
|
||||||
|
rateChance *= player.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
builder.append("<tr>");
|
builder.append("<tr>");
|
||||||
|
|||||||
@@ -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 BonusDropRateLCoin extends AbstractStatPercentEffect
|
||||||
|
{
|
||||||
|
public BonusDropRateLCoin(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.BONUS_DROP_RATE_LCOIN);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -216,6 +216,9 @@
|
|||||||
<magicCriticalRate>5</magicCriticalRate>
|
<magicCriticalRate>5</magicCriticalRate>
|
||||||
<hitCancelTime>0</hitCancelTime>
|
<hitCancelTime>0</hitCancelTime>
|
||||||
<effects>
|
<effects>
|
||||||
|
<effect name="BonusDropRateLCoin">
|
||||||
|
<amount>100</amount>
|
||||||
|
</effect>
|
||||||
<effect name="ExpModify">
|
<effect name="ExpModify">
|
||||||
<amount>
|
<amount>
|
||||||
<value level="1">10</value>
|
<value level="1">10</value>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ Bluff: Rotates the target so you face its back.
|
|||||||
BonusDropAdena: Bonus amount for dropped adena. (l2jmobius)
|
BonusDropAdena: Bonus amount for dropped adena. (l2jmobius)
|
||||||
BonusDropAmount: Bonus amount for dropped items. (l2jmobius)
|
BonusDropAmount: Bonus amount for dropped items. (l2jmobius)
|
||||||
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
BonusDropRate: Bonus chance for dropping items. (l2jmobius)
|
||||||
|
BonusDropRateLCoin: Bonus chance for LCoins. (l2jmobius)
|
||||||
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
|
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
|
||||||
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
|
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
|
||||||
Breath: Underwater breathing stat.
|
Breath: Underwater breathing stat.
|
||||||
|
|||||||
@@ -849,6 +849,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
|||||||
|
|
||||||
// bonus drop rate effect
|
// bonus drop rate effect
|
||||||
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE, 1);
|
||||||
|
if (item.getId() == Inventory.LCOIN_ID)
|
||||||
|
{
|
||||||
|
rateChance *= killer.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// calculate if item will drop
|
// calculate if item will drop
|
||||||
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))
|
||||||
|
|||||||
@@ -166,6 +166,7 @@ public enum Stat
|
|||||||
BONUS_DROP_ADENA("bonusDropAdena"),
|
BONUS_DROP_ADENA("bonusDropAdena"),
|
||||||
BONUS_DROP_AMOUNT("bonusDropAmount"),
|
BONUS_DROP_AMOUNT("bonusDropAmount"),
|
||||||
BONUS_DROP_RATE("bonusDropRate"),
|
BONUS_DROP_RATE("bonusDropRate"),
|
||||||
|
BONUS_DROP_RATE_LCOIN("bonusDropRateLCoin"),
|
||||||
BONUS_SPOIL_RATE("bonusSpoilRate"),
|
BONUS_SPOIL_RATE("bonusSpoilRate"),
|
||||||
BONUS_RAID_POINTS("bonusRaidPoints"),
|
BONUS_RAID_POINTS("bonusRaidPoints"),
|
||||||
ATTACK_CANCEL("cancel"),
|
ATTACK_CANCEL("cancel"),
|
||||||
|
|||||||
Reference in New Issue
Block a user