Addition of CraftingCritical effect handler.
This commit is contained in:
@@ -98,6 +98,7 @@ public class EffectMasterHandler
|
||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||
|
||||
@@ -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 Nik
|
||||
*/
|
||||
public class CraftingCritical extends AbstractStatAddEffect
|
||||
{
|
||||
public CraftingCritical(StatSet params)
|
||||
{
|
||||
super(params, Stat.CRAFTING_CRITICAL);
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,7 @@ CpHealPercent: Increases current CP by a given percentage amount.
|
||||
Cp: Increases current CP by a static amount.
|
||||
CpRegen: CP Regeneration stat.
|
||||
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||
CraftingCritical: Crafting critical stat.
|
||||
CriticalDamage: Critical Damage stat.
|
||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||
CriticalRate: Critical Rate stat.
|
||||
|
||||
@@ -661,7 +661,11 @@ public class RecipeManager
|
||||
}
|
||||
}
|
||||
|
||||
_target.getInventory().addItem("Manufacture", itemId, itemCount, _target, _player);
|
||||
final Item item = _target.getInventory().addItem("Manufacture", itemId, itemCount, _target, _player);
|
||||
if (item.isEquipable() && (itemCount == 1) && (Rnd.get(100) < _player.getStat().getValue(Stat.CRAFTING_CRITICAL)))
|
||||
{
|
||||
_target.getInventory().addItem("Manufacture Critical", itemId, itemCount, _target, _player);
|
||||
}
|
||||
|
||||
// inform customer of earned item
|
||||
SystemMessage sm = null;
|
||||
|
||||
@@ -308,6 +308,7 @@ public enum Stat
|
||||
// Which base stat ordinal should alter skill critical formula.
|
||||
STAT_BONUS_SKILL_CRITICAL("statSkillCritical"),
|
||||
STAT_BONUS_SPEED("statSpeed"),
|
||||
CRAFTING_CRITICAL("craftingCritical"),
|
||||
SHOTS_BONUS("shotBonus", new ShotsBonusFinalizer()),
|
||||
WORLD_CHAT_POINTS("worldChatPoints"),
|
||||
ATTACK_DAMAGE("attackDamage"),
|
||||
|
||||
Reference in New Issue
Block a user