Addition of RandomCraftRefreshFee configuration.

This commit is contained in:
MobiusDevelopment 2023-03-03 00:12:29 +02:00
parent cc3f3d32e1
commit d91ec3928f
12 changed files with 28 additions and 8 deletions

View File

@ -5,6 +5,9 @@
# Enable random craft system.
RandomCraftEnabled = True
# Random craft refresh fee.
RandomCraftRefreshFee = 10000
# Random craft create fee.
RandomCraftCreateFee = 500000

View File

@ -919,6 +919,7 @@ public class Config
// Random Craft
public static boolean ENABLE_RANDOM_CRAFT;
public static int RANDOM_CRAFT_REFRESH_FEE;
public static int RANDOM_CRAFT_CREATE_FEE;
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
@ -1959,6 +1960,7 @@ public class Config
// Load Random Craft config file (if exists)
final PropertiesParser randomCraftconfig = new PropertiesParser(RANDOM_CRAFT_FILE);
ENABLE_RANDOM_CRAFT = randomCraftconfig.getBoolean("RandomCraftEnabled", true);
RANDOM_CRAFT_REFRESH_FEE = randomCraftconfig.getInt("RandomCraftRefreshFee", 10000);
RANDOM_CRAFT_CREATE_FEE = randomCraftconfig.getInt("RandomCraftCreateFee", 300000);
DROP_RANDOM_CRAFT_MATERIALS = randomCraftconfig.getBoolean("DropRandomCraftMaterials", true);

View File

@ -120,7 +120,7 @@ public class PlayerRandomCraft
final RandomCraftRewardItemHolder holder = _rewardList.get(i);
ps.setInt(4 + (i * 4), holder == null ? 0 : holder.getItemId());
ps.setLong(5 + (i * 4), holder == null ? 0 : holder.getItemCount());
ps.setBoolean(6 + (i * 4), holder == null ? false : holder.isLocked());
ps.setBoolean(6 + (i * 4), (holder != null) && holder.isLocked());
ps.setInt(7 + (i * 4), holder == null ? 20 : holder.getLockLeft());
}
else
@ -172,7 +172,7 @@ public class PlayerRandomCraft
}
_player.addRequest(new RandomCraftRequest(_player));
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", 10000, _player, true))
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", Config.RANDOM_CRAFT_REFRESH_FEE, _player, true))
{
_player.sendPacket(new ExCraftInfo(_player));
_player.sendPacket(new ExCraftRandomRefresh());

View File

@ -5,6 +5,9 @@
# Enable random craft system.
RandomCraftEnabled = True
# Random craft refresh fee.
RandomCraftRefreshFee = 10000
# Random craft create fee.
RandomCraftCreateFee = 300000

View File

@ -928,6 +928,7 @@ public class Config
// Random Craft
public static boolean ENABLE_RANDOM_CRAFT;
public static int RANDOM_CRAFT_REFRESH_FEE;
public static int RANDOM_CRAFT_CREATE_FEE;
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
@ -2065,6 +2066,7 @@ public class Config
// Load Random Craft config file (if exists)
final PropertiesParser randomCraftconfig = new PropertiesParser(RANDOM_CRAFT_FILE);
ENABLE_RANDOM_CRAFT = randomCraftconfig.getBoolean("RandomCraftEnabled", true);
RANDOM_CRAFT_REFRESH_FEE = randomCraftconfig.getInt("RandomCraftRefreshFee", 10000);
RANDOM_CRAFT_CREATE_FEE = randomCraftconfig.getInt("RandomCraftCreateFee", 300000);
DROP_RANDOM_CRAFT_MATERIALS = randomCraftconfig.getBoolean("DropRandomCraftMaterials", true);

View File

@ -120,7 +120,7 @@ public class PlayerRandomCraft
final RandomCraftRewardItemHolder holder = _rewardList.get(i);
ps.setInt(4 + (i * 4), holder == null ? 0 : holder.getItemId());
ps.setLong(5 + (i * 4), holder == null ? 0 : holder.getItemCount());
ps.setBoolean(6 + (i * 4), holder == null ? false : holder.isLocked());
ps.setBoolean(6 + (i * 4), (holder != null) && holder.isLocked());
ps.setInt(7 + (i * 4), holder == null ? 20 : holder.getLockLeft());
}
else
@ -172,7 +172,7 @@ public class PlayerRandomCraft
}
_player.addRequest(new RandomCraftRequest(_player));
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", 10000, _player, true))
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", Config.RANDOM_CRAFT_REFRESH_FEE, _player, true))
{
_player.sendPacket(new ExCraftInfo(_player));
_player.sendPacket(new ExCraftRandomRefresh());

View File

@ -5,6 +5,9 @@
# Enable random craft system.
RandomCraftEnabled = True
# Random craft refresh fee.
RandomCraftRefreshFee = 50000
# Random craft create fee.
RandomCraftCreateFee = 300000

View File

@ -932,6 +932,7 @@ public class Config
// Random Craft
public static boolean ENABLE_RANDOM_CRAFT;
public static int RANDOM_CRAFT_REFRESH_FEE;
public static int RANDOM_CRAFT_CREATE_FEE;
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
@ -2095,6 +2096,7 @@ public class Config
// Load Random Craft config file (if exists)
final PropertiesParser randomCraftconfig = new PropertiesParser(RANDOM_CRAFT_FILE);
ENABLE_RANDOM_CRAFT = randomCraftconfig.getBoolean("RandomCraftEnabled", true);
RANDOM_CRAFT_REFRESH_FEE = randomCraftconfig.getInt("RandomCraftRefreshFee", 50000);
RANDOM_CRAFT_CREATE_FEE = randomCraftconfig.getInt("RandomCraftCreateFee", 300000);
DROP_RANDOM_CRAFT_MATERIALS = randomCraftconfig.getBoolean("DropRandomCraftMaterials", true);

View File

@ -120,7 +120,7 @@ public class PlayerRandomCraft
final RandomCraftRewardItemHolder holder = _rewardList.get(i);
ps.setInt(4 + (i * 4), holder == null ? 0 : holder.getItemId());
ps.setLong(5 + (i * 4), holder == null ? 0 : holder.getItemCount());
ps.setBoolean(6 + (i * 4), holder == null ? false : holder.isLocked());
ps.setBoolean(6 + (i * 4), (holder != null) && holder.isLocked());
ps.setInt(7 + (i * 4), holder == null ? 20 : holder.getLockLeft());
}
else
@ -172,7 +172,7 @@ public class PlayerRandomCraft
}
_player.addRequest(new RandomCraftRequest(_player));
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", 10000, _player, true))
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", Config.RANDOM_CRAFT_REFRESH_FEE, _player, true))
{
_player.sendPacket(new ExCraftInfo(_player));
_player.sendPacket(new ExCraftRandomRefresh());

View File

@ -5,6 +5,9 @@
# Enable random craft system.
RandomCraftEnabled = True
# Random craft refresh fee.
RandomCraftRefreshFee = 50000
# Random craft create fee.
RandomCraftCreateFee = 300000

View File

@ -932,6 +932,7 @@ public class Config
// Random Craft
public static boolean ENABLE_RANDOM_CRAFT;
public static int RANDOM_CRAFT_REFRESH_FEE;
public static int RANDOM_CRAFT_CREATE_FEE;
public static boolean DROP_RANDOM_CRAFT_MATERIALS;
@ -2095,6 +2096,7 @@ public class Config
// Load Random Craft config file (if exists)
final PropertiesParser randomCraftconfig = new PropertiesParser(RANDOM_CRAFT_FILE);
ENABLE_RANDOM_CRAFT = randomCraftconfig.getBoolean("RandomCraftEnabled", true);
RANDOM_CRAFT_REFRESH_FEE = randomCraftconfig.getInt("RandomCraftRefreshFee", 50000);
RANDOM_CRAFT_CREATE_FEE = randomCraftconfig.getInt("RandomCraftCreateFee", 300000);
DROP_RANDOM_CRAFT_MATERIALS = randomCraftconfig.getBoolean("DropRandomCraftMaterials", true);

View File

@ -120,7 +120,7 @@ public class PlayerRandomCraft
final RandomCraftRewardItemHolder holder = _rewardList.get(i);
ps.setInt(4 + (i * 4), holder == null ? 0 : holder.getItemId());
ps.setLong(5 + (i * 4), holder == null ? 0 : holder.getItemCount());
ps.setBoolean(6 + (i * 4), holder == null ? false : holder.isLocked());
ps.setBoolean(6 + (i * 4), (holder != null) && holder.isLocked());
ps.setInt(7 + (i * 4), holder == null ? 20 : holder.getLockLeft());
}
else
@ -172,7 +172,7 @@ public class PlayerRandomCraft
}
_player.addRequest(new RandomCraftRequest(_player));
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", 10000, _player, true))
if ((_fullCraftPoints > 0) && _player.reduceAdena("RandomCraft Refresh", Config.RANDOM_CRAFT_REFRESH_FEE, _player, true))
{
_player.sendPacket(new ExCraftInfo(_player));
_player.sendPacket(new ExCraftRandomRefresh());