Prevent SendSkillList packet spam with a task.
This commit is contained in:
parent
0c22bb6ac8
commit
825f9d8036
@ -731,6 +731,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private ScheduledFuture<?> _taskRentPet;
|
||||
private ScheduledFuture<?> _taskWater;
|
||||
|
||||
private ScheduledFuture<?> _skillListRefreshTask;
|
||||
|
||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||
/**
|
||||
@ -9489,7 +9491,14 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void sendSkillList()
|
||||
{
|
||||
sendSkillList(0);
|
||||
if (_skillListRefreshTask == null)
|
||||
{
|
||||
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
sendSkillList(0);
|
||||
_skillListRefreshTask = null;
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSkillList(int lastLearnedSkillId)
|
||||
|
@ -730,6 +730,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private ScheduledFuture<?> _taskRentPet;
|
||||
private ScheduledFuture<?> _taskWater;
|
||||
|
||||
private ScheduledFuture<?> _skillListRefreshTask;
|
||||
|
||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||
/**
|
||||
@ -9490,7 +9492,14 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void sendSkillList()
|
||||
{
|
||||
sendSkillList(0);
|
||||
if (_skillListRefreshTask == null)
|
||||
{
|
||||
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
sendSkillList(0);
|
||||
_skillListRefreshTask = null;
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSkillList(int lastLearnedSkillId)
|
||||
|
@ -732,6 +732,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private ScheduledFuture<?> _taskRentPet;
|
||||
private ScheduledFuture<?> _taskWater;
|
||||
|
||||
private ScheduledFuture<?> _skillListRefreshTask;
|
||||
|
||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||
/**
|
||||
@ -9500,7 +9502,14 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void sendSkillList()
|
||||
{
|
||||
sendSkillList(0);
|
||||
if (_skillListRefreshTask == null)
|
||||
{
|
||||
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
sendSkillList(0);
|
||||
_skillListRefreshTask = null;
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSkillList(int lastLearnedSkillId)
|
||||
|
@ -740,6 +740,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private ScheduledFuture<?> _taskRentPet;
|
||||
private ScheduledFuture<?> _taskWater;
|
||||
|
||||
private ScheduledFuture<?> _skillListRefreshTask;
|
||||
|
||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||
/**
|
||||
@ -9498,7 +9500,14 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void sendSkillList()
|
||||
{
|
||||
sendSkillList(0);
|
||||
if (_skillListRefreshTask == null)
|
||||
{
|
||||
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
sendSkillList(0);
|
||||
_skillListRefreshTask = null;
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSkillList(int lastLearnedSkillId)
|
||||
|
@ -728,6 +728,8 @@ public final class L2PcInstance extends L2Playable
|
||||
private ScheduledFuture<?> _taskRentPet;
|
||||
private ScheduledFuture<?> _taskWater;
|
||||
|
||||
private ScheduledFuture<?> _skillListRefreshTask;
|
||||
|
||||
/** Last Html Npcs, 0 = last html was not bound to an npc */
|
||||
private final int[] _htmlActionOriginObjectIds = new int[HtmlActionScope.values().length];
|
||||
/**
|
||||
@ -9433,7 +9435,14 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void sendSkillList()
|
||||
{
|
||||
sendSkillList(0);
|
||||
if (_skillListRefreshTask == null)
|
||||
{
|
||||
_skillListRefreshTask = ThreadPoolManager.schedule(() ->
|
||||
{
|
||||
sendSkillList(0);
|
||||
_skillListRefreshTask = null;
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
public void sendSkillList(int lastLearnedSkillId)
|
||||
|
Loading…
Reference in New Issue
Block a user