Last aCis updates

Started by Tryskell, January 04, 2011, 10:46:15 PM

Tryskell

Changeset 371 (821)

Datatype reorganization, Skill stuff, Misc


Datatype reorganization
   - MapRegionTable > MapRegionData
      - Javadoc, extends XMLDocument, moved to data.xml, edit for mapRegions.xml. Drop useless methods.
   - PlayerNameTable > PlayerInfoTable
      - Javadoc, moved to data.sql, DataHolder > PlayerInfo.
   - DoorTable > DoorData
      - Javadoc, extends XMLDocument, moved to data.xml, StatsSet reuse, writting style.
   - RecipeTable > RecipeData
      - Javadoc, extends XMLDocument, moved to data.xml, StatsSet used for Recipe, RecipeList > Recipe. Extract RecipeItemMaker from RecipeData, and create model.craft package to store it.
      - The data is reparsed using L2OFF data.
      - Fix an issue with recipe name when destroying such recipe from book (was the case for Orcish Poleaxe for example).
      - Rework character_recipebook table, dropping one column. Datatypes are tweaked.
      - Fix an issue on complete recipe book destroy ; the deleted stuff wasn't saved on database.
      - Rework RecipeBookItemList packet. Add a missing use of it on Recipes itemhandler (refresh book or open it on recipe addition).
   - CharTemplateTable > PlayerData
      - Skill trees are now stored directly into player templates under a List, rather than SkillTreeTable. Most methods are moved into Player, since its a generic needed parameter.
      - We don't store anymore Item template list (for character creation items generation), but int array (since storing Item templates was pointless and not even used correctly).
      - All methods got a "single" and "all" versions to avoid to loop for nothing on all skills.
   - SkillTreeTable > SkillTreeData
      - Rework all skills holders, and move them on model.skillnode
      - All methods got a "single" and "all" versions to avoid to loop for nothing on all skills.
   - BufferTable > BufferManager
      - Use XMLDocument, move to data package, rename/cleanup. Data is edited to reflect changes.
      - Add an integrity check for available skills on player schemes loading to avoid NPE. Ty katara.

Skill stuff
   - Drop getSkillLearningClassId / setSkillLearningClassId concept.
   - Drop _expertiseIndex. It is now directly calculated from skill 239 level, and can be found using getSkillLevel().
   - Rework subclass skills addition. We only storeSkill the final List, leading to a massive drop of mid-operations. Ty vladalien for the initial workbench.
   - Cleanup removeSkill() / storeSkill().
   - autoGet skills are handled by PlayerTemplate data (skills with getSpCost == 0), the stuff isn't hardcoded anymore.
   - getSkillLevel returns 0 instead of -1 if no skill is found, making checks easier to write.
   - hasSkill is used instead of getSkillLevel when skill existence is needed, but we don't specifically need the level.
   - Skill enchantable routes now handle level 79 and 80. Each route can be manually edited.
   - Fix a visual issue about shortcut refresh on failed enchant skill.
   
Misc
   - Drop RATE_CONSUMABLE_COST && ALT_GAME_SHIELD_BLOCKS configs. Rename some players.properties configs.
   - Addition of StatsSet getIntIntHolder, getIntIntHolderList && getDoubleArray.
   - Fix an issue using a toggle when you run to a target with ATTACK intention. Ty Sahar.
   - getCurrentFolkNPC() -> getCurrentFolk(). The value retained is now a Folk, not a Npc.
   - Fix an issue on RequestAnswerJoinAlly introduced on rev 366, ty sahar.
   - Region size decreases from 4096 to 2048 (x4 WorldRegion amount, vision is reduced from 6k to 3k max). It now fits retail knownlist range.
   - Fist Weapon is moved from Player to PlayerTemplate (no calculation needed anymore on player login).
   - Formatting rule for lambdas && try-with-ressources. Use lambda writting style for all Runnable.
   - Cleanup L2Request > Request, keep a reference of the task to cancel it on onRequestResponse().
   - RequestRestartPoint doesn't use anymore a Runnable for instant use.
   - Drop door onEvtAttacked behavior, which was adding a ridiculous amount of operations for nothing.
   - RequestCrystallizeItem packet is cleaned up (avoid getItemByObjectId x2, World.getInstance().removeObject is already handled).
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 372 (846)

Datatype organization, Recommendation system, Sahar fixes, AdminCommands, Misc


Datatype organization
   DuelManager
      - Moved to data.manager, we use IdFactory to get a fresh id, Javadoc.
   CursedWeaponManager
      - Moved to data.manager, rename it, use of StatsSet. Data is edited to reflect changes. Javadoc addition.
   Lottery > LotteryManager
      - Moved to data.manager, renamed LotteryManager, basic cleanup.
      - Initialization is made on Gameserver (before it was a lazy initialization).
   MonsterRace > DerbyTrackManager
      - Moved to data.manager, renamed MonsterRace > DerbyTrackManager, generic cleanup.
      - HistoryInfo is moved into model package.
      - RaceManagerNpc is renamed DerbyTrackManagerNpc.
   CoupleManager
      - moved to data.manager, cleanup.
      - IdFactory id is correctly released on couple deletion.
   Skill datatype part II
      - Pet weight system (not overload, only the lower levels handled by weight penalty) is "desactivated" time I find a workaround to avoid a NPE.
      - Merge addSkill / removeSkill methods on Player, since it's the only place it is used. There is only one way to addSkill / removeSkill for now.
      - getAvailableAutoGetSkills() / getAllAvailableSkills() don't filter skills based on current player skills (skills correctly delevel back).
      - addSkill got a check to avoid to add a skill you already own (for now it uses equals, not sure if correctly working)
      - Don't save/restore autoGet skills since they're rewarded on player restore, saving 10+ skills per character. When an autoGet skill becomes a regular skill (cf. Wind Strike), it is stored into db.

Recommendation system
   - The task runs at 13:00 and not 06:30 (was a postIL date).
   - The task both handles online and offline players. Recommendations are normally correctly calculated for everyone.
   - The saving process has been entirely reworked ; _lastRecomUpdate is dropped.

Sahar fixes
   - Fix many Item Skills.
   - Fix Focus Death / Focus Power.
   - Fix Special Ability: Mighty Mortal.
   - Fix Special Ability: Infinity Scepter.
   - Fix Frenzy.
   - Fix Mystic Immunity.
   - Provide enchant routes for Rain of Fire.
   - Fix SystemMessage in CombatPointHeal.
   - isDebuff is initialized before isOffensive, since it is used by isOffensive.
   - Make use of IS_CRAFTING_ENABLED config in Recipes.
   - StatsSet: getList/getMap now return generic List/Map.
   - Added missing items to Blacksmith of Mammon SA removal multisell.
   - Added packet: ExServerPrimitive.
   - Added getters for custom use: BufferTable#getAvailableBuffs, MultisellData#getList, Hero#getAllHeroes.
   - Added abnormal="changetexture" to Zaken skill id 4223.
   - Fix summons stucking in walls on summon process.
   - Fix basemul wasn't working at all for MCritRate stat.
   - Drop z1 parameter from 2d MathUtil#calculateDistance method.
   - Fix the movement issue when you run near a NPC and interact with it (initial movement intention was kept).
   - Fix missing skills from previous resist rework. NPC resists should work anew correctly.
   - Fix OlympiadManager message.
   - Fix stuck character if new target is null (case of targeting high altitude wyvern users), and drop the Z check.
   
AdminCommands
   - Fix all occurences of -100 > -1 for character ban process, prior to AdminData cleanup. Ty hqsly for report.
   - //invul command is deleted. //setinvul now work on any Creature type.
   - Fix //heal radius attribute.

Misc
   - ServerRestart / ServerShutdown tasks are by default done on WEEKLY time rather than DAILY (still commented by default).
   - Delete unused "char_slot" tag on characters.sql
   - Few rename/edits regarding CharSelectInfo packet and associated content.
   - Pet instance entire cleanup (rework and String-ify queries, drop _isRespawned tag and updateRefOwner() method).
   - Fix a NPE on siege zone ressurection for clanless people.
   - Added retail implementation of shift click (interact/attack without moving). GMs can still use GM panel, but it will be replaced in case of a successful NPC interaction by regular showChatWindow.
   - Edit doormen/busy.htm.
   - Create a new instance type, BorderGuard, for "Guardian of Border" NPCs (those NPCs aren't Gatekeeper anymore, since they weren't using any functionalities of this instance). Move related bypasses and showChatWindow behaviors from Npc to it.
   - Add/edit/drop some javadoc.
   - CastleManager#getSiege() is renamed getActiveSiege() because it only shows sieges in progress (reflect better the result).
   - showPkDenyChatWindow uses are now made on both onBypassFeedback and showChatWindow, on the correct instances (to avoid instanceof checks).
   - Drop Gatekeeper validateCondition system (not retail and was using HTMs which weren't existing). The "siege in progress" check on teleport location is still correctly handled.
   - Edit SystemMessageId NO_PORT_THAT_IS_IN_SIGE for CANNOT_PORT_VILLAGE_IN_SIEGE.
   - Delete PartyMatchRoom creation/edition logs.

PS : characters.sql loses "last_recom_date" and "char_slot" parameters.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#272
Changeset 373(887)

Datatype organization, Tasks, Clan, Config, Organization, Misc


Datatype organization
   BoatManager
      - Moved to data.manager, javadoc.
   CastleManager
      - Moved to data.manager, extends XMLDocument.
   CastleManorManager
      - Moved to data.manager, extends XMLDocument.
      - Queries are stringified.
      - More uses of Java8 lambdas.
   NpcTable > NpcData
      - Moved to data.xml, extends XMLDocument.
   RaidBossPointsManager > RaidPointManager
      - Rename, moved to data.manager, javadoc, cleanup.
      - Fix the order on ranks calculation. Ty katara.
   Caches
      - Move gameserver.cache to gameserver.data.cache
      - Cleanup HtmCache and CrestCache (adjust filters, javadoc, Logger...).
      - Drop AdminCache adminhandler (2 commands are dropped). Generic //reload type (crests / htm) still works.
      - Invalid crests files are deleted on server loading (being wrong format, wrong length, etc).
      - Fix an issue where old crests files weren't destroyed on crest edition.
      - RequestSetAllyCrest writting style is harmonized using similar packets.
      - RequestSetAllyCrest / RequestSetPledgeCrest / RequestExSetPledgeCrestLarge don't accept data length of 0 (case of crafted packets).
      
Tasks
   - Unify naming convention. Drop the logs.
   - ServerRestart/Shutdown are moved from MON to THU (still 4AM) to emulate maintenance task of retail server. Still off by default.
   - Drop OlympiadSave task (pointless).
   - RaidPointReset task is enhanced on numerous locations :
      - only clan level 5+ are checked (external loop is reduced).
      - ranks are calculated only for the 100 first (internal loop is reduced).
      - addReputationScore is made only on final score and not on every member check (no multiple db operations / packets broadcast for the same clan).
      
Clan
   - Basic cleanup, minor improvements, javadoc.
   - Don't reward clan skills if player is on olympiad mode.
   - _hiredGuards and associated stuff is dropped (not used).
   - RankPrivs class is dropped, it is edited for a simple Integer on the Map.
   - SubPledge class is moved out of Clan, to model.pledge.
   - CLAN_HAS_ALREADY_ESTABLISHED_A_CLAN_ACADEMY SystemMessageId is correctly shown.
   - Table clan_skills loses skill_name column (unused).
   
Config
   - Drop min/max protocol version.
   - Drop few unused loginserver configs.
   - Drop crown/circlet config (see Misc section for explanation).

Organization
   - CharCreateFail / CharDeleteFail use static approach.
   - VehicleAI / VehicleLocation / Vehicle / model.vehicles / VehicleStat > BoatAI / BoatLocation / Boat / model.boat / BoatStat. getVehicle() is merged with getBoat().
   - Implementation of CLogger (C for crappy, obviously). An effort will be done to unify all loggers writting style with time (people will complain if I only commit that).
   
Misc
   - 3158 skillId fix. Ty sahar.
   - Drop ON_KILL event on SummonMinions script (unused).
   - Fix dropMultipleItems method (impacts Q108, Q163, Q354 && Q360), ty x-user.
   - Fix the impossibility to use NPC names for players and pets. Pet name pattern introduces back numbers. Ty RooT.
   - Rework Player.getMemo(), drop getMail() (already handled by MailBBSManager). Probably fix a rare NPE with getMemo().
   - //setname can't reward a name which is already owned (player-based restriction).
   - Unify handlers writting style.
   - setReputationScore() is processed only if clan level is > 4. You can't accumulate CRPs, no matter the action, if your clan isn't at least level 5.
   - Drop the task on JailZone, leading to infinite teleport. Ty smoke121.
   - Fix toggles which aren't supposed to be desactivated while sitting. Ty TreasureHuman.
   - Fix following issues introduced in previous revisions :
      - Revert removeSkill parts to handle back "keep effect" behavior for augmentations / items passive skills.
      - Revert getAllAvailableSkills edit to make enchant working anew with idiot config. To handle deleveling correctly we need correct magicalLevel for every skill.
      - Fix config about invul gm on startup, since //invul drop.
      - Fix Party IOOBE prior to rev 652.
   - Rework crown/circlet item restriction system.
      - Don't delete objects (not retail).
      - Rework Player#checkItemRestriction() which wasn't properly updating character (headgear was still shown).
      - Rename Castle#removeCirclet and removeCircletsAndCrown for checkItemsForMember and checkItemsForClan. Methods are optimized (clan method uses only one connection for all members).
   - Edit ON DUPLICATE KEY UPDATE queries to handle parameters directly on query and not on core.
   
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#273
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.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 375 (958)

AIs, Datatype organization, Misc


AIs
    - Intentions
      - Move onInteractionInteract logic on PlayerAI (PlayerAI is the only AI to use INTERACT).
      - Improvement of Desire class.
      - _nextIntention Object is updated and not created everytime anymore, which will save some memory.
      - Fix the NPE on onEvtReadyToAct() due to a lack of synchronization.
      - Add a next intention for INTERACT case if current is CAST, but a lot more cases need such improvements (PICKUP after ATTACK/CAST notably).
   - Attack stance
      - Drop _clientAutoAttacking variable.
      - Rename clientStartAutoAttack() for startAttackStance(), same for stop. Correct use of inheritance / override.
      - A missed hit doesn't start victim attack stance.
      - Drop multiple clientStopAutoAttack() / abortAttack().

Datatype organization
   - ScriptManager > ScriptData. Extends XMLDocument, CLogger, few Javadoc.
   
Community Board
   - Complete cleanup (method names, try-with-ressources, stringified queries, variable renaming, stream uses, CLogger uses)
   - ForumsBBSManager uses ConcurrentHashMap.newKeySet() instead of CopyOnWriteArrayList as container (performance).
   - MailBBSManager uses ConcurrentHashMap instead of HashMap as mails container (fix a potential ConcurrentException).
   - MailBBSManager.sendMail method is optimized.
   
Shutdown
   - Cleanup (use of CLogger, some methods cleanup).
   - ServerStatus.STATUS_DOWN is called when time is <= 60. Before it was called only when the timer was reaching 60, meaning the server status was never updated if a shorter time was set as restart/shutdown time.

Misc
   - Drop COORD_SYNCHRONIZE config.
   - Fix Q232. Ty LordWhiz.
   - Some SummonFriend methods cleanup. Add YOU_MAY_NOT_SUMMON_FROM_YOUR_CURRENT_LOCATION message.
   - Added DebugMovement config.
      - Set to 0 by default, if > 0 it will throw items to track server-side movements. Used as a debug tool.
      - The timer, which is the config, delete objects after X seconds.
   - Move ItemTable#createItem and #destroyItem to ItemInstance. Rename them create and destroyMe.
   - Refresh clan wars on clan deletion (db was correctly handled, but not server variables). Ty Sahar.
   - Tweak subclass change overweight check. Ty Root.
   - Addition of Lightning Strike enchant routes. Ty Sahar.
   - Fix an issue where heroes who took gate passes before taking hero status get the gate passes as if they aren't heroes. Ty Sahar.
   - Weekly maintenance time set to Tuesday and not Thursday (was right in 2008 at least, edited for Wednesday since 2011). Ty Sahar.
   - Handle correctly hero item inventory discard on relog - isHero() being not fed on Player object creation, we have to rely on another source. Ty Sahar.
   - Dismount player on Olympiad teleport. Ty th0r1 for report.
   - Raid points event is every month, not every week. Ty Remix2k18 for report.
   - Fix Q118 && Q123 getSponsor check logic.
   - Fix for double penalty of 3rd class summons. Ty Sahar.
   - Fix a typo in clan full system message. Ty Sahar.
   - Fix a bug causing hero weapons to disappear if relogging with them equipped. Ty Sahar.
   - Fix missing stacktype for song of renewal / wind (can cause a bug : when rebuffing that buffs disappears). Ty Sahar.
   - Fix hero items are not being deleted from player if he is online (player had to relog to have the item deleted). Also, drop a double InventoryUpdate packet send. Ty Sahar.
   - Fix being able to buy items from disallowed NPCs in some situations (like teleporting away and then buying something). Ty Sahar.
   - Fix character gets stuck if trying to interact with an unreachable target more than once. Ty Sahar.
   - Fix issue where if you change target while already running to a certain target, you will still run towards the old target. Ty Sahar.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 376 (990)

PetitionManager, "Chaos time" system, Loot protection, Doors / Walls, Misc


PetitionManager
   - Creation of the package model.petition to hold inner classes of PetitionManager. Move PetitionManager to data.manager.
   - HashMap > ConcurrentHashMap to avoid CMEs.
   - Generic cleanup on all those classes.

"Chaos time" system.
   - RBs are affected by chaos time, for the following rule : 20% luck to change target every 1m (set on the same task than "return by teleport to spawn" behavior).
   - RBs minions got 33% luck to change target, tested every 1m (set on the same task than their RB to avoid pointless objects).
   - I didn't see specific/general rules for GrandBosses regarding chaos system. There isn't a single method call RandomizeAttackDesire() on those scripts. The behavior is entirely dropped. Scripts would be eventually edited to reflect this change.
   This little rework will fix those issues :
      - Divide between 6 to 10 the amount of target switch.
      - The random aspect to choose the next target is now really random.
      - Slight improvement, as no action is done if the same target is chosen.
      - The logic between all conditions is normally correctly handled.
      
Loot protection
   - Improvement of logic behind the main damager dealer acquisition :
      - Main damage dealer isn't edited into ItemInstance.create anymore, it is now done way before to avoid to process it on every item creation.
      - "First command channel leader" as "master looter" is now also taken into consideration on custom config AUTO_LOOT.
      - setDropProtection is moved out of ItemInstance.create, into the single usage (Attackable#dropItem) to avoid pointless casting.
   - Drop the single occurence of doItemDrop(Creature), cleanup unused parameters for 2 other methods.
   - Fix the loot protection for RBs. Regular player rules apply on them. No party thing.
   
Doors / Walls
   - Doors HPs are visible by anyone in sieges. Ty TigVecc for report.
   - Doors/walls are anew attackable by player skills upon a castle siege progress, but deal 0 damage (cosmetic edit). Ty TigVecc for report.
   - Missing CTRL (forced attack) behavior for Doors/Walls is added.

Misc
   - Don't clear Lists on Harvest/Sweep while they are still processed, to avoid ConcurrentException - let onSpawn() handles the cleaning.
   - Implemented retail player spawn locations system. Ty vampir for the hint.
   - Desire intention can't be null anymore, to avoid NPEs (2 scenarios with _nextIntention). Ty Sahar.
   - Fix the Exception when players are riding Striders with GM Haste on and disconnect. Merge stopAllTimers() to the single-used location. Ty Sahar.
   - Add back the food task on //ride, since a simple //kill and //revive generate a food task, making it looks like an "issue" while it was a "GM feature".
   - Fix Wyvern mounted players, which got their attack speed set to 300 (static) and 150 if Wyvern is hungry. Fix indirectly the single Wyvern skill.
   - Addition of "Food for Wyvern" into the GM shop.
   - Fix Q027. Ty zarie.
   - Fix Q218 quest logic behind Talin pieces acquisition. Ty Nophaie for report.
   - Tweak calcMagicSuccess in order low level skills can affect targets (base calculated on a 30 levels difference).
   - Fix Blacksmith of Mammon - Unseal/Reseal. Ty zarie.
   - Ban/kick actions don't close the client anymore, only the logout action does it. Drop secondary logout() method.
   - Fix any Plando-like creature (throwing spears issue).
   - EffectTargetMe fix after previous Desire edit (any aggression skill).
   - Retail /clanpenalty implementation. Ty Caparso for report.
   - Fast fix for Summon PC / AV - Teleport (Portas, Flash of Splendor,...).
   - "Kailu Balu" Z spawn fix.
   - Few mini cleanups :
      - _isRaid is dropped from Creature.
      - Few lambdas use.
      - Timestamp class is moved out of Player class, to model.holder package.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 377 (1020)

IXmlReader, AIs, Quests, Misc


IXmlReader - Ty Sahar
   - Drop XmlDocument and replace it by the interface IXmlReader.
   - Existing and already reworked classes which were using XmlDocument are now using IXmlReader.

AIs
   - Fix disabled AI NPCs stucking on ATTACK intention.
   - Fix minions interrupting their current cast to join the master.
   Queen Ant
      - Larva is set as disableCoreAI (it doesn't react anymore).
      - Addition of the 3 "teleport out" locations for players during Queen Ant spawn. Added back a zone corresponding to Ant Lair, to port back players.
      - Addition of onSkillSee/onAttack events for Raid Curse, which is spread for all types of ants. onAggro Raid Curse is reworked to reflect retail behavior (isn't supposed to silence mages).
      - Addition of Anti Strider Slow curse (Queen Ant onAttack behavior).
      - Rework the Nurse healing process in order it uses onFactionCall event instead of 1s task (which remove some variables).
      - Queen Ant spawn sound is corrected. Social actions amount is also corrected.
      - Nurses only heal larva and queen, not other types of faction-related ants anymore.
      - Decrease the amount of Nurses (from 5+2 (queen+larva) to 3) and Royal Guards (from 7 to 4).
      - Addition of Queen Ant behavior casting skills for following events, using retail values : onSkillSee, onFactionCall, onAttack.
      - Nurses/Royal Guards respawn time is now correctly handled (10sec Nurses, 280 + Rnd.get(40) for Royal Guards).
      - Royal Guards are teleported back on the Queen Ant zone, if out. It uses as task.
      - Queen Ant is teleported back to spawn point if out of her territory. It uses an event.
      - Royal Guards are now affected by chaos time (66% chance, tested every 90 + Rnd.get(240) seconds).

Quests
   - Addition of Q115 (made from scratch by me).
   - Addition of Q648. Ty to roko91 for the good work !
   - Fix Q403. Ty shyr for report.

Misc
    - Few HTM typos fix from the forum dedicated topic. Ty to sharers (Vampir mostly).
   - Fix a custom config (raid boss drop). Ty SweeTs.
   - Merchant HTM folder up to 31400.
   - Fix the double message on Transfer Pain (already handled by SummonStatus). Ty Sahar.
   - Drop memos associated to a deleted player. Ty ForgeOfGods.
   - ProtocolVersion accepts all legit Interlude revisions, not only the last one.
   - Tweak aggroReconsider() to don't bother with aggro lists <= 1.
   - Fix issue where circlet/reputation removal would be applied to the wrong clan after a castle siege. Ty Sahar.
   - Drop ZoneType onRevive/onDeath (unused).
   - Teleportation stuff
      - Fix a StackOverflow issue if you were using teleToLocation on following zone events : notifyExitZone / onExit.
      - teleToLocation rework ; use as low as possible advanced methods, avoid to use spawnMe()/decayMe(). Fix all issues related for using onSpawn() content.
      - Creature#setRegion handles all possible zones revalidation scenario, allowing us to get rid of revalideZone(true) from onSpawn/teleToLocation.
      - Drop Summon#onTeleported() - pet is supposed to be summoned near the owner, broadcasting packets automatically.
      - The only legit onSpawn behavior is maintained for SiegeSummon, using onTeleported.
   - MinionList rework
      - Store the current state of minion spawn/despawn in order to reuse it. Fix an issue with onMasterTeleport() - minions were created back, leading to x2 minions if respawn tasks were already scheduled.
      - Cut the number of container modification, since _minions container doesn't add/remove anymore. Only the boolean state is edited.
      - spawnMinions is only used once. It now generates _minions container content.
      - Seperate die/deletion behaviour. setLeader(null) is only set if deletion occurs (to prevent OOME).
      - Rework onMinionDie in order scripts currently affect the modification on respawn time setting (notably moving out whatever modified the respawnTime).
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 378 (1056)

MinionList, Fishing, DerbyTrackManager, Cleanup, Bugfixes


MinionList
   - Addition of show_minion.
   - Fix the minion respawn (broken on last revision). Ty Ericu for report.
   - Edited minions system to fit L2OFF behavior. Ty shyr for testing.
      - Regular minions don't respawn when master is alive. They despawn only if they switch to IDLE (case of returnToRespawnPoint for others monsters).
      - Raid boss minions are untouched, they do respawn when master is alive, and instantly despawn on master death.
   - setLeader > setMaster, all uses are edited to reflect it (edited to avoid to melt with getClan().getLeader()).
   - Minions are now setMaster(null) towards master death to avoid collateral aggro once new master comes along. In order to make minions despawn, a rework of isMinion() was needed.
   
Fishing
   - L2Fishing is renamed FishingStance. All variables and methods related to fishing are moved from Player to this class.
   - All fishing zones maxZ are reviewed (no more flying baits).
   - The way to calculate the bait location is modified.
   
DerbyTrackManager
   - Fix all issues regarding lanes swap.
   - The List of NpcTemplate is edited to be a List of Npc, which avoid to generate new Monsters instance on every race. The 24 instances are re-used, over and over. The List is shuffled, then the first 8 instances are picked as runners.
   - Current race number is now calculated based on LAST REGISTERED HistoryInfo race number, and not on number of total entries. If you manually delete old entries, it won't affect anymore the data integrity (only the data of the ticket you try to retrieve). In the same order of idea, getHistoryInfo is added to retrieve an HistoryInfo based on the saved race number, and not based on the getHistory() index anymore.
   - Minor reworks here and there (methods rename, addition of methods, Javadoc).
   
Cleanup
   - Deletion of Config.DEBUG.
   - Multiple Logger > CLogger. Improve errors log details. Ty Sahar.
   - AugmentationData cleanup (8900 > 1800 lines for skills.xml). Ty Sahar.
   - IPv4Filter cleanup. Ty svipben.
   - Slight edit of SpawnZoneType (renames and merge of identical methods). All zones are edited to reflect x/y/z caps removal.
   - Add writeLoc as part of SendablePacket, and use it where it can be used.
   - Addition of spawnMe(Location).
   - IXmlReader#parseLocation is added.
   - LoginFail / PlayFail packets static approach.
   - CursedWeapon cleanup (try-with-ressources, CLogger, static queries).

Bugfixes
   - Fixes due to IXmlReader implementation :
      - Fix broken chaotic spawn locations loading. Ty shyr for report.
      - Fix //reload zone - Miss to reset _lastDynamicId to 0.
      - Fix //reload acar - Miss to "play" with _highestLevel. It's dropped, and accesses are set on TreeMap for easy highest level found. Fix also the log regarding master level logging in.
   - Refresh informations regarding //reload admincommand (prior to AdminData rework). Ty Toxico.
   - Fix summons forced skill cast. Ty bowling4soup.
   - Fix party-broadcasted message related to distributeItem. Ty bowling4soup.
   - Gatekeeper Arisha HTM cleanup. Add a missing loc. Ty shyr for report.
   - Add more accuracy to angle<>heading conversion.
   - PartOfCharacterHeight is set to 95 by default instead of 75 (more accurate with eyes position...).
   - //spawn default respawn time is set to 60sec instead of 0sec.
   - Addition of both //show_minion and //knownlist buttons into npcinfo.htm.
   - Let Cursed Weapon tasks run up to their current loop. Avoid InterruptedException.
   - BufferUnderflowException is handling differently, to avoid ProtocolVersion spam. Ty SweeTs.
   - Entire cleanup of isRaid(), isRaidMinion(), isMinion().
      - Introduction of isRaidBoss() and isRaidRelated() (previously named isRaid()).
      - Deletion of isRaidMinion.
      - Avoid the weird "isRaid() && !isRaidMinion()" to speak about a raid boss.
   - Fix 2 issues related to teleport process :
      - on teleport, zones are correctly registered (bug introduced on last rev). Ty SweeTs for report.
      - compass and water are correctly refreshed (bug as old as L2J).
   - //setinvul uses isMortal, not isInvul anymore. Deletion of FolkStatus, NPCs are setIsMortal(false) instead.
   - SiegeFlag alert timer is moved from 20s to 30s delay.
   - Fix all wrong NPC levels (Bosses included). Add npcId 13015.
   - Duels are now interrupted if an Attackable hit one of the duelist.
   - Add the 6 missing castle warehouse keepers on castle related NPCs (they don't exist on L2OFF data too). Ty shyr.
   
PS : when you want to speak about a raid boss or raid minion, simply use isRaidRelated(). isRaidBoss() returns only Raid Bosses. isMinion() returns any minion type.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#278
Changeset 379 (1104)

Zaken, Four Sepulchers, Dimensional Rift, Cleanup, Bugfixes


Zaken
   - Addition of Zaken script. Ty Asmodeus for the initial work. Numerous cleanup and fixes have been done to fit exactly L2OFF script.

Four Sepulchers
   - Big cleanup (CLogger, Maps are reviewed, merged methods, try-with-ressources,...) with a complete events cycle rework.
   - Fix NPE issue and invalid weight penalty check on FourSepulchersManager.tryEntry (called by Q620_FourGoblets).
   - Drop the 4 duplicated managers spawns from spawnlist (already handled by the Java class).
   - Fix multiple bugs/exploits related to chests interaction (they now instantly disappear).
   - SepulcherNpc onActionShift behavior is added.
   - Add the regular message broadcast "The monsters have spawned!" for Hall Gatekeepers on door opening.
   - Monsters, upon mysterious chest opening, instantly spawn. There isn't 3,5s delay.
   - The petrification effect on statues is now instant upon statue spawn to avoid statues got time to move/get aggro. Statues are also set as noRndWalk.
   - SepulcherMonster class is dropped, a script named FourSepulchers handle all old behaviors (and even more). NPCs are re-allocated as Monster.
      - Victims are removed from FleeingNPCs script to be included directly on FourSepulchers script.
      - Archon of Halisha (the ones with 18xxx npcId) are removed from SpeakingNPCs script (not retail).
      - Victim behaviour is added (run and shout while being hit by a NPC).
   - Added retail time limit upon Mysterious Boxes opening (can't open anymore after the 49th minute), with the associated message broadcast.
   - Add HalishaChest instance : animation on spawn, don't attack, don't random walk anymore.
   - Delete remnant Chapel Keys from Players on zone oust.
   - Edit begin/end timer to fit with royal_rush_npc AI, aka : 50th min game end, 55th min game registration, 0th min game start. Shouts are made from 5th min to 45th.
   
Dimensional Rift
   - Regular cleanup on DimensionalRiftManager (IXmlReader, CLogger,...)
   - The room choice process is entirely revamped to avoid to use do/while loops which can potentially stuck up.
   - DimensionalRiftRoom is moved in its own file. A lot of cleanup here too (_roomMobs List is dropped, Location instead of int[]...).
   - Fix an issue where getFreeRooms considered boss room as valid empty room on initial start method (Rift was considered as 1 free cell to teleport in - while there was actually none).
   - teleToLocation override is moved from Creature to Player. Player also got a new teleToLocation(Location) method which simply call the super method and avoid the rift check (used only by Rift system).
   - Regular cleanup on DimensionalRift.
      - Store DimensionalRiftRoom instead of its id, which avoid to make a lot of get on DimensionalRiftManager rooms.
      - Timer / TimerTask are replaced for Future<?> and get use of ThreadPool.
      - CopyOnWriteArrayList > ConcurrentHashMap.newKeySet().
   
Cleanup
   - More Cloggers.
   - oustAllPlayers() returns the List of kicked Players.
   - Add scriptValue as part of npcinfo.htm.
   - GameServerTable is slightly refactored : renamed to GameServerManager, get use of CLogger and IXmlReader. servername.xml is renamed serverNames.xml.
   - PlaySound complete packet structure. Ty RooT.
   - Add IXmlReader addAttributes to feed an existing StatsSet. Few StatsSet cleanup. Ty Melron.
   - Npc#onActionShift npcinfo GM content is moved on sendNpcInfos.
   - L2AttackableAIScript#testCursesOnAttack method is added and used on every GrandBoss (bosses who haven't yet been reworked aren't affected - Core and Orfen). testCursesOnAggro is also added.
   - Quest / Scripting
      - onAttack behavior is edited to allow any Creature attacker to trigger it (and not only Playable).
      - onKill behavior is edited to allow any Creature killer to trigger it (and not only Playable). Indirectly fix a huge issue, where a NPC attacker would stuck victim onKill event.
      - Following methods return QuestState instead of Player, for easier management inside quests. Associated quests have been edited.
         - getPartyMembers(Player player, Npc npc, String var, String value).
         - getRandomPartyMember(Player player, Npc npc, String var, String value).
         - getRandomPartyMember(Player player, Npc npc, String value).
         - getPartyMembersState(Player player, Npc npc, byte state).
         - getRandomPartyMemberState(Player player, Npc npc, byte state).
      - Addition of Quest#addGameTimeNotify(). You can now easily add scripts behaviours based on ingame day time.
   - Add Creature#isInsideRadius(Location loc, int radius, boolean checkZ, boolean strictCheck).
   - Add Attackable#cleanAllHate() - which clean the hate, but keep all AggroInfos (to keep track of rewards).
   
Bugfixes
   - isBannedGameserverIP returns true if IP address can't be retrieved.
   - Fix the auto-attack behavior which should stop once the target isn't autoattackable anymore (include skills nextActionIsAttack behavior). Ty Kraker for fix.
   - Some crests related packets checks addition. Fix one potential client crash. Ty RooT.
   - Fix a title exploit adding a regex pattern for RequestGiveNickName. Drop isValidPlayerName.
   - Fix minions dissapearing after healing (ex : Ant Nurses)
   - MutedFolk onActionShift behavior is added.
   - Stop the current bow attack if the Player hasn't enough MP. Ty ForgeOfGods.
   - Fix the possibility to target things when incapacited.
   - Add OTHER_PARTY_IS_Broken check for duels.
   - Edit Attackable#returnHome(boolean) to use cleanAllHate() instead of _aggroList.clear(). Drop hasAI() and getMoveSpeed() checks (the first creates issues upon single player region teleport, the second is simply pointless).
   - AutoSpawnManager fix on AutoDespawner. Ty Denzel for fix.
   
PS : Four Sepulchers configs are all edited. Please refresh your events.properties.
PS : Regular teleToLocation(Location, int) should always be used. The only counter to this rule is teleported by rift itself (otherwise you are moved back to waiting room) or eventually custom skills which teleport you (rush, etc).
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 380 (1133)

RaidBossManager rework, Admincommands, DayNightSpawnManager rework, Scripts, Cleanup, Bugfixes


RaidBossManager rework
   - Regular cleanup (CLogger, try-with-ressources, stringified queries,...).
   - Edit tasks to not be canceled, probably fixing InterruptedException on raid boss death.
   - Tweak raid boss death query in order to only update it, and not all raid bosses.
   - Fix the raid boss loaded HPs upon server restart.
   
Admincommands
   - Revert //setinvul (setIsInvul true), rename it //invul and move it on AdminEffects.
   - Add //undying, which takes back the current //setinvul behavior (setIsMortal false).
   - Add //buff <skillId skillLvl>. If no valid Creature target, use player itself. Can be used as buff/debuff.
   - Fix admincommands para_all / para (mobs were still ending current casting/attack).
   - Add admin_debug for the alt+G panel ("Information" button).
   
DayNightSpawnManager rework
   - Cleanup (divide by 3 the class).
   - Hellmann is moved out, to its own script. The day/night spawn is fixed.
   - Fix the issue where day/night spawns are only handled on next day/night change after server start.
   
Scripts
   - ON_CREATURE_SEE event type is added.
   - Fix Q023 : upon saying Innocentin you didn't read the book, the quest was freezed.
   - Q024_InhabitantsOfTheForestOfTheDead is added.
   - "ForestOfTheDead" script is added. In the end, it will gather all related AIs. Handle following for now :
      - Hellmann day/night spawn.
      - Cursed Village NPCs day spawns.
      - Q023 "Maid of Lidia" night spawn.
      - Q024 night Dorian check.
   - Add a missing QueenAnt onAttack condition regarding fire spells. Ty bowling4soup.
   - NPE fix for onKill. Also allow onKill to handle custom suicide behaviours (simply check if killer is npc).
   
Cleanup
   - Complete ChangeMoveType packet structure. Ty RooT.
   - Complete TeleportToLocation packet structure.
   - Rename Creature#teleToLocation for teleportTo.
   - Addition of instantTeleportTo method (used for short distance teleport, mostly skills). GetPlayer skillhandler is edited to use it.
   - Addition of WorldObject#refreshKnownlist() method (used only by instantTeleportTo).
   - Drop unused Player constructor.
   - Move all unrelated content (spoil, soul crystals, seed,...) from Attackable to Monster (1 Map, 2 Lists, few other variables : Guard / SiegeGuard don't need such).
   - Slight Henna rework, ty StinkyMadness.

Bugfixes
   - On teleport, the heading is now taken in consideration.
   - Fix NPE for detached Players upon //character_info use. Ty sahar.
   - Complete previous fix regarding auto-attack behavior which should stop once the target isn't autoattackable anymore.
   - Fix Q634 Dimensional Fragments drop amount/rate.
   - Anakazel rewards Soul Crystal leveling to all party members.
   - Fix a weapon equip task exploit. Ty Celestine for the detailed video.   
   - Fix ghost attacks upon stun/sleep/paralyzed/... effects. Notably visible on NPCs.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#280
Changeset 381 (1225)

Updates, Cleanup, ClanHall, Bugfixes


Updates
   - aCis officially support JDK11 (since Oracle changed their licence, consider to use OpenJDK), and is now mandatory. Older/different versions aren't supported anymore.
   - Refresh mysql connector from 5.1.26 to 8.0.15.
   
Cleanup
   - Revert StringUtil#isEmpty(String... strings) logic.
   - Rnd.get(list) / Rnd.get(array) uses are unified over the source. Those methods don't send anymore default values, and will lead to errors if the given array is null.
   - Add Player#isWearingFormalWear().
   - Add ExProperties#parseIntIntList.
   - Add ZoneType#addKnownObject / removeKnownObject.
   - Drop L2Skill isDemonicSkill() / isFlyingSkill() / isStriderSkill() - no use anymore.
   - Activation of the try-with-ressources warning. All impacted classes were cleaned up in the process (renames, CLogger addition, regular writting style, Stringified queries, Javadoc...). I won't list all changes, but there was something like 200+ warnings.
   - IdFactory
      - Merged with BitSetIDFactory.
      - Drop _freeIds.clear() on initialization (Javadoc says it sets to false by default).
      - Drop _initialized flag (unused).
      - Drop Collections.sort(usedObjectIds) (pointless).
   - Basic Duel packets cleanup. Add missing ExDuelEnemyRelation packet (with no use). Ty RooT.
   - ZoneType#getKnownTypeInside returns Collections.emptyList() if no characters are found - avoid to generate an empty List for nothing. Delete children classes isEmpty() checks.
   
ClanHall
   - Complete rework of ClanHall system. Added to the regular cleanup (CLogger, Javadoc, Stringified queries,...) :
      - Improve clanhall admin management.
         - Usage is now //ch chId <set|del|open|close|goto|end> (one admincommand for all actions).
         - Clan Hall and Siege admincommands got now seperated AdminCommandHandler.
         - No more Exception on invalid parameter for both clan halls and sieges admincommands.
      - Fix clan hall doormen "To Beginning" button.
      - Change the way of attribution of ClanHallManagerNpc ClanHall (no subsequent ClanHallManager calls).
      - XMLize static data (moved out from SQL). Merge Auction db content with ClanHall db content. AuctionManager is dropped, Auction is now stored to the ClanHall directly.
      - Rework the fee task to be more friendly.
      - ClanHallFunctions are loaded in same time than ClanHall, to benefit from the existing Connection. ClanHall don't use anymore one Connection per ClanHall, too.
      - "Clan Action" panel is refreshed upon ClanHall free() method call.
      - Fix an issue with owned ClanHall bids cleaned up upon server start.
      - Upon setOwner() : previous owner got some actions made on it, fee task is renewed for new clan, existing ClanHallFunctions are deleted, outsiders are dumped out.
      - Doors are closed for both free() / setOwner() processes.
   
Bugfixes
   - Implementation of EventTrigger packet + retail usage (castle traps visual effect on siege progress). Ty RooT.
   - Implementation of ExMPCCPartyInfoUpdate packet.
   - Add mods_wedding as part of restored objectIds (otherwise those ids are usable, while they shouldn't).
   - ShortcutList / Shortcut
      - Fix addition/remove/update SKILL shortcut type (manual or from trainer).
      - Integrity check upon addition (check MACRO, RECIPE, ITEM, SKILL types).
      - Fix cleaning issue for ITEM (dropping an item on ground was only clearing the first occurence of shortcut met, not others if existing).
      - Implementation of ShortCutDelete packet.
   - Olympiad Competition starts time seconds are set to 0.
   - EnterWorld exploit fix (create a special GameClientState ENTRING for the occasion, more infos here : http://acis.i-live.eu/index.php?topic=10070).
   - GMViewSkillInfo shows correctly disabled skills when wearing Formal Wear. Also refresh skills state upon equiping/unequiping Formal Wear.
   - Add back regular skills use for mounted players and cursed weapons users. Indirectly fix SoE and alike skills items for mounted / CW user.
   - Fix zone/region overlapping (can be tested on Giran castle active front trap). Ty bowling4soup.
   - Fix Q348. It uses L2OFF script for Blooded Fabric acquisition formula.
   - Add MultiSellChoose _entryId integrity check to avoid packet craft (avoid IOOBE). Ty Ghadda / bowling4soup.
   - Rework BrokenLabyrinth based on L2OFF GF. Fix an IOOBE.
   - Edit Linux shell scripts to automatically create log folder if not existing. Ty RooT.
   - Add CW SocialAnimation upon ranking.
   - Fix CW visual effect (goes from 1 to 10 stage, not 0 to 9). Ty RooT for tip.
   - Fix XP/SP calculation. HP ratio is already taken in consideration by template values. Ty Ghadda.
   - Revert previous edition of a config, based on Sahar observations - From -18104, 109992, -2656 to -18312, 110056, -2512 archers could shoot.

   
PS : if you already own a live server, you have to add "?serverTimezone=UTC" as part of database URL.
PS2 : you have to refresh your developement board :
   - OpenJDK 11 can be downloaded here : https://jdk.java.net/
   - Eclipse 2018-12 or any IDE accepting JDK11.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#281
Changeset 382 (1288)

Since a lot of core has been edited/moved, sources will be exceptionally shared at rev 382 for Customers, added to the diff patch for the adventurers. If you begin to dev a project, I strongly invite you to port your customs directly on 382 shared pack.

Organization, Cleanup, Bugfixes


Organization

A lot of organization has been made, in order to give some consistency to core side.
   - Creation of package gameserver.enums. All existing enum have been moved here, and renamed to either get distinct name (CtrlEvent / EventType being too generic), and to fit with new convention name for enums (has to end with "Type" or "Status").
   - Creation of package gameserver.model.actor.player and gameserver.model.actor.npc, holding classes related directly to Player and Npc (+ children) classes.
   - Creation of package gameserver.model.spawn, holding AutoSpawn / L2Spawn / BossSpawn classes.
   - Drop model.base and model.actor.appearance packages.
   - Player is moved out of model.actor.instance, to model.actor.
   - Drop of Broadcast class and gameserver.util package, content is splitted between World / ZoneManager / Creature.
   - Drop of gameserver.templates package. StatsSet is moved to common.util.
   - Drop of gameserver.instancemanager, with rename : SevenSigns > SevenSignsManager, SevenSignsFestival > FestivalOfDarknessManager. Both are cleaned (CLogger, try-with-ressources,...) and moved to gameserver.data.manager.
   - AutoSpawnManager > AutoSpawnTable and moved to gameserver.data.table, with a split of AutoSpawnInstance > AutoSpawn moved to gameserver.model.
   - Drop XMLDocumentFactory and gameserver.xmlfactory package (no use anymore).
   - Drop gameserver.model.petition package, move Petition back to gameserver.model (we avoid to use package for single classes).
   
Cleanup
   - Refresh DP .project to avoid Eclipse warnings.
   - Move GET_PLAYER and INSTANT_JUMP skills to their own SkillType, TELEPORT, in order they aren't used by regular AI system. In order NPCs use them, you have to write additional script.
   - Add Npc#doCast(SkillType), which randomly cast a skill based on its SkillType and associated to the NpcTemplate skills.
   - Heading is now part of getPosition(). New setXYZ/spawnMe methods have been generated to give the possibility to feed heading in same time than X/Y/Z. To set the heading independently, you have to use getPosition().setHeading(heading).
   - Improve Npc#toString().
   - Rename Player#getPet() / setPet > getSummon() / setSummon(), since it is supposed to return Summon, which are both Pets and Servitors.
   - Walker doesn't override HP drop stuff (since it inherits from Folk#isMortal).
   - Creation of Punishment model (with Javadoc) in model.actor.player, holding all punishments informations of a Player.
   - Creation of HennaList model (with Javadoc) in model.actor.player, holding all Hennas informations of a Player. Ty vampir for the initial contribution.
   - L2Radar > RadarList + Javadoc and move it to gameserver.model.actor.player, extract RadarMarker to gameserver.model.
   - ValidatePosition _heading isn't processed anymore (no use).
   - Generate TeamType enum, based on StinkyMadness idea.
   - Complete rework of RaidBossManager.
      - Merge the different Maps holding infos into one. Create BossSpawn in model.spawn package to hold all related infos.
      - The saving process isn't lazy anymore, but handled on spawn/death/server start.
      - BossStatus isn't related to a Npc instance anymore, meaning you can interrogate it even if Npc isn't existing (DEATH case).
      - Rename StatusEnum > BossStatus enum, moved into enums package.
   - Add the possibility for server admins to tweak default items quantity and equipability. The result is more readable than previous system. It uses the newly generated ItemTemplateHolder (gameserver.model.holder).
   - Cleanup RandomAnimationTaskManager
      - Animation task cancel is now instant upon NPC death, inactive region or intention change != ACTIVE for Attackable. Before it was waiting the regular end timer.
      - Following instances types aren't registered anymore on RandomAnimationTaskManager : ControlTower, EffectPoint, FlameTower and SiegeFlag.
      - Drop of Npc#isMob(), addition of Npc#calculateRandomAnimationTimer().
   - Add missing login status on admin/maintenance.htm
   - Generate StatusType and AttributeType enum, which are used for both LS and GS. Unload ServerStatus of multiple variables.
   
Bugfixes
   - CharInfo heading / boatId is fixed, based on Vilmis remark.
   - Fix a bug introduced in rev 380, where bosses died during a server down couldn't respawn properly. Ty bowling4soup.
   - Add HEAL_STATIC as potential buff slot (fix skillId 3125). Ty Sahar.
   - Modify Lightning Strike power effect. Ty Sahar.
   - Fix the double summon spawn issue (unSummon + doDie happening in same time), as tested by Sahar.
   - Decaying summons tasks are dropped if a decay occurs (avoid tasks to run for nothing).
   - Add Porta/Perum script named SummonPlayer.
   - startAttackStance() / stopAttackStance() system is cleanup. Avoid to spam AutoAttackStop broadcast by NPCs. Decrease the amount of startAttackStance() / stopAttackStance() calls tremendously, notably because the call is moved from onHitTimer to doAttack. Since each attack can produce 1, 2 and up to 10 hits for polearm users, as much calls were done.
   - Player#store doesn't store anymore client X/Y/Z (avoid exploit upon relog).
   - Diagonals flags rule is edited on GeoDataConverter. They must now be validated in both direction.
   - Add/improve character water/fly state on SummonInfo, NpcInfo, PcMorphInfo, PetInfo.
   - Avoid NPE on ClanHall#setOwner, issue introduced in rev 381. Ty bowling4soup.
   - Fix ShortcutList#restore(), issue introduced in rev 381. Ty bowling4soup.
   - Fix ignoreShield() behavior for L2SkillType STRSIEGEASSAULT, PDAM && FATAL. Ty Sahar.
   - SiegeGuard AI is set to ACTIVE and not IDLE when reduceHate occurs.
   - Fix an issue on player creation ; items (armors) weren't equipped properly.
   - Fix default skills shortcut acquisition upon player creation.
   - A DOWN server now correctly repells login attempts (case of Shutdown 60sec). Negative access levels accounts see the server DOWN, and can't login aswell. Addition of GameServerInfo#canLogin(LoginClient client).
   
PS : You should update your geodata, either using GeoDataConverter or refreshing it using aCis shared link (verify modification date).

Since a lot of core has been edited/moved, sources will be exceptionally shared at rev 382 for Customers, added to the diff patch for the adventurers. If you begin to dev a project, I strongly invite you to port your customs directly on 382 shared pack.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#282
Changeset 383 (1388)

Movement is still experimental. The status IS NOT OK for LIVE servers. Boats and MoveToPawn behavior still need to be fixed.

Movement rework - Part I, Sit / Shop fixes, Safe fall height, Bugfixes, Organization


Movement rework - Part I
   - Fix following issues, plaguing aCis since a while :
      - Clicking fast enough on ground while moving was increasing the distance between the player and its actual real point.
      - Fix the pathfinding issue for monsters, blocking on the first encountered obstacle.
      - Introduce pathfinding for returning to spawn monsters, to avoid they stuck in middle of nowhere or got Z layers issues.
      - Rework most of the offsets to fix issues with move to pawn concept.
   - Introduce a 0.5s delay where player walks instead of run on start of a movement, to fit client animation.
   - Introduce CreatureMove, a complete replacement of MoveData. It's now bound to a Creature, and not generated on every single move. Children exist for PlayerMove and BoatMove. The whole movement logic is moved here (extracted from Character and CharacterAI).
   - Drop MovementTaskManager, every running task is now individual to avoid to register on a clock wall, which means the 100ms granularity is guaranteed without calculations or sync needs.
   - Avoid to process a movement if a movement is already launched with same destination and offset (huge performance boost upon spam pickup action).
   - Add a debug for movement system using ExServerPrimitive packet. It offers a good sight of what happens during movement process.
   
Sit / Shop fixes
   - sit/stand is now backed by _sitTask, to track delay between sit and stand position.
   - shop stand up is now instant to fit with retail and avoid exploits.
   - Player#canOpenPrivateStore is now used on 2 different places (shop opening and validation) and handle more checks. Fix multiple issues/exploits, like being able to shop while being mounted.
   - StoreType is renamed OperateType, and now include missing MANUFACTURE_MANAGE and OBSERVER. All getters/setters are edited.
   - MANUFACTURE_MANAGE is implemented, it's not possible anymore to open both (buy or sell) and manufacture panels.
   - All buy/sell/manufacture player lists are now generated on Player creation (no more lazy initializations / container creation, no more null checks).
   - Improve Player#instantStandUp(boolean) a little (don't bother with stand up if already stand up).
   - Add NO_RECIPES_REGISTERED check upon MANUFACTURE_MANAGE ; call the empty window. Add ManufactureList#_isDwarven, which allow us to call back previous state without error.
   - Don't set OperateType.NONE on invalid item count for both sell/buy manage (was leading to invalid store state). Add retail messages.
   - Fix the fact you aren't supposed to open a shop when already sat.
   - Fix the buy/sell/manufacture tryOpen methods : Don't bother with manage case, and tryOpenWorkshop only care with right OperateTypes.
   - isInStoreMode() is modified to only returns real cases of store mode. Manage cases aren't part of it.
   
Safe fall height
   - Added retail values based on classes and sex (was semi-implemented core side using default value 333). Ty RooT for dp side.
   - Add CANNOT_DISMOUNT_FROM_ELEVATION wyvern check, making it impossible to dismount a wyvern if not in a valid safe fall height.
   
Bugfixes
   - Fix Q009 reward itemId. Ty p0w3rf1y.
   - Fix Q621 / Q622 haste potion itemId reward. Q621 giveItems recipe instead of rewardItems. Ty Idontknow1.
   - Add retail behavior regarding teleporting to nearest town if wyvern feed task ends.
   - Seeds works anew (was due to invalid handler name on XML).
   - Edit few mercenary tickets SystemMessage to use retail ones. Ty RooT.
   - Fix the delay for mass teleporter (no instant case if out of siege). Ty RooT.
   - Fix Baium zone (around door, to avoid teleport back to town) using L2OFF GF values, IL being buggy.
   - Fix the few cases of mispelling or miss on configs properties files.
   - Fix radius/height/level/stats of all NPCs, except summons and tamed beasts. Ty StinkyMadness.
   - Add few missing Manor Managers on relatedNpcIds (was leading to NPEs).
   - Fix a MinionList NPE, prior to minions rework.
   - Add few missing Seven Signs event sounds. Ty RooT.
   - Drop calcFestivalRegenModifier system, which was leading to negative values and isn't retail. The only affected stat is MP regen, and it's positive, based on MotherTree zones.
   - RaidBossManager#cleanUp fix prior rev 382 edit.
   - Fix multiple SpotBugs reports (18 or so), from invalid equals/hashCode contracts to missing switch break.
   - Fix RequestListPartyMatchingWaitingRoom, RequestAskJoinPartyRoom : variables aren't set as static anymore.
   - Fix the client crash when clicking "projection" button on the "record of seven signs" (introduced on rev 239).
   - Upon SA activation on magic use, S1_HAS_BEEN_ACTIVATED message is now working and called BEFORE resist attempt.
   - FleeingNPCs / 4s victim scripts flee behavior are enhanced.
   - AI is correctly flushed upon IDLE case, leading to proper global aggro value reset (10sec aggro cooldown on respawn).
   - Fix party duel CANCELED state for ZoneId.PVP.
   - Boat _passengers is now concurrent to avoid CME.
   
Organization
   - Move _isNoRndWalk from Creature to Attackable, _isChampion from Creature to Monster.
   - Slight edit of Creature#isInsidePeaceZone (no static, first param is self).
   - Rework WorldRegion#setActive, it now uses an AtomicBoolean. Add WorldObject onActiveRegion() / onInactiveRegion(). Behavior is normally exactly the same than old setActive, but cleaned up.
   - AttackableAI#changeIntention getKnownType(Player) check is now replaced for getRegion().isActive(), probably leading to a lot of saved garbage. SiegeGuardAI#changeIntention override is dropped.
   - Remove GeoEngine.getInstance().canMoveToTarget pre-optimizations (it's already handled by moveToLocation).
   - Add missing onEvtAfraid and AFRAID AiEventType use. Rework Fear effect to use it.
   - Merge Instance#doPickupItem(WorldObject object) with AI#thinkPickUp() (single use).
   - Add Location#equals(int x, int y, int z), Location#setUsingPositiveOffset, Location#setUsingRandomOffset and Location#setFleeing methods.
   - Addition of StatsSet#getIntIntHolderArray.
   - ItemTable cleanup (renamed ItemData and moved to data.xml, CLogger, move temporary containers to good place, move _slots Map to Item, javadoc).
   - Item cleanup (drop Logger, correct use of StatsSet methods to feed Item values, javadoc)
   - Rework both Weapon#getSkillEffects (Fix the multiple calls upon getSkill() and getFirstEffect, rename those methods castSkillOnCrit / castSkillOnMagic for easier understanding).
   - Fix one strange use of StatsSet upon FestivalOfDarknessManager.
   - Rename all items handlers to keep naming convention logic.
   - Add warning regarding missing property key on configs. Ty StinkyMadness.
   - Add UseBlowfishCipher config. Limit the byte array size on VersionCheck packet. Ty RooT.
   - Drop few skills parameters duplicates, ty bowling4soup.
   - Addition of RaidBossManager#getBossSpawns() and BossSpawn#toString for easier customs implementation.
   - Numerous packet reorganization :
      - Few packets rename to fit NetPro.
      - "activeChar" naming is replaced for "player". Final keywords added here and there. Variables naming is more friendly and/or conventional.
      - NewCharacterSuccess uses a static approach for now.
      - Deletion of SuperCmdCharacterInfo, SuperCmdServerStatus && SuperCmdSummonCmd packets (custom, unused).
      - Implement SendTimeCheck / RequestTimeCheck packets. Ty RooT.
   - AdminCommands
      - Delete AdminMammon and associated admincommands.
      - Merge all cursed weapons admincommands into //cw.
      - Cleanup //admin2 panel (game_menu.htm).
      - Delete //adminX commands. It is now simply //admin. //admin can now answer to file names (ex. //admin server).
      
PS : all items XML etcitem_type parameters are edited to reflect enum value (use of caps lock).

Movement is still experimental. The status IS NOT OK for LIVE servers. Boats and MoveToPawn behavior still need to be fixed.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#283
Changeset 384 (1454)

Movement is still experimental. The status IS NOT OK for LIVE servers. MoveToPawn behavior still need to be fixed.
Siegable Hall isn't tested, and probably need further development. Those CHs are normally fully working regarding owner administration.


SH part I, Movement part II, PlayerLevelData addition, Boats, Bugfixes, Organization
   
SH part I
   - Add Q504 and Q655 quests.
   - Add 4 out of 6 Siegable Halls scripts :
      - Devastated Castle
      - Fortress of Resistance
      - Fortress of the Dead
      - Rainbow Springs Chateau
   - Add relatedNpcIds for all clan halls.
   - Add clanHall information for all doors.
   - Rework SiegeNpc to use all retail HTMs. It isn't supposed to NPE over Siegable Hall anymore.
   - Create SiegableHallZone.xml, based on ClanHallZone zones.
   - Update ClanHallZone.xml with "other" spawns.
   
Movement part II
   - Fix Boat movement, based on vladalien work.
   - Rework isPathClear behavior, which wasn't working properly. Objects don't use geopath anymore when not needed.
   - Drop ARRIVED event for intermediate path points. Ty vladalien.
   - Fix player/creature following "knownlist-forgotten" teleporting character behavior.
   - Don't process Walker path if already moving.
   
PlayerLevelData addition
   - Unhardcode Formulas#karmaMods and Experience.java.
   - Implement missing exp loss % per player death based on level.
   - Rework getExpForThisLevel() / getExpForNextLevel() / getExpForLevel(int level) for both Summon/Pet/Player. It is now only located on Stat.
   - Don't feed anymore getExpForThisLevel / getExpForNextLevel for regular servitors packets. Revert-able if a visual issue occurs.
   
Boats
   - Boat clandestines entering DURING boat leaving harbor are now correctly dropped out from Boat if they got no valid tickets.
   - Pay process is now delayed of 5sec to fit with AdvExt, passenger system is reworked.
   - Fix Boat entrance/exit to fit with AdvExt. You now instantly stop on the edge of each side (harbor/boat), and can now enter from afar. Ty vladalien.
   - Boat is now correctly set to null while teleporting (soe, gm) and upon leaving boat while boat is still sailing.
   - Store process is stopped upon boat oust.
   - Passenger summon is unsummoned to avoid movement tracking issue. RELEASE_PET_ON_BOAT is called only once, as a first shot warning and Player can onboard freely with summon on.
   
Bugfixes
   - Rework nextActionIsAttack() implementation to avoid one NPE and properly set NEXT intention.
   - SS / BSS animation is now processed as retail. Ty SweeTs.
   - NPCs don't recharge ss/bss anymore if already charged.
   - Chance skills upon casting magic skills is fixed. Ty Sahar.
   - Allow players to use Curse Death Link with CTRL. Ty Zarie.
   - Fully fix fake death behavior, as tested on AdvExt PTS.
      - Heal, buffs, missed attacks and self damage don't trigger the effect end anymore.
      - The begin of a cast/attack don't trigger the effect end anymore.
      - User spam skill/stand action got now a delay (similar to sit and revive).
      - The effect end isn't triggered anymore when being in middle of animation start (it is simply ignored).
   - Revert following part of rev 238 : 'Reflect damage skills type don't kill you anymore (stuck at 1). Well, shouldn't.' as tested on AdvExt PTS.
   - Fix Dark Vortex absorb part %.
   - Gates of Splendors can't be opened anymore using Unlock skill, based on official patch notes. Edit values based on IL patch notes.
   - Revert partially FourSepulchersManager, prior to rev 379. Shadows of Halisha should correctly spawn.
   - Upon //hide, summons are now hidden and STEALTH effect is applied.
   - Fix a missing distance check on Quest#getClanLeaderQuestState (player killer wasn't tested if not clan leader ; now both player and leader must be in good distance of the npc to trigger it).
   - Fix Anakazel duplicates. Ty bowling4soup.
   - Add missing SCHs doors upon Siegable Halls getDoors() in order to make them usable by NPCs (previous system couldn't work properly).
   - Implement CP_CH_USE_FUNCTIONS privilege. Fix missing occurences of CP_CL_VIEW_WAREHOUSE, CP_CH_SET_FUNCTIONS and CP_CH_OPEN_DOOR.
   - Fix naming conventions for both player/pet (alphanumeric 1-16 for both), based on AdvExt PTS.
   - Implementation of Siege Mercenary Gatekeepers. Ty RooT.
   - Fix missing MercenaryManagerNpc checks (upon AdminNpc to show Shop button, and on the regular packet RequestBuylist, making it impossible to buy tickets).
   - Properly cleanup tickets and mercenaries upon //removecastle.   
   - Add missing CHARGE FlyType.
   - Fix Player cast behavior : you can now queue the same skill.
   - Fix an issue with bookmarks. Bookmark name isn't server-scope anymore, but player scope. Ty StinkyMadness.
   
Organization
   - Addition of Point2D, the mother class of Location.
   - SchemeBuffer - Ty StinkyMadness
      - Rework getGroupSkillList, reducing code amount.
      - Add images to fill empty space in "prev - next", in order layout always keeps its shape.
   - Refresh some SQL tables PRIMARY KEY. Ty StinkyMadness.
   - RandomWalkRate is configurable now (default 30%).
   - Addition of //walker admincommand, showing Walker routes.
   - Remove //move_defenders (unused, not implemented).
   - //siege is reworked. It now shows current siege status and a link to siege information packet, for each castle.
   - Addition of following methods :
      - Npc#isLordOwner(Player)
      - WorldObject#setXYZ(WorldObject)
      - Quest#checkClanLeaderCondition(Player, Npc, String, String)
      - Player#hasClanPrivilege(int)
      - SpawnLocation#setHeadingTo(int, int) and variants.
      - WorldObject#knows(WorldObject). Replacement of all getKnownType(class).contains uses for knows. It will lead to big performance hit over any live server.
      - Location#distance(Location) and variants (with int coords, Point2D).
   - Multiple classes now extend appropriate classes and/or are moved to proper packages (RadarMarker, Bookmark, NewbieBuffHolder,...).
   - Store FlyType under enum, to avoid calculation.
   - Add a package named model.zone.type.subtype to store all subtypes zones related classes (aka mother classes, not used directly by XMLs but used by children).
   - Add subtype zone ResidenceZoneType, used by CastleZone and ClanHallZone.
   - Add Spawn(int id) which generate a Spawn with included NpcTemplate check.
   - AdminEditNpc is renamed AdminNpc.
      - Creation of //npcinfo (clone of shift + left click), which split all NPC infos towards categories.
      - Drop //show_minion, //show_scripts and //show_droplist ; they are now added directly into //npcinfo.
      - Edit npcinfo / doorinfo to add clan hall / siegable hall informations.
   - Npc / Door now use NpcTemplate / DoorTemplate variable to feed ClanHall / SiegableHall information instead of getNearestClanHall (avoid 100k+ iterations).
   - Package "container" creation - A container is basically an "extension" of an instance, holding multiple variables affecting one particular system and linked to an instance.
      - Move model.player and model.npc into a new package, model.container.
      - Generate model.container.creature and hold the few related classes into it.
      - Rename CharEffectList to EffectList.

Movement is still experimental. The status IS NOT OK for LIVE servers. MoveToPawn behavior still need to be fixed.
Siegable Hall isn't tested, and probably need further development. Those CHs are normally fully working regarding owner administration.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#284
Changeset 385 (1468)

Movement is still experimental. The status IS NOT OK for LIVE servers. MoveToPawn behavior still need to be fixed.
Siegable Hall isn't tested, and probably need further development. Those CHs are normally fully working regarding owner administration.


Scripts, CommandChannel edit, Bugfixes, Organization


Scripts
   - Addition of Q336. Ty RooT.
   - Q384 rework.
      - Fix IOOBE. Ty p0w3rf1y.
      - IntIntHolder use for shorter storage, avoid ArraysUtils using String#contains instead.
      - Medals aren't deleted anymore upon abort.
   - Addition of Q386, based on Q384 rework.

CommandChannel edit
   - Addition of BossInfoType enum, holding informations about Command Channel.
   - Move reduceCurrentHp override from Monster to RaidBoss and rework it.
   - The check task is now running every second, timer is reduced from 15m to 5m.
   - Looting rights messages have been added (10sec show).
   - Strategy Guide item (8871 itemId) is used as a side-way to create a Command Channel, and is now only needed/consumed if your clan doesn't own Clan Imperium skill (391 skillId).

Bugfixes
   - Fix TARGET_CORPSE_MOB target types ; you can now use such skills on Guards. Ty Art1s.
   - Fix unarmed mAtk damage.
   - Fix enchanted item buy possibility on Player tradelist. Ty RooT.
   - Fix extractable items inventory limit bug.
   - Fix a NPE over CreatureMove#moveToNextRoutePoint() execution.
   - Fix NPCs vulnerabilities passive skills.
   - Clear variables upon harvest and sweep attempt to avoid exploit attempt.
   
Organization
   - Add following methods :
      - Location#isInRadius(int, int, int) / Point2D#isInRadius(int, int) (and variants)
   - Move 3x3 matrice, used by Q384 / Q386 quests to MathUtil.
   - Add container.monster. Generate OverhitState, SpoilState and SeedState from Monster content.

Movement is still experimental. The status IS NOT OK for LIVE servers. MoveToPawn behavior still need to be fixed.
Siegable Hall isn't tested, and probably need further development. Those CHs are normally fully working regarding owner administration.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>