Jump to content

Recommended Posts

Posted (edited)

i think can be done with many ways:

_list.remove(_list.indexOf(itemId));
_list.remove(Integer.valueOf(ItemId));
_list.remove(new Integer(itemId));

But the critical its to find the best performance.

Edited by StinkyMadness
Posted
15 minutes ago, Rootware said:

@Tryskell my example works correct. I get index first and after remove object from ArrayList by him index. What's wrong? All follows Eclipse documentation.

 

Until JIT does its work and saves the day, it's (probably) costier.

Posted
5 minutes ago, StinkyMadness said:

i think can be done with many ways:


_list.remove(_list.indexOf(itemId));
_list.remove(Integer.valueOf(ItemId));
_list.remove(new Integer(itemId));

But the critical its to find the best performance.

 

In your case not matter "best way", because too small list for feeling difference. Less few billions object in list pointless for catching performance.

Posted (edited)
19 minutes ago, Rootware said:

 

In your case not matter "best way", because too small list for feeling difference. Less few billions object in list pointless for catching performance.


Yes but is one list for each player... if all use it you better find best performance.
In other way already work with (Integer itemId)

Edited by StinkyMadness
Posted
10 minutes ago, Rootware said:

 

In your case not matter "best way", because too small list for feeling difference. Less few billions object in list pointless for catching performance.

 

remove(Integer.valueOf(

is the regular writing style, over L2J and aCis. End of story.

Posted (edited)
12 hours ago, StinkyMadness said:


Yes but is one list for each player... if all use it you better find best performance.
In other way already work with (Integer itemId)

 

If you cares about player instance, as multiplier can change performance, then cares about cleanup any customs from any this instance. By the way, everyone player's instance it's another thread and not matter how many time will be done list's operation. In your case this difference less 0,00001 second.

 

The general story line was in style of coding. :aproove-smile:

Edited by Rootware
  • Thanks 1
Posted
1 hour ago, Rootware said:

 

If you cares about player instance, as multiplier can change performance, then cares about cleanup any customs from any this instance. By the way, everyone player's instance it's another thread and not matter how many time will be done list's operation. In your case this difference less 0,00001 second.

 

The general story line was in style of coding. :aproove-smile:


i know player's instance its already kinda mess xD i'm just telling that there are 3 or more ways that are doing the same job.. i care to learn.. the best performance.. not only for this case...

Posted

I always felt like things like this have more of a place in the CommunityBoard, instead of the NpcHtml. You have more space and to add more things. Also previous/next pagination can get hectic without numbered pagination so I would add that.

 

In terms of the code the following can be optimized:

npc.getDropData().forEach(c -> list.add(c));
Collections.reverse(list);

You can iterate over the getDropData() enumerable in a reverse fashion in order to prevent the reverse call. You just add the objects in reverse before hand.

 

You can move "final int ITEMS_PER_LIST = 7;" outside of the static method to prevent the allocation to the object every time the method is called.

 

You should chain sb.append within your sb.append calls. Strings are immutable so you're allocating more memory for no reason.

 

You can change this:

 

if (_ignored.contains(itemId))
       _ignored.remove(itemId);
   else
       _ignored.add(itemId);

To this:

 

var existed = _ignored.remove(itemId);
if(!existed)
    _ignored.add(itemId);

 

You also should rename the public methods "ignoredDropContain" and "ignored" in Player.java. They are really bad names and they don't imply what they do. They also don't belong in the Player class.

 

There are other small things as well but too nit picky to mention.

  • Upvote 1
Posted (edited)

Hi, is this compatible with Interlude? Thanks! 

 

Never mind :), i successfully implemented it on my private server. The only question I have, what does the check boxes actually do? How do they work? Because i can't see any changes whatsoever.

Edited by stalker66
  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • Server owners, Top.MaxCheaters.com is now live and accepting Lineage 2 server listings. There is no voting, no rankings manipulation, and no paid advantages. Visibility is clean and equal, and early listings naturally appear at the top while the platform grows. If your server is active, it should already be listed. Submit here  https://Top.MaxCheaters.com This platform is part of the MaxCheaters.com network and is being built as a long-term reference point for the Lineage 2 community. — MaxCheaters.com Team
    • Someone knows if there is a free download in some place for get it?. Thanks!
    • NEWS Elysian Realms   LINEAGE 2 PRIVATE PUBLIC SERVER A complete, optimized, and feature-rich Lineage 2 experience — ready to launch, play, and scale.  OVERVIEW Elysian Realms is a high-quality Lineage 2 private public server pack, crafted for stability, balance, and long-term gameplay enjoyment. Every system is preconfigured and battle-tested, allowing server owners to focus on community and growth rather than constant fixes. Whether you aim for classic nostalgia or a modern custom experience, Elysian Realms adapts to your vision. STABLE & SECURE CORE Performance-focused and scalable core High uptime & low latency Bug-free, smooth gameplay Designed for long-term server stability Your players stay focused on the world — not server issues.  CUSTOM FEATURES WITHOUT COMPROMISE Authentic Lineage 2 feeling enhanced with smart QoL systems:  Interface & Visuals Unique UI tweaks Custom skins, armors, weapons, tattoos & cloaks Special camera effects on death Color Choose Player system Vitality 16+ special armor effects  Gameplay Systems Balanced skills & stats (fully tested) Unique Rebirth Manager (Doll Skills) Dolls items with custom skills Rune XP Bonus system (XP / SP / Drop boosts) Auto Pots system (.menu) Buff cancel (5 sec return)  PVE & FARMING CONTENT Expanded PvE zones Solo farm zones (Top / Mid / Low LS) Tyrannosaurus addons with top LS drops Party Farm Event Dungeon Manager Top Farm Items Manager Global Drop System Farm Protection (Captcha) Solo & Zerg protection system  PVP & COMPETITIVE EVENTS Flag Raid Zones (PvP zones) PvP Top Player events + rewards Special PvP & PK rankings (spawned in Giran) Tournament events (x3 / x5 / x9) TvT & CTF Random 1vs1 Event Hero Boss Event System Race of Wars (Unique Event) Elysian Ultimate Zones – God Zone RAIDS & WORLD CONTENT Raid HP announcements Special Gatekeeper: Farm Zones PvP Zones Raid Zones Event Zones Party Farms Random Locations Flagged Raid Zones (PvP enabled) AUTOMATION & SMART SYSTEMS Auto Farm (VIP) Auto Gold Bar system Auto NPC announcements (Giran Town) Auto login & online record announcements Auto Vote system with global rewards Auto Zones Timed Items Dungeon Unique. REWARDS, PROGRESSION & ECONOMY Achievement Manager Mission System (Cafe Points + Random Rewards) Capsule Boxes. Top Boxes system with configurable rewards Roll Dice System (Lucky Manager x2 rewards) Donate Manager (clean & transparent) Auction Manager (extended icon support)  FULLY DOCUMENTED & DEVELOPER FRIENDLY Complete server & client documentation  MULTIVERSE-READY CORE Supports C4-style to High Five gameplay Multi-language support Scalable rates Modular scripts & systems One core. Endless possibilities.  DESIGNED FOR Indie server owners & developers Event & GvG organizers Modders & hobbyists Fans of classic & custom Lineage 2 PROVEN & BATTLE-TESTED Previously online with 100+ active players All systems tested in live environment Balanced for both PvE & PvP longevity ELYSIAN REALMS PHILOSOPHY Elysian Realms isn’t just a server pack — it’s a complete Lineage 2 ecosystem built for players and creators alike. Ready to enter the Elysian World? Launch. Customize. Dominate.   https://www.l2elysian.com/
    • Case: medical report edits aligned with KYC logic ▪ The request looked “simple”: replace patient data and adjust values. In reality, it was a high-risk case where consistency matters more than numbers. What was done: → aligned name, gender, dates, and internal identifiers into a single logic → synchronized sample collection time, lab intake, and result print timestamps → carefully reduced values without exceeding reference ranges → added doctor’s signature and stamp with no repeating patterns → delivered the final document as a clean PDF with no editor traces ▪ Critical point: if you change only values while ignoring timing and service fields, the document fails on the very first checker. Conclusion: Medical reports are read as a system. Any mismatch in dates, timing, or layout breaks approval. ▪ We work with data logic, not with pictures — that’s why the result passes verification. If you have a similar case — we analyze the risks first, then proceed. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) #redraw #verification #documents #KYC #antifraud
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..