8070 Commits

Author SHA1 Message Date
Florian Wilkemeyer
f7bc696335 map-server: increased size of skilldb_id2idx[] array, to prevent out-of-bounds access.
Bug:
It was Initially declared as size of UINT16_MAX (0xffff) but as the skill-id itself which will be used
as offset can reach this value, it's too small.
2016-05-04 21:57:10 +02:00
aleos89
d83559cb7f Added missing Summoner constants
* Added JOB_SUMMONER and EAJ_SUMMONER constants.
* Updated eA Job System documentation.
2016-05-04 12:58:09 -04:00
Florian Wilkemeyer
ce97b9ae0f corrected some typos in descriptive comments 2016-05-04 14:46:29 +02:00
Florian Wilkemeyer
99cb385f34 map-server: optimized path_search(), by removing dynamic memory allocation for each call.
Pathfinding uses BHEAP_* (vector) operations from db.h, before this optimization each pathsearch resulted in an call to aMalloc() / aFree()  which is quite costly as it fragments memory over time & may cause software stalls when the application's heap must be resized.

Now it allocates the Heap once (& may grow it accordingly) and re-uses the allocated memory every time/call.

This makes also tons of monsters less cpu-time intensive.
2016-05-04 14:00:37 +02:00
Playtester
8a37f1b2a9 Marionette Control, Mechanic Back/Front Slide
- Marionette Control now has a range of 7 (fixes #1239)
- Mechanic Back/Front Slide skills are no longer blocked by gear that makes you knock-back immune (fixes #1227)
2016-05-03 22:04:43 +02:00
Lemongrass3110
2170cfc01b Fixed a cashshop crash after reloaditemdb
Fixes #1234, thanks to @julia40124009.

Please note that it is currently not supported to resend the cashshop data to the players. It is only transmitted once during login as per request from the client.
2016-05-03 19:33:23 +02:00
Playtester
89f86b2533 Lunatic Carrot Beat, Catnip Meteor, Grand Cross (fixes #1219)
- Lunatic Carrot Beat and Catnip Meteor now deal 300% to 700% damage which is calculated once and split between multiple hits rather than calculating damage per hit; despite this, they can still hit plants
- Reduced cast time of Lunatic Carrot Beat from 3000ms to 1500ms and cooldown from 8000ms to 6000ms according to latest tests on kRO
- Fixed Catnip Meteor still having a fixed cast time
- Increased stun chance of Lunatic Carrot Beat from 10% to 20%
- Increased curse chance of Catnip Meteor from 10% to 20%
- Increased cast time of Grand Cross in pre-re to 3000ms (see #1140)
- Fixed Grand Cross sometimes having 4 intervals instead of 3 (see #1140)
2016-05-02 23:27:08 +02:00
aleos89
cb52138eaa Corrected Tiger Cannon combo bonus (fixes #1233)
* Tiger Cannon combo bonus should not be applied when used through Flash Combo.
* Follow up to e30df46.
2016-05-02 13:01:18 -04:00
Florian Wilkemeyer
7ff50e46a7 fix return values in pc_setpos (use enum constants instead of INT-values for return return value) 2016-05-02 15:19:37 +02:00
aleos89
abaed18016 Corrected Tension Relax HP regeneration while overweight (fixes #1177)
* When Tension Relax ends so should the HP regeneration bonus.
2016-05-01 09:51:19 -04:00
aleos89
d36610d605 Fixed a compile error on pre-renewal
* Follow up to 44cf0d0.
2016-04-30 12:04:25 -04:00
aleos89
44cf0d0e93 Corrected Enchant Blade damage formula (fixes #975)
* Enchant Blade now factors in target's DEF/MDEF and source's MATK.
2016-04-30 10:09:49 -04:00
aleos89
ba1c45c45d Fixed an issue with Chorus skill range (fixes #1162)
* Follow up to 497cca1.
* Resolves some Chorus skills not activating properly.
2016-04-29 16:21:11 -04:00
aleos89
703b1ec6ed Fixed NPC_SUMMONMONSTER switching monster mode to the slave mode (fixes #1221)
* NPC_SUMMONMONSTER should not call status_calc_slave_mode as it should be spawned like a normal monster.
2016-04-28 13:44:47 -04:00
aleos89
b02115e163 Updated Fresh Shrimp heal rate (fixes #1220)
* Fresh Shrimp now heals 4% of max HP.
2016-04-28 12:29:34 -04:00
Lemongrass3110
16f2d54248 Updated the logic in atcommand item2
Now shadow equipments will not stack anymore.
Pet eggs are created as in normal item atcommand.

Fixes #1214
Thanks to @julia40124009 for reporting.
2016-04-27 10:22:00 +02:00
aleos89
9fd08ef540 Corrected a comment to match the config value
* Follow up to 6227135.
2016-04-26 10:06:45 -04:00
Jittapan Pluemsumran
0f1b1af928
Implemented additional item bonus bMagicAddRace2 and bIGnoreMdefRace2Rate 2016-04-26 00:31:24 +07:00
Lemongrass3110
6688089192 Follow up to 6ab9fd0
Fixed a typo.
2016-04-24 20:41:01 +02:00
Lemongrass3110
6ab9fd0eea Small refactor of pc_setpos
pc_setpos now delivers an enum for the error that happened.
Additionallly it now returns a different return value when the targeted player is in autotrade state.
Added usage of this new return value to all recall commands.
2016-04-24 20:32:05 +02:00
Lemongrass3110
0a92487d19 Removed a redundant death check in recallall
This check is also done in pc_setpos. It additionally ignores one of the configurations by doing this here.
2016-04-24 12:07:24 +02:00
Florian Wilkemeyer
2a60f56a7a map-server: skill-subsystem: removed yet another useless DBMap (skilldb_id2idx).
As a skill ID is UINT16 && our skill index is also UINT16 - there is absolutly NO need for a B-Tree.
The lookup id2idx is done really often. so a tree-traversal is a bit too costly here.

The new -array based- implementation will consume 256 KiB on 32 Bit && 512 KiB memory to provide
a static lookup table.
2016-04-23 16:45:45 +02:00
Florian Wilkemeyer
80d4474bc7 map-server: cleanup: skilldb_name2id declared in header not in source-file. 2016-04-23 16:24:07 +02:00
Cydh Ramdh
94840b1734 Follow up e8f2fc166fd61aa1f32d18d7cce4cdccaae9696d
* Fixed compilation warning, incompatible types for timer.

Signed-off-by: Cydh Ramdh <cydh@pservero.com>
2016-04-23 17:59:36 +07:00
aleos89
10bac969ee Added DIR_* to script constants
* Adjusted a few location in source to use the constants.
Thanks to @Lemongrass3110!
2016-04-22 23:12:47 -04:00
aleos89
e8f2fc166f Added comments to rental functions
* Follow up to 074bdde.
* Changed pc_inventory_rental_end to a bool type.
2016-04-21 12:13:45 -04:00
aleos89
ef779946fa Resolved a compile warning
* Removed an unused variable from 55e4df1.
2016-04-19 08:49:34 -04:00
aleos89
55e4df14c2 Overhaul of the mob mode system
* This rewrite allows for better adaptation from the Aegis Class and Attribute fields.
* Refactored the renewal level penalty function.
* Slaves are now properly assigned an official slave mode of CanWalk, CanAttack, and NoRandomWalk.
* Removed extra Boss checks and adjusted others to use their proper functions.
* Properly implemented Skill Immunity mode to match Aegis.
* Separated MVP and Boss modes.
-- MVP mode defines when mobs should give MEXP, MVP Drops, and show the MVP sign.
-- MVP now have their own item drop configurations.
* Updated the mob_db and mob_skill_db to match the new mode structure.
-- Included a Perl tool (tools/convert_monstermode.pl) to allow people to convert their custom mobs to the new mode structure.
Thanks to @Playtester and @Lemongrass3110 for help with debugging and information!
2016-04-18 14:49:27 -04:00
Lemongrass3110
5070855f0a Reverted f0aa0e5
This commit fixed one problem, but actually broke a lot of other things.
2016-04-17 23:47:09 +02:00
Lemongrass3110
f0aa0e5b60 Fixed the unknown packets on clients from october 2015 onwards
Sorry guys, we actually created this issue ourselves, because we overwrote the data of the next incoming packet eventually.
Maybe this will make 2015-10-29 also useable again.

Fixes #1049.
2016-04-17 22:31:19 +02:00
Aleos
76922d87a3 Adjusted some characters in a comment
* Corrected a comment to use UTF-8 characters.
2016-04-17 12:47:00 -04:00
aleos89
e30df46797 Fixed Tiger Cannon and Sky Net Blow splash damage (fixes #1025)
* Tiger Cannon and Sky Net Blow will now properly give Combo State bonus damage to splash targets.
* Corrected Flash Combo not delaying attacks, acting, and item usage for the entire cast time.
2016-04-17 10:51:16 -04:00
Jittapan Pluemsumran
77212ece52
Follow up to 21c636c
Move CELL_CHKLANDPROTECTOR check to ST_WATER check
2016-04-17 18:30:55 +07:00
Jittapan Pluemsumran
21c636c12b
Correct Aqua Benedicta interaction with Watery Evasion to match official behavior. Fixes #1119 2016-04-17 17:45:02 +07:00
Playtester
33efbd0869 Summoner, Novice and Level 151+ HP/SP updated (fixes #1181)
* Summoner HP/SP values are now accurate for both HP/SP tables and the automatic calculation
* Summoner HP/SP adjustments in the code are now at the correct place and only used when the HP/SP tables are not used
* Super Novices now gain +2000 HP at both level 99 and level 150 and the bonus stays even on level 100-149 and 151+ (fixes #979)
* Normal Novices no longer get a HP boost
* Updated HP/SP tables to official values for level 151-175 and extrapolated new values for up to level 500
* Removed 3rd classes from the HP/SP tables in pre-re and replaced them with dummy data (using Novice values)
-- Note: This way updates like this one don't need to be done twice. If you want to use 3rd classes in pre-re just copy over the lines you need from the re folder or even better, use the import folder. You should use it for all customizations you do for easier updating.
2016-04-17 01:08:44 +02:00
aleos89
5d446e533b Updated Power of Sea effect (fixes #1174)
* Now gives MHP + 1000 and MSP + 100.
* Spending 20 skill points on Fish-type skills the bonus becomes MHP + 3000 and MSP + 300.
2016-04-16 09:51:14 -04:00
aleos89
63e772956b Corrected some skills healing immune targets (fixes #1109)
* Gentle Touch - Cure and Tuna Belly will no longer heal Emperium or Barricades.
Thanks to @admkakaroto and @Darkelfen!
2016-04-15 10:50:13 -04:00
aleos89
a1777407f9 Resolved final GCC compile warnings
* Fully fixes #1171.
* Follow up to ee3cf98.
2016-04-15 10:02:51 -04:00
Lemongrass3110
7264099fb9 Fixes some compiler warnings on GCC
Partially fixes #1171 as a follow up to 2bf64c9.
2016-04-14 23:24:15 +02:00
Aleos
a41ba12cf2 Fixed character deletion on 2015-11-04 and higher (fixes #1167)
* Resolves characters not being removed from the character select screen after the delete time is met and clicking the delete button.
Thanks to @joelolopez, @Darkelfen, and @Lemongrass3110!
2016-04-14 17:01:29 -04:00
aleos89
9a3afff176 Merge branch 'master' of https://github.com/rathena/rathena 2016-04-13 14:07:39 -04:00
aleos89
bd3952c3d4 Updated Body Style command
* Now allows for Arch Bishop class.
2016-04-13 14:07:06 -04:00
Playtester
7e97b0db86 Summoner skill status changes
* Until tested, Summoner skills will now use the default renewal base duration for their status changes
-- Bleeding: 120s
-- Stun: 5s
* Moved status change durations to duration2 for these skills
2016-04-13 18:14:49 +02:00
Playtester
e3500093b1 Catnip Meteor Cast, AoE and Damage (fixes #1166)
* Catnip Meteor now has a variable cast time of 7500ms (previous 6000ms)
* Catnip Meteor now has a cooldown of 5000ms on all levels (previously 2000-6000ms)
* Each meteor now has an AoE range of 7x7 (previously 3x3)
* Each meteor now deals 5 hits regardless of level used (previous 1-5 hits)
* Each hit now only deals 40%+20%*level damage (previously 200%+100%*level)
-- Note: As damage is multiplied by number of hits (can hit plants), damage per meteor is now 200%+100%*level
2016-04-13 17:51:31 +02:00
aleos89
67e26c885d Added a new script command unitexists
* Small follow up to 4f16d82.
* Checks to see if a unit exists or not.
2016-04-13 09:34:43 -04:00
Lemongrass3110
2bf64c9773 Refactored the EQI constants
The EQI constants of the constants database did not match the ones used in the source up to now.
For whatever reason long long ago an array was created which mapped the const_db EQI constants to the source's EQP constant(aegis bitmasks).
With this commit we now use the already existing array from pc.h(which was moved from pc.c to be accessible).

This merges and closes #1147 due to follow up changes with 1cd3741.
2016-04-13 11:11:42 +02:00
aleos89
4f16d82540 Added return values for unit script commands (fixes #1143)
* Script commands getunitdata and setunitdata will return -1 when the given GID is not found.
* Script commands getunitname and setunitname will return Unknown when the given GID is not found.
2016-04-12 10:16:58 -04:00
aleos89
ee3cf98daa Fixed a possible item ID overflow for script command makeitem (fixes #1160)
* Fixed a possible overflow with script command getareadropitem.
* Adjusted item count variables to match item ID variable type as well.
2016-04-12 09:52:06 -04:00
Playtester
87471044aa Auto spell error log (fixes #1154)
* When using auto spell, it will no longer print error messages to the map-server when no valid skill was selected

Note: This needs to be done because the client sends us random IDs if the user simply presses on "Ok" without selecting a skill, so it's technically not an error, but expected behavior that needs to be handled.

Special thanks to @anacondaqq and @stealth62 for helping to reproduce the error.
2016-04-11 19:51:51 +02:00
aleos89
17685a3247 Fixed Heaven Drive not doing any damage (fixes #1156)
* Moved the Silver Vine Root Twist cancellation from Heaven Drive to skill_additional_effect as it was breaking out of the switch before skill_attack.
2016-04-11 09:45:03 -04:00