Changeset 353 (444)
- Split L2PetData && L2PetLevelData : L2PetData is now merged with the new PetTemplate, while L2PetLevelData is renamed PetDataEntry.
- Data is parsed using L2OFF : Fix all base values (int to double) and add numerous missing stats.
- Added template based autoFeed, hungry and unsummon limits (respectively 55, 50 and 40% : before only 55% was used). Rework associated checks, drop isHungry().
- Added messages for pet items equip/unequip.
- Fix the walking/running and food visual updates on pet window when autofeeding.
- Added distance check for player > pet items transfer.
- Fix a critical issue with pet > player inventory transfer on pet unsummon.
- Fix doesPetNameExist method to fit with L2OFF (also avoid String operations).
- Fix the annoying issue with summons single attack (erm, my fault).
- NpcTable is fully reworked. We avoid 2 loops to check XML content.
- Drop L2NpcAIData object, the content is merged with NpcTemplate.
- ClassId Enum got a static VALUES .values() to avoid to generate arrays on call.
- NpcTemplate is organized ; setRace is cleaner, Race Enum is edited to reflect that change. Drop of "single-uses" methods to avoid pointless calls.
- NPCs skills are now taken directly from NpcTemplate, instead of being cloned into L2Character. Save 41k+ maps, roughly 15mo of RAM.
- StatsSet : getBool() is slightly edited. Addition of getStringArray(), getList() and getMap(). Drop of isSet(), which is containsKey() clone.
- Light cleanup on HelperBuff system (L2HelperBuff moved and renamed, drop of id variable, drop of setters, etc).
- Drop Server class, which was holding 3 int. Rework Config and associated classes accordingly. Ty Hasha.
- //reload admincommand allow the use of numerous parameters (//reload skills npc acar, for example).
- L2AuctioneerInstance RooT's fix.
PS : don't forget to edit npcs XMLs to reflect changes (pet data is holded by NpcTable, and AI type is setted in CAPS to fit with Enum).
PS2 : a second part will come with fixed xp system (wolf, strider, hatchling) and stats for pets (correctly loaded but not yet correctly calculated).
Geodata is now mandatory.
L2D type geodata is too mandatory.
In case you were using L2D geodata, consider to convert anew the geodata you were using, as the type of L2D has been edited. Using an older L2D geodata will lead to ingame issues.Changeset 354 (460)
GeoEngine (part II/III), DropProtection drop, ObjectPoly drop, ObjectPosition drop, Misc
GeoEngine - part II
- merged geodata and pathfinding packages/classes, now we have only one Geoengine package and Geoengine class - better structure overview and removal of unnecessary calls between PathFinding and GeoData.
- simplified inheritance: new Geoengine abstract class now contains as many methods as possible (common methods to any geoengine model), each geoengine model contains only own/specific methods -> like -70% of code over whole geoengine package (duplicates, getters, ...).
- Geoengine is now mandatory to start up server because of new upcoming features (doors, fences, new npc spawn manager) - cleaned up configs and related classes.
- adding missing javadoc everywhere, adding comments to critical sections.
- merged GeoData and PathNode admin handlers/commands.
- implementing back Block-based geodata model prior to geo part III.
- dropped all "new IndexOutOfBounds()" thrown every time we are accessing layer, that does not exist - geodata conversion speed +200%.
- renaming block classes for better identification.
- geoengine now loads only diagonal geodata (L2D format), due to overall performance reasons, updated configs with info.
- implemented another way of accessing block data - indexes. Index-based approach should be faster for multilayer block, when accessing both, NSWE and height of particular cell (should have double performance compared to current getter-based model...upon specific conditions).
- GeoEngine is no longer abstract class, it contains geodata. GeoEnginePathfinding extends GeoEngine and contains pathfinding related methods.
Path-checking & Pathfinding
- fixed line of sight check, though walls without geodata, ty Root for report.
Converter & L2D geodata
- dropped own block classes, using geoengine blocks and updating them with necessary methods.
- updated geodata conversion with few cases/conditions leading to slightly more acurate geodata on rare ocasions (100-1000 cells per region file).
- L2D geodata for multilayer block are now aligned same way as for L2J/L2OFF (from highest layer to lowest one), leading to drop of the sorting mechanism, overall simplicity and much faster conversion.
- dropped logger class, using standard output now, improved instructions (for dummies).
GeoEngine - part III
- added IGeoObject interface to create basic definition of geo object, when any object implements IGeoObject interface successfully, the object can be added/removed to/from geoengine and geodata can be affected by it.
- created IDynamicBlock interface, added BlockComplexDynamic and BlockMultilayerDynamic classes to support dynamic geodata when IGeoObject is added/removed to engine.
- updated GeoEngine with methods to add/remove IGeoObject, created the normal block to dynamic block conversion.
- written own parser to get XML from L2OFF data, new XMLs now contains more and accurate parameters (e.g. doors have level now, it is used for Unlock skill chance calculations).
- doors are parsed using combination of IL (Vanganth) and GF (Sublimity) datas (thanks for shares) - that means, we have also all doors for future implementation of Fortresses now (340 -> 547 doors total!).
- checked and corrected all spawn coordinates of doors (L2OFF uses spawn coordinate at the edge of door, we need it in the center) + it contains Z coordinate from geodata (this will help with further implementation of doors and its geodata creation).
- created DoorTemplate to contain data from XML files, L2DoorInstance use the template in constructor - same approach as for NPCs.
- massive cleanup and reorganization of L2DoorInstance.
- updated HTML info window, to show all parameters - so sexy now.
- auto-open/close task improved, using strictly timers from template, cleaned up scripts.
- updated/cleaned DoorInfo and DoorStatus packets, added missing parameters.
- added L2OFF posibility for doors to control another door - multiple open/close at same time.
- implemented IGeoObject interface and updated DoorTable with proper loading mechanism for it.
- added FenceTable, L2FenceInstance, ExOlympiadFenceInfo packet.
- updated admin spawn commands to spawn fences correctly.
- implemented IGeoObject to L2FenceInstance and updated FenceTable to support dynamic geodata - client sends StopMove packet, when character make collision with fence.
- Drop DropProtection class ; rework an existing system to do the same work.
- Rework L2PcInstance.isInLooterParty() and rename it isLooterOrInLooterParty().
- L2Attackable : No more items template checks.
- L2PcInstance : No more options to secure player drops. Save a inventory.getItemByObjectId on intentional player dropItem().
- L2PetInstance.doPickUp() : Drop a double setIntention IDLE.
- Drop ObjectPoly class, hold directly variables into L2Object.
- Add a Enum to enforce cases type (DEFAULT, ITEM, NPC). All checks are based on PolyType.
- Add few checks, notably item template and possible targets.
- Add the possibility to polymorph a NPC (regular or L2Attackable).
- Drop SpawnItemPoly packet (redundant with SpawnItem packet).
- Drop ObjectPosition with correct use of override, leading to a shitload of dropped cast. All methods are moved into L2Object.
- spawnMe methods are harmonized.
- Fix an issue with setRegion (code was running twice).
- L2PcInstance : Rename setProtection to setSpawnProtection (to avoid to melt with item protection).
- Fix subclass height/radius issue, prior to changeset 351.
- L2CharPosition is dropped. Use Location for IntentionMoveTo, and SpawnLocation for the leftover.
- Add MathUtil.limit method (pickup min or max limits if reached, from a default value).
- Use spawnMe() when spawnMe(int, int, int) isn't needed (avoid to write location).
- Drop all useless occurences of L2WorldRegion.removeFromZones(this) checks, check which is already done by decayMe() > setRegion(null) from L2Character override. In the same order of idea, drop occurences of L2World.removeObject(this), already done by decayMe().Geodata is now mandatory.
L2D type geodata is too mandatory.
In case you were using L2D geodata, consider to convert anew the geodata you were using, as the type of L2D has been edited. Using an older L2D geodata will lead to ingame issues.