diff options
author | Haru <haru@dotalux.com> | 2013-08-27 08:08:34 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-11-05 04:17:39 +0100 |
commit | 97001710c06ed7053d18c8baaac602eb563b64b3 (patch) | |
tree | a4f08884917a5934e9b7ba66b39cd5e25db92e54 /src/map/guild.c | |
parent | 0a5abb6de766be6a5068da08eb6477e343f2d7b3 (diff) | |
download | hercules-97001710c06ed7053d18c8baaac602eb563b64b3.tar.gz hercules-97001710c06ed7053d18c8baaac602eb563b64b3.tar.bz2 hercules-97001710c06ed7053d18c8baaac602eb563b64b3.tar.xz hercules-97001710c06ed7053d18c8baaac602eb563b64b3.zip |
Introducing the Hercules Standalone Script Syntax Checker
- 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.
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 0ae45bede..908c38341 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -2172,12 +2172,15 @@ void guild_flags_clear(void) { guild->flags_count = 0; } -void do_init_guild(void) { - guild->db = idb_alloc(DB_OPT_RELEASE_DATA); - guild->castle_db = idb_alloc(DB_OPT_BASE); - guild->expcache_db = idb_alloc(DB_OPT_BASE); - guild->infoevent_db = idb_alloc(DB_OPT_BASE); - guild->expcache_ers = ers_new(sizeof(struct guild_expcache),"guild.c::expcache_ers",ERS_OPT_NONE); +void do_init_guild(bool minimal) { + if (minimal) + return; + + guild->db = idb_alloc(DB_OPT_RELEASE_DATA); + guild->castle_db = idb_alloc(DB_OPT_BASE); + guild->expcache_db = idb_alloc(DB_OPT_BASE); + guild->infoevent_db = idb_alloc(DB_OPT_BASE); + guild->expcache_ers = ers_new(sizeof(struct guild_expcache),"guild.c::expcache_ers",ERS_OPT_NONE); sv->readdb(map->db_path, "castle_db.txt", ',', 4, 5, -1, guild->read_castledb); |