summaryrefslogtreecommitdiff
path: root/src/map/mob.c
AgeCommit message (Collapse)AuthorFilesLines
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>
2016-01-06Change all TBL_PET to struct pet_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MER to struct mercenary_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_HOM to struct homun_data as per style guidelineshemagx1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_MOB to struct mob_data as per strly guidelineshemagx1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-7/+7
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added some missing item IDs to their enumHaru1-1/+1
2015-12-28Added Poring to the mob_id enumHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Replaced some numeric mob IDs with the proper constants (MOBID_TREASURE_BOX*)Haru1-3/+5
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Added Splendide, Manuk and Mora mobs to the mob_id enumHaru1-3/+24
Signed-off-by: Haru <haru@dotalux.com>
2015-12-28Standardized (source) mob_id enumHaru1-5/+6
- MOBID_ constant names now follow the Mob DB spritenames. - The following names were changed: * MOBID_EMPERIUM => MOBID_EMPELIUM * MOBID_TREAS01 => MOBID_TREASURE_BOX1 * MOBID_TREAS40 => MOBID_TREASURE_BOX40 * MOBID_BARRICADE1 => MOBID_BARRICADE * MOBID_BARRICADE2 => MOBID_BARRICADE_ * MOBID_GUARIDAN_STONE1 => MOBID_S_EMPEL_1 * MOBID_GUARIDAN_STONE2 => MOBID_S_EMPEL_2 * MOBID_FOOD_STOR => MOBID_OBJ_A * MOBID_BLUE_CRYST => MOBID_OBJ_A2 * MOBID_PINK_CRYST => MOBID_OBJ_B2 * MOBID_TREAS41 => MOBID_TREASURE_BOX41 * MOBID_TREAS49 => MOBID_TREASURE_BOX49 - Added several missing items Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Merge pull request #1009 from Jedzkie/ItemDB_UpdatesDastgir1-16/+16
ItemDB Updates
2015-12-25New Entity Packets Implemented (Thanks to Rytech)Dastgir1-2/+13
2015-12-23Update:Jedzkie1-16/+16
- Rename BLUE_CRYST and PINK_CRYST to BLUE_CRYSTAL and PINK_CRYSTAL - Rename FOOD_STOR to FOOD_STORAGE - Rename TREAS01, TREAS40, TREAS41, TREAS49 to TREASURE_01, TREASURE_40, TREASURE_41, TREASURE_49
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-14Added official effect of Mora Berry.Jedzkie1-1/+4
Signed-off-by: Haru <haru@dotalux.com>
2015-12-13ItemDB Updates:Jedzkie1-1/+3
- Added 'Malang Cat Can' item. - Added 'Ru Blue Spear' item. - Change the item id of 'RWC Silver Brooch' from 2998 to 2999. - Follow up https://github.com/HerculesWS/Hercules/commit/e511dcf5940cee7a6e43744543a5ca96bc23cf84, thanks to zackdreaver. - item_db.conf renewal minor clean-up xD
2015-12-06Refactored/fixed race handling for bonuses that store it as a bitmaskHaru1-2/+2
- The following bonuses now work correctly with RC_DemiPlayer, RC_NonDemiPlayer, RC_NonDemiHuman, RC_Nonplayer: * bIgnoreDefRace * bIgnoreMdefRace * bDefRatioAtkRace * bAddMonsterDropChainItem (bonus3) * bAddMonsterDropItem (bonus3) - A new function (map->race_id2mask) is provided, to easily and efficiently generate a bitmask from a race ID. - The RC_ALL race ID is mapped to RC_BOSS and RC_NONBOSS, for backwards compatibility. Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Added subtype initializer to npc_create_npcHaru1-3/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Moved class and dir initializers to npc_create_npcHaru1-6/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-10-22Removed support for the deprecated SQL item, mob, mob_skill databases.Haru1-60/+1
Follow-up to 84e02ac28fbb15c58d0a0f8a916b49663198b05b Signed-off-by: Haru <haru@dotalux.com>
2015-10-20Fixed an issue preventing the mob_db2 from being loadedHaru1-8/+5
Follow-up to 3feef93 (thanks to kyeme) Signed-off-by: Haru <haru@dotalux.com>
2015-10-19Add support for mob_db in conf format.Andrei Karas1-239/+539
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-10-11Cleanup of the HPluginData implementation (second part)Haru1-2/+1
- Changed the hplugin_data_store's array into a VECTOR. Signed-off-by: Haru <haru@dotalux.com>
2015-10-11Cleanup of the HPluginData implementation (First part)Haru1-10/+2
- Several explicit casts are removed, to have a slightly better type-checking at compile time. - A destructor function is provided, to remove code duplication. Signed-off-by: Haru <haru@dotalux.com>