summaryrefslogtreecommitdiff
path: root/src/map
AgeCommit message (Collapse)AuthorFilesLines
2017-04-04Implementation of Item Options System.Smokexyz11-64/+536
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-02-19Merge pull request #1457 from Ridley8819/unitIbrahem Hossam1-1/+1
Fixes Range Exploit
2017-01-27remove hardcoded chat area size from clif.c, add chat_area_size to battleconfgumi4-2/+5
2016-12-03Remove the platform-dependent variables from struct status_dataHaru11-60/+61
`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-03Add function to retrieve the appropriate fame list type for a job mapidHaru4-31/+37
This commit adds the function `pc->famelist_type()` to retrieve the appropriate fame list for a given job (common operation). When the given job ID doesn't have an appropriate fame list, the newly introduced value RANKTYPE_UNKNOWN is returned. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Change the argument to pc->famerank() to a rank type (instead of job mapid)Haru4-22/+42
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 pointsHaru5-38/+56
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)Haru11-215/+251
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)Haru17-199/+221
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-12-03Clarify the meaning of the MAPID_* constantsHaru1-97/+228
The enum values are now written in a more explicit way, showing how they're composed (upper mask + base job). A future-proof static assertion is added, to make sure the base jobs won't overlap the upper masks. Signed-off-by: Haru <haru@dotalux.com>
2016-12-02Fixed a null-pointer dereference in BUILDIN(makeitem2)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-12-02Merge pull request #1405 from Emistry/scriptcommand_makeitem2Haru1-0/+85
Add *makeitem2 script command.
2016-12-02Merge pull request #1521 from Lemongrass3110/fix/areawarp_cellcheckIbrahem Hossam1-1/+4
Fixed areawarp cell check
2016-12-02Merge pull request #1494 from Emistry/party_check_stateIbrahem Hossam1-5/+9
Update party_check_state
2016-12-01Fixed areawarp cell checkLemongrass31101-1/+4
The script command areawarp has been checking the wrong target map for ages. It has been checking the mapindex rather than the mapid and therefore returned a wrong result. Original commit: rathena/rathena@ac2ba09
2016-11-20Removed support for apostrophes in constantsHaru1-1/+1
Supporting apostrophes (`'`) inside constants or variables is no longer necessary thanks to the more strict AegisName ruleset we're using now. Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Added validation for the AegisName while parsing the item dbHaru1-0/+24
Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Synchronized the AegisNames to the in-source ITEMID_ constantsHaru3-34/+34
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-19Extend the previous linker library order fix to other makefilesHaru1-3/+3
This also fixed a typo (misplaced parentheses around LIBCONFIG_OBJ) in the *_DEPENDS variable of makefiles 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-11-03Fix version for packet 0x08d6 ZC_CLEAR_DIALOG.Andrei Karas2-2/+12
2016-11-03Add packet 0x08d3 ZC_SE_CASHSHOP_UPDATE into packets.hAndrei Karas1-0/+7
2016-11-03Fix version for packet 0x08d2 ZC_FASTMOVE.Andrei Karas2-3/+2
2016-11-03Add packets 0x08d0 ZC_REQ_WEAR_EQUIP_ACK2, 0x08d1 ZC_REQ_TAKEOFF_EQUIP_ACK2 ↵Andrei Karas1-0/+2
into packets.h
2016-11-03Fix version for packet 0x08cf ZC_SPIRITS_ATTRIBUTE.Andrei Karas2-3/+9
2016-11-03Add packet 0x09dc into packets.hAndrei Karas1-0/+7
2016-11-03Add packet 0x08cb ZC_PERSONAL_INFOMATION into packets.hAndrei Karas1-0/+8
2016-11-03Fix version for packet 0x08ca ZC_ACK_SCHEDULER_CASHITEM.Andrei Karas2-1/+5
2016-11-03Fix version for packet 0x08c9.Andrei Karas1-1/+1
2016-11-03Add packet 0x08c8 ZC_NOTIFY_ACT3 into packets.hAndrei Karas1-0/+7
2016-11-03Add packet 0x08c7 ZC_SKILL_ENTRY3 into packets.hAndrei Karas1-0/+7
2016-11-03Add packets 0x08c1, 0x08c2 into packets.hAndrei Karas1-0/+2
2016-11-03Fix version for packet 0x08c0 ZC_ACK_SE_CASH_ITEM_LIST2.Andrei Karas2-2/+14
2016-11-03Add packets 0x2f3-0x2f6 into packets.hAndrei Karas1-0/+10
2016-11-03Add packets 0x08b4, 0x08b5, 0x08b6 into packets.hAndrei Karas1-0/+9
2016-11-03Fix version for packet 0x08b3 ZC_SHOWSCRIPTAndrei Karas2-0/+9
2016-11-03Add packet 0x08b1 ZC_MCSTORE_NOTMOVEITEM_LIST int packets.hAndrei Karas1-0/+7
2016-11-03Fix version for packet 0x08e2 ZC_NAVIGATION_ACTIVE.Andrei Karas2-3/+6
2016-11-03Fix version for packet 0x097e ZC_UPDATE_RANKING_POINT.Andrei Karas2-4/+7
2016-11-03Add packet size 0x097d ZC_ACK_RANKING into packets.hAndrei Karas2-2/+11
2016-11-03Fix version for packet 0x0a28 ZC_ACK_OPENSTORE2Andrei Karas2-3/+10
2016-11-03Add packets CZ_GANGSI_RANK and CZ_JOIN_BATTLE_FIELD with clif_dull function.Andrei Karas1-51/+58
2016-10-28Fixed copyright year for 2016Lemongrass311055-55/+55
2016-10-27Update party_check_stateEmistry Haoyan1-5/+9
- missing classes checking.
2016-10-23Removed the too small max key length limit on the npc_removed_list DBMapHaru1-1/+1
- Fixes #1483 Signed-off-by: Haru <haru@dotalux.com>
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-22Fix incorrect coding style used in char/char.c and map/skill.cDastgir Pojee1-4/+4
2016-10-22Added max_summoner_parameter:Dastgir Pojee3-0/+4
Default max parameter for summoner is 120.
2016-10-22Minor Typo fixes, also added tsc declarationDastgir Pojee1-3/+4
2016-10-22Implemented UNT_CATNIPPOWDER.Dastgir Pojee2-0/+21
Implemented SC_CATNIPPOWDER: Increases WAtk%, MAtk% and Reduces Movement Speed. Increases Natural Hp/Sp Recovery