summaryrefslogtreecommitdiff
path: root/src/map/npc.h
AgeCommit message (Collapse)AuthorFilesLines
2015-05-19Fixed some issues reported by coverity scan [2/3]Haru1-1/+1
- Corrected some NPC ID range checks Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru1-1/+5
- Rather than failing at runtime, plugins that try to access non-interfaced, unavailable functions or variables, will now show an error at compile-time. Signed-off-by: Haru <haru@dotalux.com>
2015-01-02Add npcdb_checkid to npc interface.Andrei Karas1-4/+1
2014-12-16Add function what called if player leave npc area.Andrei Karas1-0/+1
2014-12-16Add function what call OnUntouch event.Andrei Karas1-0/+1
2014-12-15add npc area size field.Andrei Karas1-0/+1
2014-11-28Add function for create npc.Andrei Karas1-0/+1
2014-11-27Add function for parse or report about unknown object in parsing script file.Andrei Karas1-0/+1
2014-11-27Add function for parse/report unknown map flag.Andrei Karas1-0/+1
2014-11-16Whitespace cleanup (no code changes)Haru1-1/+1
This includes, and is not limited to: mixed or wrong indentation, excess whitespace (horizontal and vertical), misalignment, trailing spaces. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru1-3/+3
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-06-21MAX_NPC_CLASS2_END updated to latest ID. Added more NPC constants.Taylor Locke1-1/+1
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-2/+2
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-2/+2
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-10Small changes in npc loading/reloadingpanikon1-1/+1
Compartmentalized npc file processing Corrected event initalisation order in npc_reload Changed loading order, now item db constants are loaded before npc processing in order to avoid labels overwriting constants values, like Aegis Names Added information regarding reloading scripts in /doc/script_commands.txt
2014-05-09Fixed order of includes in all source filesHaru1-2/+2
- Changed order according to the (upcoming) code style guidelines. - Fixes several issues caused by missing headers when their include order is changed or in plugins. Signed-off-by: Haru <haru@dotalux.com>
2014-05-09Return EXIT_FAILURE if a script parse error occurred.Haru1-8/+8
- This affects normal execution as well as ./script-checker runs. Signed-off-by: Haru <haru@dotalux.com>
2014-05-06Bug fixes and other changespanikon1-1/+1
#Fixed issue where a corrupted map cache would lead to a crash *Moved Big-endian compatibility functions to common/utils.h #Fixed issue 8162 *http://hercules.ws/board/tracker/issue-8162-loadnpc-doesnt-trigger-oninit-of-duplicate-npcs/ *Added options to npc_parse_duplicate #Fixed issue 8169 *http://hercules.ws/board/tracker/issue-8169-script-command-guildskill-skill-idlevel-not-working-as-intended/ *Changed *guildskill behavior, now it behaves exactly as depicted in the documentation *Updated *guildskill documentation #Added missing GBI types to mapif_parse_GuildBasicInfoChange now it's possible to change guild exp, lv, skill point and skill information #GeoIP revamp *GeoIP module was partially rewritten *Added several data checks to prevent corruption and crashes *Updated GeoIP database *See https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/GeoIP.c for more information #Added packetver checks regarding NST_MARKET *Now *tradertype warns if user is trying to use this feature with older clients
2014-02-08Added get_substring to the libpcre interfaceHaru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-02-02Introducing HPM Datacheckshennetsind1-3/+3
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-19HPM Custom Data Struct Expansion: map/instance/party/guildshennetsind1-0/+1
As requested by the community in http://hercules.ws/board/topic/3832-hpm-custom-data-struct-for-instance-data-guild-data-and-party-data/ Signed-off-by: shennetsind <ind@henn.et>
2014-01-18PCRE Interfaceshennetsind1-0/+19
Plugins may now take advantage of the pcre support within the core. Thanks to Haruna! Signed-off-by: shennetsind <ind@henn.et>
2014-01-12Changed some void* to the correct data types where applicableHaru1-7/+2
Signed-off-by: Haru <haru@dotalux.com>
2014-01-01Correctly removed persistent database entries for disabled NPC Market scriptsHaru1-0/+1
- When a Market script is disabled or removed, its database entries are now correctly cleared upon reloadscript and/or server restart. - Special thanks to ossi0110. Signed-off-by: Haru <haru@dotalux.com>
2013-12-24Christmas Patch - 2013-12-23 Supportshennetsind1-5/+41
Info: http://hercules.ws/board/topic/3614-christmas-patch-gifto/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-13Follow up 8fda38dcdabbb9d252b0e11fb07b2ad37f9e659fshennetsind1-2/+2
Fixed compiler error on selected systems, thanks to haruna bringing it up! Signed-off-by: shennetsind <ind@henn.et>
2013-11-13HPM Custom Data Struct Makeover!shennetsind1-1/+5
- Modified how the core handles it, making it easier to add new points. - Modified how plugins call it, calls were made shorter, e.g. 'HPMi->getFromSession(session[fd],HPMi->pid,0)' => 'getFromSession(session[fd],0)' -- check src/common/HPMi.h #defines for all the options - Added support for npc_data (getFromNPCD and so on) as requested in http://hercules.ws/board/topic/2923-hpm-custom-struct-npcs/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-2/+2
- Added a command line argument '--script-check' to check a script's syntax without running the server (and without requiring a SQL connection). Usage: ./map-server --script-check /path/to/the/script.txt - For convenience, a script-checker bash script is provided, to set the path correctly when called from a different directory. Usage: /path/to/Hercules/script-checker /path/to/the/script/to/check.txt - While the script checker will supposedly work under windows as well, no convenience scripts are currently provided for platforms other than UNIX (feel free to open a pull request with a .bat launcher or whatever you like) - Integration with IDEs or text editors is possible. In fact, I already have a fully functional plugin for vim (through vim-syntastic), and if there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD - If you want an online checker, http://haru.ws/scriptchecker/ is running this code, without modifications and will be kept up to date (without any warranty though.) - Special thanks to Ind, Yommy, Streusel, who helped making this possible, in a way or another.
2013-10-28Added ability to use constants instead of sprite IDs for NPCs. Converted all ↵Kisuka1-1/+3
npcs to use this.
2013-10-26Changed 'tick' variables to 64 bitHaru1-6/+6
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-10-07Fixed Bug #7744shennetsind1-2/+0
Adjusted missing #ifdef behavior to be friendly to the hooking. http://hercules.ws/board/tracker/issue-7744-compiler-error-on-hpm-hooking-after-undefined-packetver-re/ Signed-off-by: shennetsind <ind@henn.et>
2013-09-25Renamed more forgotten variables during interface conversionsHaru1-2/+2
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>
2013-09-17HPM: npc_chat.c Interfacedshennetsind1-8/+52
Fully Integrated, closes #117 Also updated buildin_ functions to match latest script.c/.h macros. Signed-off-by: shennetsind <ind@henn.et>
2013-09-16HPM: Npc.c Interfaceshennetsind1-77/+121
Fully Interfaced. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-07-18Changed npcdb_checkid to use MAX_NPC_CLASS2_START and END.Kisuka1-1/+1
2013-05-30Memory Slasher - May 30 Patchshennetsind1-5/+7
http://hercules.ws/board/topic/928-memory-slasher-may-30-patch/ Signed-off-by: shennetsind <ind@henn.et>
2013-05-17MOTD redesignshennetsind1-2/+14
much more flexible, as per community suggestion in http://hercules.ws/board/topic/320-motd-change-suggestion/ dropped motd_type config new motd is at npc/MOTD.txt dropped @motd, @gmotd commands Signed-off-by: shennetsind <ind@henn.et>
2013-04-16Fixed Bug #1721shennetsind1-1/+1
SECURE_NPCTIMEOUT now possesses 3 settings (to mimic official ones) NPC_SECURE_TIMEOUT_INPUT NPC_SECURE_TIMEOUT_MENU NPC_SECURE_TIMEOUT_NEXT http://hercules.ws/board/tracker/issue-1721-npc-window-timeout/ Signed-off-by: shennetsind <ind@henn.et>
2013-04-11New NPC range now working.lemongrass31101-0/+5
Sorry guys, back in my days it was as easy as this, but I did not test it. So now tested and working. :) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17246 54d463be-8e91-2dee-dedb-b68131a5f0ec
2013-04-11-Support for newer NPC'sStreusel1-1/+1
2013-03-27Introducing Hercules' Map Zone Databaseshennetsind1-0/+1
Click the link for full info~! http://hercules.ws/board/topic/302-introducing-hercules-map-zone-database/ Signed-off-by: shennetsind <ind@henn.et>
2013-03-08Fixed Bug #7114malufett1-0/+1
-revised/added 'npc_isnear' where it checks if an NPC is nearby when making chat rooms or using vending. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-02-24Fixed Bug #7092malufett1-1/+1
-Follow up adda8d74c3280ae1e3745591caafd9ce6e81ded7 where 'close2' is not working properly. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-02-24Revert "Fixed Bug #7091"shennetsind1-1/+1
This reverts commit adda8d74c3280ae1e3745591caafd9ce6e81ded7. Signed-off-by: shennetsind <ind@henn.et>
2013-02-24Fixed Bug #7091malufett1-1/+1
-Updated SN_SIGHT to its RE behavior. -Updated RE behavior that deals with NPC dialogs and using items/skills. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2012-12-30-Harmonize skillid, skill_num, skillnum, skill, to skill_id and same for ↵glighta1-4/+4
skill_lv -Optimise type from int to int16 in order to reduce ram consumtion. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17065 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-27* Implemented `useskilltopc' (tid:74685), and now if desired npcs can carry ↵momacabu1-0/+4
status such as str, atk, def, etc and level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17048 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-109/+110
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-110/+109
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-12Modified @addwarp to accept a new optional parameter <npc name>. If <npc ↵momacabu1-1/+1
name> is specified, then the warp created will have that name. Otherwise it will use a name chosen by the emulator. If there is already another warp with that name the generic name will be used instead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16919 54d463be-8e91-2dee-dedb-b68131a5f0ec