summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
2019-05-06Fixes a nullpo on MVP dropsGuilherme Menaldo1-1/+2
2019-04-20Moved mob drop data to its own structureGuilherme G. Menaldo1-5/+1
2019-04-20Added support for mobs to drop items with Random OptionsGuilherme G. Menaldo1-8/+349
2019-04-07Rename clif_charnameack into clif_blname_ackAndrei Karas1-4/+4
2018-11-20Change short group to bool is_group in s_add_dropskyleo1-2/+2
current checks for empty entries assumed that if id and group is 0 that it is empty, while in fact ITMCHAIN_ORE has group 0 as value, for easier checks and more aesthetic code short group has been replaced, id's are now always written into short id and bool is_group decides if it's an item or a group.
2018-09-02Fixed issue #2201Dastgir1-1/+2
Killing clone will not trigger achievement
2018-08-27Fix some issues reported by gcc-8's address sanitizerHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2018-07-30always set the type when doing script->add_strgumi1-2/+2
2018-07-24Implementation of the official Achievement System.smokexyz1-0/+7
Source: http://ro.gnjoy.com/news/update/View.asp?seq=163&curpage=1 Script Commands - ``` achievement_progress(<ach_id>,<obj_idx>,<progress>,<incremental?>{,<char_id>}); ``` Includes an achievement_db.conf generator that reads from the item_db, mob_db (server side) and achievement_list.lub files to determine valid achievement entries based on item/monster availability. Achievements containing unsupported entries are commented out. This feature, although renewal-only in official servers, is capable of being used in pre-renewal mode on Hercules. Does not include the title system yet. A big thanks to - @MishimaHaruna for constantly reviewing. @4144 for all the support. @Asheraf for a lot of official information. Co-authored-by: "Dastgir" <dastgirp@gmail.com>
2018-07-19Add new constant MAX_ITEM_ID for maximum allowed item id.Andrei Karas1-11/+64
For clients older than 2018-07-04 Re maximum supported and enabled id is 65535 (0xffff). For newer clients miximum id is 2147483648. Enabled by default 131072 (0x20000)
2018-07-01Change functions to static where possible (Part 4 - map)Haru1-110/+153
This fixes issues with plugins defining symbols with the same names Signed-off-by: Haru <haru@dotalux.com>
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>