- A devoted player will now get the full 5%+15%*level damage reduction of Defender (fixed#234)
- Magnificat will no longer increase HP regen (fixed#275)
- Sitting will now always double the regeneration speed instead of just adding 100% to the regen bonus (i.e. Magnificat + Sitting = quadruple SP regen instead of triple)
Skill array clean up
- Changed skill_db array to better memory allocation.
- Reduced MAX_SKILL_LEVEL from 100 to 10 (part of Hercules HerculesWS/Hercules@0f4a50d), also has changes on skill_get checks for skill levels greater than 10.
- Reduced MAX_SKILL from 5020 to 1200 (only 1109 skills are used).
- Added macros for checking Homunculus, Guild, Mercenary, and Elemental skill ranges.
- Added skill check and index validation when player logs in and on use of @reloadskilldb.
- Corrected enum e_skill_flag order for SKILL_FLAG_REPLACED_LV_0's sake.
- Merged 'addtoskill' script command just as alias of 'skill' script command.
Summary:
- Decreased memory usage by map-server up to 50 MB.
- Decreased memory for each player because of mmo_charstatus::skill[] array size from 5020 to 1200.
- Please use skill_get_index() for accessing sd->status.skill[] or skill_db[], don't recklessly use skill_id as array index.
NOTE:
- Please import upgrade_20150131_skillset.sql
* Changed bonus script list to link list
* Merged 'pc_bonus_script_clear_all' to 'pc_bonus_script_clear'
* Now bonus script will be saved on auto-save timer or other save request, prevent losing the bonus when "something" happen. But, saving when player is quiting, will removes the bonus that won't be saved on logout.
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Changed skill_db array to better memory allocation.
* Reduced MAX_SKILL_LEVEL from 100 to 10 (part of Hercules 0f4a50d135), also has changes on skill_get checks for skill level that more than 10.
* Reduced MAX_SKILL from 5020 to 1200 (actually only 1109 skills are used).
* Added macros for checking Homunculus, Guild, Mercenary, & Elemental skill ranges.
* Added skill check & index validation when player logged in and when @reloadskilldb.
* Corrected `enum e_skill_flag` order for SKILL_FLAG_REPLACED_LV_0's sake.
* Merged 'addtoskill' script command just as alias of 'skill' script command.
Summary:
* Decreased memory usage by map-server reduced up to 50 MB.
* Decreased memory for each player because of mmo_charstatus::skill[] only has 1200 array, before is 5020.
* Please use skill_get_index() for accessing sd->status.skill[] or skill_db[], don't reckless use skill_id as array index.
NOTE:
* Please import upgrade_20150131_skillset.sql
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Removed fixed array size (MAX_PC_BONUS_SCRIPT) of bonus_script on players.
* Changed fixed script string on player's bonus_script to StringBuf, reduce memory usage for each connected player.
* Added new flags to expand duplicated script and flag to allow duplicate script.
* Reduced buf lenght from 1024 to 512 on bonus_script_data (used for saving/loading bonus_script from char-server). Still, MAX_PC_BONUS_SCRIPT is used to gives limit data can be loaded.
NOTE:
Please import 'upgrade_20150131.sql' for `bonus_script` table changes
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
Straight up copied the code from Pyroclastic, as the original skill code for Light of Regen was not applying the status effect to the player. Seems to work just fine, not sure if that second sc_start2 can just be deleted.
* Implemented ALL_REVERSEORCISH as follow up 01ae1ae6126dc8aa91f967eea7d145e10dfb29e3.
* Clean up `rand()` script usage in Fools_Day_Box (12396) and Fools_Day_Box2 (12397).
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Max level to equip item now works for Pre-Renewal too, since the field is optional. 0 means no max level limit.
* Fixed fail message on clif_equipitemack when item cannot be equipped because level limitation
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Changed Guild/Party Bound Item Retrieval Methods:
- Fixes bugreport:9338
- Now resend the list to map-server from char/inter-server to avoid "weird" item allocation on guild storage. Example, previously you will meet stacked item like GUID does, but it shouldn't!
- Also will check the maximum amount that can be store in guild store. If guild storage is full (the slots or item stack limit is reach) the rest value/item will be dropped.
- Account of kicked guild member won't be kicked from server any more if the player idle on character select window (just prevents player to login when retrieving items are in progress)
- Delete guild bound items from guild master when guild is disbanded! Previously, the bound type just changed to NONE. Also for party bound item.
- If kicked guild/party member is trading bound item when be kicked, the trade will be cancelled!
- If the guild member is being kicked when open guild storage, storage will be closed first waiting for next item retrieval.
- Now when guild storage is opened, storage_status (changed the var to 'opened') will be used to hold char_id who opens it.
* Misc:
- Cleanup guild storage prefix functions, changed them to "gstorage_*"
- Added picklog type 'B' for logging deleted bound item because of kicked from guild/party.
- Updated documentation for new used packet 0x3857
* Separated pet_db for Renewal & Pre-Renewal to avoid non-existant monster in different mode.
* Cleaned script command in pet_db.txt file, just point it to doc/script_commands.txt. Read them there!
* Separated damage value for petskillattack2 to its own var 'damage', that previously use 'lv' var to store the value.
* Added config 'pet_ignore_infinite_def' in conf/battle/pet.conf,
- If disabled (val:"no"), fixed damage from pet script 'petskillattack2' will be adjusted to 1. Example, just like player attacks Shining Plant.
- Enabled by default. Previously, fixed damage ignore the infinite defense, that's why it's enabled by default.
- TODO: Correcting the logic and maybe also confirm the correct behavior!
* Added validation for pet script commands,
- Skill for petskillattack, petskillattack2, & petskillsupport
- SC range for petrecovery.
* Cleaned up some source documentation.
* SC_FIGHTINGSPIRIT gives no effect for RK_FIGHTINGSPIRIT level < 10
* Fixed RK_FIGHTINGSPIRIT gives no effect if level < 5
* Little optimization on RK_FIGHTINGSPIRIT codes
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
* Separated how monster's skills to be assigned to each monster to `mob_skill_db_set()` function
* Added temporary `DBMap *mob_skill_db` to store monster skills by using `struct s_mob_skill`
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>
Mapindex now also uses the common variable db_path and the DBIMPORT define
Also removed the global mapindex configuration variable from the header file
* Missing `item_ratio->nameid = nameid;` assignment when item_ratio isn't exist in db yet
* Modified @whodrops result for monster list to: "- <monster name> (<mob_id>): <rate>%"
Signed-off-by: Cydh Ramdh <house.bad@gmail.com>