diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java index 31f8a7bbc1..73ad1dc613 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -95,6 +95,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt index e7c11ea1b2..e63bfcc34f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/stats/skills/documentation.txt @@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/RecipeController.java index 3eff82009f..37d4ea9698 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if ((Rnd.get(100) < _recipeList.getSuccessRate()) || _target.tryLuck()) + else if ((Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) || _target.tryLuck()) { rewardPlayer(_target); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2ff5850eed..03901690af 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -292,7 +292,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java index 31f8a7bbc1..73ad1dc613 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -95,6 +95,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt index e7c11ea1b2..e63bfcc34f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_2.5_Underground/dist/game/data/stats/skills/documentation.txt @@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/RecipeController.java index 3eff82009f..37d4ea9698 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if ((Rnd.get(100) < _recipeList.getSuccessRate()) || _target.tryLuck()) + else if ((Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) || _target.tryLuck()) { rewardPlayer(_target); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2ff5850eed..03901690af 100644 --- a/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_2.5_Underground/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -292,7 +292,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java index 31f8a7bbc1..73ad1dc613 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -95,6 +95,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt index e7c11ea1b2..e63bfcc34f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_3.0_Helios/dist/game/data/stats/skills/documentation.txt @@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/RecipeController.java index 3eff82009f..37d4ea9698 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if ((Rnd.get(100) < _recipeList.getSuccessRate()) || _target.tryLuck()) + else if ((Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) || _target.tryLuck()) { rewardPlayer(_target); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java index 2ff5850eed..03901690af 100644 --- a/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_3.0_Helios/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -292,7 +292,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java index 8b41772eab..e1e16f213a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -96,6 +96,7 @@ public class EffectMasterHandler 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("CreateCommonItem", CreateCommonItem::new); EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt index 12facbae2c..ad687abacf 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/stats/skills/documentation.txt @@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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. CreateCommonItem: Allows the player to create common recipe items up to a certain level. CreateItem: Allows the player to create dwarven recipe items up to a certain level. diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java index 60d7fcaa24..6e836752c4 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -293,7 +293,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java index d08e2a8250..d5b2ea0e80 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java @@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); if (success) // Successful craft. { diff --git a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java index 0cc9acd02b..40b638ff58 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java @@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true); if (success) diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java index f6bc03e2bd..2aaf4ef0ba 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -97,6 +97,7 @@ public class EffectMasterHandler 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("CreateCommonItem", CreateCommonItem::new); EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt index 4bf4bdb507..cf420ec7a5 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/stats/skills/documentation.txt @@ -66,6 +66,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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. CreateCommonItem: Allows the player to create common recipe items up to a certain level. CreateItem: Allows the player to create dwarven recipe items up to a certain level. diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java index faa2621bc2..18e8e84039 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -298,7 +298,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java index d08e2a8250..d5b2ea0e80 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java @@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); if (success) // Successful craft. { diff --git a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java index 0cc9acd02b..40b638ff58 100644 --- a/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java +++ b/L2J_Mobius_5.0_Salvation/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java @@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true); if (success) diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java index f2ba9bd8d6..42dd17ed59 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -98,6 +98,7 @@ public class EffectMasterHandler 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("CreateCommonItem", CreateCommonItem::new); EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt index 860d243860..eba0bed3e3 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/stats/skills/documentation.txt @@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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. CreateCommonItem: Allows the player to create common recipe items up to a certain level. CreateItem: Allows the player to create dwarven recipe items up to a certain level. diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java index 62c27673bb..bcb0a6d10d 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -301,7 +301,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java index d08e2a8250..d5b2ea0e80 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java @@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); if (success) // Successful craft. { diff --git a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java index 0cc9acd02b..40b638ff58 100644 --- a/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java +++ b/L2J_Mobius_5.5_EtinasFate/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java @@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true); if (success) diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java index f2ba9bd8d6..42dd17ed59 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -98,6 +98,7 @@ public class EffectMasterHandler 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("CreateCommonItem", CreateCommonItem::new); EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt index 860d243860..eba0bed3e3 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/stats/skills/documentation.txt @@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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. CreateCommonItem: Allows the player to create common recipe items up to a certain level. CreateItem: Allows the player to create dwarven recipe items up to a certain level. diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java index 62c27673bb..bcb0a6d10d 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -301,7 +301,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java index d08e2a8250..d5b2ea0e80 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java @@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); if (success) // Successful craft. { diff --git a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java index 0cc9acd02b..40b638ff58 100644 --- a/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java +++ b/L2J_Mobius_6.0_Fafurion/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java @@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true); if (success) diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java index b48a67e771..9933b3bf89 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -99,6 +99,7 @@ public class EffectMasterHandler 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("CreateCommonItem", CreateCommonItem::new); EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt index d56dc74f05..582bda9171 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt @@ -68,6 +68,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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. CreateCommonItem: Allows the player to create common recipe items up to a certain level. CreateItem: Allows the player to create dwarven recipe items up to a certain level. diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java index 62c27673bb..bcb0a6d10d 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -301,7 +301,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java index cb23993874..60d3c15ab9 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java @@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); if (success) // Successful craft. { diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java index cd51d08984..084fc9cb88 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java @@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true); if (success) diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java index a31b4b1961..68e80889be 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -99,6 +99,7 @@ public class EffectMasterHandler 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("CreateCommonItem", CreateCommonItem::new); EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt index fcf9bbe6a8..6ec4bf2af3 100644 --- a/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_8.0_Homunculus/dist/game/data/stats/skills/documentation.txt @@ -68,6 +68,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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. CreateCommonItem: Allows the player to create common recipe items up to a certain level. CreateItem: Allows the player to create dwarven recipe items up to a certain level. diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java index 62c27673bb..bcb0a6d10d 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -301,7 +301,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java index cb23993874..60d3c15ab9 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeItemMakeSelf.java @@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); if (success) // Successful craft. { diff --git a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java index cd51d08984..084fc9cb88 100644 --- a/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java +++ b/L2J_Mobius_8.0_Homunculus/java/org/l2jmobius/gameserver/network/clientpackets/RequestRecipeShopMakeItem.java @@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus()); } - final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus) > Rnd.get(100)); + final boolean success = player.tryLuck() || ((recipe.getSuccessRate() + offeringBonus + player.getStat().getValue(Stat.CRAFT_RATE, 0)) > Rnd.get(100)); final boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100)); final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true); if (success) diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java index 993dcca9eb..eb445537aa 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -94,6 +94,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt index f92c512d3e..a77820658b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/stats/skills/documentation.txt @@ -64,6 +64,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/RecipeController.java index 721cbf2178..0a4dd7068c 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java index 118c527732..2b9f5de3ef 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -289,7 +289,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java index 993dcca9eb..eb445537aa 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -94,6 +94,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt index f92c512d3e..a77820658b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/stats/skills/documentation.txt @@ -64,6 +64,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/RecipeController.java index 721cbf2178..0a4dd7068c 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java index 118c527732..2b9f5de3ef 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.1_Zaken/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -289,7 +289,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java index 2dfded611a..90a4417517 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -95,6 +95,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt index 42f9225480..25288e4bb5 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/stats/skills/documentation.txt @@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/RecipeController.java index 374d2ffa87..62bbe7967a 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java index c9480c09ff..5873067451 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.2_Antharas/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -294,7 +294,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java index 6104abfd4b..d3814b0ceb 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -96,6 +96,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt index 69ff3ba013..d2a47817b7 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/stats/skills/documentation.txt @@ -66,6 +66,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/RecipeController.java index 374d2ffa87..62bbe7967a 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java index a89f9d98a7..44131034ce 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -310,7 +310,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java index 6104abfd4b..d3814b0ceb 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -96,6 +96,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt index 69ff3ba013..d2a47817b7 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/stats/skills/documentation.txt @@ -66,6 +66,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/RecipeController.java index 374d2ffa87..62bbe7967a 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java index a89f9d98a7..44131034ce 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -310,7 +310,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java index 3dd52843a0..ec8003f692 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -97,6 +97,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt index e3c9fc6362..71a0b1d277 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/stats/skills/documentation.txt @@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/RecipeController.java index 374d2ffa87..62bbe7967a 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java index 563a5a5b8d..6a83adb801 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -312,7 +312,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java index 8929496c10..9bc974d7d8 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -95,6 +95,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt index 46df4d1648..3700ae2dd0 100644 --- a/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Classic_Interlude/dist/game/data/stats/skills/documentation.txt @@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/RecipeController.java index 721cbf2178..0a4dd7068c 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java index 598a3d315f..3eb580d4b1 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -291,7 +291,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length; diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java index a380c3eb2a..179ae199e6 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -97,6 +97,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("CraftRate", CraftRate::new); EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new); EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java new file mode 100644 index 0000000000..2d74464406 --- /dev/null +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java @@ -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 . + */ +package handlers.effecthandlers; + +import org.l2jmobius.gameserver.model.StatSet; +import org.l2jmobius.gameserver.model.stats.Stat; + +/** + * @author quangnguyen + */ +public class CraftRate extends AbstractStatAddEffect +{ + public CraftRate(StatSet params) + { + super(params, Stat.CRAFT_RATE); + } +} diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt index 8fec4baa04..802542e24b 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/dist/game/data/stats/skills/documentation.txt @@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time. 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) CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/RecipeController.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/RecipeController.java index 7d30bc2884..f668dabea4 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/RecipeController.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/RecipeController.java @@ -403,7 +403,7 @@ public class RecipeController // handle possible cheaters here // (they click craft then try to get rid of items in order to get free craft) } - else if (Rnd.get(100) < _recipeList.getSuccessRate()) + else if (Rnd.get(100) < (_recipeList.getSuccessRate() + _player.getStat().getValue(Stat.CRAFT_RATE, 0))) { rewardPlayer(); // and immediately puts created item in its place updateMakeInfo(true); diff --git a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java index 9b7faf74bc..c8098dae23 100644 --- a/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java +++ b/L2J_Mobius_Essence_4.0_DwellingOfSpirits/java/org/l2jmobius/gameserver/model/stats/Stat.java @@ -315,7 +315,9 @@ public enum Stat ATTACK_DAMAGE("attackDamage"), IMMOBILE_DAMAGE_BONUS("immobileBonus"), - IMMOBILE_DAMAGE_RESIST("immobileResist"); + IMMOBILE_DAMAGE_RESIST("immobileResist"), + + CRAFT_RATE("CraftRate"); public static final int NUM_STATS = values().length;