summaryrefslogtreecommitdiff
path: root/src/map/status.c
AgeCommit message (Collapse)AuthorFilesLines
2019-02-01Merge pull request #1631 from Emistry/fix_voice_of_sirenHaru1-0/+3
Fix Voice of Siren minimum duration.
2018-12-14Add inventory size field into db and using it in server.Andrei Karas1-1/+1
2018-11-21Fix a regression that prevented characters from being resurrectedHaru1-1/+1
Caused by a wrong check in 8269fdcd5d036ddc3c24bc0ebb4ad958b5c19a3a Signed-off-by: Haru <haru@dotalux.com>
2018-11-14Extend status->heal() with a flag to allow reviving a dead characterHaru1-1/+3
This adds `STATUS_HEAL_ALLOWREVIVE` to `enum status_heal_flag`. Fixes an issue caused by a hack in the resurrection code, that would make characters respawn with 2 HP instead of 1. Signed-off-by: Haru <haru@dotalux.com>
2018-11-14Use an enum as flag for status->heal() and related functionsHaru1-47/+64
This introduces the `enum status_heal_flag`. No functional changes are made. Signed-off-by: Haru <haru@dotalux.com>
2018-11-14Fixes #889 & #840Jedzkie1-14/+49
- Novice classes will never go below 50% hp when died. - Other classes will show 1 HP rather than 0 when died. - Added battle configuration. Signed-off-by: Haru <haru@dotalux.com>
2018-10-07Fixed Logically Dead CodeDastgir1-23/+0
2018-07-01Fix some warnings caused by static functions defined and unusedHaru1-2/+6
Signed-off-by: Haru <haru@dotalux.com>
2018-07-01Change functions to static where possible (Part 4 - map)Haru1-224/+233
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
2018-06-29Fix packet 836 (search in stores).Andrei Karas1-1/+1
Added item options fields into this packet. Updated other things for support for report item options in vending. Buying store not supported for now.
2018-06-20Revert "Fixed Bug#8624"skyleo1-6/+1
This reverts commit 2c192fc93f4b5c8a19eaefbca4e24e160feb5d47. This `Fix` broke NPC_POWERUP (or rather SC_INCATKRATE) on Monsters, making MVPs like Atroce and Doppelganger not stronger in their Power Up phase as they used to be. Additionally it broke Divest Weapon's ATK Reduction on Monsters in Renewal.
2018-06-07Fix a crash caused by removing entries in job_dbAsheraf1-2/+4
2018-06-03Conversion of exp.txt to libconfigSmokexyz1-7/+41
2018-06-02Merge pull request #842 from AnnieRuru/request_6Haru1-0/+3
Add new *pcblock script command
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-05-04Add setpcblock & checkpcblock script commandsAnnieRuru1-0/+3
thanks to @MishimaHaruna for the updated syntax
2018-04-23Move hp recover code from status_calc_pc_ into separate function.Andrei Karas1-5/+14
2018-04-22Fixes interaction between Curse and BlessingJedzkie1-8/+16
When under Curse or Stone Curse, Blessing will only remove the negative statuses. Blessing needs to be cast twice to obtain the buff. Fixes #680 Signed-off-by: Haru <haru@dotalux.com>
2018-04-08Update Skill/Item messagesJedzkie1-1/+5
2018-02-10Clean up trailing whitespace and non-indent tabsHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2018-01-25Implementation of Official Clan SystemMurilo Pereti Tavares1-0/+21
All official features work including the autokick for inactive members And the system is completely customizable.
2017-12-17Merge pull request #1925 from MishimaHaruna/slowpoisonHaru1-13/+15
Natural expiration of Poison when under Slow Poison effect
2017-12-03Fix an issue that prevents the Poison status to naturally end when Slow ↵Haru1-13/+15
Poison is active The status change timer wasn't correctly rearmed in such a condition, keeping SC_POISON active indefinitely. Signed-off-by: Haru <haru@dotalux.com>
2017-11-05Reduce confusion between skill IDs and skill DB indexes (part 2)Haru1-2/+2
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-04Allow each npc use own view_data structure.Andrei Karas1-4/+8
Allow npc to use player classes (for older than 20170726 npc visible as players). View_data structure can be copied from predefined view_data lists created new if npc using player type.
2017-09-19remove trailing whitespaces from sourcegumi1-7/+7
2017-09-17Move other view-related variables to `sd->status.look`Haru1-4/+4
The following variables are now moved to `sd->status.look` (from `sd->status`): `head_top`, `head_mid`, `head_bottom`, `robe` Signed-off-by: Haru <haru@dotalux.com>
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-21/+18
`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-07-30Implementation of RoDEXKirieZ1-0/+7
2017-07-27Fix possible buffer overflows with snprintf.Andrei Karas1-1/+1
2017-07-27Move handling unknown sc code from status_change_start into separate function.Andrei Karas1-3/+13
2017-07-27Move adding icon code from status_change_start into separate function.Andrei Karas1-12/+20
2017-07-27Move getting val_flag based on type from status_change_start into separate ↵Andrei Karas1-128/+142
function.
2017-07-27Move set options from status_change_start into separate function.Andrei Karas1-164/+188
2017-07-27Move code for stop actions into separate function from status_change_start.Andrei Karas1-64/+79
2017-07-27Move from status_change_start code for end previous sc to separate function.Andrei Karas1-255/+284
2017-07-27Move some immune/resists checks from status_change_start into separate ↵Andrei Karas1-120/+155
functions.
2017-05-21Refine rate correction from kRO.smokexyz1-26/+51
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-05-09Merge pull request #1699 from Jedzkie/11-SummerCostumeHaru1-24/+35
Implemented Official Summer 2 Costume
2017-05-01Normal Stat food can't override the effect of Cash Stat food.Jedzkie1-30/+12
2017-04-23Coding-style Fixes and White space adjustmentsJedzkie1-26/+22
2017-04-19Added oktoberfest_ignorepalette configurationJedzkie1-1/+1
2017-04-19Implemented Official Summer 2 CostumeJedzkie1-1/+16
Added summer2_ignorepalette configuration
2017-04-04Implementation of Item Options System.Smokexyz1-2/+35
Allows the infusing of equipments with bonus item options. This feature is constrained to clients of packet versions greater than or equal to `20150226`. Item Options and their effects are defined server-side in `db/item_options.conf` and client side in `data/luafiles514/lua files/datainfo/addrandomoptionnametable.lub` The ID of the option must tally with the correct index of the description provided in the client side lua file to avoid bugs. IT_OPT_* keys and MAX_ITEM_OPTIONS macro are also exported from the source as constants. An additional flag `disable_options` has been added to sql, and as `DisableOptions: true/false (boolean, defaults to false !!for equipments only!!)` to item_db.conf files. Script commands documentation is also included. SQL file updates are included. Credits: [Smokexyz](https://github.com/Smokexyz) Style and Script Fixes by [Asheraf](https://github.com/Asheraf) Initial design Idea by [secretdataz](https://github.com/secretdataz)
2017-03-14Fix Voice of Siren minimum duration.Emistry Haoyan1-0/+3
- The minimum duration of Voice of Siren is now 10 seconds - Credit https://github.com/rathena/rathena/commit/f7a276ec7389389b6b56653ad87b21eb937aace6
2016-12-03Remove the platform-dependent variables from struct status_dataHaru1-6/+6
`struct status_data::class_` was platform dependent since c30bb75ec50624429bff7b4106db4be0fda366d6 in order to silence some compile warnings (uint32 on 64 bit builds and uint16 on 32 bit builds). It's now been changed to the correct type, int32, on all platforms. Since the change has potential to silently break third party code, the variable was renamed to `class`. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Change the argument to pc->famerank() to a rank type (instead of job mapid)Haru1-4/+5
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-03Clarify some Job Class vs MapID confusion (2/2)Haru1-21/+21
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>