Addition of EnchantItem flood protector configuration.
This commit is contained in:
parent
3d49d1284d
commit
5d7f71a46b
@ -60,6 +60,13 @@ FloodProtectorDropItemPunishmentLimit = 0
|
||||
FloodProtectorDropItemPunishmentType = none
|
||||
FloodProtectorDropItemPunishmentTime = 0
|
||||
|
||||
# EnchantItem - flooding
|
||||
FloodProtectorEnchantItemInterval = 15
|
||||
FloodProtectorEnchantItemLogFlooding = False
|
||||
FloodProtectorEnchantItemPunishmentLimit = 0
|
||||
FloodProtectorEnchantItemPunishmentType = none
|
||||
FloodProtectorEnchantItemPunishmentTime = 0
|
||||
|
||||
# ServerBypass - server bypass flooding
|
||||
FloodProtectorServerBypassInterval = 5
|
||||
FloodProtectorServerBypassLogFlooding = False
|
||||
|
@ -683,6 +683,7 @@ public class Config
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_GLOBAL_CHAT;
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_SUBCLASS;
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_DROP_ITEM;
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_ENCHANT_ITEM;
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_SERVER_BYPASS;
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_MULTISELL;
|
||||
public static FloodProtectorConfig FLOOD_PROTECTOR_TRANSACTION;
|
||||
@ -1316,6 +1317,7 @@ public class Config
|
||||
FLOOD_PROTECTOR_GLOBAL_CHAT = new FloodProtectorConfig("GlobalChatFloodProtector");
|
||||
FLOOD_PROTECTOR_SUBCLASS = new FloodProtectorConfig("SubclassFloodProtector");
|
||||
FLOOD_PROTECTOR_DROP_ITEM = new FloodProtectorConfig("DropItemFloodProtector");
|
||||
FLOOD_PROTECTOR_ENCHANT_ITEM = new FloodProtectorConfig("EnchantItemFloodProtector");
|
||||
FLOOD_PROTECTOR_SERVER_BYPASS = new FloodProtectorConfig("ServerBypassFloodProtector");
|
||||
FLOOD_PROTECTOR_MULTISELL = new FloodProtectorConfig("MultiSellFloodProtector");
|
||||
FLOOD_PROTECTOR_TRANSACTION = new FloodProtectorConfig("TransactionFloodProtector");
|
||||
@ -3147,6 +3149,7 @@ public class Config
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_GLOBAL_CHAT, "GlobalChat", 5);
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SUBCLASS, "Subclass", 20);
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_DROP_ITEM, "DropItem", 10);
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_ENCHANT_ITEM, "EnchantItem", 15);
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_SERVER_BYPASS, "ServerBypass", 5);
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_MULTISELL, "MultiSell", 1);
|
||||
loadFloodProtectorConfig(properties, FLOOD_PROTECTOR_TRANSACTION, "Transaction", 10);
|
||||
|
@ -53,8 +53,7 @@ public class RequestEnchantItem implements ClientPacket
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
// TODO: canEnchantItem
|
||||
if (!client.getFloodProtectors().canPerformTransaction())
|
||||
if (!client.getFloodProtectors().canEnchantItem())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ public class FloodProtectors
|
||||
private final FloodProtectorAction _globalChat;
|
||||
private final FloodProtectorAction _subclass;
|
||||
private final FloodProtectorAction _dropItem;
|
||||
private final FloodProtectorAction _enchantItem;
|
||||
private final FloodProtectorAction _serverBypass;
|
||||
private final FloodProtectorAction _multiSell;
|
||||
private final FloodProtectorAction _transaction;
|
||||
@ -55,6 +56,7 @@ public class FloodProtectors
|
||||
_globalChat = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_GLOBAL_CHAT);
|
||||
_subclass = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SUBCLASS);
|
||||
_dropItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_DROP_ITEM);
|
||||
_enchantItem = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_ENCHANT_ITEM);
|
||||
_serverBypass = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_SERVER_BYPASS);
|
||||
_multiSell = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_MULTISELL);
|
||||
_transaction = new FloodProtectorAction(client, Config.FLOOD_PROTECTOR_TRANSACTION);
|
||||
@ -100,6 +102,11 @@ public class FloodProtectors
|
||||
return _dropItem.canPerformAction();
|
||||
}
|
||||
|
||||
public boolean canEnchantItem()
|
||||
{
|
||||
return _enchantItem.canPerformAction();
|
||||
}
|
||||
|
||||
public boolean canUseServerBypass()
|
||||
{
|
||||
return _serverBypass.canPerformAction();
|
||||
|
Loading…
Reference in New Issue
Block a user