Addition of BonusDropRateLCoin effect.

This commit is contained in:
MobiusDevelopment 2021-10-18 22:35:00 +00:00
parent 81961bb91d
commit 20f3d3114d
16 changed files with 98 additions and 0 deletions

View File

@ -69,6 +69,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("BonusDropRateLCoin", BonusDropRateLCoin::new);
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
EffectHandler.getInstance().registerHandler("Breath", Breath::new);

View File

@ -500,6 +500,10 @@ public class NpcViewMod implements IBypassHandler
}
// bonus drop rate effect
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\">");

View File

@ -278,6 +278,10 @@ public class DropSearchBoard implements IParseBoardHandler
}
// bonus drop rate effect
rateChance *= dropRateEffectBonus;
if (item.getId() == Inventory.LCOIN_ID)
{
rateChance *= player.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
}
}
builder.append("<tr>");

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 BonusDropRateLCoin extends AbstractStatPercentEffect
{
public BonusDropRateLCoin(StatSet params)
{
super(params, Stat.BONUS_DROP_RATE_LCOIN);
}
}

View File

@ -216,6 +216,9 @@
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<effects>
<effect name="BonusDropRateLCoin">
<amount>100</amount>
</effect>
<effect name="ExpModify">
<amount>
<value level="1">10</value>

View File

@ -39,6 +39,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)
BonusDropRateLCoin: Bonus chance for LCoins. (l2jmobius)
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
Breath: Underwater breathing stat.

View File

@ -849,6 +849,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
// bonus drop rate effect
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
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))

View File

@ -166,6 +166,7 @@ public enum Stat
BONUS_DROP_ADENA("bonusDropAdena"),
BONUS_DROP_AMOUNT("bonusDropAmount"),
BONUS_DROP_RATE("bonusDropRate"),
BONUS_DROP_RATE_LCOIN("bonusDropRateLCoin"),
BONUS_SPOIL_RATE("bonusSpoilRate"),
BONUS_RAID_POINTS("bonusRaidPoints"),
ATTACK_CANCEL("cancel"),

View File

@ -69,6 +69,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("BonusDropRateLCoin", BonusDropRateLCoin::new);
EffectHandler.getInstance().registerHandler("BonusRaidPoints", BonusRaidPoints::new);
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
EffectHandler.getInstance().registerHandler("Breath", Breath::new);

View File

@ -500,6 +500,10 @@ public class NpcViewMod implements IBypassHandler
}
// bonus drop rate effect
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\">");

View File

@ -278,6 +278,10 @@ public class DropSearchBoard implements IParseBoardHandler
}
// bonus drop rate effect
rateChance *= dropRateEffectBonus;
if (item.getId() == Inventory.LCOIN_ID)
{
rateChance *= player.getStat().getMul(Stat.BONUS_DROP_RATE_LCOIN, 1);
}
}
builder.append("<tr>");

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 BonusDropRateLCoin extends AbstractStatPercentEffect
{
public BonusDropRateLCoin(StatSet params)
{
super(params, Stat.BONUS_DROP_RATE_LCOIN);
}
}

View File

@ -216,6 +216,9 @@
<magicCriticalRate>5</magicCriticalRate>
<hitCancelTime>0</hitCancelTime>
<effects>
<effect name="BonusDropRateLCoin">
<amount>100</amount>
</effect>
<effect name="ExpModify">
<amount>
<value level="1">10</value>

View File

@ -39,6 +39,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)
BonusDropRateLCoin: Bonus chance for LCoins. (l2jmobius)
BonusRaidPoints: Bonus amount for raid points. (l2jmobius)
BonusSpoilRate: Bonus chance for acquiring spoil items. (l2jmobius)
Breath: Underwater breathing stat.

View File

@ -849,6 +849,10 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
// bonus drop rate effect
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
if ((Rnd.nextDouble() * 100) < (dropItem.getChance() * rateChance))

View File

@ -166,6 +166,7 @@ public enum Stat
BONUS_DROP_ADENA("bonusDropAdena"),
BONUS_DROP_AMOUNT("bonusDropAmount"),
BONUS_DROP_RATE("bonusDropRate"),
BONUS_DROP_RATE_LCOIN("bonusDropRateLCoin"),
BONUS_SPOIL_RATE("bonusSpoilRate"),
BONUS_RAID_POINTS("bonusRaidPoints"),
ATTACK_CANCEL("cancel"),