Addition of CraftRate effect.
Contributed by quangnguyen.
This commit is contained in:
@@ -95,6 +95,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(_target); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -292,7 +292,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -95,6 +95,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(_target); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -292,7 +292,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -95,6 +95,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(_target); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -292,7 +292,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -96,6 +96,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
|
31
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CraftingCritical: Crafting critical stat.
|
CraftingCritical: Crafting critical stat.
|
||||||
CreateCommonItem: Allows the player to create common recipe items up to a certain level.
|
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.
|
CreateItem: Allows the player to create dwarven recipe items up to a certain level.
|
||||||
|
@@ -293,7 +293,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
if (success) // Successful craft.
|
if (success) // Successful craft.
|
||||||
{
|
{
|
||||||
|
@@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -97,6 +97,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
|
31
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -66,6 +66,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CraftingCritical: Crafting critical stat.
|
CraftingCritical: Crafting critical stat.
|
||||||
CreateCommonItem: Allows the player to create common recipe items up to a certain level.
|
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.
|
CreateItem: Allows the player to create dwarven recipe items up to a certain level.
|
||||||
|
@@ -298,7 +298,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
if (success) // Successful craft.
|
if (success) // Successful craft.
|
||||||
{
|
{
|
||||||
|
@@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -98,6 +98,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
|
31
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CraftingCritical: Crafting critical stat.
|
CraftingCritical: Crafting critical stat.
|
||||||
CreateCommonItem: Allows the player to create common recipe items up to a certain level.
|
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.
|
CreateItem: Allows the player to create dwarven recipe items up to a certain level.
|
||||||
|
@@ -301,7 +301,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
if (success) // Successful craft.
|
if (success) // Successful craft.
|
||||||
{
|
{
|
||||||
|
@@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -98,6 +98,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
|
31
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CraftingCritical: Crafting critical stat.
|
CraftingCritical: Crafting critical stat.
|
||||||
CreateCommonItem: Allows the player to create common recipe items up to a certain level.
|
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.
|
CreateItem: Allows the player to create dwarven recipe items up to a certain level.
|
||||||
|
@@ -301,7 +301,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
if (success) // Successful craft.
|
if (success) // Successful craft.
|
||||||
{
|
{
|
||||||
|
@@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -99,6 +99,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
|
31
L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -68,6 +68,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CraftingCritical: Crafting critical stat.
|
CraftingCritical: Crafting critical stat.
|
||||||
CreateCommonItem: Allows the player to create common recipe items up to a certain level.
|
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.
|
CreateItem: Allows the player to create dwarven recipe items up to a certain level.
|
||||||
|
@@ -301,7 +301,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
if (success) // Successful craft.
|
if (success) // Successful craft.
|
||||||
{
|
{
|
||||||
|
@@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -99,6 +99,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
EffectHandler.getInstance().registerHandler("CraftingCritical", CraftingCritical::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
EffectHandler.getInstance().registerHandler("CreateCommonItem", CreateCommonItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
EffectHandler.getInstance().registerHandler("CreateItem", CreateItem::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
|
31
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_8.0_Homunculus/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -68,6 +68,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CraftingCritical: Crafting critical stat.
|
CraftingCritical: Crafting critical stat.
|
||||||
CreateCommonItem: Allows the player to create common recipe items up to a certain level.
|
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.
|
CreateItem: Allows the player to create dwarven recipe items up to a certain level.
|
||||||
|
@@ -301,7 +301,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ public class RequestRecipeItemMakeSelf implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
if (success) // Successful craft.
|
if (success) // Successful craft.
|
||||||
{
|
{
|
||||||
|
@@ -205,7 +205,7 @@ public class RequestRecipeShopMakeItem implements IClientIncomingPacket
|
|||||||
offeringBonus = Math.min((offeredAdenaWorth / recipe.getMaxOffering()) * recipe.getMaxOfferingBonus(), recipe.getMaxOfferingBonus());
|
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 boolean craftingCritical = success && (player.getStat().getValue(Stat.CRAFTING_CRITICAL) > Rnd.get(100));
|
||||||
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
final ItemHolder craftedItem = recipe.doCraft(player, manufacturer, success, craftingCritical, true);
|
||||||
if (success)
|
if (success)
|
||||||
|
@@ -94,6 +94,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -64,6 +64,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -289,7 +289,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -94,6 +94,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -64,6 +64,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -289,7 +289,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -95,6 +95,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -294,7 +294,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -96,6 +96,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -66,6 +66,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -310,7 +310,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -96,6 +96,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::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 quangnguyen
|
||||||
|
*/
|
||||||
|
public class CraftRate extends AbstractStatAddEffect
|
||||||
|
{
|
||||||
|
public CraftRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.CRAFT_RATE);
|
||||||
|
}
|
||||||
|
}
|
@@ -66,6 +66,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -310,7 +310,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -97,6 +97,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -312,7 +312,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -95,6 +95,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
||||||
|
31
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
31
L2J_Mobius_Classic_Interlude/dist/game/data/scripts/handlers/effecthandlers/CraftRate.java
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the L2J Mobius project.
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
package handlers.effecthandlers;
|
||||||
|
|
||||||
|
import 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);
|
||||||
|
}
|
||||||
|
}
|
@@ -65,6 +65,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -291,7 +291,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
@@ -97,6 +97,7 @@ public class EffectMasterHandler
|
|||||||
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
EffectHandler.getInstance().registerHandler("CpHealOverTime", CpHealOverTime::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
EffectHandler.getInstance().registerHandler("CpHealPercent", CpHealPercent::new);
|
||||||
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
EffectHandler.getInstance().registerHandler("CpRegen", CpRegen::new);
|
||||||
|
EffectHandler.getInstance().registerHandler("CraftRate", CraftRate::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamage", CriticalDamage::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new);
|
||||||
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new);
|
EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::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 quangnguyen
|
||||||
|
*/
|
||||||
|
public class CraftRate extends AbstractStatAddEffect
|
||||||
|
{
|
||||||
|
public CraftRate(StatSet params)
|
||||||
|
{
|
||||||
|
super(params, Stat.CRAFT_RATE);
|
||||||
|
}
|
||||||
|
}
|
@@ -67,6 +67,7 @@ CpHealOverTime: Increases current CP by a given amount over time.
|
|||||||
CpHealPercent: Increases current CP by a given percentage amount.
|
CpHealPercent: Increases current CP by a given percentage amount.
|
||||||
Cp: Increases current CP by a static amount.
|
Cp: Increases current CP by a static amount.
|
||||||
CpRegen: CP Regeneration stat.
|
CpRegen: CP Regeneration stat.
|
||||||
|
CraftRate: Craft success rate bonus. (l2jmobius)
|
||||||
CriticalDamage: Critical Damage stat.
|
CriticalDamage: Critical Damage stat.
|
||||||
CriticalDamagePosition: Critical Damage depending on position stat.
|
CriticalDamagePosition: Critical Damage depending on position stat.
|
||||||
CriticalRate: Critical Rate stat.
|
CriticalRate: Critical Rate stat.
|
||||||
|
@@ -403,7 +403,7 @@ public class RecipeController
|
|||||||
// handle possible cheaters here
|
// handle possible cheaters here
|
||||||
// (they click craft then try to get rid of items in order to get free craft)
|
// (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
|
rewardPlayer(); // and immediately puts created item in its place
|
||||||
updateMakeInfo(true);
|
updateMakeInfo(true);
|
||||||
|
@@ -315,7 +315,9 @@ public enum Stat
|
|||||||
ATTACK_DAMAGE("attackDamage"),
|
ATTACK_DAMAGE("attackDamage"),
|
||||||
|
|
||||||
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
IMMOBILE_DAMAGE_BONUS("immobileBonus"),
|
||||||
IMMOBILE_DAMAGE_RESIST("immobileResist");
|
IMMOBILE_DAMAGE_RESIST("immobileResist"),
|
||||||
|
|
||||||
|
CRAFT_RATE("CraftRate");
|
||||||
|
|
||||||
public static final int NUM_STATS = values().length;
|
public static final int NUM_STATS = values().length;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user