summaryrefslogtreecommitdiff
path: root/src/map/status.c
AgeCommit message (Collapse)AuthorFilesLines
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.
2016-10-22Implemented SU_TUNAPARTY Skill.Dastgir Pojee1-5/+10
Protects the target for 30 seconds. Tuna's Defense Power: (10+(20*(SkillLv-1)))% of Caster's MaxHP
2016-10-22Implemented SU_LUNATICCARROTBEAT Skill.Dastgir Pojee1-0/+1
Atk +(200+100*SkillLv)%. When 1 Carrot is consumed, Add's a chance to stun enemy. Lv1-2: 3x3 AoE Lv3-4: 5x5 AoE Lv5: 7x7 AoE Added Item Constants in itemdb.h
2016-10-22Implemented SU_ARCLOUSEDASH Skill.Dastgir Pojee1-1/+13
For (50+10*SkillLv) Seconds, Atk +(15+5*SkillLv). Increases Movement Speed. If Target is Doram Race, Increases Range Physical attack by 10%.
2016-10-22Implemented SU_SCAROFTAROU Skill.Dastgir Pojee1-0/+2
Heal,Cure,Clearance cancels the effect. Atk + 100*SkillLv%. Reduces Fixed Amount of MaxHP for 9 seconds. For Every 30 Base Levels, Adds an Additional chance that skill will be activated again.
2016-10-22Implemented SU_SV_ROOTTWIST Skill.Dastgir Pojee1-4/+8
Duration: (5+(2*SkillLv)) seconds. Cannot be used on Boss Monsters. Effect is cancelled when Heaven's Drive or Trample is used. Enemies trapped on roots receive poison property damage.
2016-10-22Implemented SU_POWEROFLIFE Skill.Dastgir Pojee1-0/+6
Increases Flee, Hit and CRI by 20. If >= 20 Skill points invested in animal-based skills, Ranged Physical Attack + 20%.
2016-10-22Implemented SU_CN_METEOR:Dastgir Pojee1-0/+1
Catnip Meteor: Increases Matk by 200+100*SkillLevel%. When 1 Catnip is consumed, Adds a Chance to curse target[Not Implemented].
2016-10-22Implemented SU_CN_POWDERING Skill.Dastgir Pojee1-0/+1
Consumes 1 Catnip Fruit. Lv 1-2: 3x3 AoE Lv 3-4: 5x5 AoE Lv 5: 7x7 AoE Lasts for (2+SkillLevel) Seconds Increases Natural Recovery of HP/SP. Reduces Atk and MAtk by 50% Reduces Movement Speed.
2016-10-22Implemented SU_SV_STEMSPEAR Skill.Dastgir Pojee1-0/+1
Silvervine Steam Spear: 10% Bleeding Chance, 700% Matk at all levels. Lv 1: Earth Magic Lv 2: Fire Magic Lv 3: Water Magic Lv 4: Wind Magic Lv 5: Ghost Magic Base Level 30: Chance to activate skill again. Every 30 Base Level: Increases the chance to activate skill.
2016-10-22Implemented SU_POWEROFLAND Skill.Dastgir Pojee1-0/+6
Increases INT by 20, If More than 20 skill points invested in plant based Skills, MATK+20%.
2016-10-22Implemented SU_FRESHSHRIMP Skill.Dastgir Pojee1-1/+17
Consumes Fresh Shrimp to recover HP for 2 Minutes. Max Level 5: Recovers Every (11-SkillLevel) Seconds.
2016-10-22Implemented SU_SPRITEMABLE Skill.Dastgir Pojee1-1/+16
MaxHP + 1000, MaxSP + 100. Show's Spirit of Sea, Land and Life around the sprite when skill is learned.
2016-10-22Implemented SU_STOOP Skill.Dastgir Pojee1-0/+1
Reduces Incoming Damange by 90% for 6 seconds. When Knock Back, the effect disappears.
2016-10-22Implemented SU_SCRATCH:Dastgir Pojee1-0/+1
Max Level: 3 Attack Increases by 50+(50+Level)% Base Level >= 30: Activates a Chance to cast skill again. Every 30 Base Level: Increases the chance to cast skill again.
2016-10-22Implemented SU_HIDE Skill.Dastgir Pojee1-0/+8
Transforms into Bush.
2016-10-05CRI should only be calculated if flag have SCB_CRI.Dastgir Pojee1-4/+6
Fixes #1442
2016-09-30Add different fixes for gcc 7 warnings.Andrei Karas1-1/+34
Some possible buffer overflows. Add attribute for mark fallthrough cases. Skipped libconfig warnings.
2016-09-19Add missing checks into status.cAndrei Karas1-90/+239
2016-09-11Fixes skills targeting characters under camouflage statuscsnv1-1/+1
Fixes #571
2016-07-19Add skill atributes for allow moving while casting skill.Andrei Karas1-7/+18
New SkillInfo attributes: FreeCastReduced - allow move while casting with slowdown FreeCastNormal - allow move while casting with normal speed
2016-07-14Changed mmo_charstatus::base_level and mmo_charstatus::job_level to intHaru1-4/+2
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-07-12Add into skill.c some handling for unknown skills/skill units.Andrei Karas1-11/+1
Also improve a bit cast end functions call.
2016-07-10Merge pull request #1350 from 4144/scconfHaru1-40/+4
Extend with new flag sc_config.txt
2016-07-10Fixed SC_OFFERTORIUM and SC_MAGNIFICATRidley1-5/+9
They should cancel each other, not prevent the usage (like Kyrie and Assumptio) Closes #1222 as merged Signed-off-by: Haru <haru@dotalux.com>