Use //debug packetsto see the related packet for updating the icons when they change.
[17/09 10:15:18] [C] MoveBackwardToLocation[17/09 10:15:19] [C] Action[17/09 10:15:19] [S] MoveToPawn[17/09 10:15:19] [S] CreatureSay[17/09 10:15:19] [S] NpcHtmlMessage[17/09 10:15:19] [S] ActionFailed[17/09 10:15:19] [S] ActionFailed[17/09 10:15:20] [C] MoveBackwardToLocation[17/09 10:15:21] [C] Action[17/09 10:15:21] [S] MoveToPawn[17/09 10:15:21] [S] CreatureSay[17/09 10:15:21] [S] NpcHtmlMessage[17/09 10:15:21] [S] ActionFailed[17/09 10:15:21] [S] ActionFailed[17/09 10:15:25] [C] MoveBackwardToLocation[17/09 10:15:28] [C] SendBypassBuildCmd[17/09 10:15:28] [S] CreatureSay[17/09 10:15:28] [S] NpcHtmlMessage[17/09 10:15:29] [C] RequestBypassToServer[17/09 10:15:29] [S] TargetUnselected[17/09 10:15:29] [S] CreatureSay
to see the related packet for updating the icons when they change.
[s] server packet[c] client packet
Is it an old post here from the forum similar to what you want to solve?https://l2jmobius.org/forum/index.php?topic=8136.msg34971#msg34971
not :/ i want to make sure, everyone have same buff sorting in ct0 right? dances and songs are always last in list, no matter when you use them
diff --git a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/EffectList.java b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/EffectList.javaindex c609b64648..47b85572eb 100644--- a/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/EffectList.java+++ b/L2J_Mobius_CT_0_Interlude/java/org/l2jmobius/gameserver/model/EffectList.java@@ -31,7 +31,6 @@ import java.util.function.Consumer; import java.util.function.Function; import java.util.logging.Logger; -import org.l2jmobius.Config; import org.l2jmobius.commons.threads.ThreadPool; import org.l2jmobius.gameserver.enums.SkillFinishType; import org.l2jmobius.gameserver.model.actor.Creature;@@ -62,8 +61,6 @@ public class EffectList private static final Logger LOGGER = Logger.getLogger(EffectList.class.getName()); /** Queue containing all effects from buffs for this effect list. */ private final Queue<BuffInfo> _buffs = new ConcurrentLinkedQueue<>();- /** Queue containing all dances/songs for this effect list. */- private final Queue<BuffInfo> _dances = new ConcurrentLinkedQueue<>(); /** Queue containing all toggle for this effect list. */ private final Queue<BuffInfo> _toggles = new ConcurrentLinkedQueue<>(); /** Queue containing all debuffs for this effect list. */@@ -92,6 +89,7 @@ public class EffectList private final AtomicInteger _hiddenBuffs = new AtomicInteger(); /** Delay task **/ private ScheduledFuture<?> _updateEffectIconTask;+ private Queue<BuffInfo> dances; /** * Constructor for effect list.@@ -117,7 +115,15 @@ public class EffectList */ public Queue<BuffInfo> getDances() {- return _dances;+ dances = null;+ _buffs.forEach(_buff ->+ {+ if (_buff.getSkill().isDance())+ {+ dances.add(_buff);+ }+ });+ return dances; } /**@@ -164,11 +170,6 @@ public class EffectList buffs.addAll(_buffs); } - if (hasDances())- {- buffs.addAll(_dances);- }- if (hasToggles()) { buffs.addAll(_toggles);@@ -203,10 +204,6 @@ public class EffectList { effects = _debuffs; }- else if (skill.isDance())- {- effects = _dances;- } else if (skill.isToggle()) { effects = _toggles;@@ -244,23 +241,6 @@ public class EffectList } } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if (info != null)- {- for (AbstractEffect effect : info.getEffects())- {- if ((effect != null) && (effect.getEffectType() == type))- {- return info;- }- }- }- }- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -330,18 +310,6 @@ public class EffectList } } - if (hasDances() && (info == null))- {- for (BuffInfo b : _dances)- {- if (b.getSkill().getId() == skillId)- {- info = b;- break;- }- }- }- if (hasToggles() && (info == null)) { for (BuffInfo b : _toggles)@@ -490,7 +458,15 @@ public class EffectList */ public int getDanceCount() {- return hasDances() ? _dances.size() : 0;+ int danceCount = 0;+ for (BuffInfo _buff : _buffs)+ {+ if (_buff.getSkill().isDance())+ {+ danceCount++;+ }+ }+ return danceCount; } /**@@ -628,18 +604,6 @@ public class EffectList update = true; } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if (!info.getSkill().isStayAfterDeath())- {- stopAndRemove(true, info, _dances);- }- }- update = true;- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -668,10 +632,6 @@ public class EffectList { stopAndRemove(broadcast, info, _buffs); }- for (BuffInfo info : _dances)- {- stopAndRemove(broadcast, info, _dances);- } for (BuffInfo info : _toggles) { stopAndRemove(broadcast, info, _toggles);@@ -722,18 +682,6 @@ public class EffectList update = true; } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if (!info.getSkill().isStayOnSubclassChange())- {- stopAndRemove(true, info, _dances);- }- }- update = true;- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -799,7 +747,6 @@ public class EffectList { return; }- _dances.forEach(b -> stopAndRemove(update, b, _dances)); // Update effect flags and icons. updateEffectList(update); }@@ -850,18 +797,6 @@ public class EffectList update = true; } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if (info != null)- {- action.accept(info);- }- }- update = true;- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -978,18 +913,6 @@ public class EffectList update = true; } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if (info.getSkill().isRemovedOnAnyActionExceptMove())- {- stopAndRemove(true, info, _dances);- }- }- update = true;- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -1028,18 +951,6 @@ public class EffectList update = true; } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if ((info != null) && info.getSkill().isRemovedOnDamage())- {- stopAndRemove(true, info, _dances);- }- }- update = true;- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -1109,7 +1020,15 @@ public class EffectList */ public boolean hasDances() {- return !_dances.isEmpty();+ int danceCount = 0;+ for (BuffInfo _buff : _buffs)+ {+ if (_buff.getSkill().isDance())+ {+ danceCount++;+ }+ }+ return !(danceCount == 0); } /**@@ -1159,14 +1078,6 @@ public class EffectList } } - if (dances && hasDances())- {- for (BuffInfo info : _dances)- {- update |= function.apply(info);- }- }- if (hasToggles()) { for (BuffInfo info : _toggles)@@ -1323,11 +1234,9 @@ public class EffectList if (!skill.isDebuff() && !skill.isToggle() && !skill.is7Signs() && !doesStack(skill)) { int buffsToRemove = -1;- if (skill.isDance())- {- buffsToRemove = getDanceCount() - Config.DANCES_MAX_AMOUNT;- }- else if (!skill.isHealingPotionSkill())+ /*+ * if (skill.isDance()) { buffsToRemove = getDanceCount() - Config.DANCES_MAX_AMOUNT; } else+ */ if (!skill.isHealingPotionSkill()) { buffsToRemove = getBuffCount() - _owner.getStat().getMaxBuffCount(); }@@ -1431,15 +1340,6 @@ public class EffectList } } - // Songs and dances.- if (hasDances())- {- for (BuffInfo info : _dances)- {- addIcon(info, asu, ps, psSummon, os, isSummon);- }- }- // Toggles. if (hasToggles()) {@@ -1645,20 +1545,6 @@ public class EffectList } } - if (hasDances())- {- for (BuffInfo info : _dances)- {- if (info != null)- {- for (AbstractEffect e : info.getEffects())- {- flags |= e.getEffectFlags();- }- }- }- }- if (hasToggles()) { for (BuffInfo info : _toggles)
it's kind a old topic, i did fix it without touching java, it has types inside skills, since i dont care this optionbuffs - 20dance/songs - +4i just simply deleted types inside skills, so they are all random now and order depends which skill you use last