Prevent SendSkillList packet spam with a task.
This commit is contained in:
+9
@@ -731,6 +731,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
private ScheduledFuture<?> _taskRentPet;
|
private ScheduledFuture<?> _taskRentPet;
|
||||||
private ScheduledFuture<?> _taskWater;
|
private ScheduledFuture<?> _taskWater;
|
||||||
|
|
||||||
|
private ScheduledFuture<?> _skillListRefreshTask;
|
||||||
|
|
||||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||||
/**
|
/**
|
||||||
@@ -9488,8 +9490,15 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList()
|
public void sendSkillList()
|
||||||
|
{
|
||||||
|
if (_skillListRefreshTask == null)
|
||||||
|
{
|
||||||
|
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||||
{
|
{
|
||||||
sendSkillList(0);
|
sendSkillList(0);
|
||||||
|
_skillListRefreshTask = null;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList(int lastLearnedSkillId)
|
public void sendSkillList(int lastLearnedSkillId)
|
||||||
|
|||||||
+9
@@ -730,6 +730,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
private ScheduledFuture<?> _taskRentPet;
|
private ScheduledFuture<?> _taskRentPet;
|
||||||
private ScheduledFuture<?> _taskWater;
|
private ScheduledFuture<?> _taskWater;
|
||||||
|
|
||||||
|
private ScheduledFuture<?> _skillListRefreshTask;
|
||||||
|
|
||||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||||
/**
|
/**
|
||||||
@@ -9489,8 +9491,15 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList()
|
public void sendSkillList()
|
||||||
|
{
|
||||||
|
if (_skillListRefreshTask == null)
|
||||||
|
{
|
||||||
|
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||||
{
|
{
|
||||||
sendSkillList(0);
|
sendSkillList(0);
|
||||||
|
_skillListRefreshTask = null;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList(int lastLearnedSkillId)
|
public void sendSkillList(int lastLearnedSkillId)
|
||||||
|
|||||||
+9
@@ -732,6 +732,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
private ScheduledFuture<?> _taskRentPet;
|
private ScheduledFuture<?> _taskRentPet;
|
||||||
private ScheduledFuture<?> _taskWater;
|
private ScheduledFuture<?> _taskWater;
|
||||||
|
|
||||||
|
private ScheduledFuture<?> _skillListRefreshTask;
|
||||||
|
|
||||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||||
/**
|
/**
|
||||||
@@ -9499,8 +9501,15 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList()
|
public void sendSkillList()
|
||||||
|
{
|
||||||
|
if (_skillListRefreshTask == null)
|
||||||
|
{
|
||||||
|
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||||
{
|
{
|
||||||
sendSkillList(0);
|
sendSkillList(0);
|
||||||
|
_skillListRefreshTask = null;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList(int lastLearnedSkillId)
|
public void sendSkillList(int lastLearnedSkillId)
|
||||||
|
|||||||
+9
@@ -740,6 +740,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
private ScheduledFuture<?> _taskRentPet;
|
private ScheduledFuture<?> _taskRentPet;
|
||||||
private ScheduledFuture<?> _taskWater;
|
private ScheduledFuture<?> _taskWater;
|
||||||
|
|
||||||
|
private ScheduledFuture<?> _skillListRefreshTask;
|
||||||
|
|
||||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||||
/**
|
/**
|
||||||
@@ -9497,8 +9499,15 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList()
|
public void sendSkillList()
|
||||||
|
{
|
||||||
|
if (_skillListRefreshTask == null)
|
||||||
|
{
|
||||||
|
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||||
{
|
{
|
||||||
sendSkillList(0);
|
sendSkillList(0);
|
||||||
|
_skillListRefreshTask = null;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList(int lastLearnedSkillId)
|
public void sendSkillList(int lastLearnedSkillId)
|
||||||
|
|||||||
+9
@@ -728,6 +728,8 @@ public final class L2PcInstance extends L2Playable
|
|||||||
private ScheduledFuture<?> _taskRentPet;
|
private ScheduledFuture<?> _taskRentPet;
|
||||||
private ScheduledFuture<?> _taskWater;
|
private ScheduledFuture<?> _taskWater;
|
||||||
|
|
||||||
|
private ScheduledFuture<?> _skillListRefreshTask;
|
||||||
|
|
||||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||||
/**
|
/**
|
||||||
@@ -9432,8 +9434,15 @@ public final class L2PcInstance extends L2Playable
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList()
|
public void sendSkillList()
|
||||||
|
{
|
||||||
|
if (_skillListRefreshTask == null)
|
||||||
|
{
|
||||||
|
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||||
{
|
{
|
||||||
sendSkillList(0);
|
sendSkillList(0);
|
||||||
|
_skillListRefreshTask = null;
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendSkillList(int lastLearnedSkillId)
|
public void sendSkillList(int lastLearnedSkillId)
|
||||||
|
|||||||
Reference in New Issue
Block a user