summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2018-06-02Merge pull request #2055 from trojal/patch-1Haru1-1/+1
Don't overwrite mob.range with Inherit:true
2018-05-31Don't overwrite mob.range with Inherit:truetrojal1-1/+1
Using mob_db2 and Inherit: true shouldn't override the base mob's range if it's not included.
2018-05-312012-2018 !Maytichai Saowa1-1/+1
2018-05-15fix a wrong iterator used for mob skill db parsingAsheraf1-4/+4
2018-05-01Replace "--ja--" and "--en--" with constants (source only)Haru1-11/+10
- Use `DEFAULT_MOB_NAME` instead of a literal "--en--" - Use `DEFAULT_MOB_JNAME` instead of a literal "--ja--" Signed-off-by: Haru <haru@dotalux.com>
2018-04-19Convert mob_skill_db into libconf formatAsheraf1-208/+177
2018-04-08Added delay to tomb spawnGuilherme G. Menaldo1-2/+48
2017-12-23Show item drop effects only if monster dropping non looted items.Andrei Karas1-4/+9
2017-12-23Add support for new drop packet 0xadd for zero clientsAsheraf1-2/+2
2017-11-05Use the skill DB accessors where possible/appropriateHaru1-1/+1
This includes some renamed local variables, in order to minimize the cases of unsafe variable reuse. Signed-off-by: Haru <haru@dotalux.com>
2017-10-30Add monster spawn boss flag for miniboss: miniboss_monsterAndrei Karas1-1/+1
also fix boss_monster flag for works as mvp and not like mini boss. unhide boss flag if hp bar disabled.
2017-10-21Merge pull request #1833 from Emistry/mapflag_noautolootHaru1-0/+1
Add NoAutoloot mapflag
2017-10-22Add NoAutoloot mapflagEmistry Haoyan1-0/+1
- Enable server to disable autoloot settings for certain maps.
2017-08-20Ignore hidden units in the cell stack limit checksHaru1-1/+1
- This improves the Dancer Quest experience as well as other cases of hidden NPCs blocking off certain cells - Fixes #1135 Signed-off-by: Haru <haru@dotalux.com>
2017-07-27Fix possible buffer overflows with snprintf.Andrei Karas1-4/+4
2017-04-29Removal of rare_drop_announce config.Jedzkie1-16/+0
2017-04-29Fixes #994Jedzkie1-8/+7
2017-02-26Added option to show classchange only to one player (#1587)Guilherme G. M1-1/+1
* Added option to show classchange only to one player
2016-12-03Remove the platform-dependent variables from struct status_dataHaru1-8/+9
`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-03Ensure that pc->addfame() increments the correct fame pointsHaru1-1/+1
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 (1/2)Haru1-2/+2
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-09-30Add different fixes for gcc 7 warnings.Andrei Karas1-1/+6
Some possible buffer overflows. Add attribute for mark fallthrough cases. Skipped libconfig warnings.
2016-07-14Changed mmo_charstatus::base_level and mmo_charstatus::job_level to intHaru1-1/+1
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
2016-06-29Fix EXP modifiers to match aegis modifiers calclution.hemagx1-5/+0
- Now Renewal Level Penalty being calculated in pc_calcexp only - Now Guild Tax is being paid after experience modifiers and not before - Now Experience modifiers being calculated in right way as in aegis (Race modifiers -> PK modifiers -> Premium modifiers -> Buff modifiers)
2016-04-23Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message()Haru1-2/+2
- The argument was redundant, since the passed value is always the same as the passed string's length (it doesn't make sense otherwise). The argument is implicit now. Less typing and less errors. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type of the 'length' argument of various broadcast-related ↵Haru1-2/+2
functions - Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->broadcast()`, `clif->broadcast2()`, `intif->broadcast()`, `intif->broadcast2()` Signed-off-by: Haru <haru@dotalux.com>
2016-04-22Fixed an issue that could prevent a mvp reward to be ignoredHaru1-45/+47
- During the randomization of the list, an entry could be overwritten under certain (rare) conditions. Signed-off-by: Haru <haru@dotalux.com>
2016-04-04add missing checks into mob.cAndrei Karas1-7/+88
2016-03-25Fixed a call to clif->item_drop_announce with a NULL sd.Haru1-1/+3
Closes #1220 Signed-off-by: Haru <haru@dotalux.com>
2016-02-28Changed mob mode field to 32 bit, for future expansionHaru1-38/+44
Signed-off-by: Haru <haru@dotalux.com>
2016-02-28Added NoKnockback Mode for monstersDastgir1-0/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-02-27Replaced various '-1' with the correct constantHaru1-5/+7
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context. Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-2/+2
Add all missing -Wformat flags into configure.
2016-02-17Replaced some now unnecessary includes with forward declarations in header filesHaru1-0/+1
Added some forgotten <stdio.h> and "common/conf.h" includes to .c files, that were previously masked by the above. Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Removed unnecessary typedefs from libconfigHaru1-15/+15
Signed-off-by: Haru <haru@dotalux.com>
2016-02-17Renamed config->read_file to config->load_fileHaru1-1/+4
- The return value is now consistent with the libconfig standard (CONFIG_TRUE/CONFIG_FALSE). - Removed some redundant error messages. Signed-off-by: Haru <haru@dotalux.com>
2016-02-09Small tweaks to mob_drop_adjustHaru1-7/+13
Related to #1152 Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Re-added support for the JName field in the mob dbHaru1-0/+8
Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Replaced several floating-point operations with integer operationsHaru1-15/+13
This fixes several rounding errors happening in various places (i.e. the base exp for HORONG being calculated as 819 instead of 820 when the server rates are set to 1x) Signed-off-by: Haru <haru@dotalux.com>
2016-01-29Modified Mob DB loader to behave like the Item DB loaderHaru1-247/+384
- Separated load and validation logic. - The load/validation functions now return the loaded mob ID Signed-off-by: Haru <haru@dotalux.com>
2016-01-13Added support to mark constants in db/constants.conf as deprecatedHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-12Whitespace cleanup (removed alignment tabs or trailing whitespace at line end)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-09Corrected various zero-argument function definitionsHaru1-1/+1
- Functions should always specify their arguments, even if they take none. In C, not specifying arguments is different than specifying (void). Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-24/+13
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCASTHaru1-19/+16
- Replaced safe casts (bl type already checked) Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some map->id2sd calls with the proper map->id2XX functionHaru1-2/+2
- Also added new map->id2XX convenience functions for the other bl types. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-36/+46
- Replaced casts in foreach callbacks. - Added assertions and nullpo checks where applicable. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_NPC to struct npc_data as per style guidelineshemagx1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_ELEM to struct elemental_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>