Addition of RandomCraftCreateFee configuration.
Thanks to MacuK.
This commit is contained in:
parent
de3890b3bf
commit
ebddd951ed
@ -3,10 +3,13 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable random craft system.
|
||||
RandomCraftEnabled = False
|
||||
RandomCraftEnabled = True
|
||||
|
||||
# Random craft create fee.
|
||||
RandomCraftCreateFee = 500000
|
||||
|
||||
# Drop materials for random craft.
|
||||
# Cannot be reloaded. It needs server restart.
|
||||
# Works independently from above config.
|
||||
# Recommend to use same value as RandomCraftEnabled.
|
||||
DropRandomCraftMaterials = False
|
||||
DropRandomCraftMaterials = True
|
||||
|
@ -893,6 +893,7 @@ public class Config
|
||||
|
||||
// Random Craft
|
||||
public static boolean ENABLE_RANDOM_CRAFT;
|
||||
public static int RANDOM_CRAFT_CREATE_FEE;
|
||||
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
|
||||
|
||||
// GrandBoss Settings
|
||||
@ -1951,8 +1952,9 @@ public class Config
|
||||
|
||||
// Load Random Craft config file (if exists)
|
||||
final PropertiesParser randomCraftSettings = new PropertiesParser(RANDOM_CRAFT_FILE);
|
||||
ENABLE_RANDOM_CRAFT = randomCraftSettings.getBoolean("RandomCraftEnabled", false);
|
||||
DROP_RANDOM_CRAFT_MATERIALS = randomCraftSettings.getBoolean("DropRandomCraftMaterials", false);
|
||||
ENABLE_RANDOM_CRAFT = randomCraftSettings.getBoolean("RandomCraftEnabled", true);
|
||||
RANDOM_CRAFT_CREATE_FEE = randomCraftSettings.getInt("RandomCraftCreateFee", 500000);
|
||||
DROP_RANDOM_CRAFT_MATERIALS = randomCraftSettings.getBoolean("DropRandomCraftMaterials", true);
|
||||
|
||||
// Load Training Camp config file (if exists)
|
||||
final PropertiesParser trainingCampSettings = new PropertiesParser(TRAINING_CAMP_CONFIG_FILE);
|
||||
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.RandomCraftData;
|
||||
@ -245,7 +246,7 @@ public class PlayerRandomCraft
|
||||
}
|
||||
_player.addRequest(new RandomCraftRequest(_player));
|
||||
|
||||
if (_player.reduceAdena("RandomCraft Make", 500000, _player, true))
|
||||
if (_player.reduceAdena("RandomCraft Make", Config.RANDOM_CRAFT_CREATE_FEE, _player, true))
|
||||
{
|
||||
final int madeId = Rnd.get(0, 4);
|
||||
final RandomCraftRewardItemHolder holder = _rewardList.get(madeId);
|
||||
|
@ -3,10 +3,13 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Enable random craft system.
|
||||
RandomCraftEnabled = False
|
||||
RandomCraftEnabled = True
|
||||
|
||||
# Random craft create fee.
|
||||
RandomCraftCreateFee = 300000
|
||||
|
||||
# Drop materials for random craft.
|
||||
# Cannot be reloaded. It needs server restart.
|
||||
# Works independently from above config.
|
||||
# Recommend to use same value as RandomCraftEnabled.
|
||||
DropRandomCraftMaterials = False
|
||||
DropRandomCraftMaterials = True
|
||||
|
@ -893,6 +893,7 @@ public class Config
|
||||
|
||||
// Random Craft
|
||||
public static boolean ENABLE_RANDOM_CRAFT;
|
||||
public static int RANDOM_CRAFT_CREATE_FEE;
|
||||
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
|
||||
|
||||
// GrandBoss Settings
|
||||
@ -1954,8 +1955,9 @@ public class Config
|
||||
|
||||
// Load Random Craft config file (if exists)
|
||||
final PropertiesParser randomCraftSettings = new PropertiesParser(RANDOM_CRAFT_FILE);
|
||||
ENABLE_RANDOM_CRAFT = randomCraftSettings.getBoolean("RandomCraftEnabled", false);
|
||||
DROP_RANDOM_CRAFT_MATERIALS = randomCraftSettings.getBoolean("DropRandomCraftMaterials", false);
|
||||
ENABLE_RANDOM_CRAFT = randomCraftSettings.getBoolean("RandomCraftEnabled", true);
|
||||
RANDOM_CRAFT_CREATE_FEE = randomCraftSettings.getInt("RandomCraftCreateFee", 300000);
|
||||
DROP_RANDOM_CRAFT_MATERIALS = randomCraftSettings.getBoolean("DropRandomCraftMaterials", true);
|
||||
|
||||
// Load Training Camp config file (if exists)
|
||||
final PropertiesParser trainingCampSettings = new PropertiesParser(TRAINING_CAMP_CONFIG_FILE);
|
||||
|
@ -24,6 +24,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.database.DatabaseFactory;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.data.xml.RandomCraftData;
|
||||
@ -245,7 +246,7 @@ public class PlayerRandomCraft
|
||||
}
|
||||
_player.addRequest(new RandomCraftRequest(_player));
|
||||
|
||||
if (_player.reduceAdena("RandomCraft Make", 500000, _player, true))
|
||||
if (_player.reduceAdena("RandomCraft Make", Config.RANDOM_CRAFT_CREATE_FEE, _player, true))
|
||||
{
|
||||
final int madeId = Rnd.get(0, 4);
|
||||
final RandomCraftRewardItemHolder holder = _rewardList.get(madeId);
|
||||
|
Loading…
Reference in New Issue
Block a user