Addition of BonusSpoilRate effect.
This commit is contained in:
@@ -61,6 +61,7 @@ public final class EffectMasterHandler
|
||||
EffectHandler.getInstance().registerHandler("Bluff", Bluff::new);
|
||||
EffectHandler.getInstance().registerHandler("BonusDropAmount", BonusDropAmount::new);
|
||||
EffectHandler.getInstance().registerHandler("BonusDropRate", BonusDropRate::new);
|
||||
EffectHandler.getInstance().registerHandler("BonusSpoilRate", BonusSpoilRate::new);
|
||||
EffectHandler.getInstance().registerHandler("Breath", Breath::new);
|
||||
EffectHandler.getInstance().registerHandler("BuffBlock", BuffBlock::new);
|
||||
EffectHandler.getInstance().registerHandler("CallParty", CallParty::new);
|
||||
|
@@ -401,8 +401,9 @@ 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 double dropAmountEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 1);
|
||||
final double dropRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_DROP_RATE, 1);
|
||||
final double spoilRateEffectBonus = activeChar.getStat().getValue(Stats.BONUS_SPOIL_RATE, 1);
|
||||
final StringBuilder leftSb = new StringBuilder();
|
||||
final StringBuilder rightSb = new StringBuilder();
|
||||
String limitReachedMsg = "";
|
||||
@@ -428,6 +429,9 @@ public class NpcViewMod implements IBypassHandler
|
||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||
rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
|
||||
}
|
||||
|
||||
// bonus spoil rate effect
|
||||
rateChance *= spoilRateEffectBonus;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -504,16 +508,9 @@ public class NpcViewMod implements IBypassHandler
|
||||
}
|
||||
|
||||
// bonus drop amount effect
|
||||
if (dropAmountEffectBonus > 0)
|
||||
{
|
||||
rateAmount += rateAmount * dropAmountEffectBonus;
|
||||
}
|
||||
|
||||
rateAmount *= dropAmountEffectBonus;
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance += rateChance * dropRateEffectBonus;
|
||||
}
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">");
|
||||
|
@@ -168,8 +168,9 @@ 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);
|
||||
final double dropAmountEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_AMOUNT, 1);
|
||||
final double dropRateEffectBonus = player.getStat().getValue(Stats.BONUS_DROP_RATE, 1);
|
||||
final double spoilRateEffectBonus = player.getStat().getValue(Stats.BONUS_SPOIL_RATE, 1);
|
||||
for (int index = start; index <= end; index++)
|
||||
{
|
||||
CBDropHolder cbDropHolder = list.get(index);
|
||||
@@ -188,6 +189,9 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
rateChance *= Config.PREMIUM_RATE_SPOIL_CHANCE;
|
||||
rateAmount *= Config.PREMIUM_RATE_SPOIL_AMOUNT;
|
||||
}
|
||||
|
||||
// bonus spoil rate effect
|
||||
rateChance *= spoilRateEffectBonus;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -266,16 +270,9 @@ public class DropSearchBoard implements IParseBoardHandler
|
||||
}
|
||||
|
||||
// bonus drop amount effect
|
||||
if (dropAmountEffectBonus > 0)
|
||||
{
|
||||
rateAmount += rateAmount * dropAmountEffectBonus;
|
||||
}
|
||||
|
||||
rateAmount *= dropAmountEffectBonus;
|
||||
// bonus drop rate effect
|
||||
if (dropRateEffectBonus > 0)
|
||||
{
|
||||
rateChance += rateChance * dropRateEffectBonus;
|
||||
}
|
||||
rateChance *= dropRateEffectBonus;
|
||||
}
|
||||
|
||||
builder.append("<tr>");
|
||||
|
31
L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusSpoilRate.java
vendored
Normal file
31
L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/BonusSpoilRate.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 BonusSpoilRate extends AbstractStatEffect
|
||||
{
|
||||
public BonusSpoilRate(StatsSet params)
|
||||
{
|
||||
super(params, Stats.BONUS_SPOIL_RATE);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user