summaryrefslogtreecommitdiff
path: root/src/map/skill.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-30add support for send target in unittalkAsheraf1-1/+1
2018-06-25Merge pull request #2076 from dastgirp/3-skill_pluginHaru1-3/+5
Plugin function ReturnType fix
2018-06-12Changed returntype of skill_check_condition_castend_unknown.Dastgir1-3/+5
skill_check_condition_castend is terminated if returntype is true
2018-06-03Fix the skill element for levels above the MAX_SKILL_LEVELHaru1-4/+0
Fixes a regression in 2b4bfa5d08931530d5c9b30af10dd58c1af14883 Signed-off-by: Haru <haru@dotalux.com>
2018-06-02Merge pull request #2038 from 4144/msiHaru1-10/+23
Improve msgstring table usage
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-05-29Add autogenerated messages list headers with original strings and translation.Andrei Karas1-5/+18
Also add packet version checks for used messages.
2018-05-29Fix wrong values in clif_messages enum.Andrei Karas1-5/+5
Also use official constant names with custom prefix in clif_messages enum.
2018-05-01Replace "--ja--" and "--en--" with constants (source only)Haru1-2/+2
- Use `DEFAULT_MOB_NAME` instead of a literal "--en--" - Use `DEFAULT_MOB_JNAME` instead of a literal "--ja--" Signed-off-by: Haru <haru@dotalux.com>
2018-05-01Fix the name of the monsters summoned by SA_SUMMONMONSTERHaru1-1/+2
- The displayed name was " --ja--" due to an extra space inside a string. - Error introduced in 2012, commit d9d3adf3fd4795bf2483ec8549ddc30e01629db Signed-off-by: Haru <haru@dotalux.com>
2018-04-23Merge pull request #2005 from guilherme-gm/guildskillcdHaru1-6/+10
Allow guild skills cooldown to continue when logged out
2018-04-08Allow guild skills cooldown to continue when logged outGuilherme G. Menaldo1-6/+10
2018-04-08Prevent a null pointer failure when TK_JUMPKICK is used by a non-playerHaru1-8/+6
Fixes #1875 Signed-off-by: Haru <haru@dotalux.com>
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-0/+2
All official features work including the autokick for inactive members And the system is completely customizable.
2018-01-14Merge pull request #1939 from Asheraf/zero_drop_packetHaru1-10/+10
Add support for new drop packet 0xadd for zero clients
2017-12-23Replace the use of skill_reproduce_db with AllowReproduce flagAsheraf1-18/+7
2017-12-23Add support for new drop packet 0xadd for zero clientsAsheraf1-10/+10
2017-11-26Fix handling of the special case of SplashRange < 0 meaning AREA_SIZEHaru1-3/+6
This restores the behavior that was broken in 2b4bfa5d0. Fixes #1911 Signed-off-by: Haru <haru@dotalux.com>
2017-11-24Allow using the skill DB accessors on non-skill attacks (skill_id = 0)Haru1-53/+182
This suppresses an assertion in the skill DB accessors when called with `skill_id = 0` (such as during normal attacks). In such case, they'll now return an appropriate zero value, as it happened before 2b4bfa5d0. Fixes #1909 Signed-off-by: Haru <haru@dotalux.com>
2017-11-18Merge pull request #1903 from Asheraf/skill_scaleHaru1-0/+6
Implement skill scale packet for client versions >= 20151223.
2017-11-16Implement skill scale packet for client versions >= 20151223.Asheraf1-0/+6
2017-11-05Fix/clarify various incorrect modulo operationsHaru1-23/+24
Most relevantly, `skill_lv%11 - 1` is not a valid skill item requirement index, since it can return -1 depending on the skill_lv. It was replaced with `(skill_lv - 1) % MAX_SKILL_ITEM_REQUIRE`, which always returns a value in the 0 ~ MAX_SKILL_ITEM_REQUIRE range. Signed-off-by: Haru <haru@dotalux.com>
2017-11-05Reduce confusion between skill IDs and skill DB indexes (part 2)Haru1-4/+4
Remove MAX_SKILL in favor of MAX_SKILL_DB, when referring to the maximum skill DB index. This is opposed to MAX_SKILL_ID, the maximum skill ID. Signed-off-by: Haru <haru@dotalux.com>
2017-11-05Use the skill DB accessors where possible/appropriateHaru1-46/+50
This includes some renamed local variables, in order to minimize the cases of unsafe variable reuse. Signed-off-by: Haru <haru@dotalux.com>
2017-11-05Reduce confusion between skill IDs and skill DB indexes (part 1)Haru1-68/+444
Rewrite skill DB accessors to clarify the difference between IDs and indexes, and to report a backtrace to the console when an invalid ID is passed. The type of the skill_id and skill_lv arguments has been changed to int. Signed-off-by: Haru <haru@dotalux.com>
2017-11-05Fix a subtle error in case skill->unit_group_newid overflowsHaru1-7/+8
The incorrect handling of the overflowed values would cause certain skill unit entries to get stuck and never get deleted correctly. A possible symptom of the issue are monsters that become immune to certain AoE spells having the UF_NOOVERLAP flag (Storm Gust, Lord of Vermillion, etc). Signed-off-by: Haru <haru@dotalux.com>
2017-10-21Merge pull request #1854 from Asheraf/skillHaru1-1/+2
Change skill_init_unit_layout to report skill id instead of index
2017-10-21Add packets for 64 bit exp.Andrei Karas1-2/+2
Also update some functions for support 64 bit exp calculation.
2017-10-21Change skill_init_unit_layout to report skill id instead of indexAsheraf1-1/+2
2017-09-21Convert some functions from int32 types to int64.Andrei Karas1-2/+2
This mainly need for base and job exp, because now they using int64 type.
2017-09-19remove trailing whitespaces from sourcegumi1-16/+16
2017-09-17Differentiate variables that hold a ViewSprite and a Subtype (part 2)Haru1-1/+1
`sd->status.shield` is renamed to `sd->status.look.shield` and only holds ViewSprite IDs. Its previous other meaning is now transferred to `sd->has_shield`, of boolean type (to detect the presence of a shield) Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Differentiate variables that hold a ViewSprite and a weapon SubtypeHaru1-5/+5
`sd->status.weapon` is renamed to `sd->status.look.weapon` and only holds ViewSprite IDs. Its previous other meaning is now transferred to `sd->weapontype` (holding the currently equipped weapon type, considering both hands at once) Signed-off-by: Haru <haru@dotalux.com>
2017-09-17Split 'View' in two different fields in the item databaseHaru1-1/+1
- The field was used both for sprite view IDs and for weapon or ammunition subtypes. Now the fields 'ViewSprite' and 'Subtype' are used respectively. Signed-off-by: Haru <haru@dotalux.com>
2017-06-09Merge pull request #1139 from SamuelHercules/WarlockCLFixsmokexyz1-1/+1
Fixed Chain Lighting animation was sent in wrong flow.
2017-06-06Fixed assert report when arrow shower(skill) was used on traps.Dastgir1-3/+3
Fixes #1676
2017-05-21Refine rate correction from kRO.smokexyz1-1/+1
Normal Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941553&curpage=1 Enriched Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941565&curpage=1 Event Normal Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941558&curpage=1 Event Enriched Ores: http://ro.gnjoy.com/news/probability/View.asp?category=4&seq=1941567&curpage=1
2017-04-10Monster Vulture's Eye and Snake's Eye removed.Smokexyz1-2/+2
Original PR #1148 by @SamuelHercules committed on 8 Feb 2016 * Monsters no longer have Vulture's Eye level 10 and Snake's Eye level 10 learned by default * When you tank Cecil Damon from 10-14 cells away, she will no longer use her target skills * Added a configuration with which you can set the level of Vulture's Eye and Snake's Eye that monsters have learned Merged rAthena @ cccd1496f716fe02a3db20780b6e52b3c33391b4 Credit: Playtester
2017-03-16Correct Castling skill to use cooldownAsheraf1-2/+8
2017-03-16Official status change base durations for Stun (#1234) (#1632)Flipp1-3/+3
- NPC_LICK now has a base chance of 20%*level and a base duration of 5s - Excruciating Palm now has a base duration 5s - Shield Press now has a base duration of 5s+0.5s*level - Earth Shaker now has a base duration of 2s (level 2-3) and 3s (level 4-5) - Sightless Mind now has a base duration of 30s in pre-re and 20s in renewal - Credit rathena/rathena@80e026433
2016-12-03Change the argument to pc->famerank() to a rank type (instead of job mapid)Haru1-2/+3
For consistency with `pc->addfame()`, the argument to pc->famerank() is now an enum fame_list_type. The function was renamed to `pc->fame_rank()` to avoid silently compiling old non-compliant code. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Ensure that pc->addfame() increments the correct fame pointsHaru1-14/+15
The function now takes the rank type as argument, rather than guessing it from the character's class. If the wrong fame point type for the current character is requested, the request is ignored. This fixes some (unofficial) edge cases where a Taekwon or an Alchemist refined a signed item, they could obtain rank points. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (2/2)Haru1-32/+30
This commit ensures that `sd->job` and related variables only contain MapIDs (i.e. the serverside optimized values, where High Novice is MAPID_NOVICE | JOBL_UPPER) and are never checked against the client-based Job Class values. As a rule of thumb, from now on, when a variable is named `job` or `jobid`, it is intended to contain a MapID and not a Job Class ID. The type of such variable shall be an unsigned `uint16` or `uint32`. To ensure that related third party code is also verified when this commit is merged, the variable `struct map_session_data::class_ (i.e. `sd->class_`) is renamed to `job`. Some issues in related lines are also fixed, including: - The atcommand `@mount` would not check properly that the requesting character is a 2nd class Swordsman type. - `pc->addfame()` would silently accept invalid MapIDs, sending unknown values to the client (more on this in a subsequent commit). - `pc->famerank()` would not use the passed job as a bitmask, causing the caller to have to mask it beforehand (more on this in a subsequent commit). - The Soul Linker check in TK_JUMPKICK wasn't future-proof (no harm caused currently). - Gunslingers would be able to be targeted by Spiritual Bestowment (`MO_KITRANSLATION`) and Spiritual Sphere Absorption (`MO_ABSORBSPIRITS`) due to a faulty check introduced when the Rebellion class was implemented (causing unintended interaction with Coins). Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-12/+13
This commit ensures that `sd->status.class` and related variables only contain Job Classes (i.e. the client-compatible values, where High Novice 4001) and are never checked against the bitmask-based MapID values. As a rule of thumb, from now on, when a variable is named `class`, it is intended to contain a Job Class ID and not a MapID. The type of such variable shall be a signed `int16` or `int`. To ensure that related third party code is also verified when this commit is merged, the variable `struct mmo_charstatus::class_ (i.e. `sd->status.class_`) is renamed to `class`. Some issues in related lines are also fixed, including: - A wrong check in the char server would prevent the correct detection of babies in code related to the family exp sharing. - Baby Arch Bishops would not be affected by Eucharistica. - A wrong check would cause the `questinfo()` script command not to display its information for most classes (except 1-1 classes). - Map IDs and Job Classes were mixed up in `itemdb_jobid2mapid()` and `itemdb_jobmask2mapid()` for 1-1 classes (causing currently no harm, since they just happen to coincide). - The Baby Sura class would not cause parties to be marked as containing a monk type character (for SLS Team Up purposes). - Baby Geneticists would bypass the cart check when trying to equip ammunitions. - Baby Mechanics would bypass the Mado Gear check when trying to equip ammunitions. - Transcendent Shadow Chasers would lose the Stalkers' ability to clone transcendent skills. Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Synchronized the AegisNames to the in-source ITEMID_ constantsHaru1-15/+15
Some missing items were copied to the pre-renewal database. In general, when an item ID is hardcoded in source, it's preferable that the item exists in both databases. Signed-off-by: Haru <haru@dotalux.com>
2016-11-07Corrected an issue causing WZ_HEAVENDRIVE to be ineffectiveHaru1-4/+4
The issue was caused by an evident patch mishap in commit 5e04f472e1ef618d9201fd22e382dca829992b3b. The misplaced piece of code has now been moved to the most likely place it was supposed to be in. This commit also removes an extra 'break' introduced by accident in commit f4e8189545642ee0bf87f3da546bddc918682935 (which caused no harm). Related: http://herc.ws/board/topic/13672-heaven-driver/ Signed-off-by: Haru <haru@dotalux.com>
2016-10-22Fix incorrect coding style used in char/char.c and map/skill.cDastgir Pojee1-4/+4
2016-10-22Minor Typo fixes, also added tsc declarationDastgir Pojee1-3/+4
2016-10-22Implemented UNT_CATNIPPOWDER.Dastgir Pojee1-0/+7
Implemented SC_CATNIPPOWDER: Increases WAtk%, MAtk% and Reduces Movement Speed. Increases Natural Hp/Sp Recovery
2016-10-22Increases SkillID Range on skill_get_index.Dastgir Pojee1-1/+1