summaryrefslogtreecommitdiff
path: root/src/map/npc.c
AgeCommit message (Collapse)AuthorFilesLines
2016-02-05Merge pull request #993 from HerculesWS/mobdb2sqlAndrei Karas1-15/+15
Mob DB support for the db2sql plugin
2016-01-29Replaced several floating-point operations with integer operationsHaru1-15/+15
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-21Remove unused PCRE_SUPPORT define.Andrei Karas1-2/+0
2016-01-13Converted const.txt to libconfig formatHaru1-1/+1
- This is necessary for upcoming improvements Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-11/+12
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCASTHaru1-5/+4
- 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-12/+13
- 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-7/+20
- Replaced casts in foreach callbacks. - Added assertions and nullpo checks where applicable. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Replaced some explicit casts with BL_UCAST/BL_UCCASTHaru1-5/+4
- Replaced the map-iterator related casts. Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_NPC to struct npc_data as per style 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-4/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-12-31Extended the numeric view ID deprecation to '-1' (FAKE_NPC)Haru1-2/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-12-31Replaced leftover -1 view IDs with FAKE_NPCHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-12-25Implemented NoViewIDDastgir1-0/+2
(http://herc.ws/board/topic/10020-official-mapflag-to-disable-viewid/) Closes #926 as merged Signed-off-by: Haru <haru@dotalux.com>
2015-12-21Fix Client stuck if npc secure time reached and no actual dialog presented ↵hemagx1-1/+6
to client. Fix dialog being cleared if npc secure time reached and dialog exist Fixes #916
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Fix Dialog being cleaned after timeout on secure npc timeout enabled.hemagx1-1/+0
Closes #916
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_unknown_objectHaru1-1/+18
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_mobHaru1-1/+19
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_functionHaru1-3/+26
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_duplicateHaru1-8/+37
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_scriptHaru1-6/+32
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_shopHaru1-5/+18
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_warpHaru1-2/+19
Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added const qualifier to the w1~w4 arguments of npc_parse_mapflagHaru1-7/+35
- This is necessary before merging #960 Signed-off-by: Haru <haru@dotalux.com>
2015-12-06Fixed a validation issue in the NPC Sell ListHaru1-5/+13
Signed-off-by: Haru <haru@dotalux.com>
2015-12-05Fixed a client crash when a MVP Tombstone is createdHaru1-7/+1
- Follow-up to 57f09704 - Fixes #901, thanks to zackdreaver Signed-off-by: Haru <haru@dotalux.com>
2015-11-18Replaced -1 with FAKE_NPC in source, where appropriateHaru1-7/+6
Signed-off-by: Haru <haru@dotalux.com>
2015-11-18Merge pull request #837 from AnnieRuru/request_5Haruna1-1/+4
Add new config to allow player vend/chat room nearby hidden npc (#834)
2015-11-14Fix npc initialisation in first map (m == 0).Andrei Karas1-1/+1
2015-11-12Split npc_duplicate_sub into separate functions based on subtypesHaru1-48/+82
- For plugin overriding purposes. Thanks to Andrei Karas for the idea. Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Split frequently repeated code to add/register new NPCs to its own functionHaru1-58/+34
Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Added subtype initializer to npc_create_npcHaru1-15/+18
Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Moved class and dir initializers to npc_create_npcHaru1-49/+35
Signed-off-by: Haru <haru@dotalux.com>
2015-11-12Split the duplication logic away from the parsing logic in NPC duplicatesHaru1-136/+154
- Fixes #812 (warning message while creating instances) Signed-off-by: Haru <haru@dotalux.com>
2015-11-11Split the source path reference retain mechanism out of npc_parsename.Haru1-37/+69
Signed-off-by: Haru <haru@dotalux.com>
2015-10-31Add new config to allow player vend/chat room nearby hidden npcAnnieRuru1-2/+2
make changes to (#837) - mske better battle_config clarification - Add FAKE_NPC constant in the source and use them - also use the HIDDEN_WARP_NPC constants
2015-10-29Add new config to allow player vend/chat room nearby hidden npc (#834)AnnieRuru1-0/+3
credit to Emistry for the idea
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>
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-141/+120
Signed-off-by: Haru <haru@dotalux.com>
2015-09-24Add bl parameter to getcell functions.Andrei Karas1-8/+8
2015-09-18Clarified the intent of several assignments inside conditional expressionsHaru1-6/+6
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-0/+1
Improved compatibility, portability and standards conformance. - Since it is not possible to portably and reliably re-use the core's symbols in plugins, symbols are no longer exported unless explicitly required, in the UNIX builds. This mimics the Windows behavior and adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas for making this possible. - For convenience, it is no longer necessary to call GET_SYMBOL, since the plugin will automatically import all the available symbols when it's loaded, depending on the included headers. - Plugins are now supposed to include the "common/hercules.h" header before including anything else. Incluing common/HPMi.h, common/cbasetypes.h or conf/core.h is no longer necessary, as those are guaranteed to be automatically included by hercules.h. - HPM API version bumped to 1.1. Signed-off-by: Haru <haru@dotalux.com>
2015-08-10Add script interface function run_npc. It do same thing as run.Andrei Karas1-11/+11
2015-08-09Improved validation of monster/boss_monster top-level script objectsHaru1-3/+3
- xs, ys, delay1, delay2 and event are now required, as described in the documentation. Signed-off-by: Haru <haru@dotalux.com>
2015-08-09Added validation of the 'facing' value in top-level script objectsHaru1-0/+18
Signed-off-by: Haru <haru@dotalux.com>
2015-08-09Deprecated use of numeric NPC view IDs. Use constants instead.Haru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-07-05Fixed issue #560Emistry1-12/+11
@sold[] return named item values.