summaryrefslogtreecommitdiff
path: root/src/common/mapindex.c
AgeCommit message (Collapse)AuthorFilesLines
2013-11-25Fixed Bug 7833shennetsind1-0/+1
instance custom map names no longer linger in the index after the instance is destroyed http://hercules.ws/board/tracker/issue-7833-instancing-issues/ Signed-off-by: shennetsind <ind@henn.et>
2013-11-05Introducing the Hercules Standalone Script Syntax CheckerHaru1-5/+12
- 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-05-17Fixed Look_Base not refreshing skill treeshennetsind1-1/+1
special thanks to Beret~! Signed-off-by: shennetsind <ind@henn.et>
2013-05-17Fixed 2 clang warningsshennetsind1-1/+1
Special Thanks to mkbu95! Signed-off-by: shennetsind <ind@henn.et>
2013-05-08Fixed mapindex_name2idshennetsind1-1/+1
Special Thanks to Wolfed~! <3 Signed-off-by: shennetsind <ind@henn.et>
2013-05-04mapindex updateshennetsind1-31/+27
Fixed a mapindex_name2id problem that'd persistently not fix a broken mapindex data (e.g. char save/last map data being incorrect). It'll now align it to MAP_DEFAULT when such error occurs. Also speeded up mapindex_name2id queries, replaced the loop by the red-black-tree db lookup. Special Thanks to yommy~! Signed-off-by: shennetsind <ind@henn.et>
2013-05-04Enabling a temporary debug setup for mapindexshennetsind1-3/+2
so when this thing finds a unknown id we can actually know where it came from. Signed-off-by: shennetsind <ind@henn.et>
2013-02-16Updating the Headers across source filesshennetsind1-1/+1
And adding missing ones. Signed-off-by: shennetsind <ind@henn.et>
2013-02-07Fixing mistake in modified source code headersshennetsind1-1/+1
Signed-off-by: shennetsind <ind@henn.et>
2013-01-31Fixed Bug #3080shennetsind1-4/+5
Replaced strncpy with safestrncpy where I found would be beneficial. http://hercules.ws/board/tracker/issue-3080-safestrncpy-instead-of-strncpy-where-applicable/ Also modifying headers accordingly. Signed-off-by: shennetsind <ind@henn.et>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-124/+127
[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-127/+124
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-24Implemented @warp modification (tid:74181), it check if a map exists ↵momacabu1-1/+1
regardless of case-sensitivity. Also fixes bugreport:5719. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16956 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-05-01* Removed auto-add feature from mapindex code, as map indexes are used for ↵ai4rei1-10/+0
save data, thus need to be constant across server starts (since r4726). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14807 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-13Resolved a client hang in the scenario where the client sent loadendack ↵ultramage1-1/+1
before the server finished loading all data (bugreport:3700). Improved the performance of pc_autosave() to stop scanning players after it has already found the player it wanted to save (bugreport:3717). The 'overweight' status changes (SC_WEIGHT50/SC_WEIGHT90) will now be cleared on logout, to avoid saving them into the database (they get derived from player weight during login anyway). Improved lock.c on windows to use C's access(0) function instead of doing fopen/fclose when testing for existence of files. Re-added the 'static' attribute to mapindex_getmapname_ext's buffer; returning the address of a non-static local variable is undefined behavior (see r13901). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14144 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-08-14- Fixes and optimization to instancing. Thanks to Saithiszephyrus1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14006 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-06-20- Instancing System (Thanks to Sirius White who did most of the code, with ↵zephyrus1-13/+33
some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao. - Fixed a bug on areamobuseskill and changed it to make it as Aegis. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-05-02- Fixed some typos in the script command documentation. (bugreport:2547)brianluau1-2/+2
- Fixed a misleading message in the custom Job Changer. (bugreport:682) - Updated some NPC's facing directions. (bugreport:3030) - Added missing newline in some ShowWarning(). (bugreport:2940) - Fixed SC_BOSSMAPINFO time being off by 1 minutes (bugreport:3035) Now, the seconds are rounded up to the next whole minute. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13713 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-01-13* Cleaned up command @users/#users:FlavioJS1-2/+0
- displays everything on the target user (self for @users) - uses a static array instead of a temporary DBMap - displays percentages with precision of 0.01% - uses safesnprintf instead of sprintf git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-18Fixed numerous /W4 warnings (and created more :)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11514 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17Using predefined constants as parameters to the exit() function.ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11501 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22* Added 'safestrnlen' to prevent null pointer crashesultramage1-1/+1
* Fixed global chat logging always crashing on a null pointer * Applied changes to clif_parse_globalmessage() from my WiP code - clearer processing of the individual packet components - proper code ordering, some more integrity checks - fixes to some poorly chosen ShowWarning() format strings - global chat logging no longer logs the entire string (w/ player name) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11271 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15small mapindex.c typo fixultramage1-5/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11014 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09- stable -> trunk syncultramage1-1/+1
- battle.c and pc.c formatting - fixed one badly defined npc shop format string - removed the "selling item for no buying price" warning when the item has a buying price of 20 (see topic:157465) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10971 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09The new functions now clear junk from the output buffer, this simplifies the ↵ultramage1-2/+5
code a bit. Added a TODO for one emblem loading problem/crash. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10969 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-08* Cleaned up junk left in the code by the mapcache/mapindex updateultramage1-18/+55
- Added mapindex_getmapname(_ext) to help with ".gat" adding/removing - Moved related processing to the interface (prevents duplicity) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10963 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-23* Changed the restricting mapflag for @jump from nowarp/nowarpto to noteleportultramage1-22/+20
* Simplified the mapindex code a bit * Changed clif_skill_warppoint() so that now the '.gat' adding happens inside and doesn't have to be handled by the calling code git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10901 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-07-18- Small update to the effects list (new exe's effects by Au{R}oN)ultramage1-3/+3
- No sending of the pet_equip packet when pet has no equip (thx to Skotlex) - Added back exp gain limiting for old formula to stop exploits (see r8177) - Now a message is printed when the packet_ver filter rejects someone - Renamed two structs using same name as variables (MSVC debugger issue) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10886 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-25Corrected some weird fgets() statements, plus reformatted themultramage1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10616 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-19Reformatting @_@ultramage1-4/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10581 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-05-05- imported the latest working grfio code from stableultramage1-3/+1
- re-added usage of managed allocation routines in grfio - eol-styled some new files - some cosmetic fixes here and there git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10468 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06- Fixed the start_point setting smashing t3h stack in some situationsultramage1-9/+8
- Fixed some over/under-dimensioned arrays (the map length defines already reserve space for the string terminator) - Fixed an unupdated define making Warp Portal fail with an error - Fixed some skill entries of the Galion mob git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10168 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-04-06I'm still here!DracoRPG1-20/+32
Rewrote fame ranking lists- changed MAP_NAME_LENGTH to 12, now there's MAP_NAME_LENGTH_EXT at 16 for uses where there is / may be the .gat extension, code adjusted accordingly - moved map_normalize_name to mapindex_normalize_name so that everything handling map names uses the same extension-removing function - greatly enhanced the map cache generator, complete documentation on the tool and the map cache format can be found in doc/ - the map cache format changed a bit as a consequence, but of course a new valid one is included (contains latest Nameless Island maps) - fixed a duplicate entry in map index git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10167 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13Fixed a warningDracoRPG1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10004 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-13Mapcache update, should polish off remaining bugsDracoRPG1-18/+6
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10003 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-09- Made conv_str return const char* since the script engine screws up if you ↵skotlex1-1/+1
mess with the position of the terminator on the received string. - Because of this, many functions that handled the return of conv_str need to be changed, I haven't finished doing the conversion process because I must go already, if someone else can continue, please do so (I will resume work on this in ~5 hours git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9978 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage1-0/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07Undid the memset->malloc_set replacementultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-18- Cosmetic changes to db.FlavioJS1-59/+61
- Fixed the unused MAPINDEX_AUTOADD section in mapindex.c (mapindex.h wasn't being included) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9515 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-08-27* Optional macro MEMSET_TURBO for faster low-level memory initializations.Lance1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8499 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-22- Merged the unit_data structure from jA for handling unit-related data ↵skotlex1-0/+1
(attack times, walking, auto-attack timers, skill related data) - Modified unit_skillcastcancel to receive flag&2, which stands for "cancel casting only if current skill is cancellable" - Battle config options changed from yes/no to BL_TYPE settings: skillrange_by_distance, skill_noreiteration, skill_nofootset, gvg_traps_target_all, skill_log, attack_direction_change, auto_counter_type - Clif.c will disconnect sessions that send an unknown command packet above 0x30000 instead of just ignoring it. - Cleaned up/rewrite of the pet ai, same for pet_calc_pos - Implemented use of mob variable attacked_players as it is used on jA - Cleaned up error reporting during mob-skill loading to be less spamy with non-loaded mobs. - Corrected water_height reading. I forgot to give credits to LittleWolf for providing the water-reading function :X git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5707 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-03-02- Applied Snufkin's patch to fix compilation on FreeBSD.skotlex1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5428 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-01-29AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES ↵Valaris1-0/+130
GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec