Community board buff skill id protection.
This commit is contained in:
@@ -633,6 +633,10 @@ CommunityPremiumBuyCoinId = 57
|
||||
# Amount of coins needed for each premium day bought.
|
||||
CommunityPremiumPricePerDay = 1000000
|
||||
|
||||
# List of available buffs to avoid exploits.
|
||||
# Usage: SkillId1,SkillId2...
|
||||
CommunityAvailableBuffs = 1077,1240,1086,1032,1073,1036,1035,1068,1040,1044,1182,1191,1033,1189,1392,1393,1303,1059,1242,1268
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Premium System (VIP)
|
||||
|
@@ -198,7 +198,10 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
for (int i = 0; i < buffCount; i++)
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(Integer.parseInt(buypassOptions[i].split(",")[0]), Integer.parseInt(buypassOptions[i].split(",")[1]));
|
||||
|
||||
if (!Config.COMMUNITY_AVAILABLE_BUFFS.contains(skill.getId()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
targets.stream().filter(target -> !target.isSummon()).forEach(target ->
|
||||
{
|
||||
skill.applyEffects(activeChar, target);
|
||||
|
@@ -806,6 +806,7 @@ public final class Config
|
||||
public static boolean COMMUNITY_PREMIUM_SYSTEM_ENABLED;
|
||||
public static int COMMUNITY_PREMIUM_COIN_ID;
|
||||
public static int COMMUNITY_PREMIUM_PRICE_PER_DAY;
|
||||
public static List<Integer> COMMUNITY_AVAILABLE_BUFFS;
|
||||
public static boolean PREMIUM_SYSTEM_ENABLED;
|
||||
public static float PREMIUM_RATE_XP;
|
||||
public static float PREMIUM_RATE_SP;
|
||||
@@ -2606,6 +2607,12 @@ public final class Config
|
||||
COMMUNITY_PREMIUM_SYSTEM_ENABLED = CustomSettings.getBoolean("CommunityPremiumSystem", false);
|
||||
COMMUNITY_PREMIUM_COIN_ID = CustomSettings.getInt("CommunityPremiumBuyCoinId", 57);
|
||||
COMMUNITY_PREMIUM_PRICE_PER_DAY = CustomSettings.getInt("CommunityPremiumPricePerDay", 1000000);
|
||||
final String[] allowedBuffs = CustomSettings.getString("CommunityAvailableBuffs", "").split(",");
|
||||
COMMUNITY_AVAILABLE_BUFFS = new ArrayList<>(allowedBuffs.length);
|
||||
for (String s : allowedBuffs)
|
||||
{
|
||||
COMMUNITY_AVAILABLE_BUFFS.add(Integer.parseInt(s));
|
||||
}
|
||||
|
||||
PREMIUM_SYSTEM_ENABLED = CustomSettings.getBoolean("EnablePremiumSystem", false);
|
||||
PREMIUM_RATE_XP = CustomSettings.getFloat("PremiumRateXp", 2);
|
||||
|
Reference in New Issue
Block a user