Last aCis updates

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

Tryskell

Changeset 264

Misc

   - fix a MysqlDataTruncation on shortcut save (max number by page = 10).
   - fix previous CW refactor about max stage level.
   - cleanup AdminMammon adminhandler.
   - add a variant of "admin_list_spawns" named "admin_list_positions", and move it from AdminMammon to AdminSpawn.
   - fix mass summon cubics radius for party members.
   - fix CrestCache getCrest() (couldn't return null and so issue to clean invalid crests), ty Java-Man.
   - cleanup of getTargetList() method. Multiple improvements (FastList > ArrayList, variables initilialization in the shortest scope).
   - fix SSBoost usage for BLOW skillhandler.
   - cleanup a couple of skillhandlers, in order they use the inheritated list of L2Object rather than calculating a new one.
   - fix harvest system + harvest messages aswell.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#166
Changeset 265

Misc

   - fix GoldenRam issue.
   - fix 2 CW issues (when player drops it).
   - correct implementation of shift click, with use of inheritance.
   - addition of item shift+click possibility for GMs, HTMlize static object shift+click for GMs.
   - fix mercenary tickets pickup (probably, couldn't test as we're in wrong 7signs period), optimize item pickup check aswell.
   - move caches section upper than clan section, in order to avoid clans crests being deleted at server startup (as crest cache isn't yet initialized).




Changeset 266

L2OFF droplist, misc


Droplist
   - parse L2OFF IL droplist. Go from 26881 to 29767 drops. A big ty to dEvilKinG for that work.
   - Core side goes from SQL to XML aswell.
   
Misc
   - fix AQ minions paralyze/silence.
   - DatapackRoot config is dropped. I don't find any point to put your DP in another folder, added to that the config is probably bad integrated.
   - fix a possible NPE if a RB got suicide skill (happen only when sahar got events ideas).
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 267

HtmCache/NpcHtmlMessage cleanup by Hasha.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 268

Hasha quest engine cleanup.


Quest
   - QuestEventType class to its own class.
   - sorted all methods by groups (I suggest to create "//INFO: this is some info for text below" tag for the GS,DP pack projects).
   - dropped "character_quest_global_data" table, since it only written in 2 quests (never read).
   - removed "class_index" column in "character_quests" (never used).
   - global quest variables methods unified for simpler usage.
   - dropped some method concerning quest load/close (not used).
   - added isRealQuest() method to separate scripts from live quest. That means every live quest needs to have _Id > 0.
   - method changes :
      - player handling filters player with desired quest state or condition :
         - getRandomPartyMember() now includes a range check.
         - checkPlayerCondition/State() last hit drops.
         - getPartyMembers/State() full party last hit (can be used directly in FOR loop).
         - getRandomPartyMember/State() party random.
         - getClanLeaderQuestState() concerned range check set to npc, not player anymore.
      - spawn, timer handling :
         - cleaned up, unified usage for these methods.
         - dropped methods with same name and different parameters (now you have one method and fill all necessary params in it -> clear usage).

State
   - added in QuestState class.
   - changed quest state storage type in "character_quests" table from String to Byte.

QuestState
   - these methods created/modified
      - item handling (usable during quest) :
         - giveItems() simply remove specified amount of items.
         - takeItems() simply remove specified amount of items.
      - drop handling (usable for quest item drop) :
         - in order to support rate of dropping quest items, added drop type parameter to these methods (see javadoc tag).
         - dropItemsAlways() amount is affected by Config.QUEST_RATE_DROP.
         - dropItems() amount/chance are affected by dropType param and Config.QUEST_RATE_DROP .
      - reward hanling (usable for quest rewards) :
         - rewardItems() rewards player with items (config applied).
         - rewardExpAndSp() rewards player with exp, sp (config applied).
   - removed spawn and timer methods from this class, everything is handled in Quest directly (it wasn't necessary to use QuestState for it).

General
   - fixed onTalk bug, where player could start quest from another NPC, than registered

---- IMPORTANT ----

For existing database, use attached sql command :

USE acis;
SET NAMES cp1250;

DROP TABLE IF EXISTS character_quest_global_data;

ALTER TABLE character_quests DROP COLUMN class_index;

UPDATE character_quests SET value='1' WHERE var='<state>' AND value='Start';
UPDATE character_quests SET value='2' WHERE var='<state>' AND value='Started';
UPDATE character_quests SET value='3' WHERE var='<state>' AND value='Completed';

---- EDIT TRYSKELL ----

Those are additions to original Hasha's notes'n'patch.

- added a check for custom scripts to avoid the reload state when they load, as they all use the same id.
- fix giveItems() behavior (was completely buggy, Hasha...).
- add few final keywords (cause I like them).
- ArrayList initializations are changed for primitive List, it's a bad use to use an "evolved form", as it limits possibilities. In the same spirit we could use directly "HashMap = new HashMap" for maps, but we don't.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 269

Quests, misc


Quests
   - addition of Q337.
   - fix critical issues appearing in last revision, and impacting 80+ quests (boolean stuff, custom scripts && objectId).
   - drop the max level on all quests, and harmonize all HTMs about "you need level X in order to make the quest". Remove hardcoded versions and add HTMs for Q042/Q043/Q044.
   - fix Q656 min level.
   - fix Q341 repeatable state.
   - addition of a couple of missing "st.exitQuest(true);" (Q338, Q354, Q356)
   - Q371 party system is now ok.
   - rework Q027, Q028, Q029, Q030 STATE_CREATED.
   - use of Race model rather than ordinal, it's easier to read/debug.
   - complete rework of Alliance/Clan java. HTMs are harmonized following 7Signs ones. Probably more to do (like moving all events on scripts directly).
   - custom scripts (-1) are out of queststate checks when not involved by db edition or variables save/load/checks.
   - rework endQuest(), only one db query is made to drop all (on L2J, one db query per variable).
   - L2PcInstance : _quests FastMap is changed for a FastList, _notifyQuestOfDeathList is directly initialized (avoid synchro shit and null checks).
   - drop missing SQL stuff about character_quest_global_data.

Misc
   - rework regen skill in order Valakas doesn't cast it at all, but got directly the effect. Add a random timer aswell.
   - drop slow effects on 4 bleed augment (postIL behavior).
   - fix "Heart of Pa'agrio" radius effect and icon (more skills to come later, I know SweeTs I KNOW).
   - fix all silence times and chances (basically 80% 30sec for one target, 40% 30sec for aoe).
   
Note : //reload quest is currently not working correctly.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 270

Quests (Sailren questline), misc


Quests
   - addition of Q123, Q125, Q126, Q127, Q367, Q413, Q641. Ty to sharers!
   - fix rewards for Q631.
   - rework rewards Map to use int[][] instead (Q631, Q640, Q642, Q644, Q645, Q646).
   - checkPlayerState() and checkPlayerCondition return the QuestState (avoid to create anew a QuestState). Not affecting party quests.
   - fix Q241 NPEs.
   
Misc
   - addition of fail enchant messages, ty dEvilKing.
   - fix stopWaterTask(), ty xblx.
   - drop a double message when you use TP, ty sahar for report.
   - [L2J 5584] calculatePledgeClass() is now static.
   - [L2J 5584] fix Noblesse/Hero status icon for clanless characters.
   - [L2J 5584] L2ClanMember uses a ResultSet / the player instance directly. Can't create a L2ClanMember if clan is null.
   - one of stopMove() parameters is dropped. Avoid to send x2 broadcastPacket(new StopMove) on L2TamedBeastInstance. Add a stopMove on /unstuck.
   - addition of 4 missing spawns for Q125/Q126.
   - addition of missing HTMs for npcid 32109 (needed for Q126/Q641), implementation in GrandBossTeleporters script with retail HTMs.
   - fixed numerous retail typos : Siren > Sailren, Elkrokhi > Elroki, ax > axe.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#171
Changeset 271

Quests, Javolution, misc


Quests
   - addition of Q111, Q359 && Q633.
   - addition of the missing HTM for Kirikachin.
   - revert positions of 2 multisell entries for Q633.
   
Javolution
   - drop of that library, leading to a serious drop in RAM usage (-45mo at startup = -19%). As comparison, that memory drop equals *ALL* SQL > XML changes made so far.
   - changes follow a simple scheme, listed here :
      - WeakFastSet / FastSet > HashSet.
      - FastList > ArrayList (in very few cases, LinkedList).
      - FastMap > HashMap.
      - all ".shared(true)" versions use Concurrent versions (CopyOnWriteArraySet, CopyOnWriteArrayList, ConcurrentHashMap).
      - TextBuilder > StringBuilder. There is no equivalence for ".clear()", I decided to use ".setLength(0)".

Misc
   - rework GameServerTable (XML loading part).
   - drop of the single use of Vector (replaced by an ArrayList in ServerStatus gameserverpacket).
   - modify all uses of "new Integer(value).intValue()" for "Integer.parseInt(value)".
   - MMOCore is refreshed to use JDK7. The build is remade from zero, and avoid to create a zip.
   - L2FastList, which was a children of FastList, has been dropped. All uses have been replaced for ArrayList.
   - rework a couple of Iterator uses to be more elegant (Duel, DuelManager, GmListTable, CharNameTable) - I kept Iterator *ONLY* when .remove was used (and so when Iterator was vital).
   - cleanup AdminEditChar (drop of arrays which are not used, checks are glued, variables beginning by a minuscule, and others esthetic/performance stuff).

PS : I just thought, like 3min after, than I didn't update internal MMOCore JAR. So compile it and replace, in 271 I will add the new directly.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 272

SS/BSS system, Minions, Misc


SS/BSS system
   - [L2J 5637] ss/bss system is reworked to allow inheritance.
   - drop the ReentrantLock on Soulshot handler.
   - cleanup ss/sps/bsps handlers (drop of switches, drop of synchronized, etc).
   
Minions
   - fix UnsupportedOperationException on MinionList.
   - drop _enableMinions boolean tag (always true).
   - regular minions repop after "leader respawn time / 2".
   - drop of a pointless list which was keeping references of dead minions.
   - if a monster is consider as a leader, don't make minion checks (and vice-versa).
   - _maintenanceTask is moved from regular monsters to RBs (used only for location checks). Drop of getMaintenanceInterval().
   - cleanup MinionList (unused methods, methods calling others methods).
   
Misc
   - addition of MMOCore jar, as it was cleaned up in last rev.
   - teleToLocation boolean parameter is modified for an int. 2 configs are dropped.
   - addSpawn() from Quest.java can handle Location models (used in future for Benom).
   - addition of the missing spawn id 35506 (used in future for Benom).
   - QuestJython model is dropped.
   - drop of "this." uses on scripts.
   - [L2J 5413] reuse delay stuff is cleaned up, getMReuseRate()/getPReuseRate() methods are dropped, _baseMReuseRate isn't generated for any Char template anymore.
   - fix ConcurrentExceptions on ItemsAutoDestroy, ForumsBBSManager.
   - cleanup of isBehind(), isBehindTarget(), isInFrontOf(), isFacing().
   - reworked implementation of Miser SA.
   - parseGameCondition conditions are "else if" rather than "if" (understand who can...)
   - fix CoV critical rate value, ty Stanus for report.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 273

DEATH TO ANACONDA !


Jython
   - is OFFICIALLY dropped from aCis (if that force ppl to make java quests instead of using outdated technologies, that's only a bonus).
   - all your previous .py files (quests, scripts) && jython tasks must be moved to java.
   - such scripts problems (buffers, AIs, etc) are then OFFICIALLY unsupported.

Configs
   - drop "LazyItemsUpdate" (dangerous, ends to unexpected behaviours).
   - drop "AltGameMobAttackAI" (no core support anymore, ghost variable).
   - "RaidChaosTime", "GrandChaosTime" && "MinionChaosTime" are edited from 10sec to 30sec by default.
   
Misc
   - Update mysql-connector jar from 5.1.18 to 5.1.22
   - drop of L2ScriptZone and ZONE_SCRIPT (if you want custom zones, just make your own type).
   - update formatting for DP (I was using it, but it looks it wasn't commited) and validate files which weren't using that format (4 so far).
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 274

AI system part I..., pet inventory, Fear effect, misc


It is not yet the paradise, but I tried to cut the complexity, reuse existing stuff, and prepare AI data for future templates rework.
I still search ideas for new AI system (using inheritance, either for AI type and/or template type).

General AI behaviors changes
   - checks concerning friendly/enemy clans verify confusion state (in case of enemy clan, it replaces).
   - mages/priests AI handle following cases from now :
      - will always launch skills.
      - in case they're muted, they 100% flee.
      - in case they're rooted, and can't launch skills (oom/muted), they will attack the nearest (if not possible to attack the current target) target using melee.
      - switch automatically from high to short range skills if you approach (priority to short range, as retail), and vice-versa.
   - mobs won't (re)buff if they're already buffed when you initiate a fight (as they can buff themselves random-walking).
   - drop of the random forget time.

Mobs ARE SUPPOSED TO act as following :
   - target checks :
      - mob hasn't target/got dead target/got timeout ; replace target in case mob is aggro type and continue execution or break the whole processus.
      - mob is chaosTime type, switch target if possible.
   - mob successes to launch a skill (10% default, 100% for healer/mages AIs) :
      - mob suicide below 15% HPs.
      - mob heal allies who got the lowest HPs amount (activation at 75% HPs, priority to healer && mages AI).
      - mob use a random spell - debuff (10%) - otherwise, by priority : short range && long range skills.
   - mob is immobilized : if physical range is ok, attack, if not, pickup the nearest target and attack it.
   - mob flee from player melee range if it is a mage/healer/archer AI.
   - mob approaches the player if out of physical range.
   - mob physically attacks the player.

L2SiegeGuardAI
   - reorganized entirely the file, inheritating from L2AttackableAI.
   - correct an issue introduced 10~ revs ago, where siege guards weren't attacking at all.
   - drop TargetAnalysis && SelfAnalysis (was creating a huge amount of pointless lists for every siege guard).
   
L2NpcTemplate
   - drop 13/19 skills lists and associated getters (here are the survivors : long range, short range, heal, buff, debuff, and suicide.
   - addSkill() method avoid to use "add" getters, allowing to drop them all.
   - drop of FIGHTER and BALANCED AITypes. Those 2 AIs are now refered as DEFAULT (as basically FIGHTER types got and will use skills).
   
AbstractAI
   - _castTarget and _attackTarget are dropped. All is uniformed around getTarget().

L2AttackableAI
   - drop of _lastBuffTick.
   - reorganized entirely the file, and rework many methods.
   - avoid to generate internal skills lists for AIs. It uses templates skills arrays.
   - the attack timeout is back to 30s, rather than 2min (/4). It now handles differently aggro mobs from passive mobs. Passive mobs will stop to attack if you don't attack them, when aggro mobs will continue to follow you until you're out of their "aggro range * 2".

L2NpcAIData
   - drop many variables with their getters/setters/uses, in prevision of future NPC templates rework. The list concerns :
      - _primaryAttack
      - _minSkillChance
      - _maxSkillChance
      - _isChaos
      - _longRangeSkill
      - _shortRangeSkill
      - _longRangeChance
      - _shortRangeChance
      - _switchRangeChance
      - _enemyClan
      - _enemyRange
   - SQL is not cleaned cause it will soon disappear. As the useless data isn't loaded, it's not a problem.
   - drop of %ai_enemy_clan% in shift+click panel on NPCs.
   
NpcWalkers (L2NpcWalkerInstance, L2NpcWalkerAI)
   - L2NpcWalkerInstance internal broadcastChat() -> L2Npc broadcastNpcSay().
   - avoid multiple .get() operations updating a single L2NpcWalkerNode when the NPC goes to it (as we have, anyway, to retrieve the node, better make it automatically).
   - drop _homeX, _homeY, _homeZ variables + getters/setters and uses on onSpawn() - unused.
   - _walkingToNextPoint getters/setters are dropped - unused.
   
Pet inventory
   - fix a concurrent issue, ty Hasha.
   - fix the inventory update when you transfer non stackable items.
   - add player && pet inventory weight refresh. Pet can now be overweight (was working before, but only in few circumstances).
   - items are cleaned from pet inventory list / from the world even if the owner doesn't exist.
   - checkItemManipulation for pet inventory (make checks on count). The string parameter is dropped for both inventory types. The count check is made on < 1, not on < 0 anymore.

Fear effects
   - glitch is fixed, ty xblx.
   - slight edit in order if you trigger startFear() it works in any case, and avoid pointless actions triggered by onActionTime().
   - remove the visual effect when effect ends.

Misc
   - modifier for L2Attackable concerning cast break has been removed. I still believe it should be reworked for monsters (75% or 50% of the final value ?).
   - drop of Rnd.nextInt(int) method, which was calling Rnd.get(int) method.
   - fix a ConcurrentException on CellPathFinding geodata module.
   - fix lethal strikes messages. calcLethalHit() method doesn't return a boolean anymore (no use).
   - fix a couple of skills values (lethal2 100% chance issue && few cancel resist/vuln chances setted to 40 instead of 30).
   - drop of mAtkRange Stats. The only factor which entered in that Stats calculation was skillRange, so I simplified it.
   - fix gameserver shutdown issue (ty Kenrix for reminder). I don't use L2J forum / Silentium fix.
   - fix RequestHennaEquip adena amount message (cleaner method used than Silentium).
   - fix a minor issue on /unstuck command - missing isSitting() check (ty Silentium).
   - fix jail issue (teleport you forever in jail if you're //recall by a GM). Ty xblx.
   - [L2J 5684] hitTime lower than 500 are taken in consideration, _castInterruptTime takes in consideration the skill coolTime.
   - cleanup of all getKnownXXX() / getKnownXXXInRadius() methods, replacing them by 2 using generic types (fuck yeah).
   - drop few clone checks concerning isRunning() - as setRunning() internally checks it.
   - fix FriendList packet, ty Root for report.
   
N.B :
Between 10mo to 15mo RAM are saved.
The think cycle is actually used more than once per second (called by itself on attack ?). This is the main issue about packet flood when numerous enemies follow you, and will end by a huge performance boost once corrected.
I search a mean to fix pet inventory weight number. Atm it only updates while overweight penalty is called. I dunno why.

Things to fix in AI part II:
- null crap on HitTask / callSkill.
- flee behavior if you're too near (mob stops to attack).
- siege NPCs mage weird movement.
- find a solution about mage with low/no mana, in order to avoid those weird movement.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 275

Enchant system, Quest system, Misc


Enchant system
   - [L2J Silentium 145] add skill refresh when you enchant an equiped dual (to +4) or armor (to +6, if other parts of set are already +6).
   - don't unequip item (it was visible if you failed a blessed enchant).
   - avoid to refresh weight in case of a success or a blessed fail.
   
Quest system (Hasha)
   -  fix exclamation mark for NPCs with one-time quests.
   -  npc will now show correctly the "quest completed" message, when quest is completed.
   
Misc
   - cleanup pathnodes loading.
   - delete _isSpoil + setter/getter (can be retrieved with another variable). Cleanup spoil skillhandler && effect.
   - cleanup 20+ generated TODO and content of those files (conditions mostly).
   - fix an issue where 2 items rewarding the same skill drops the skill once you unequip one of those items. Addition of getPaperdollItems() method. Ty xblx.
   - fix alliance creation/dissolution and clan dissolution if you're registered/participing in a siege. Ty Hasha. PS : it also avoids one connection with DB.
   - cleanup xp/sp methods to reuse existing stuff. Ty Hasha.
   - EffectStunSelf correctly stuns effector, not effected. Ty xblx for report.
   - FriendList packet edited (again). Ty xblx.
   - fix the last potential NPE (according Eclipse).
   - fix a crappy NPE introduced in previous rev (see last comments on previous rev). Ty xblx.
   - drop or edit few "_log.log(Level.WARNING, "", e);", as they send blank debug message. I only bothered about the most common.
   - AdminPledge is cleaned up, the following actions (dismiss, setlevel, reputation) are now possible on any clan member, not simply the leader. info and dismiss work as supposed (no need 2nd parameter) when used from admin panel.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 276

Quests, misc


Quests
   - addition of Q047, Q048, Q324, Q372, Q426. Ty to sharers.
   
Misc
   - "Quest." are dropped on any quest (Quest.getNoQuestMsg(), Quest.getAlreadyCompletedMsg() && all Quest.STATE_XXX).
   - drop a double check on checkClanJoinCondition() method, ty Ashe.
   - fix "ghost" aborted/completed quest issue on quest logs.
   - few HTM typos.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 277

Quests, Misc


Quests
   - addition of Q101, Q102, Q103, Q119, Q265, Q654. Ty sharers :3.
   - Echoes crystals aren't a Newbie reward (Q104 / Q105).
   
Misc
   - drop the "karma drop" message (was flooding logs).
   - change the severity of disconnected client message from "info" to "fine" (was flooding logs).
   - (potentially) fix concurrent exceptions on updateHeroes() && activateHero(). For info, .put on a Map overrides the entry if it was already existing, making the .remove useless (and dropping the concurrent use).

Notes
   - put back a concurrent version of ArrayList if Hero problem persists.
   - the "Rewards" var (flag used on repeatable newbie quests) will be kept until Tutorial is commited.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

Changeset 278

Quests, AutoChatHandler, Misc


Quests
   - addition of Q106, Q107, Q108, Q274, Q306. Ty sharers. Again.
   - unify checks about races on quests HTMs.
   
AutoChatHandler
   - drop AutoChatHandler system. It is only used for 7Signs, and it can't be used for a simple random npcid (or anyway must be scripted, as it must be setActive()).
   - indirectly fix the issue introduced in auto_chat rework, where Preachers were spamming the whole block of text (bad split with " $ ", dunno why).
   
Misc
   - classes folder use a better organized files, which also fix the Linux issue. Ty Root. I got few answers it works on Linux, and I tested some minutes on Windows.
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Tryskell

#179
Changeset 279

Quests, Misc


We reached a total of 300 scripts commited ! Ty to all sharers !

Quests
   - addition of Q273, Q292, Q293, Q340, Q602, Q604, Q610, Q616, Q625.
   - cleanup the demote methods for ketra and varka (use a for loop instead of imbricated if/else).
   - few HTMs "typos". Mostly to keep a shared pattern amongst all quests.
   
Misc
   - add a restriction for newbie check based on class level (avoid to be considered as a Newbie as a Saggitarius lvl 12).
   - drop a double message (reduceAdena() already got YOU_NOT_ENOUGH_ADENA included).
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>