Addition of HuntPass premium item configurations.

This commit is contained in:
MobiusDevelopment
2023-01-09 00:02:32 +00:00
parent ae3c350456
commit d13e57f1d5
9 changed files with 28 additions and 22 deletions

View File

@@ -8,9 +8,10 @@ EnabledHuntPass = False
DayOfMonth = 1
# Pass Premium Cost.
# Retail is 8000 Einhasad Coin.
PremiumCost = 8000
# Retail is Hunt Pass - Additional Reward Coupon (60309).
PremiumItemId = 60309
PremiumItemCount = 1
# Please take caution when changing anything.
# Required Points per Window or step.
PointsForstep = 3000
PointsForStep = 300000

View File

@@ -917,7 +917,8 @@ public class Config
// HuntPass
public static boolean ENABLE_HUNT_PASS;
public static int HUNT_PASS_PERIOD;
public static int HUNT_PASS_PREMIUM_COST;
public static int HUNT_PASS_PREMIUM_ITEM_ID;
public static int HUNT_PASS_PREMIUM_ITEM_COUNT;
public static int HUNT_PASS_POINTS_FOR_STEP;
// GrandBoss Settings
@@ -2661,8 +2662,9 @@ public class Config
// Load HuntPass (if exists)
final PropertiesParser huntPassConfig = new PropertiesParser(HUNT_PASS_CONFIG_FILE);
ENABLE_HUNT_PASS = huntPassConfig.getBoolean("EnabledHuntPass", true);
HUNT_PASS_PREMIUM_COST = huntPassConfig.getInt("PremiumCost", 3600);
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForstep", 2400);
HUNT_PASS_PREMIUM_ITEM_ID = huntPassConfig.getInt("PremiumItemId", 60309);
HUNT_PASS_PREMIUM_ITEM_COUNT = huntPassConfig.getInt("PremiumItemCount", 1);
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForStep", 300000);
HUNT_PASS_PERIOD = huntPassConfig.getInt("DayOfMonth", 1);
// Gracia Seeds

View File

@@ -21,7 +21,6 @@ import java.util.Calendar;
import org.l2jmobius.Config;
import org.l2jmobius.commons.network.ReadablePacket;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
@@ -57,7 +56,7 @@ public class RequestHuntPassBuyPremium implements ClientPacket
return;
}
if (!player.destroyItemByItemId("RequestHuntPassBuyPremium", Inventory.EINHASAD_COIN_ID, Config.HUNT_PASS_PREMIUM_COST, player, true))
if (!player.destroyItemByItemId("RequestHuntPassBuyPremium", Config.HUNT_PASS_PREMIUM_ITEM_ID, Config.HUNT_PASS_PREMIUM_ITEM_COUNT, player, true))
{
player.sendPacket(SystemMessageId.NOT_ENOUGH_MONEY_TO_USE_THE_FUNCTION);
return;

View File

@@ -9,8 +9,9 @@ DayOfMonth = 16
# Pass Premium Cost.
# Retail is 3600 L-Coin.
PremiumCost = 3600
PremiumItemId = 91663
PremiumItemCount = 3600
# Please take caution when changing anything.
# Required Points per Window or step.
PointsForstep = 2400
PointsForStep = 2400

View File

@@ -951,7 +951,8 @@ public class Config
// HuntPass
public static boolean ENABLE_HUNT_PASS;
public static int HUNT_PASS_PERIOD;
public static int HUNT_PASS_PREMIUM_COST;
public static int HUNT_PASS_PREMIUM_ITEM_ID;
public static int HUNT_PASS_PREMIUM_ITEM_COUNT;
public static int HUNT_PASS_POINTS_FOR_STEP;
// Achivement Box
@@ -2694,8 +2695,9 @@ public class Config
// Load HuntPass (if exists)
final PropertiesParser huntPassConfig = new PropertiesParser(HUNT_PASS_CONFIG_FILE);
ENABLE_HUNT_PASS = huntPassConfig.getBoolean("EnabledHuntPass", true);
HUNT_PASS_PREMIUM_COST = huntPassConfig.getInt("PremiumCost", 3600);
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForstep", 2400);
HUNT_PASS_PREMIUM_ITEM_ID = huntPassConfig.getInt("PremiumItemId", 91663);
HUNT_PASS_PREMIUM_ITEM_COUNT = huntPassConfig.getInt("PremiumItemCount", 3600);
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForStep", 2400);
HUNT_PASS_PERIOD = huntPassConfig.getInt("DayOfMonth", 1);
// Load ArchivementBox (if exists)

View File

@@ -21,7 +21,6 @@ import java.util.Calendar;
import org.l2jmobius.Config;
import org.l2jmobius.commons.network.ReadablePacket;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
@@ -57,7 +56,7 @@ public class RequestHuntPassBuyPremium implements ClientPacket
return;
}
if (!player.destroyItemByItemId("RequestHuntPassBuyPremium", Inventory.LCOIN_ID, Config.HUNT_PASS_PREMIUM_COST, player, true))
if (!player.destroyItemByItemId("RequestHuntPassBuyPremium", Config.HUNT_PASS_PREMIUM_ITEM_ID, Config.HUNT_PASS_PREMIUM_ITEM_COUNT, player, true))
{
player.sendPacket(SystemMessageId.NOT_ENOUGH_MONEY_TO_USE_THE_FUNCTION);
return;

View File

@@ -9,8 +9,9 @@ DayOfMonth = 16
# Pass Premium Cost.
# Retail is 3600 L-Coin.
PremiumCost = 3600
PremiumItemId = 91663
PremiumItemCount = 3600
# Please take caution when changing anything.
# Required Points per Window or step.
PointsForstep = 2400
PointsForStep = 2400

View File

@@ -951,7 +951,8 @@ public class Config
// HuntPass
public static boolean ENABLE_HUNT_PASS;
public static int HUNT_PASS_PERIOD;
public static int HUNT_PASS_PREMIUM_COST;
public static int HUNT_PASS_PREMIUM_ITEM_ID;
public static int HUNT_PASS_PREMIUM_ITEM_COUNT;
public static int HUNT_PASS_POINTS_FOR_STEP;
// Achivement Box
@@ -2694,8 +2695,9 @@ public class Config
// Load HuntPass (if exists)
final PropertiesParser huntPassConfig = new PropertiesParser(HUNT_PASS_CONFIG_FILE);
ENABLE_HUNT_PASS = huntPassConfig.getBoolean("EnabledHuntPass", true);
HUNT_PASS_PREMIUM_COST = huntPassConfig.getInt("PremiumCost", 3600);
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForstep", 2400);
HUNT_PASS_PREMIUM_ITEM_ID = huntPassConfig.getInt("PremiumItemId", 91663);
HUNT_PASS_PREMIUM_ITEM_COUNT = huntPassConfig.getInt("PremiumItemCount", 3600);
HUNT_PASS_POINTS_FOR_STEP = huntPassConfig.getInt("PointsForStep", 2400);
HUNT_PASS_PERIOD = huntPassConfig.getInt("DayOfMonth", 1);
// Load ArchivementBox (if exists)

View File

@@ -21,7 +21,6 @@ import java.util.Calendar;
import org.l2jmobius.Config;
import org.l2jmobius.commons.network.ReadablePacket;
import org.l2jmobius.gameserver.model.actor.Player;
import org.l2jmobius.gameserver.model.itemcontainer.Inventory;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.SystemMessageId;
import org.l2jmobius.gameserver.network.clientpackets.ClientPacket;
@@ -57,7 +56,7 @@ public class RequestHuntPassBuyPremium implements ClientPacket
return;
}
if (!player.destroyItemByItemId("RequestHuntPassBuyPremium", Inventory.LCOIN_ID, Config.HUNT_PASS_PREMIUM_COST, player, true))
if (!player.destroyItemByItemId("RequestHuntPassBuyPremium", Config.HUNT_PASS_PREMIUM_ITEM_ID, Config.HUNT_PASS_PREMIUM_ITEM_COUNT, player, true))
{
player.sendPacket(SystemMessageId.NOT_ENOUGH_MONEY_TO_USE_THE_FUNCTION);
return;