summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-01-02HPM Hooks UpdateHercules.ws15-15/+15
Signed-off-by: HerculesWSAPI <dev@herc.ws>
2017-01-02Double NPC Name in Royal Guard job change quest (#1538)Ridley1-1/+0
2016-12-13Merge pull request #1529 from Asheraf/quest13Ibrahem Hossam1-0/+5
Add a custom weight check in ring of the wise king quest
2016-12-12Add a custom weight check in ring of the wise king questAsheraf1-0/+5
2016-12-07Re-add -fvisibility=hidden on FreeBSD (necessary for plugins)Haru1-1/+1
Related to 2ceb249879148be0fca7d81f31158eccf3142aa2, which removed the option since it didn't appear to be necessary on Linux or macOS. Signed-off-by: Haru <haru@dotalux.com>
2016-12-03Merge pull request #1522 from HerculesWS/jobclass-mapid-cleanupAndrei Karas39-812/+1110
Job Class vs Job MapID cleanup
2016-12-03HPM Hooks UpdateHaru5-124/+158
Signed-off-by: Haru <haru@dotalux.com>
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 mapidHaru5-31/+38
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)Haru25-273/+297
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_* constantsHaru2-103/+234
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-03Add support for static assertions (on compilers that support them)Haru1-0/+27
This introduces the macro `STATIC_ASSERT(ex, msg)`, that works like its C11 counterpart `_Static_assert(ex, msg)`, on compilers that support it. Support is provided, depending on the compiler: - When in C11 mode, use the native `_Static_assert` - If the compiler advertises having the `c_static_assert` feature, use `_Static_assert` (according to the clang documentation). - If the compiler is GCC >= 4.7 (tested to be compatible), use `_Static_assert` (nonstandard extension, C11 feature available in C99). - If the compiler is MSVC (all the currently supported versions have been tested to be compatible), then use `static_assert` (nonstandard extension, C++ feature) - Otherwise, define it as a no-op macro. 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_makeitem2Haru2-1/+111
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-22Merge pull request #1519 from Asheraf/thesignDastgir1-5/+5
Fix wrong command usage at the sign quest
2016-11-22Fix wrong command usage at sign questAsheraf1-5/+5
disabled npc's do not show the effects
2016-11-21Constants Documentation SyncHercules.ws1-1107/+1107
Signed-off-by: HerculesWSAPI <dev@herc.ws>
2016-11-21ItemDB SQL SyncHercules.ws2-1279/+1284
Signed-off-by: HerculesWSAPI <dev@herc.ws>
2016-11-21Merge pull request #1514 from HerculesWS/itemdb-fixesAndrei Karas92-2482/+2604
Itemdb AegisName fixes
2016-11-20Removed support for apostrophes in libconfig key namesHaru3-82/+90
The apostrophe (`'`) is no longer an allowed symbol in libconfig key names. It is no longer necessary since it is no longer allowed in constant names. Signed-off-by: Haru <haru@dotalux.com>
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 dbHaru2-2/+26
Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Replaced some unsupported symbols in AegisNames (step 2)Haru78-1084/+1084
This removes the remaining unsupported symbols (despite they being official names) in AegisNames: The apostrophe (`'`) sign is suppressed. The full replacement rules (cumulative with the step 1 commit) are thus: - Any apostrophe is suppressed. - Any non-`[A-Za-z0-9_]` character is replaced with an underscore (`_`). - If the replaced symbol is at a word boundary (beginning or end of the string, or next to another underscore), it is suppressed instead. - If the replacement causes an AegisName conflict, underscores are appended appropriately. Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Replaced some unsupported symbols in AegisNames (step 1)Haru5-21/+21
This removes some unsupported symbols (despite they being official names) in AegisNames. The replacement rules used are: - Any non-`[A-Za-z0-9_']` character is replaced with an underscore (`_`). - If the replaced symbol is at a word boundary (beginning or end of the string, or next to another underscore), it is suppressed instead. - If the replacement causes an AegisName conflict, underscores are appended appropriately. Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Fixed various broken AegisNamesHaru1-8/+8
This removes special symbols (spaces, dashes, parentheses) from various custom AegisNames for which we don't have the official value available. Where possible, the appropriate name was guessed (based on similar existing items). Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Corrected item type for Gymnastics_Ribbon and Floral_Mic_Of_IguHaru1-2/+2
They are whips, not musical instruments. Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Synchronized the AegisNames to the in-source ITEMID_ constantsHaru4-34/+124
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-20Synchronized the AegisName between re and pre-re item databasesHaru4-24/+24
Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Fixed various minor issues in the item DBHaru2-9/+8
- Mostly whitespace, with the exception of the 'Wurst' item rename (was previously incorrectly named Brusti) Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Propageted the AegisName fix to scripts and pre-re databaseHaru16-294/+295
This commit just propagates the AegisName changes to the pre-re database and to the (re) scripts. Two issues are fixed as a side-effect: - The ghost_palace script was referring the non-existing constant(s): Thanatos_Two-Handed_Staff == (Thanatos_Two) - (Handed_Staff) == 0. Paired with the script engine's inability to differentiate between constants and player variables, that produced a very subtle issue. - The item RAG203 is sold by a NPC (Rebellion Weapon Vending). Due to a pair of swapped AegisName constants (RAG203 and RAG203_), the slotted version was sold by the NPC instead of hte non-slotted one (the issue was actually fixed in the previous commit, although the description of the fix is here - these two commits are only split for legibility purposes but they're to be considered indivisible). Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Fixed several broken or incorrect AegisName valuesHaru1-932/+932
The values are based on Divine-Pride. This also fixes several unusable AegisName constants containing spaces or special characters. Signed-off-by: Haru <haru@dotalux.com>
2016-11-20Merge pull request #1517 from HerculesWS/libconfig-quickupdateAndrei Karas20-926/+852
Libconfig quickupdate
2016-11-19Let the CI test suite also run the testsHaru1-0/+22
For the time being, test_libconfig only (test_spinlock is very time consuming)
2016-11-19Fix various uninitialized objects in the test_libconfig suiteHaru1-0/+31
The config_t objects need to be initialized through libconfig->init() before use (except when loaded through libconfig->load_file(), which initializes the object). Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Extend the previous linker library order fix to other makefilesHaru4-11/+11
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-19Fix a 'make test' failure caused by a wrong linker library orderHaru1-2/+2
The library common.a depends on common_sql.a. Signed-off-by: Haru <haru@dotalux.com>
2016-11-19HPM Hooks UpdateHaru4-72/+72
2016-11-19Add fixed-size versions of the _int64 libconfig getters/settersHaru4-17/+91
As we use int64 (instead of long long int) through the code, it's preferable if our libconfig interface does the same, avoiding us to create temporary interchange variables for that purpose. Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Fix a compilation warning in test_spinlockHaru1-5/+7
2016-11-19Fix a compiler warning from libconfig on gcc-6 and -O3Haru2-0/+24
Signed-off-by: Haru <haru@dotalux.com>
2016-11-19Re-generate libconfig with Flex 2.6.2-1 (still using Bison 3.0.4)Haru2-214/+171
The version of flex used here includes a workaround for https://github.com/westes/flex/issues/113 (since it's otherwise not-compilable)
2016-11-19Re-generate libconfig with Bison 3.0.4 (still using Flex 2.6.0)Haru3-606/+422
Signed-off-by: Haru <haru@dotalux.com>
2016-11-08ItemDB SQL SyncHercules.ws1-40/+40
Signed-off-by: HerculesWSAPI <dev@herc.ws>
2016-11-08Merge pull request #1502 from Angelmelody/correct_weapon_item_typeDastgir1-40/+40
Fixed incorrect item type for weapons and armor