summaryrefslogtreecommitdiff
path: root/src/map/status.c
AgeCommit message (Collapse)AuthorFilesLines
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)
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>
2016-12-03Clarify some Job Class vs MapID confusion (1/2)Haru1-19/+18
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-10-28Fixed copyright year for 2016Lemongrass31101-1/+1
2016-10-23Fixed some incorrect SCFLAG values introduced in ↵Haru1-6/+6
b0006317e5cc4a48cd5b8a501b94813cd3b93670 - Their original value was `17` (0x11), which is equivalent to `SCFLAG_NOAVOID|SCFLAG_NOICON`, rather than `SCFLAG_ALL` (0x1f) Signed-off-by: Haru <haru@dotalux.com>
2016-10-22Implemented UNT_CATNIPPOWDER.Dastgir Pojee1-0/+14
Implemented SC_CATNIPPOWDER: Increases WAtk%, MAtk% and Reduces Movement Speed. Increases Natural Hp/Sp Recovery
2016-10-22Implemented SC_SHRIMP.Dastgir Pojee1-0/+8
Increases BaseAtk and MAtk by 10%
2016-10-22Summoner should be Small Size and Brute Race.Dastgir Pojee1-2/+2
2016-10-22Implemented SC_BITESCAR:Dastgir Pojee1-0/+13
Cannot be reset by dispell. Cannot be healed by item/NPC once in BITESCAR. Heal Skill would end the BiteScar Effect.
2016-10-22Implemented SU_BUNCHOFSHRIMP Skill.Dastgir Pojee1-0/+1
Lasts for (30+30*SkillLv) Seconds. Consumes 1 Shrimp. Increases ATK and MATK by 10% for limited time.