Discussion Npc Buffer - Stinkymadness - Updated
-
Posts
-
Changeset 412 (3767) JDK 25, Garbage shrink, GeoEngine, PathFinder, Movement, IdFactory, Skills/Items refactor, Fishing, Stats calculation, Race issues, Zones, Bugfixes, Organization JDK 25 aCis officialy migrates to latest LTS, JDK 25 ! Make a use of unnamed variables. Garbage shrink - reduce overall garbage (-92%~) with multiple reworks (from 17go/h to 1.4go/h). GeoEngine Memory-mapped geodata, avoiding ~300mo internal objects overhead and remove the geodata loading from the GC heap. Replace divisions with bit shifts for block indexing (notably used by getBlock). Eliminate repeated Math.sqrt() calls in the DDA loops : horizontal distance and step increments (distStepX/distStepY) are precomputed once, then accumulated (accumDist) on each iteration. Implement CellWalker/LosTrace which factorize the DDA and avoid double scanning for vision checks. Add a block cache (lastBlockX/lastBlockY) to avoid redundant getBlock() calls while the cell stays within the same block. Add guards for the dx == 0 case (purely vertical movement) when computing slope m and distance increments. Introduce LOS_HEIGHT_FACTOR to factor out the line-of-sight height calculation. PathFinder Implement retail pathfind system, using both algorithm, rules and data. System is far lesser impressive than geodata ones, but is blazing fast and is strictly similar to what L2OFF is/feels. New Config : PATHFIND_ITERATIONS / PATHFIND_CHASE_ITERATIONS. Movement Revert back to a shared MoveTaskManager ticking every 100ms ; no per-actor scheduled task anymore. Use immutable, atomically-published MoveHolder orders (similar to CastHolder pattern) ; no lock between the order path and the tick path. Implement a server-side start-accel ramp matching the client's from-standstill acceleration, simulating properly the client animation cycle over straight lines - no matter your actual speed. IdFactory Use a lock-free implementation rather than full synchronized. Skills/Items refactor - Ty Bandnentans for refactor, Sahar for initial skill parsing Reparse all skills and items using L2OFF AdvExt. Rework many formulas to handle things as L2OFF (notably skill effect success rate, fall damage, etc). Skills Rework 15 target handlers, introducing 13 AffectScope and 7 AffectObject. Introduce retail effects : 6 consume, 8 cubic, 90 instant, 97 pumps, 3 tick. Introduce 44 conditions. Addition of L2J channelization system, EffectInfo, EffectList - with vital reworks (using lock-based fine-grained concurrency, isLimitExceeded cleanup, effects flag recomputation use main updateEffectList loop,...). Addition of EffectExpirationTaskManager, a wall-clock used to handle timers of effects. Addition of //show affectscope to visualize the range effects of casted skills. Can be used to any target, as a toggle on/off, visualized by any GM (similar to //show move implementation). Add icon tag over data - make a use over SchemeBuffer. Known bugs fixed : All skills properly consume mana (notably stances). Ty to original reporter p0w3rf1y. Similar abnormal states visuals don't override each other anymore (exemple case of Silent Move and Stealth). Ty to original reporter Sim. All skill related data is normally fine - until L2OFF AdvExt is wrong. Topics related to values edition were dropped. If invalid, propose another data to reparse. Fix an issue with Touch of Life, disappearing from buff slot when you port (soe, teleport, GM recall). Issue related to Scroll of Recovery deleting buff because related skill was using BUFF SkillType is fixed. Ty to original reporter KejbL. Upon //skill remove all / set all, the expertise penalty is now properly set. Skills such as Switch/Trick properly use DERANGEMENT trait. Ty to original reporter YeahThePro. Skill, as container of effects, can now apply different skill powers per effect. As exemple, Blinding Blow "turning back" effect is 100%, but damage itself can fail independently. Ty to original reporter YeahThePro. With new affectscope/affectobject/targethandlers : Skills can't be used versus invalid targets (exemple : Tribunal towards Guards). Ty to original reporter shyr. Skills can be used upon CTRL (Vortex, Archer stun, Sand Bomb) without need of pvp flag. Ty to original reporters Denzel, ErHarD. Shuriel's Oracle properly heal the boss rather than themselves. Ty to original reporter Bandnentans. SoE and alike skills can be properly casted by mounted Players, since RideState implementation. Ty to original reporter cross. Skills without effect points don't trigger anymore any type of trigger skills (notably, Energy Stone and Infinity Rod exploit). Ty cross for report. Heroic skills (aswell as a big amount of item skills) casted from any sub/main class should also be set on reuse for all other sub/main classes. Ty Bandnentans for report. Effects don't refresh upon each other (sleep, root, fear, stun) - they are automatically being resisted. Ty to original reporter Kitsos. Effects aren't preventively dropped - if a Stun occurs, it isn't instantly stopped if another Stun is attempted. Ty to original reporter Kitsos. Madness properly temporary aggro a target, and stop to do so at end of the effect. Ty to original reporter shyr. Fear doesn't make the target coming to you, it instantly goes into fear effect. Ty to original reporter shyr. Cubics data and behavior is reparsed and formulas picked from L2OFF. Ty to original reporter p0w3rf1y. Skill casting animation isn't "bloated" anymore by delay. Ty to original reporter deekay. Clan Skill : Luck is now properly implemented. Fix an issue where when an effect disappears, the thinkCast of the same skill is triggered immediately (npcId 18243 using Fake Petrification when he was able to use it, making it invul). Ty to original reporter Denzel. Blows do specific sounds over critical. Ty to original reporter L2Pulse. PvP Ability – The player’s attack ability in Player vs. Player combat increases once they become a Noblesse. Ty YeahThePro for report. Items BodyPart is now an enum, cutting many switches to none (-200 lines over Inventory). Arrow type method helper is now part of CrystalType enum, cutting related uses. Add alias and icon tags - make a use of icon in existing "noicon" placeholders - notably //find item. Known bug fixed : Don't make Adena sellable. Ty DarthVader for report. Upon extractable item production, both sit/Formal Wear now work. Ty to original reporter sahar. All items are properly parsed, so issues such as "Skill 2188 [BEAST_FEED] isn't implemented". Ty to original reporter Jackass. Soul crystals properly aggro monsters upon usage. Ty to original reporter Denzel. Fishing Add parsed data related to fishing (places, monster, rod, distribution). Formulas are picked from L2OFF aswell. Hot Springs Lure is now available to buy. Stats calculation Introduce StatusBroadcastTaskManager, used to delay all types of broadcast (karma, skill cooltime, skilllist, weight, stats, abnormals...). Indirectly fix all types of stats update lacking, such as Bison Spirit Totem skills. Ty to original reporter FunnyMan. Speed is still sent at-will. Basic Creature stats values are now precomputed and recalculated when needed (buff, debuff, etc). There is no more calcStat when getting a basic value, which avoid calcStat over get"Stat" (getPdef, getPatk, etc). Rework StatusUpdate Avoid to use temporary maps, use an int array instead (less RAM footprint). Packet directly pick good stats, you don't have to register it anymore (less verbose). Stats are filtered before being sent. Status listener is moved from Creature to Attackable, avoiding to generate and manage thousands of useless Sets. Race issues Casting process now uses a CastHolder, used to retain current cast data. Should avoid the random NPEs. Movement process now uses MoveHolder. Fix race conditions (geopath queue could be accessed in 2 different spots, could end as a IOOBE). Solve race conditions over DesireQueue, using an ArrayList + lock. WorldObject (_objectId / _region as volatile, _isVisible as atomic, shorten the lock over setRegion, calling effects aside lock, inverse the order of refreshId ; we set a new id, then release old id). Spawn related Fixed SpawnManager leaks. Added atomic maker/multispawn synchronization with rollback. Secured spawn counters with CAS. Introduced atomic respawn-claiming. Simplified and hardened recycling logic in MultiSpawn. Add MultiSpawn#isDeleted to expose the deletion state. Deleted MultiSpawn instances can no longer respawn through the scheduler. Rework MakerSpawnScheduleTaskManager Move from ConcurrentLinkedQueue to PriorityBlockingQueue ; poll until test fails, avoiding to iterate the whole container. Emptiness check removal is down at the end, not the start - to avoid leftovers. Add Spawn _npc safeguards to avoid NPEs due to potential race conditions. Improve DamageZone, PoisonZone and InstantSkillZone concurrency safety and task lifecycle management. Make Intention immutables. Npc#onDecay now claims _isDecayed atomically ; concurrent decay paths (DecayTaskManager tick, deleteMe from scripts) can no longer run it twice and corrupt spawn accounting. TradeList#confirm locks both TradeLists in a deterministic order, so two concurrent confirms can no longer each grab their own lock and silently stall the trade. Product#decreaseCount uses a CAS loop, so racing buyers can no longer drive a limited stock negative. Refactor death state management - provide a single source of truth for death checks and reduce the risk of state desynchronization. Should fix "Body to Mind" sync issue, where skill kills you while it shouldn't (and alike). Zones Zones no longer live in WorldRegion. They are rasterized once into a coarse TILE_SIZE (32768u) grid owned by ZoneManager, decoupled from the visibility grid. A point lookup is now a single cell read instead of scanning the current region plus its 8 neighbours. Revalidation is split add-only / set-iterating: entering scans only the creature's own cell (ZoneManager.revalidate -> ZoneType.addCreature), no wasted removal tests; exiting iterates the creature's cached inside-zone set (Creature._insideZones), which also covers zones outside its current cell. ZoneType keeps a reverse index in sync via Creature.addZone/removeZone. EventTrigger visuals (castle slow traps, fences) become a real invisible WorldObject (EventTriggerObject) riding the object knownlist like retail's CEventController, replacing the ZoneType addKnownObject/removeKnownObject hooks; ZoneType.onReload() releases the emitter on zone reload. Clan-hall decorations move the same way, onto ClanHallManagerNpc.addKnownObject. Danger zones (Damage/Poison/InstantSkill/Swamp) split onEnter/onExit into isOn()-gated public methods plus unconditional doEnter/doExit, so a setOnOff toggle applies the effect correctly against the freshly flipped flag. SwampZone drops its prior func before re-adding it to avoid stacking the slow when a movement revalidate races a toggle. Admin //zone panel is paginated over the current cell's candidate zones. Bugfixes Fix PK killer being flagged as a PKer itself. Grouped territories (territory="a;b;c") are no longer merged into a single synthetic "grouped_XXX" Territory (random location was corrupted due to Z depth merge). Ty Bandnentans for report. Merge _runAiStep into _lifeTime in NpcAI (redundant) since _runAiStep was reset to 0 every 3 ticks, and this broke the % 2 follow cadence. Fix rooted monster who doesn't provide XP/SP upon death. Ty Denzel for report. Introduce a mechanism where hate value is cleared if monster is back to full health and aggro cleaned. Clean aggro and hate upon next spawn occurence. Npc#onDecay now cancels any pending scheduled despawn, preventing a stale timer from despawning a recycled, respawned Npc. Npc#deleteMe now aborts attack, cast and move, releasing the Npc from shared tasks (MoveTaskManager). Npc#deleteMe now severs the master/minion relationship both ways ; killing privates no longer breaks their respawn once the leader deleted itself (Stakato Nest 22108/22110 exploit). Ty Denzel for report. Handle EffectZoneTaskManager NPE gracefully. Improve rev. 411 "Allow blocked interaction to scan at higher range." bugfix ; now it properly reads bypasses. Ty Bandnentans for report/fix. Deny arrow key movement if casting/attacking. Ty Bandnentans for report. Multiple Pledge fixes : Fix 2 potential NPEs upon VillageMaster. Add Clan#getUnitName method. Fix 1 potential NPE upon Clan#getSubPledgeLeaderName. Avoid Clan#getOnlineMembers/getAllSubPledges arrays creation. Fix PledgeShowMemberListAll server crash (introduced in rev 311). Multiple summons/monster fixes : Fix "move to" summon action, broken since movement branch and boat method implementation. Fix "stop" summon action : Stop summon even when returning to owner. Stop attack stance. Fix "attack" summon action, it only tryToAttack, no tryToFollow. Implement proper behavior for attack follow, for both summons and regular Npcs (try to reach one offset surrounding target). Implement proper behavior for friendly follow (offset behind the target, follow task stops if target isn't owner and destination is reached). Remove tryToIdle upon Playable#stop (subject to StackOverflowException). Refresh the SP display upon studying skills. Fix a trade issue, where disconnected Player wouldn't clear trade window for partner. Fix Castle#regTimeOver behavior. Ty Sahar for report, LaRoja for fix. Fix PlayerCast NPE, occuring since Siege switch flip. Ty Sahar for fix. Fix a NPE over Npc#isInMyTerritory. Ty Sahar for fix. Dummy objectId deletion is now ignored. Ty TheDude for report. Fix INVALID_MACRO logic. Macros aren't limited to 255 characters server-side anymore. Ty MrThirtyOddSix for report. Fix and improve SetAggressiveTime logic. Ty Bandnentans for report. Add missing 32049 npcId HTM. Ty Bandnentans for report. Fix potential RequestRestartPoint NPE. Ty Bandnentans for report. Fix Baium Desires weight. Ty Bandnentans for report. Make RandomAnimationTaskManager more random - since all calls are gathered upon a similar wallclock, many Npc were sending SocialAction at the same time. Fix an UnsupportedOperationException over Olympiads, prior to c2c50fa5 commit. Bad, Bad LaRoja. Ty CUCU23 for report. Fix an issue over onEvtAgression (social aggro was running as a dead loop). Fix a NPE over RaidPrivateStandard. Ty Bandnentans for report. Adena is now charged after teleport appearing, not before. Ty Bandnentans for report. Organization World gets explicit coordinate helpers (worldToZoneGridX/Y, worldToRegionX/Y, worldToTileX/Y, regionIndexToWorldX/Y) and drops the expensive getRegion(ZoneType). Geometry gains AShape.getBounds() (Rectangle/Triangle/Polygon) for broad-phase grid insertion, and Polygon now computes an area-weighted centroid. Overload CabalType enum with maxTax. Drop ChangeRecorderListener - avoid generating arraylists/arrays upon item equip/unequip (manually tracking updates became useless since InventoryUpdateTaskManager / ItemInstanceTaskManager introduction). Delete TamedBeast / TamedBeastAI (unused). CastleDefendTeleporter is reworked to handle NPC AI params instead of hardcoded Locations arrays - drop related custom zones. Siegable#checkSides aswell as Siege#switchSides now handles Set<SiegeSide> instead of varargs - (O1) instead of (On) + EnumSet performance. Npc#isLordOwner is renamed isMyLord, Npc#getPledgeCastleState does only 1 SiegeSide lookup instead of 2. Few QuestVars addition (120+ entries). Replace TradeList#getAvailableItems peek use (should be only used for debugging process) TradeList for trade usages isn't nullified anymore, but clear(). Player#isTrading is implemented such as trade partner != null. "skill" package is now part of "model" package, L2Skill is renamed Skill to follow regular convention naming. Most inner packages are renamed. SkillTable is now known as SkillData and moved to "data.xml", since it only cares about XML content. DocumentBase/Item/Skill are heavily reworked, since they don't use <table> tag anymore. DocumentBase, as IXmlReader, now use a static DocumentBuilderFactory. Addition of few Inventory methods, such as #isInPaperdoll(Item) or #forEachPaperdollItem(Predicate, Consumer) - cutting complexity and improving performance. GamePacketHandler management is fully reworked to be handled as an EnumMap<GameState, HashMap<Integer, Supplier>>. Addition of PACKET_VIEWER_DEBUG Config, splitting the packet view logic from PACKET_HANDLER_DEBUG. Rework HexUtil to avoid to generate any sublayered Strings, we only rely on the initial StringBuilder. Rework few unoptimized methods/streams here and there (RaidPointManager#calculateRanking/getWinners, AdminFind#listDualbox, Location#getClosestPosition/getClosestPositionList, ...) Implement RequestSetCastleSiegeTime packet, added back RequestSkillCoolTime packet. Introduce STATIC_PACKET version of DummyPacket. FirstClassChange / SecondClassChange are reworked using record / QuestVars. 50+ SonarLint warnings. Rework GM Shop, delete 20% of buyLists, order Sets over //item set. Drop unused Desire#getTimestamp implementation. Implement a universal, lock-free, growable and highly concurrent ObjectPool. It is used to build, retain and borrow Objects of any type, leading to a complete crush of garbage for such objects at the cost of retained RAM. Implement TimeUtil, a utility class to help to get current hour and minute instead of using a Calendar. Implement ConcurrentSnapshotSet, a thread-safe Set tuned for read-mostly, allocation-free iteration (avoiding to compute .values()). Delete #forceWalkStance / #forceRunStance methods - use #setWalkOrRun instead. Don't send any packet if running state doesn't evolve. Npc follow system is cleaned up (variables are static and precalculated, follow slots is now a int[] instead of a List<Integer>). Add DEFAULT_FOLLOW_RANGE Config. Move fishing variables from Player to FishingStance. Multiple Object[0] > Object[]::new to save some array computation. Skill#getTargetList use a static new Creature[0] to avoid to generate pointless arrays, use an ArrayList rather than LinkedList. World class : #removeObjects allows Collection as parameter, #getRegion is sanitized, #deleteVisibleNpcSpawns is called over _objects, not the 45056 WorldRegion _objects lists, static methods are dropped. PlayerInfoTable : #addPlayer/#updatePlayerData are now processed by a single method, #mergePlayerData. Rework //enchant admincommand. It now uses a panel to properly visualize your target's items and current enchant level. New helper method Npc#notifyClanAttack Behavior edit WorldRegion size is reduced from 2048 to 1024 (retail value). Still no Z check. Monster don't have anymore LoS check for onSee, making them agressive through walls (retail behavior). Drop aswell the social LoS check.
-
What password for this file ?
-
Dude, you brought this topic back after 15 years you’re a legend 😂 Please describe your problem. Is the model appearing gray or is the model completely missing?
-
Your approach with real user signals sounds interesting For broader SEO work on my own side projects, I’ve been getting solid results through https://xedea.com/our-services/seo-agency-malaysia/ -their focus on lead generation and transparent reporting fits what I needed. Might offer useful complementary techniques for scaling beyond search ranking alone
-
By EarthlyAngel · Posted
can you explain how to do it? I have the same problem and i dont know how o fix this
-
-
Topics

Recommended Posts