Changeset 374 (920)
Datatype organization, Geoengine, Clan, Zones, TaskManagers, Misc
Datatype organization
ZoneManager cleanup
- Moved to data.manager, extends XMLDocument, full Javadoc documentation.
- Zone types are now based on file name (automatically set, the dedicated variable is dropped).
- Few optimizations are done (zone constructor is unique per loaded file, Node 'for' loops are merged, use of IntIntHolder, getRegionX is moved one step higher to avoid to process it on every y call).
FishingChampionshipManager cleanup
- javadoc, CLogger, try-with-ressource use, String black magic > StringBuilder, use of addBatch and avoid to create a PreparedStatement per player.
MovieMakerManager cleanup
- javadoc, moved to data.manager, all _sequences container uses are enhanced. Don't create a new Sequence object when you update it.
Geoengine (was supposed to be part of next revision, but the removeInvalidSkills() hotfix made me commit it)
- Merge GeoEngine and GeoEnginePathFinding, use CLogger, edit _debugItems CopyOnWriteArrayList for ConcurrentHashMap.newKeySet().
- Delete PathFinding config.
Clan
- Tweak clan_data datatypes.
- village_master Clan and Alliance HTMs are harmonized.
- Extend internal usage of static pledge types, remove "Clan." from existing ones.
- updateClanMember method is deleted (it was full garbage).
- Implement "clan leader transfer cancellation" bypass (was written as undone in HTM).
- Addition of ClanLeaderTransfer task, which fix possible exploits regarding clan transfer. Set on THU 16:55 (17:00 being retail maintenance time, on 2007). Compared to L2J version :
- If the given newLeaderId doesn't exist on task execution, we reset it to 0 for this clan (no future execution of the task for this clan).
Zones
- BossZones
- Following zones are deleted : Ant Queen, Orfen (don't exist on L2OFF).
- Following zones are edited using L2OFF GF values : Sailren, Frintezza, Altar of Sacrifice.
- Ice Fairy zones have been implemented (3 new zones).
- Drop EnabledByDefault parameter (unused, I don't see the use since everything is on by default).
- CopyOnWriteArrayList is replaced for ConcurrentHashMap.newKeySet() for better performance.
- Players aren't teleported out if summon enters in a BossZone. The summon is still unsummoned. The unsummon part is moved inside the null check to avoid NPE.
- Zone names classes lose L2 prefix, javadoc is added. Some variables are either deleted (when unused), or renamed.
- Zaken curse zone is deleted (postIL).
- Damage zones deal 200 damages per tick, not 100.
- SpawnZone is renamed SpawnZoneType, to follow ZoneType and CastleZoneType.
- Addition of ZoneId.BOSS, to easier checks about boss zones.
- Cleanup htm/admin/zone.htm and related admincommand
- Fix an exploit using mass resurrect out of BossZone, reviving people inside it. Ty Sahar.
TaskManagers
- ItemsOnGroundTaskManager : merge 2 db connections, use of CLogger.
- MovementTaskManager : use regular ThreadPool, drop iterator and try/catch.
Misc
- Fix a MySql data truncation error for shadow items with time >= 600. Ty shyr for report.
- Fix players stop to attack when speaking to a NPC (before they were continuing attacking first target). Ty RooT for the report.
- Fix archer double damage.
- Fix skill animation cancellation with ESC.
- Fix autoattack which was cancelling by itself (for some dudes).
- Implementation of removeInvalidSkills(). Fix Expertise system, and regular skills downgrade / deletion on player delevel (based on player level + 9).
- All Clan containers are now concurrent. ConcurrentModificationException were rare, but they were possible.
- Fix blow formula (CRITICAL_DAMAGE_POS calculation). Ty sahar.
- Fix NPE for clanless people on siege (3 potential spots, because switch can't accept a null value being passed on it). Ty sahar for the catch.
- ServerRestart and ServerShutdown tasks are set to THU 17:00. Promise, I stop to edit them.
- All packets logs concerning exploits/integrity checks are dropped (obviously checks themselves are retained...).
- Say2
- Max number of characters is now 100 (from 99). Ty kvex.
- CRITICAL_ANNOUNCE can be used only by GMs characters.
- Invalid integrity checks simply return and don't logout player.
- Move CastleManager initialization higher in the hierarchy (was called indirectly by ItemsOnGroundTaskManager).
- Fix a NPE using "remove castle" admin command if CastleManorManager is disabled.
PS : - clan_data enabled column datatype is edited from enum to tinyint.
- SSQZone file is dropped (unused), all zones lose "type" parameter.
- Sailren zone id is changed to 110011, from 110015 (I ordered zones using L2OFF areadata.txt). Ant Queen && Orfen boss zones are deleted. Scripts are edited to reflect the change.
- The 3 animation bugs (archer, cancel skill, autoattack) come from rev 338 (exist since 2015). Consider to throw some stones to Hasha.
- if you use a live server, consider to redesign items.sql table.