|
@@ -18,8 +18,8 @@
|
|
*/
|
|
*/
|
|
package handlers.effecthandlers;
|
|
package handlers.effecthandlers;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
|
-import java.util.List;
|
|
|
|
|
|
+import java.util.HashSet;
|
|
|
|
+import java.util.Set;
|
|
|
|
|
|
import com.l2jserver.gameserver.datatables.BotReportTable;
|
|
import com.l2jserver.gameserver.datatables.BotReportTable;
|
|
import com.l2jserver.gameserver.instancemanager.PunishmentManager;
|
|
import com.l2jserver.gameserver.instancemanager.PunishmentManager;
|
|
@@ -37,23 +37,16 @@ import com.l2jserver.gameserver.model.skills.BuffInfo;
|
|
*/
|
|
*/
|
|
public final class BlockAction extends AbstractEffect
|
|
public final class BlockAction extends AbstractEffect
|
|
{
|
|
{
|
|
- private final List<Integer> _blockedActions;
|
|
|
|
|
|
+ private final Set<Integer> _blockedActions = new HashSet<>();
|
|
|
|
|
|
public BlockAction(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
|
|
public BlockAction(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params)
|
|
{
|
|
{
|
|
super(attachCond, applyCond, set, params);
|
|
super(attachCond, applyCond, set, params);
|
|
|
|
|
|
- String[] rawActions = params.getString("blockedActions").split(",");
|
|
|
|
- _blockedActions = new ArrayList<>(rawActions.length);
|
|
|
|
- for (String act : rawActions)
|
|
|
|
|
|
+ final String[] actions = params.getString("blockedActions").split(",");
|
|
|
|
+ for (String action : actions)
|
|
{
|
|
{
|
|
- try
|
|
|
|
- {
|
|
|
|
- _blockedActions.add(Integer.parseInt(act));
|
|
|
|
- }
|
|
|
|
- catch (Exception e)
|
|
|
|
- {
|
|
|
|
- }
|
|
|
|
|
|
+ _blockedActions.add(Integer.parseInt(action));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|