summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/HPMchar.c22
-rw-r--r--src/char/HPMchar.h22
-rw-r--r--src/char/Makefile.in20
-rw-r--r--src/char/char.c35
-rw-r--r--src/char/char.h24
-rw-r--r--src/char/geoip.c24
-rw-r--r--src/char/geoip.h24
-rw-r--r--src/char/int_auction.c24
-rw-r--r--src/char/int_auction.h23
-rw-r--r--src/char/int_elemental.c24
-rw-r--r--src/char/int_elemental.h23
-rw-r--r--src/char/int_guild.c24
-rw-r--r--src/char/int_guild.h23
-rw-r--r--src/char/int_homun.c24
-rw-r--r--src/char/int_homun.h23
-rw-r--r--src/char/int_mail.c24
-rw-r--r--src/char/int_mail.h23
-rw-r--r--src/char/int_mercenary.c24
-rw-r--r--src/char/int_mercenary.h23
-rw-r--r--src/char/int_party.c24
-rw-r--r--src/char/int_party.h23
-rw-r--r--src/char/int_pet.c24
-rw-r--r--src/char/int_pet.h23
-rw-r--r--src/char/int_quest.c24
-rw-r--r--src/char/int_quest.h23
-rw-r--r--src/char/int_storage.c24
-rw-r--r--src/char/int_storage.h23
-rw-r--r--src/char/inter.c24
-rw-r--r--src/char/inter.h24
-rw-r--r--src/char/loginif.c24
-rw-r--r--src/char/loginif.h24
-rw-r--r--src/char/mapif.c24
-rw-r--r--src/char/mapif.h23
-rw-r--r--src/char/pincode.c24
-rw-r--r--src/char/pincode.h24
-rw-r--r--src/common/HPM.c62
-rw-r--r--src/common/HPM.h26
-rw-r--r--src/common/HPMDataCheck.h30
-rw-r--r--src/common/HPMSymbols.inc.h41
-rw-r--r--src/common/HPMi.h38
-rw-r--r--src/common/Makefile.in20
-rw-r--r--src/common/atomic.h23
-rw-r--r--src/common/cbasetypes.h19
-rw-r--r--src/common/conf.c24
-rw-r--r--src/common/conf.h24
-rw-r--r--src/common/console.c35
-rw-r--r--src/common/console.h23
-rw-r--r--src/common/core.c24
-rw-r--r--src/common/core.h24
-rw-r--r--src/common/db.c24
-rw-r--r--src/common/db.h24
-rw-r--r--src/common/des.c23
-rw-r--r--src/common/des.h22
-rw-r--r--src/common/ers.c24
-rw-r--r--src/common/ers.h24
-rw-r--r--src/common/grfio.c24
-rw-r--r--src/common/grfio.h23
-rw-r--r--src/common/hercules.h23
-rw-r--r--src/common/mapindex.c24
-rw-r--r--src/common/mapindex.h24
-rw-r--r--src/common/md5calc.c24
-rw-r--r--src/common/md5calc.h20
-rw-r--r--src/common/memmgr.c24
-rw-r--r--src/common/memmgr.h23
-rw-r--r--src/common/mmo.h24
-rw-r--r--src/common/mutex.c23
-rw-r--r--src/common/mutex.h23
-rw-r--r--src/common/nullpo.c24
-rw-r--r--src/common/nullpo.h24
-rw-r--r--src/common/random.c23
-rw-r--r--src/common/random.h23
-rw-r--r--src/common/showmsg.c24
-rw-r--r--src/common/showmsg.h24
-rw-r--r--src/common/socket.c24
-rw-r--r--src/common/socket.h24
-rw-r--r--src/common/spinlock.h26
-rw-r--r--src/common/sql.c24
-rw-r--r--src/common/sql.h24
-rw-r--r--src/common/strlib.c24
-rw-r--r--src/common/strlib.h24
-rw-r--r--src/common/sysinfo.c30
-rw-r--r--src/common/sysinfo.h28
-rw-r--r--src/common/thread.c28
-rw-r--r--src/common/thread.h23
-rw-r--r--src/common/timer.c24
-rw-r--r--src/common/timer.h24
-rw-r--r--src/common/utils.c24
-rw-r--r--src/common/utils.h24
-rw-r--r--src/common/winapi.h20
-rw-r--r--src/config/classes/general.h23
-rw-r--r--src/config/const.h24
-rw-r--r--src/config/core.h23
-rw-r--r--src/config/renewal.h23
-rw-r--r--src/config/secure.h23
-rw-r--r--src/login/HPMlogin.c22
-rw-r--r--src/login/HPMlogin.h22
-rw-r--r--src/login/Makefile.in20
-rw-r--r--src/login/account.h24
-rw-r--r--src/login/account_sql.c24
-rw-r--r--src/login/ipban.h23
-rw-r--r--src/login/ipban_sql.c24
-rw-r--r--src/login/login.c28
-rw-r--r--src/login/login.h24
-rw-r--r--src/login/loginlog.h23
-rw-r--r--src/login/loginlog_sql.c24
-rw-r--r--src/map/HPMmap.c22
-rw-r--r--src/map/HPMmap.h22
-rw-r--r--src/map/Makefile.in20
-rw-r--r--src/map/atcommand.c42
-rw-r--r--src/map/atcommand.h24
-rw-r--r--src/map/battle.c79
-rw-r--r--src/map/battle.h28
-rw-r--r--src/map/battleground.c24
-rw-r--r--src/map/battleground.h24
-rw-r--r--src/map/buyingstore.c28
-rw-r--r--src/map/buyingstore.h24
-rw-r--r--src/map/channel.c22
-rw-r--r--src/map/channel.h22
-rw-r--r--src/map/chat.c24
-rw-r--r--src/map/chat.h24
-rw-r--r--src/map/chrif.c24
-rw-r--r--src/map/chrif.h24
-rw-r--r--src/map/clif.c38
-rw-r--r--src/map/clif.h24
-rw-r--r--src/map/date.c23
-rw-r--r--src/map/date.h23
-rw-r--r--src/map/duel.c24
-rw-r--r--src/map/duel.h24
-rw-r--r--src/map/elemental.c24
-rw-r--r--src/map/elemental.h24
-rw-r--r--src/map/guild.c28
-rw-r--r--src/map/guild.h24
-rw-r--r--src/map/homunculus.c24
-rw-r--r--src/map/homunculus.h24
-rw-r--r--src/map/instance.c24
-rw-r--r--src/map/instance.h24
-rw-r--r--src/map/intif.c23
-rw-r--r--src/map/intif.h24
-rw-r--r--src/map/irc-bot.c25
-rw-r--r--src/map/irc-bot.h26
-rw-r--r--src/map/itemdb.c24
-rw-r--r--src/map/itemdb.h26
-rw-r--r--src/map/log.c24
-rw-r--r--src/map/log.h24
-rw-r--r--src/map/mail.c24
-rw-r--r--src/map/mail.h24
-rw-r--r--src/map/map.c46
-rw-r--r--src/map/map.h26
-rw-r--r--src/map/mapreg.h24
-rw-r--r--src/map/mapreg_sql.c24
-rw-r--r--src/map/mercenary.c24
-rw-r--r--src/map/mercenary.h23
-rw-r--r--src/map/mob.c33
-rw-r--r--src/map/mob.h35
-rw-r--r--src/map/npc.c262
-rw-r--r--src/map/npc.h42
-rw-r--r--src/map/npc_chat.c24
-rw-r--r--src/map/packets.h21
-rw-r--r--src/map/packets_struct.h21
-rw-r--r--src/map/party.c24
-rw-r--r--src/map/party.h24
-rw-r--r--src/map/path.c24
-rw-r--r--src/map/path.h24
-rw-r--r--src/map/pc.c47
-rw-r--r--src/map/pc.h25
-rw-r--r--src/map/pc_groups.c24
-rw-r--r--src/map/pc_groups.h24
-rw-r--r--src/map/pet.c24
-rw-r--r--src/map/pet.h24
-rw-r--r--src/map/quest.c24
-rw-r--r--src/map/quest.h24
-rw-r--r--src/map/script.c43
-rw-r--r--src/map/script.h26
-rw-r--r--src/map/searchstore.c24
-rw-r--r--src/map/searchstore.h24
-rw-r--r--src/map/skill.c44
-rw-r--r--src/map/skill.h24
-rw-r--r--src/map/status.c133
-rw-r--r--src/map/status.h349
-rw-r--r--src/map/storage.c24
-rw-r--r--src/map/storage.h24
-rw-r--r--src/map/trade.c24
-rw-r--r--src/map/trade.h24
-rw-r--r--src/map/unit.c24
-rw-r--r--src/map/unit.h24
-rw-r--r--src/map/vending.c24
-rw-r--r--src/map/vending.h24
-rw-r--r--src/plugins/HPMHooking.c23
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc33
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc29
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.Hooks.inc55
-rw-r--r--src/plugins/HPMHooking/HPMHooking_char.sources.inc29
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc33
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc29
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.Hooks.inc55
-rw-r--r--src/plugins/HPMHooking/HPMHooking_login.sources.inc29
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc103
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc48
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc582
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.sources.inc31
-rw-r--r--src/plugins/Makefile.in19
-rw-r--r--src/plugins/db2sql.c47
-rw-r--r--src/plugins/dbghelpplug.c23
-rw-r--r--src/plugins/sample.c96
-rw-r--r--src/plugins/script_mapquit.c15
-rw-r--r--src/test/Makefile.in20
-rw-r--r--src/test/test_libconfig.c26
-rw-r--r--src/test/test_spinlock.c20
-rw-r--r--src/tool/Makefile.in20
-rw-r--r--src/tool/mapcache.c23
210 files changed, 5626 insertions, 1187 deletions
diff --git a/src/char/HPMchar.c b/src/char/HPMchar.c
index 99e7c598f..c34866e53 100644
--- a/src/char/HPMchar.c
+++ b/src/char/HPMchar.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2014-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "HPMchar.h"
diff --git a/src/char/HPMchar.h b/src/char/HPMchar.h
index 431017b7a..2bf2820f8 100644
--- a/src/char/HPMchar.h
+++ b/src/char/HPMchar.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2014-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_HPMCHAR_H
#define CHAR_HPMCHAR_H
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index 45f0cd872..bc2c0e980 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -1,5 +1,21 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2012-2015 Hercules Dev Team
+# Copyright (C) Athena Dev Teams
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/char/char.c b/src/char/char.c
index 41b13b3db..91d0870d1 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CONSOLE_INPUT
@@ -5637,21 +5653,21 @@ int char_config_read(const char* cfgName)
} else if(strcmpi(w1, "gm_allow_group") == 0) {
gm_allow_group = atoi(w2);
} else if (strcmpi(w1, "autosave_time") == 0) {
- autosave_interval = atoi(w2)*1000;
+ autosave_interval = atoi(w2) * 1000;
if (autosave_interval <= 0)
autosave_interval = DEFAULT_AUTOSAVE_INTERVAL;
} else if (strcmpi(w1, "save_log") == 0) {
save_log = config_switch(w2);
}
#ifdef RENEWAL
- else if (strcmpi(w1, "start_point") == 0) {
+ else if (strcmpi(w1, "start_point_re") == 0) {
char map[MAP_NAME_LENGTH_EXT];
int x, y;
if (sscanf(w2, "%15[^,],%d,%d", map, &x, &y) < 3)
continue;
start_point.map = mapindex->name2id(map);
if (!start_point.map)
- ShowError("Specified start_point %s not found in map-index cache.\n", map);
+ ShowError("Specified start_point_re '%s' not found in map-index cache.\n", map);
start_point.x = x;
start_point.y = y;
}
@@ -5663,7 +5679,7 @@ int char_config_read(const char* cfgName)
continue;
start_point.map = mapindex->name2id(map);
if (!start_point.map)
- ShowError("Specified start_point_pre %s not found in map-index cache.\n", map);
+ ShowError("Specified start_point_pre '%s' not found in map-index cache.\n", map);
start_point.x = x;
start_point.y = y;
}
@@ -5674,7 +5690,7 @@ int char_config_read(const char* cfgName)
i = 0;
split = strtok(w2, ",");
- while (split != NULL && i < MAX_START_ITEMS*3) {
+ while (split != NULL && i < MAX_START_ITEMS * 3) {
char *split2 = split;
split = strtok(NULL, ",");
start_items[i] = atoi(split2);
@@ -5977,6 +5993,7 @@ int do_init(int argc, char **argv) {
Sql_HerculesUpdateCheck(inter->sql_handle);
#ifdef CONSOLE_INPUT
console->input->setSQL(inter->sql_handle);
+ console->display_gplnotice();
#endif
ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", chr->port);
diff --git a/src/char/char.h b/src/char/char.h
index 7576b00ce..3d25ec465 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_CHAR_H
#define CHAR_CHAR_H
diff --git a/src/char/geoip.c b/src/char/geoip.c
index 924c1cd83..36b908561 100644
--- a/src/char/geoip.c
+++ b/src/char/geoip.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "geoip.h"
diff --git a/src/char/geoip.h b/src/char/geoip.h
index 5a6abf68a..61ebb535f 100644
--- a/src/char/geoip.h
+++ b/src/char/geoip.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_GEOIP_H
#define CHAR_GEOIP_H
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 48bf715f2..b402e7f98 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_auction.h"
diff --git a/src/char/int_auction.h b/src/char/int_auction.h
index 37fd48264..29b068dfd 100644
--- a/src/char/int_auction.h
+++ b/src/char/int_auction.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_AUCTION_H
#define CHAR_INT_AUCTION_H
diff --git a/src/char/int_elemental.c b/src/char/int_elemental.c
index 3969e5e43..b781654db 100644
--- a/src/char/int_elemental.c
+++ b/src/char/int_elemental.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_elemental.h"
diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h
index 0fae74cd0..9cdd63e7f 100644
--- a/src/char/int_elemental.h
+++ b/src/char/int_elemental.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_ELEMENTAL_H
#define CHAR_INT_ELEMENTAL_H
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index 239e8a296..03a1d368d 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // DBPATH
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 7a5ed3aae..1076b3394 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_GUILD_H
#define CHAR_INT_GUILD_H
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index 78b4dbb61..f60394ee7 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_homun.h"
diff --git a/src/char/int_homun.h b/src/char/int_homun.h
index d5a35283f..e070cccb6 100644
--- a/src/char/int_homun.h
+++ b/src/char/int_homun.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_HOMUN_H
#define CHAR_INT_HOMUN_H
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 933856b14..c15dc5180 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_mail.h"
diff --git a/src/char/int_mail.h b/src/char/int_mail.h
index d15b264b5..346adeea7 100644
--- a/src/char/int_mail.h
+++ b/src/char/int_mail.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_MAIL_H
#define CHAR_INT_MAIL_H
diff --git a/src/char/int_mercenary.c b/src/char/int_mercenary.c
index fb98161fe..2ed45305c 100644
--- a/src/char/int_mercenary.c
+++ b/src/char/int_mercenary.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_mercenary.h"
diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h
index 0d52b02e1..17cc97fda 100644
--- a/src/char/int_mercenary.h
+++ b/src/char/int_mercenary.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_MERCENARY_H
#define CHAR_INT_MERCENARY_H
diff --git a/src/char/int_party.c b/src/char/int_party.c
index d4af67eb3..71034a17b 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_party.h"
diff --git a/src/char/int_party.h b/src/char/int_party.h
index af3877549..e6ad75bb8 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_PARTY_H
#define CHAR_INT_PARTY_H
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 37e238725..6baf832bc 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_pet.h"
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index 213c377ee..07a273eac 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_PET_H
#define CHAR_INT_PET_H
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index e2ee3401a..946603b0a 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "int_quest.h"
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index 442995826..8d5cd5807 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_QUEST_H
#define CHAR_INT_QUEST_H
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index c0cae5300..086ef2044 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // GP_BOUND_ITEMS
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index f02decf49..9bf5b5fd5 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INT_STORAGE_H
#define CHAR_INT_STORAGE_H
diff --git a/src/char/inter.c b/src/char/inter.c
index 1ed29719e..5b81a4732 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "inter.h"
diff --git a/src/char/inter.h b/src/char/inter.h
index 743f7e2f1..49eca1256 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_INTER_H
#define CHAR_INTER_H
diff --git a/src/char/loginif.c b/src/char/loginif.c
index e99e05237..c577ad791 100644
--- a/src/char/loginif.c
+++ b/src/char/loginif.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "loginif.h"
diff --git a/src/char/loginif.h b/src/char/loginif.h
index 44cf1ebf6..d1bfe5c3c 100644
--- a/src/char/loginif.h
+++ b/src/char/loginif.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_LOGINIF_H
#define CHAR_LOGINIF_H
diff --git a/src/char/mapif.c b/src/char/mapif.c
index eb5a6690a..5ba687a77 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "mapif.h"
diff --git a/src/char/mapif.h b/src/char/mapif.h
index a986cd46f..eb5d30b2c 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -1,7 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_MAPIF_H
#define CHAR_MAPIF_H
diff --git a/src/char/pincode.c b/src/char/pincode.c
index f5992de83..af79d6f11 100644
--- a/src/char/pincode.c
+++ b/src/char/pincode.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "pincode.h"
diff --git a/src/char/pincode.h b/src/char/pincode.h
index 3cda11768..fb0c1a9c4 100644
--- a/src/char/pincode.h
+++ b/src/char/pincode.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CHAR_PINCODE_H
#define CHAR_PINCODE_H
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 7d9a0b104..62ef54499 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CONSOLE_INPUT
@@ -389,11 +405,21 @@ bool hpm_add_arg(unsigned int pluginID, char *name, bool has_param, CmdlineExecF
* @retval true if the listener was added successfully.
* @retval false in case of error.
*/
-bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val))
+bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *name, void (*parse_func) (const char *key, const char *val), int (*return_func) (const char *key))
{
struct HPConfListenStorage *conf;
int i;
+ if (parse_func == NULL) {
+ ShowError("HPM->addConf:%s: missing setter function for config '%s'\n",HPM->pid2name(pluginID),name);
+ return false;
+ }
+
+ if (type == HPCT_BATTLE && return_func == NULL) {
+ ShowError("HPM->addConf:%s: missing getter function for config '%s'\n",HPM->pid2name(pluginID),name);
+ return false;
+ }
+
if (type >= HPCT_MAX) {
ShowError("HPM->addConf:%s: unknown point '%u' specified for config '%s'\n",HPM->pid2name(pluginID),type,name);
return false;
@@ -412,7 +438,8 @@ bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *na
conf->pluginID = pluginID;
safestrncpy(conf->key, name, HPM_ADDCONF_LENGTH);
- conf->func = func;
+ conf->parse_func = parse_func;
+ conf->return_func = return_func;
return true;
}
@@ -798,7 +825,29 @@ bool hplugins_parse_conf(const char *w1, const char *w2, enum HPluginConfType po
if (i == VECTOR_LENGTH(HPM->config_listeners[point]))
return false;
- VECTOR_INDEX(HPM->config_listeners[point], i).func(w2);
+ VECTOR_INDEX(HPM->config_listeners[point], i).parse_func(w1, w2);
+ return true;
+}
+
+/**
+ * Get a battle configuration entry through the registered plugins.
+ *
+ * @param[in] w1 The configuration entry name.
+ * @param[out] value Where the config result will be saved
+ * @retval true in case of data found
+ * @retval false in case of no data found
+ */
+bool hplugins_get_battle_conf(const char *w1, int *value)
+{
+ int i;
+
+ nullpo_retr(false, value);
+
+ ARR_FIND(0, VECTOR_LENGTH(HPM->config_listeners[HPCT_BATTLE]), i, strcmpi(w1, VECTOR_INDEX(HPM->config_listeners[HPCT_BATTLE], i).key) == 0);
+ if (i == VECTOR_LENGTH(HPM->config_listeners[HPCT_BATTLE]))
+ return false;
+
+ *value = VECTOR_INDEX(HPM->config_listeners[HPCT_BATTLE], i).return_func(w1);
return true;
}
@@ -1020,6 +1069,7 @@ void hpm_defaults(void)
HPM->load_sub = NULL;
HPM->addhook_sub = NULL;
HPM->parseConf = hplugins_parse_conf;
+ HPM->getBattleConf = hplugins_get_battle_conf;
HPM->DataCheck = HPM_DataCheck;
HPM->datacheck_init = HPM_datacheck_init;
HPM->datacheck_final = HPM_datacheck_final;
diff --git a/src/common/HPM.h b/src/common/HPM.h
index 5420e5300..215161a86 100644
--- a/src/common/HPM.h
+++ b/src/common/HPM.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_HPM_H
#define COMMON_HPM_H
@@ -101,7 +117,8 @@ struct HPMFileNameCache {
struct HPConfListenStorage {
unsigned int pluginID;
char key[HPM_ADDCONF_LENGTH];
- void (*func) (const char *val);
+ void (*parse_func) (const char *key, const char *val);
+ int (*return_func) (const char *key);
};
/* Hercules Plugin Manager Interface */
@@ -145,6 +162,7 @@ struct HPM_interface {
bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID);
/* for custom config parsing */
bool (*parseConf) (const char *w1, const char *w2, enum HPluginConfType point);
+ bool (*getBattleConf) (const char* w1, int *value);
/* validates plugin data */
bool (*DataCheck) (struct s_HPMDataCheck *src, unsigned int size, int version, char *name);
void (*datacheck_init) (const struct s_HPMDataCheck *src, unsigned int length, int version);
diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h
index 00ac57cd5..e849e6620 100644
--- a/src/common/HPMDataCheck.h
+++ b/src/common/HPMDataCheck.h
@@ -1,8 +1,28 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2014-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
+
#ifndef HPM_DATA_CHECK_H
#define HPM_DATA_CHECK_H
diff --git a/src/common/HPMSymbols.inc.h b/src/common/HPMSymbols.inc.h
index 4c3722b69..db9108774 100644
--- a/src/common/HPMSymbols.inc.h
+++ b/src/common/HPMSymbols.inc.h
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2015-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
#if !defined(HERCULES_CORE)
#ifdef COMMON_UTILS_H /* HCache */
@@ -149,6 +168,9 @@ struct mercenary_interface *mercenary;
#ifdef MAP_MOB_H /* mob */
struct mob_interface *mob;
#endif // MAP_MOB_H
+#ifdef MAP_NPC_H /* npc_chat */
+struct npc_chat_interface *npc_chat;
+#endif // MAP_NPC_H
#ifdef MAP_NPC_H /* npc */
struct npc_interface *npc;
#endif // MAP_NPC_H
@@ -167,6 +189,9 @@ struct pc_groups_interface *pcg;
#ifdef MAP_PC_H /* pc */
struct pc_interface *pc;
#endif // MAP_PC_H
+#ifdef MAP_NPC_H /* libpcre */
+struct pcre_interface *libpcre;
+#endif // MAP_NPC_H
#ifdef MAP_PET_H /* pet */
struct pet_interface *pet;
#endif // MAP_PET_H
@@ -372,6 +397,9 @@ if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mercenary", mercenary)) retu
#ifdef MAP_MOB_H /* mob */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mob", mob)) return "mob";
#endif // MAP_MOB_H
+#ifdef MAP_NPC_H /* npc_chat */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("npc_chat", npc_chat)) return "npc_chat";
+#endif // MAP_NPC_H
#ifdef MAP_NPC_H /* npc */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("npc", npc)) return "npc";
#endif // MAP_NPC_H
@@ -390,6 +418,9 @@ if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pc_groups", pcg)) return "pc
#ifdef MAP_PC_H /* pc */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pc", pc)) return "pc";
#endif // MAP_PC_H
+#ifdef MAP_NPC_H /* libpcre */
+if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("libpcre", libpcre)) return "libpcre";
+#endif // MAP_NPC_H
#ifdef MAP_PET_H /* pet */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("pet", pet)) return "pet";
#endif // MAP_PET_H
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 9a61dd256..cf3e16277 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_HPMI_H
#define COMMON_HPMI_H
@@ -183,19 +199,19 @@ enum HPluginConfType {
/* HPMi->addPacket */
#define addPacket(cmd,len,receive,point) HPMi->addPacket(cmd,len,receive,point,HPMi->pid)
/* HPMi->addBattleConf */
-#define addBattleConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_BATTLE,bcname,funcname)
+#define addBattleConf(bcname,funcname,returnfunc) HPMi->addConf(HPMi->pid,HPCT_BATTLE,bcname,funcname,returnfunc)
/* HPMi->addLogin */
-#define addLoginConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_LOGIN,bcname,funcname)
+#define addLoginConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_LOGIN,bcname,funcname,NULL)
/* HPMi->addChar */
-#define addCharConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_CHAR,bcname,funcname)
+#define addCharConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_CHAR,bcname,funcname,NULL)
/* HPMi->addCharInter */
-#define addCharInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_CHAR_INTER,bcname,funcname)
+#define addCharInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_CHAR_INTER,bcname,funcname,NULL)
/* HPMi->addMapInter */
-#define addMapInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_MAP_INTER,bcname,funcname)
+#define addMapInterConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_MAP_INTER,bcname,funcname,NULL)
/* HPMi->addLog */
-#define addLogConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_LOG,bcname,funcname)
+#define addLogConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_LOG,bcname,funcname,NULL)
/* HPMi->addScript */
-#define addScriptConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_SCRIPT,bcname,funcname)
+#define addScriptConf(bcname,funcname) HPMi->addConf(HPMi->pid,HPCT_SCRIPT,bcname,funcname,NULL)
/* HPMi->addPCGPermission */
#define addGroupPermission(pcgname,maskptr) HPMi->addPCGPermission(HPMi->pid,pcgname,&maskptr)
@@ -222,7 +238,7 @@ struct HPMi_interface {
/* program --arg/-a */
bool (*addArg) (unsigned int pluginID, char *name, bool has_param, CmdlineExecFunc func, const char *help);
/* battle-config recv param */
- bool (*addConf) (unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val));
+ bool (*addConf) (unsigned int pluginID, enum HPluginConfType type, char *name, void (*parse_func) (const char *key, const char *val), int (*return_func) (const char *key));
/* pc group permission */
void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask);
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index f9917ef0d..df3ecaf2d 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -1,5 +1,21 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2012-2015 Hercules Dev Team
+# Copyright (C) Athena Dev Teams
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/common/atomic.h b/src/common/atomic.h
index 1bb859b29..82d579bf4 100644
--- a/src/common/atomic.h
+++ b/src/common/atomic.h
@@ -1,6 +1,23 @@
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) rAthena Project (www.rathena.org)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_ATOMIC_H
#define COMMON_ATOMIC_H
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 5fc08b770..61d0646eb 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -1,3 +1,22 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_CBASETYPES_H
#define COMMON_CBASETYPES_H
diff --git a/src/common/conf.c b/src/common/conf.c
index d9367dc9e..3e8c08963 100644
--- a/src/common/conf.c
+++ b/src/common/conf.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "conf.h"
diff --git a/src/common/conf.h b/src/common/conf.h
index 0ef86adea..19b13c51a 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_CONF_H
#define COMMON_CONF_H
diff --git a/src/common/console.c b/src/common/console.c
index 477141b48..f0702d0da 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CONSOLE_INPUT, MAX_CONSOLE_INPUT
@@ -75,6 +91,16 @@ void display_title(void) {
ShowInfo("Compiled with %s\n", sysinfo->compiler());
ShowInfo("Compile Flags: %s\n", sysinfo->cflags());
}
+
+/**
+ * Shows a license notice as per GNU GPL recommendation.
+ */
+void display_gplnotice(void)
+{
+ ShowInfo("Hercules, Copyright (C) 2012-2015, Hercules Dev Team and others.\n");
+ ShowInfo("Licensed under the GNU General Public License, version 3 or later.\n");
+}
+
#ifdef CONSOLE_INPUT
int console_parse_key_pressed(void)
{
@@ -532,6 +558,7 @@ void console_defaults(void)
console->init = console_init;
console->final = console_final;
console->display_title = display_title;
+ console->display_gplnotice = display_gplnotice;
#ifdef CONSOLE_INPUT
console->input = &console_input_s;
console->input->parse_init = console_parse_init;
diff --git a/src/common/console.h b/src/common/console.h
index 102a1beaf..43f48b865 100644
--- a/src/common/console.h
+++ b/src/common/console.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_CONSOLE_H
#define COMMON_CONSOLE_H
@@ -84,6 +100,7 @@ struct console_interface {
void (*init) (void);
void (*final) (void);
void (*display_title) (void);
+ void (*display_gplnotice) (void);
struct console_input_interface *input;
};
diff --git a/src/common/core.c b/src/common/core.c
index 6f21f526b..201d4f5e8 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h"
diff --git a/src/common/core.h b/src/common/core.h
index f8e748db4..4aaa6cfac 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_CORE_H
#define COMMON_CORE_H
diff --git a/src/common/db.c b/src/common/db.c
index 0600be2e8..361e212cb 100644
--- a/src/common/db.c
+++ b/src/common/db.c
@@ -1,7 +1,25 @@
-/*****************************************************************************\
- * Copyright (c) Athena Dev Teams - Licensed under GNU GPL
- * For more information, see LICENCE in the main folder
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
*
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*****************************************************************************\
* This file is separated in five sections:
* (1) Private typedefs, enums, structures, defines and global variables
* (2) Private functions
diff --git a/src/common/db.h b/src/common/db.h
index 1df306038..205288f13 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -1,7 +1,25 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
/*****************************************************************************\
- * Copyright (c) Athena Dev Teams - Licensed under GNU GPL *
- * For more information, see LICENCE in the main folder *
- * *
* This file is separated in two sections: *
* (1) public typedefs, enums, unions, structures and defines *
* (2) public functions *
diff --git a/src/common/des.c b/src/common/des.c
index 0a702bfdf..ce64309f3 100644
--- a/src/common/des.c
+++ b/src/common/des.c
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "des.h"
diff --git a/src/common/des.h b/src/common/des.h
index 6f54b36f2..d62b5cc49 100644
--- a/src/common/des.h
+++ b/src/common/des.h
@@ -1,5 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_DES_H
#define COMMON_DES_H
diff --git a/src/common/ers.c b/src/common/ers.c
index bf17e087d..85e1fb759 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -1,6 +1,24 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
/*****************************************************************************\
* <H1>Entry Reusage System</H1> *
* *
diff --git a/src/common/ers.h b/src/common/ers.h
index 09290186e..938882edd 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -1,7 +1,25 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
/*****************************************************************************\
- * Copyright (c) Athena Dev Teams - Licensed under GNU GPL *
- * For more information, see LICENCE in the main folder *
- * *
* <H1>Entry Reusage System</H1> *
* *
* There are several root entry managers, each with a different entry size. *
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 46804ea08..678875c91 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "grfio.h"
diff --git a/src/common/grfio.h b/src/common/grfio.h
index adffe0990..36ed8fb39 100644
--- a/src/common/grfio.h
+++ b/src/common/grfio.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_GRFIO_H
#define COMMON_GRFIO_H
diff --git a/src/common/hercules.h b/src/common/hercules.h
index 678577690..6b4b9d696 100644
--- a/src/common/hercules.h
+++ b/src/common/hercules.h
@@ -1,7 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Base author: Haru <haru@dotalux.com>
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_HERCULES_H
#define COMMON_HERCULES_H
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index aa31d8090..5b0f6169b 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "mapindex.h"
diff --git a/src/common/mapindex.h b/src/common/mapindex.h
index ff19630a1..3fb170c1f 100644
--- a/src/common/mapindex.h
+++ b/src/common/mapindex.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_MAPINDEX_H
#define COMMON_MAPINDEX_H
diff --git a/src/common/md5calc.c b/src/common/md5calc.c
index e594c364f..44f912992 100644
--- a/src/common/md5calc.c
+++ b/src/common/md5calc.c
@@ -1,3 +1,25 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#define HERCULES_CORE
+
/***********************************************************
* md5 calculation algorithm
*
@@ -6,8 +28,6 @@
*
***********************************************************/
-#define HERCULES_CORE
-
#include "md5calc.h"
#include "common/cbasetypes.h"
diff --git a/src/common/md5calc.h b/src/common/md5calc.h
index f06a01f4d..0294c3ca1 100644
--- a/src/common/md5calc.h
+++ b/src/common/md5calc.h
@@ -1,3 +1,23 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_MD5CALC_H
#define COMMON_MD5CALC_H
diff --git a/src/common/memmgr.c b/src/common/memmgr.c
index f7177338c..97991ceaa 100644
--- a/src/common/memmgr.c
+++ b/src/common/memmgr.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "memmgr.h"
diff --git a/src/common/memmgr.h b/src/common/memmgr.h
index c5a3358db..4b06ae56e 100644
--- a/src/common/memmgr.h
+++ b/src/common/memmgr.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_MEMMGR_H
#define COMMON_MEMMGR_H
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 095b96341..cb8a75b24 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_MMO_H
#define COMMON_MMO_H
diff --git a/src/common/mutex.c b/src/common/mutex.c
index af1a6d155..0f02b153f 100644
--- a/src/common/mutex.c
+++ b/src/common/mutex.c
@@ -1,6 +1,23 @@
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) rAthena Project (www.rathena.org)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "mutex.h"
diff --git a/src/common/mutex.h b/src/common/mutex.h
index a70f0e8fd..5127d9f4b 100644
--- a/src/common/mutex.h
+++ b/src/common/mutex.h
@@ -1,6 +1,23 @@
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) rAthena Project (www.rathena.org)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_MUTEX_H
#define COMMON_MUTEX_H
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index 98faa9f06..5b1be14ea 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "nullpo.h"
diff --git a/src/common/nullpo.h b/src/common/nullpo.h
index 8abeb4af9..098e669f3 100644
--- a/src/common/nullpo.h
+++ b/src/common/nullpo.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_NULLPO_H
#define COMMON_NULLPO_H
diff --git a/src/common/random.c b/src/common/random.c
index a4d7c5d34..ba70a5c1d 100644
--- a/src/common/random.c
+++ b/src/common/random.c
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "random.h"
diff --git a/src/common/random.h b/src/common/random.h
index 379e675b2..0b5abbcdc 100644
--- a/src/common/random.h
+++ b/src/common/random.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_RANDOM_H
#define COMMON_RANDOM_H
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 27fb0b635..e60b9f536 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "showmsg.h"
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 728691ba3..ed8776fb0 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_SHOWMSG_H
#define COMMON_SHOWMSG_H
diff --git a/src/common/socket.c b/src/common/socket.c
index 88d35e57a..f67c3d074 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // SHOW_SERVER_STATS
diff --git a/src/common/socket.h b/src/common/socket.h
index 426f8e4bb..b33fd2acf 100644
--- a/src/common/socket.h
+++ b/src/common/socket.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_SOCKET_H
#define COMMON_SOCKET_H
diff --git a/src/common/spinlock.h b/src/common/spinlock.h
index 811b239df..4d9c4c668 100644
--- a/src/common/spinlock.h
+++ b/src/common/spinlock.h
@@ -1,18 +1,32 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) rAthena Project (www.rathena.org)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_SPINLOCK_H
#define COMMON_SPINLOCK_H
-//
// CAS based Spinlock Implementation
//
// CamelCase names are chosen to be consistent with Microsoft's WinAPI
// which implements CriticalSection by this naming...
//
// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-//
-//
#include "common/atomic.h"
#include "common/cbasetypes.h"
diff --git a/src/common/sql.c b/src/common/sql.c
index 4262a10a1..f6280c436 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "sql.h"
diff --git a/src/common/sql.h b/src/common/sql.h
index fc1562347..33643407d 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_SQL_H
#define COMMON_SQL_H
diff --git a/src/common/strlib.c b/src/common/strlib.c
index fefabe52b..997b01ffa 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "strlib.h"
diff --git a/src/common/strlib.h b/src/common/strlib.h
index cd9e105fb..c523f5d86 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_STRLIB_H
#define COMMON_STRLIB_H
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index 1baf33086..dbedfa2db 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -1,9 +1,29 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Base Author: Haru @ http://herc.ws
-
-/// See sysinfo.h for a description of this file
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+/**
+ * See sysinfo.h for a description of this file.
+ *
+ * Base Author: Haru @ http://herc.ws
+ */
#define HERCULES_CORE
#include "sysinfo.h"
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
index 7d47398a3..904be832f 100644
--- a/src/common/sysinfo.h
+++ b/src/common/sysinfo.h
@@ -1,14 +1,32 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Base Author: Haru @ http://herc.ws
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_SYSINFO_H
#define COMMON_SYSINFO_H
/**
* Provides various bits of information about the system Hercules is running on
* (note: on unix systems, to avoid runtime detection, most of the data is
- * cached at compile time)
+ * cached at compile time).
+ *
+ * Base Author: Haru @ http://herc.ws
*/
#include "common/hercules.h"
diff --git a/src/common/thread.c b/src/common/thread.c
index d9cd42aa6..6012791e2 100644
--- a/src/common/thread.c
+++ b/src/common/thread.c
@@ -1,12 +1,28 @@
-//
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) rAthena Project (www.rathena.org)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#define HERCULES_CORE
+
// Basic Threading abstraction (for pthread / win32 based systems)
//
// Author: Florian Wilkemeyer <fw@f-ws.de>
-//
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
-#define HERCULES_CORE
#include "thread.h"
diff --git a/src/common/thread.h b/src/common/thread.h
index 36ea006b3..261735306 100644
--- a/src/common/thread.h
+++ b/src/common/thread.h
@@ -1,6 +1,23 @@
-// Copyright (c) rAthena Project (www.rathena.org) - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) rAthena Project (www.rathena.org)
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_THREAD_H
#define COMMON_THREAD_H
diff --git a/src/common/timer.c b/src/common/timer.c
index f31ae0ffe..7f71157ae 100644
--- a/src/common/timer.c
+++ b/src/common/timer.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "timer.h"
diff --git a/src/common/timer.h b/src/common/timer.h
index c00a4362b..2161f5e31 100644
--- a/src/common/timer.h
+++ b/src/common/timer.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_TIMER_H
#define COMMON_TIMER_H
diff --git a/src/common/utils.c b/src/common/utils.c
index f5eecb65d..dcf0a749a 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "utils.h"
diff --git a/src/common/utils.h b/src/common/utils.h
index 6296f6235..da2a29317 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef COMMON_UTILS_H
#define COMMON_UTILS_H
diff --git a/src/common/winapi.h b/src/common/winapi.h
index f53d9cbbd..724f052a0 100644
--- a/src/common/winapi.h
+++ b/src/common/winapi.h
@@ -1,3 +1,23 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#pragma once
diff --git a/src/config/classes/general.h b/src/config/classes/general.h
index bf9c05bf5..f1fa63179 100644
--- a/src/config/classes/general.h
+++ b/src/config/classes/general.h
@@ -1,6 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CONFIG_GENERAL_H
#define CONFIG_GENERAL_H
diff --git a/src/config/const.h b/src/config/const.h
index b6eb5db77..75bf35dd9 100644
--- a/src/config/const.h
+++ b/src/config/const.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CONFIG_CONSTANTS_H
#define CONFIG_CONSTANTS_H
diff --git a/src/config/core.h b/src/config/core.h
index 3832b185e..09954e0cb 100644
--- a/src/config/core.h
+++ b/src/config/core.h
@@ -1,6 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CONFIG_CORE_H
#define CONFIG_CORE_H
diff --git a/src/config/renewal.h b/src/config/renewal.h
index e4b8e699b..67d216226 100644
--- a/src/config/renewal.h
+++ b/src/config/renewal.h
@@ -1,6 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CONFIG_RENEWAL_H
#define CONFIG_RENEWAL_H
diff --git a/src/config/secure.h b/src/config/secure.h
index 67f7a972b..3f1342b22 100644
--- a/src/config/secure.h
+++ b/src/config/secure.h
@@ -1,6 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef CONFIG_SECURE_H
#define CONFIG_SECURE_H
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index 5ceb38283..f12996915 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2014-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "HPMlogin.h"
diff --git a/src/login/HPMlogin.h b/src/login/HPMlogin.h
index 35d4bd01c..5e059aa7e 100644
--- a/src/login/HPMlogin.h
+++ b/src/login/HPMlogin.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2014-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef LOGIN_HPMLOGIN_H
#define LOGIN_HPMLOGIN_H
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index 652876727..022831fb5 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -1,5 +1,21 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2012-2015 Hercules Dev Team
+# Copyright (C) Athena Dev Teams
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/login/account.h b/src/login/account.h
index 1e95c19de..151a2863d 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef LOGIN_ACCOUNT_H
#define LOGIN_ACCOUNT_H
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 4efa73e94..89f4aaaab 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CONSOLE_INPUT
diff --git a/src/login/ipban.h b/src/login/ipban.h
index 8f3cac16c..85cf3873c 100644
--- a/src/login/ipban.h
+++ b/src/login/ipban.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef LOGIN_IPBAN_H
#define LOGIN_IPBAN_H
diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c
index b4fce009d..090886e93 100644
--- a/src/login/ipban_sql.c
+++ b/src/login/ipban_sql.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "ipban.h"
diff --git a/src/login/login.c b/src/login/login.c
index 3ec60f0aa..e478d0252 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "login.h"
@@ -2033,6 +2049,10 @@ int do_init(int argc, char** argv)
core->runflag = LOGINSERVER_ST_RUNNING;
}
+#ifdef CONSOLE_INPUT
+ console->display_gplnotice();
+#endif // CONSOLE_INPUT
+
ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port);
login_log(0, "login server", 100, "login server started");
diff --git a/src/login/login.h b/src/login/login.h
index 40a8237d8..8036d04ad 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef LOGIN_LOGIN_H
#define LOGIN_LOGIN_H
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index f4327764a..efb0873bd 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef LOGIN_LOGINLOG_H
#define LOGIN_LOGINLOG_H
diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c
index d26d910de..f26d9890f 100644
--- a/src/login/loginlog_sql.c
+++ b/src/login/loginlog_sql.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "loginlog.h"
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c
index ade685bf7..289375323 100644
--- a/src/map/HPMmap.c
+++ b/src/map/HPMmap.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "HPMmap.h"
diff --git a/src/map/HPMmap.h b/src/map/HPMmap.h
index b1957b139..a9d2a454e 100644
--- a/src/map/HPMmap.h
+++ b/src/map/HPMmap.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_HPMMAP_H
#define MAP_HPMMAP_H
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index ca6f70472..60d87522e 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -1,5 +1,21 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2012-2015 Hercules Dev Team
+# Copyright (C) Athena Dev Teams
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 61ac124ca..889deac49 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // AUTOLOOTITEM_SIZE, AUTOTRADE_PERSISTENCY, MAX_SUGGESTIONS, MOB_FLEE(), MOB_HIT(), RENEWAL, RENEWAL_DROP, RENEWAL_EXP
@@ -6111,9 +6127,7 @@ ACMD(npctalk)
bool ifcolor=(*(info->command + 7) != 'c' && *(info->command + 7) != 'C')?0:1;
unsigned int color = 0;
- if (sd->sc.count && //no "chatting" while muted.
- (sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT)))
+ if (!pc->can_talk(sd))
return false;
if(!ifcolor) {
@@ -6160,9 +6174,7 @@ ACMD(pettalk)
return false;
}
- if (sd->sc.count && //no "chatting" while muted.
- (sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT)))
+ if (!pc->can_talk(sd))
return false;
if (!*message || sscanf(message, "%99[^\n]", mes) < 1) {
@@ -6967,9 +6979,7 @@ ACMD(homtalk)
sd->cantalk_tick = timer->gettick() + battle_config.min_chat_delay;
}
- if (sd->sc.count && //no "chatting" while muted.
- (sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT)))
+ if (!pc->can_talk(sd))
return false;
if (!homun_alive(sd->hd)) {
@@ -7334,9 +7344,7 @@ ACMD(me)
memset(tempmes, '\0', sizeof(tempmes));
memset(atcmd_output, '\0', sizeof(atcmd_output));
- if (sd->sc.count && //no "chatting" while muted.
- (sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT)))
+ if (!pc->can_talk(sd))
return false;
if (!*message || sscanf(message, "%199[^\n]", tempmes) < 0) {
@@ -9796,7 +9804,7 @@ bool atcommand_exec(const int fd, struct map_session_data *sd, const char *messa
return false;
//Block NOCHAT but do not display it as a normal message
- if ( sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCOMMAND )
+ if (pc_ismuted(&sd->sc, MANNER_NOCOMMAND))
return true;
// skip 10/11-langtype's codepage indicator, if detected
diff --git a/src/map/atcommand.h b/src/map/atcommand.h
index 6c8dbf9ef..5c4acdf01 100644
--- a/src/map/atcommand.h
+++ b/src/map/atcommand.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_ATCOMMAND_H
#define MAP_ATCOMMAND_H
diff --git a/src/map/battle.c b/src/map/battle.c
index 7fbbcd0d5..c28aef820 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, HMAP_ZONE_DAMAGE_CAP_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, RE_LVL_DMOD(), RE_LVL_MDMOD(), RE_LVL_TMDMOD(), RE_SKILL_REDUCTION(), SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, STATS_OPT_OUT
@@ -3044,18 +3060,30 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
// Compressed code, fixed by map.h [Epoque]
if (src->type == BL_MOB) {
int i;
- if (sc->data[SC_MANU_DEF])
- for (i=0;ARRAYLENGTH(mob->manuk)>i;i++)
- if (mob->manuk[i]==((TBL_MOB*)src)->class_) {
+ if (sc->data[SC_MANU_DEF] != NULL) {
+ for (i = 0; i < ARRAYLENGTH(mob->manuk); i++) {
+ if (mob->manuk[i] == ((TBL_MOB*)src)->class_) {
damage -= damage * sc->data[SC_MANU_DEF]->val1 / 100;
break;
}
- if (sc->data[SC_SPL_DEF])
- for (i=0;ARRAYLENGTH(mob->splendide)>i;i++)
- if (mob->splendide[i]==((TBL_MOB*)src)->class_) {
+ }
+ }
+ if (sc->data[SC_SPL_DEF] != NULL) {
+ for (i = 0; i < ARRAYLENGTH(mob->splendide); i++) {
+ if (mob->splendide[i] == ((TBL_MOB*)src)->class_) {
damage -= damage * sc->data[SC_SPL_DEF]->val1 / 100;
break;
}
+ }
+ }
+ if (sc->data[SC_MORA_BUFF] != NULL) {
+ for (i = 0; i < ARRAYLENGTH(mob->mora); i++) {
+ if (mob->mora[i] == ((TBL_MOB*)src)->class_) {
+ damage -= damage * sc->data[SC_MORA_BUFF]->val1 / 100;
+ break;
+ }
+ }
+ }
}
if((sce=sc->data[SC_ARMOR]) && //NPC_DEFENDER
@@ -5805,6 +5833,17 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st
delay += 100;/* gradual increase so the numbers don't clip in the client */
}
+ if (sc->data[SC_MVPCARD_ORCLORD]) {
+ NORMALIZE_RDAMAGE(damage * sc->data[SC_MVPCARD_ORCLORD]->val1 / 100);
+
+ rdelay = clif->delay_damage(tick + delay, src, src, status_get_amotion(src), status_get_dmotion(src), rdamage, 1, BDT_ENDURE);
+
+ if (tsd)
+ battle->drain(tsd, src, rdamage, rdamage, status_get_race(src), 0);
+ battle->delay_damage(tick, wd->amotion, target, src, 0, CR_REFLECTSHIELD, 0, rdamage, ATK_DEF, rdelay, true);
+
+ delay += 100;
+ }
}
if( ( ssc = status->get_sc(src) ) ) {
if( ssc->data[SC_INSPIRATION] ) {
@@ -7329,15 +7368,23 @@ int battle_set_value(const char* w1, const char* w2)
return 1;
}
-int battle_get_value(const char* w1)
+bool battle_get_value(const char *w1, int *value)
{
int i;
- nullpo_retr(1, w1);
+
+ nullpo_retr(false, w1);
+ nullpo_retr(false, value);
+
ARR_FIND(0, ARRAYLENGTH(battle_data), i, strcmpi(w1, battle_data[i].str) == 0);
- if (i == ARRAYLENGTH(battle_data))
- return 0; // not found
- else
- return *battle_data[i].val;
+ if (i == ARRAYLENGTH(battle_data)) {
+ if (HPM->getBattleConf(w1,value))
+ return true;
+ } else {
+ *value = *battle_data[i].val;
+ return true;
+ }
+
+ return false;
}
void battle_set_defaults(void) {
diff --git a/src/map/battle.h b/src/map/battle.h
index 68a427e72..ad59efedd 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_BATTLE_H
#define MAP_BATTLE_H
@@ -630,8 +646,8 @@ struct battle_interface {
/* - battle_config */
int (*config_read) (const char *cfgName);
void (*config_set_defaults) (void);
- int (*config_set_value) (const char* w1, const char* w2);
- int (*config_get_value) (const char* w1);
+ int (*config_set_value) (const char *w1, const char *w2);
+ bool (*config_get_value) (const char *w1, int *value);
void (*config_adjust) (void);
/* ----------------------------------------- */
/* picks a random enemy within the specified range */
diff --git a/src/map/battleground.c b/src/map/battleground.c
index 208b4b99f..b2d6f0faf 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "battleground.h"
diff --git a/src/map/battleground.h b/src/map/battleground.h
index dcf92d6d8..639d91635 100644
--- a/src/map/battleground.h
+++ b/src/map/battleground.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_BATTLEGROUND_H
#define MAP_BATTLEGROUND_H
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index 67018ec1f..3828a3c14 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "buyingstore.h" // struct s_buyingstore
@@ -35,7 +51,7 @@ bool buyingstore_setup(struct map_session_data* sd, unsigned char slots)
return false;
}
- if( sd->sc.data[SC_NOCHAT] && (sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM) )
+ if(pc_ismuted(&sd->sc, MANNER_NOROOM))
{// custom: mute limitation
return false;
}
@@ -89,7 +105,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha
return;
}
- if( sd->sc.data[SC_NOCHAT] && (sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM) )
+ if(pc_ismuted(&sd->sc, MANNER_NOROOM))
{// custom: mute limitation
return;
}
diff --git a/src/map/buyingstore.h b/src/map/buyingstore.h
index 74f61239f..1e277b7fa 100644
--- a/src/map/buyingstore.h
+++ b/src/map/buyingstore.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_BUYINGSTORE_H
#define MAP_BUYINGSTORE_H
diff --git a/src/map/channel.c b/src/map/channel.c
index 023d22c06..d778b355d 100644
--- a/src/map/channel.c
+++ b/src/map/channel.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "channel.h"
diff --git a/src/map/channel.h b/src/map/channel.h
index 391045c59..ac1c8f0cb 100644
--- a/src/map/channel.h
+++ b/src/map/channel.h
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_CHANNEL_H
#define MAP_CHANNEL_H
diff --git a/src/map/chat.c b/src/map/chat.c
index aaf34a6f9..45d4ea0cc 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "chat.h"
diff --git a/src/map/chat.h b/src/map/chat.h
index 68f9107f3..603d8441f 100644
--- a/src/map/chat.h
+++ b/src/map/chat.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_CHAT_H
#define MAP_CHAT_H
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 62ef52dbd..e9227db73 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // AUTOTRADE_PERSISTENCY, STATS_OPT_OUT
diff --git a/src/map/chrif.h b/src/map/chrif.h
index 25f69a309..d57d4d42c 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_CHRIF_H
#define MAP_CHRIF_H
diff --git a/src/map/clif.c b/src/map/clif.c
index f79b15171..6fb7dd04e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // ANTI_MAYAP_CHEAT, RENEWAL, SECURE_NPCTIMEOUT
@@ -10219,7 +10235,7 @@ void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
sd->sc.data[SC_TRICKDEAD] ||
sd->sc.data[SC_BLADESTOP] ||
sd->sc.data[SC_CLOAKINGEXCEED] ||
- (sd->sc.data[SC_NOCHAT] &&sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
+ pc_ismuted(&sd->sc, MANNER_NOITEM)
) )
break;
@@ -10255,7 +10271,7 @@ void clif_parse_DropItem(int fd, struct map_session_data *sd)
if (sd->sc.count && (
sd->sc.data[SC_AUTOCOUNTER] ||
sd->sc.data[SC_BLADESTOP] ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
+ pc_ismuted(&sd->sc, MANNER_NOITEM)
))
break;
@@ -10514,7 +10530,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
char s_password[CHATROOM_PASS_SIZE];
char s_title[CHATROOM_TITLE_SIZE];
- if (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM)
+ if (pc_ismuted(&sd->sc, MANNER_NOROOM))
return;
if(battle_config.basic_skill_check && pc->checkskill(sd,NV_BASIC) < 4) {
clif->skill_fail(sd,1,USESKILL_FAIL_LEVEL,3);
@@ -11800,7 +11816,7 @@ void clif_parse_PartyMessage(int fd, struct map_session_data* sd)
if( atcommand->exec(fd, sd, message, true) )
return;
- if( sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ if( !pc->can_talk(sd) )
return;
if (battle_config.min_chat_delay) {
@@ -12512,7 +12528,7 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
if( !flag )
sd->state.prevend = sd->state.workinprogress = 0;
- if( sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOROOM )
+ if(pc_ismuted(&sd->sc, MANNER_NOROOM))
return;
if( map->list[sd->bl.m].flag.novending ) {
clif->message (sd->fd, msg_sd(sd,276)); // "You can't open a shop on this map"
@@ -12904,7 +12920,7 @@ void clif_parse_GuildMessage(int fd, struct map_session_data* sd)
if( atcommand->exec(fd, sd, message, true) )
return;
- if( sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ if( !pc->can_talk(sd) )
return;
if (battle_config.min_chat_delay) {
@@ -16000,7 +16016,7 @@ void clif_parse_BattleChat(int fd, struct map_session_data* sd)
if( atcommand->exec(fd, sd, message, true) )
return;
- if( sd->sc.data[SC_BERSERK] || (sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) || (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ if( !pc->can_talk(sd) )
return;
if( battle_config.min_chat_delay ) {
diff --git a/src/map/clif.h b/src/map/clif.h
index 40610b7c1..cbf34d0d0 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_CLIF_H
#define MAP_CLIF_H
diff --git a/src/map/date.c b/src/map/date.c
index e2ad2b179..5579962bf 100644
--- a/src/map/date.c
+++ b/src/map/date.c
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "date.h"
diff --git a/src/map/date.h b/src/map/date.h
index e7d06f29d..831539e3c 100644
--- a/src/map/date.h
+++ b/src/map/date.h
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_DATE_H
#define MAP_DATE_H
diff --git a/src/map/duel.c b/src/map/duel.c
index e18e2fc45..8f309abe4 100644
--- a/src/map/duel.c
+++ b/src/map/duel.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "duel.h"
diff --git a/src/map/duel.h b/src/map/duel.h
index c77f1c351..60b5b09ab 100644
--- a/src/map/duel.h
+++ b/src/map/duel.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_DUEL_H
#define MAP_DUEL_H
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 226b6e443..36dee32ba 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "elemental.h"
diff --git a/src/map/elemental.h b/src/map/elemental.h
index d040f8337..1618c0d15 100644
--- a/src/map/elemental.h
+++ b/src/map/elemental.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_ELEMENTAL_H
#define MAP_ELEMENTAL_H
diff --git a/src/map/guild.c b/src/map/guild.c
index 5776db4bc..10511067a 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // GP_BOUND_ITEMS
@@ -1081,7 +1097,7 @@ int guild_change_memberposition(int guild_id,int account_id,int char_id,short id
int guild_memberposition_changed(struct guild *g,int idx,int pos)
{
nullpo_ret(g);
- Assert_ret(idx > 0 && idx < MAX_GUILD);
+ Assert_ret(idx >= 0 && idx < MAX_GUILD);
g->member[idx].position=pos;
clif->guild_memberpositionchanged(g,idx);
@@ -1115,7 +1131,7 @@ int guild_position_changed(int guild_id,int idx,struct guild_position *p)
struct guild *g=guild->search(guild_id);
int i;
nullpo_ret(p);
- Assert_ret(idx > 0 && idx < MAX_GUILD);
+ Assert_ret(idx >= 0 && idx < MAX_GUILD);
if(g==NULL)
return 0;
memcpy(&g->position[idx],p,sizeof(struct guild_position));
diff --git a/src/map/guild.h b/src/map/guild.h
index a11585fbc..4b6e860d8 100644
--- a/src/map/guild.h
+++ b/src/map/guild.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_GUILD_H
#define MAP_GUILD_H
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 8d529ea01..2e74800a3 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // DBPATH
diff --git a/src/map/homunculus.h b/src/map/homunculus.h
index 9d23fbe2c..9582c875c 100644
--- a/src/map/homunculus.h
+++ b/src/map/homunculus.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_HOMUNCULUS_H
#define MAP_HOMUNCULUS_H
diff --git a/src/map/instance.c b/src/map/instance.c
index 1649c751e..ff6f8bdab 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CELL_NOSTACK
diff --git a/src/map/instance.h b/src/map/instance.h
index 058cd2c3d..2019b1a42 100644
--- a/src/map/instance.h
+++ b/src/map/instance.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_INSTANCE_H
#define MAP_INSTANCE_H
diff --git a/src/map/intif.c b/src/map/intif.c
index 9fe82302f..06b910d54 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // GP_BOUND_ITEMS
diff --git a/src/map/intif.h b/src/map/intif.h
index 369ac1d9b..0bcaae941 100644
--- a/src/map/intif.h
+++ b/src/map/intif.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_INTIF_H
#define MAP_INTIF_H
diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c
index fd9107c00..3d8ec8b5d 100644
--- a/src/map/irc-bot.c
+++ b/src/map/irc-bot.c
@@ -1,7 +1,26 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Base Author: shennetsind @ http://herc.ws
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+/**
+ * Base Author: shennetsind @ http://herc.ws
+ */
#define HERCULES_CORE
#include "irc-bot.h"
diff --git a/src/map/irc-bot.h b/src/map/irc-bot.h
index a85fc46e8..dc67e2fe8 100644
--- a/src/map/irc-bot.h
+++ b/src/map/irc-bot.h
@@ -1,8 +1,26 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Base Author: shennetsind @ http://herc.ws
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+/**
+ * Base Author: shennetsind @ http://herc.ws
+ */
#ifndef MAP_IRC_BOT_H
#define MAP_IRC_BOT_H
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 34db4b796..54458d248 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // DBPATH, RENEWAL
diff --git a/src/map/itemdb.h b/src/map/itemdb.h
index 7b35e1ae1..c804e4b4f 100644
--- a/src/map/itemdb.h
+++ b/src/map/itemdb.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_ITEMDB_H
#define MAP_ITEMDB_H
@@ -122,7 +138,7 @@ enum item_itemid {
ITEMID_NOBLE_NAMEPLATE = 12705,
ITEMID_DUN_TELE_SCROLL1 = 14527,
ITEMID_BATTLE_MANUAL25 = 14532,
- ITEMIDBATTLE_MANUAL100 = 14533,
+ ITEMID_BATTLE_MANUAL100 = 14533,
ITEMID_BATTLE_MANUAL_X3 = 14545,
ITEMID_DUN_TELE_SCROLL2 = 14581,
ITEMID_WOB_RUNE = 14582,
diff --git a/src/map/log.c b/src/map/log.c
index 70f5dfc9a..942acb706 100644
--- a/src/map/log.c
+++ b/src/map/log.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "log.h"
diff --git a/src/map/log.h b/src/map/log.h
index 4b2b5d4d6..fbd0acc0e 100644
--- a/src/map/log.h
+++ b/src/map/log.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_LOG_H
#define MAP_LOG_H
diff --git a/src/map/mail.c b/src/map/mail.c
index 8abeed285..e446a10d2 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "mail.h"
diff --git a/src/map/mail.h b/src/map/mail.h
index 128b1fbaa..94100e608 100644
--- a/src/map/mail.h
+++ b/src/map/mail.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_MAIL_H
#define MAP_MAIL_H
diff --git a/src/map/map.c b/src/map/map.c
index e1bf5232a..dcbc3f6f5 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CELL_NOSTACK, CIRCULAR_AREA, CONSOLE_INPUT, DBPATH, RENEWAL
@@ -3911,8 +3927,9 @@ struct map_zone_data *map_merge_zone(struct map_zone_data *main, struct map_zone
return zone;
}
-void map_zone_change2(int m, struct map_zone_data *zone) {
- char empty[1] = "\0";
+void map_zone_change2(int m, struct map_zone_data *zone)
+{
+ const char *empty = "";
if( map->list[m].zone == zone )
return;
@@ -3938,10 +3955,11 @@ void map_zone_change(int m, struct map_zone_data *zone, const char* start, const
map->zone_apply(m,zone,start,buffer,filepath);
}
/* removes previous mapflags from this map */
-void map_zone_remove(int m) {
+void map_zone_remove(int m)
+{
char flag[MAP_ZONE_MAPFLAG_LENGTH], params[MAP_ZONE_MAPFLAG_LENGTH];
unsigned short k;
- char empty[1] = "\0";
+ const char *empty = "";
for(k = 0; k < map->list[m].zone_mf_count; k++) {
size_t len = strlen(map->list[m].zone_mf[k]),j;
params[0] = '\0';
@@ -4665,9 +4683,10 @@ bool map_zone_mf_cache(int m, char *flag, char *params) {
return false;
}
-void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const char* buffer, const char* filepath) {
+void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const char* buffer, const char* filepath)
+{
int i;
- char empty[1] = "\0";
+ const char *empty = "";
char flag[MAP_ZONE_MAPFLAG_LENGTH], params[MAP_ZONE_MAPFLAG_LENGTH];
map->list[m].zone = zone;
for(i = 0; i < zone->mapflags_count; i++) {
@@ -4690,10 +4709,11 @@ void map_zone_apply(int m, struct map_zone_data *zone, const char* start, const
}
}
/* used on npc load and reload to apply all "Normal" and "PK Mode" zones */
-void map_zone_init(void) {
+void map_zone_init(void)
+{
char flag[MAP_ZONE_MAPFLAG_LENGTH], params[MAP_ZONE_MAPFLAG_LENGTH];
struct map_zone_data *zone;
- char empty[1] = "\0";
+ const char *empty = "";
int i,k,j;
zone = &map->zone_all;
@@ -5955,6 +5975,8 @@ int do_init(int argc, char *argv[])
#ifdef CONSOLE_INPUT
console->input->setSQL(map->mysql_handle);
+ if (!minimal && core->runflag != CORE_ST_STOP)
+ console->display_gplnotice();
#endif
ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map->port);
diff --git a/src/map/map.h b/src/map/map.h
index 8f0bbca39..84af04f77 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_MAP_H
#define MAP_MAP_H
@@ -467,7 +483,7 @@ enum status_point_types {
SP_SKILL_COOLDOWN,SP_SKILL_FIXEDCAST, SP_SKILL_VARIABLECAST, SP_FIXCASTRATE, SP_VARCASTRATE, //2050-2054
SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST, //2055-2058
SP_SET_DEF_RACE,SP_SET_MDEF_RACE, //2059-2060
- SP_RACE_TOLERANCE, //2061
+ SP_RACE_TOLERANCE,SP_ADDMAXWEIGHT, //2061-2062
/* must be the last, plugins add bonuses from this value onwards */
SP_LAST_KNOWN,
diff --git a/src/map/mapreg.h b/src/map/mapreg.h
index 09d051bab..dfe1dfb2d 100644
--- a/src/map/mapreg.h
+++ b/src/map/mapreg.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_MAPREG_H
#define MAP_MAPREG_H
diff --git a/src/map/mapreg_sql.c b/src/map/mapreg_sql.c
index 93ac52f33..ddd259651 100644
--- a/src/map/mapreg_sql.c
+++ b/src/map/mapreg_sql.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "mapreg.h"
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 59a6f7a44..4e3c8508d 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "mercenary.h"
diff --git a/src/map/mercenary.h b/src/map/mercenary.h
index 9e0c59428..05adc1fce 100644
--- a/src/map/mercenary.h
+++ b/src/map/mercenary.h
@@ -1,6 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_MERCENARY_H
#define MAP_MERCENARY_H
diff --git a/src/map/mob.c b/src/map/mob.c
index d9a3f6776..0d6055b13 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // AUTOLOOT_DISTANCE, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, RENEWAL_DROP, RENEWAL_EXP
@@ -2351,7 +2367,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) {
// Increase drop rate if user has SC_CASH_RECEIVEITEM
if (sd && sd->sc.data[SC_CASH_RECEIVEITEM]) // now rig the drop rate to never be over 90% unless it is originally >90%.
- drop_rate = max(drop_rate,cap_value((int)(0.5+drop_rate*(sd->sc.data[SC_CASH_RECEIVEITEM]->val1)/100.),0,9000));
+ drop_rate = max(drop_rate, cap_value((int)(0.5 + drop_rate * (sd->sc.data[SC_CASH_RECEIVEITEM]->val1) / 100.), 0, 9000));
+ if (sd && sd->sc.data[SC_OVERLAPEXPUP])
+ drop_rate = max(drop_rate, cap_value((int)(0.5 + drop_rate * (sd->sc.data[SC_OVERLAPEXPUP]->val2) / 100.), 0, 9000));
#ifdef RENEWAL_DROP
if( drop_modifier != 100 ) {
drop_rate = drop_rate * drop_modifier / 100;
@@ -4979,9 +4997,10 @@ int do_final_mob(void)
}
void mob_defaults(void) {
- //Defines the Manuk/Splendide mob groups for the status reductions [Epoque]
+ // Defines the Manuk/Splendide/Mora mob groups for the status reductions [Epoque & Frost]
const int mob_manuk[8] = { 1986, 1987, 1988, 1989, 1990, 1997, 1998, 1999 };
const int mob_splendide[5] = { 1991, 1992, 1993, 1994, 1995 };
+ const int mob_mora[5] = { 2137, 2136, 2134, 2133, 2132 };
mob = &mob_s;
@@ -4991,6 +5010,8 @@ void mob_defaults(void) {
memcpy(mob->manuk, mob_manuk, sizeof(mob->manuk));
memcpy(mob->splendide, mob_splendide, sizeof(mob->splendide));
+ memcpy(mob->mora, mob_mora, sizeof(mob->mora));
+
/* */
mob->reload = mob_reload;
mob->init = do_init_mob;
diff --git a/src/map/mob.h b/src/map/mob.h
index f7e071261..6267c0e8c 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_MOB_H
#define MAP_MOB_H
@@ -272,14 +288,15 @@ struct item_drop_list {
#define mob_is_treasure(md) (((md)->class_ >= MOBID_TREAS01 && (md)->class_ <= MOBID_TREAS40) || ((md)->class_ >= MOBID_TREAS41 && (md)->class_ <= MOBID_TREAS49))
struct mob_interface {
- //Dynamic mob database, allows saving of memory when there's big gaps in the mob_db [Skotlex]
- struct mob_db *db_data[MAX_MOB_DB+1];
+ // Dynamic mob database, allows saving of memory when there's big gaps in the mob_db [Skotlex]
+ struct mob_db *db_data[MAX_MOB_DB + 1];
struct mob_db *dummy; //Dummy mob to be returned when a non-existant one is requested.
- //Dynamic mob chat database
- struct mob_chat *chat_db[MAX_MOB_CHAT+1];
- //Defines the Manuk/Splendide mob groups for the status reductions [Epoque]
+ // Dynamic mob chat database
+ struct mob_chat *chat_db[MAX_MOB_CHAT + 1];
+ // Defines the Manuk/Splendide/Mora mob groups for the status reductions [Epoque & Frost]
int manuk[8];
int splendide[5];
+ int mora[5];
/* */
int (*init) (bool mimimal);
int (*final) (void);
diff --git a/src/map/npc.c b/src/map/npc.c
index 3bd14bf41..82365efba 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // NPC_SECURE_TIMEOUT_INPUT, NPC_SECURE_TIMEOUT_MENU, NPC_SECURE_TIMEOUT_NEXT, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL
@@ -293,7 +309,6 @@ int npc_rr_secure_timeout_timer(int tid, int64 tick, int id, intptr_t data) {
sd->st->state = END;
sd->state.menu_or_input = 0;
sd->npc_menu = 0;
- clif->scriptmes(sd, sd->npc_id, " ");
/**
* This guy's been idle for longer than allowed, close him.
**/
@@ -2630,8 +2645,25 @@ struct npc_data* npc_add_warp(char* name, short from_mapid, short from_x, short
return nd;
}
-/// Parses a warp npc.
-const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+/**
+ * Parses a warp NPC.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_warp(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
int x, y, xs, ys, to_x, to_y, m;
unsigned short i;
char mapname[32], to_mapname[32];
@@ -2678,11 +2710,24 @@ const char* npc_parse_warp(char* w1, char* w2, char* w3, char* w4, const char* s
}
/**
- * Parses a SHOP/CASHSHOP npc
- * @param retval Pointer to the status, used to know whether there was an error or not, if so it will be EXIT_FAILURE
- * @retval Parsing position (currently only '\n')
- **/
-const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+ * Parses a SHOP/CASHSHOP NPC.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_shop(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
//TODO: could be rewritten to NOT need this temp array [ultramage]
// We could use nd->u.shop.shop_item to store directly the items, but this could lead
// to unecessary memory usage by the server, using a temp dynamic array is the
@@ -2892,12 +2937,38 @@ const char* npc_skip_script(const char* start, const char* buffer, const char* f
return p+1;// return after the last '}'
}
-/// Parses a npc script.
-///
-/// -%TAB%script%TAB%<NPC Name>%TAB%-1,{<code>}
-/// <map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,{<code>}
-/// <map name>,<x>,<y>,<facing>%TAB%script%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>,{<code>}
-const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval)
+/**
+ * Parses a NPC script.
+ *
+ * Example:
+ * @code
+ * -<TAB>script<TAB><NPC Name><TAB>-1,{
+ * <code>
+ * }
+ * <map name>,<x>,<y>,<facing><TAB>script<TAB><NPC Name><TAB><sprite id>,{
+ * <code>
+ * }
+ * <map name>,<x>,<y>,<facing><TAB>script<TAB><NPC Name><TAB><sprite id>,<triggerX>,<triggerY>,{
+ * <code>
+ * }
+ * @endcode
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[in] options NPC parse/load options (@see enum npc_parse_options).
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_script(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval)
{
int x, y, dir = 0, m, xs = 0, ys = 0; // [Valaris] thanks to fov
struct script_code *scriptroot;
@@ -3151,14 +3222,43 @@ bool npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int xs,
return false;
}
-/// Duplicate a warp, shop, cashshop or script. [Orcao]
-/// warp: <map name>,<x>,<y>,<facing>%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<spanx>,<spany>
-/// shop/cashshop/npc: -%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>
-/// shop/cashshop/npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>
-/// npc: -%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>
-/// npc: <map name>,<x>,<y>,<facing>%TAB%duplicate(<name of target>)%TAB%<NPC Name>%TAB%<sprite id>,<triggerX>,<triggerY>
-/// !!Only NPO_ONINIT is available trough options!!
-const char* npc_parse_duplicate(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval) {
+/**
+ * Parses a duplicate warp, shop, cashshop or script NPC. [Orcao]
+ *
+ * Example:
+ * @code
+ * warp:
+ * <map name>,<x>,<y>,<facing><TAB>duplicate(<name of target>)<TAB><NPC Name><TAB><spanx>,<spany>
+ * shop/cashshop/npc:
+ * -<TAB>duplicate(<name of target>)<TAB><NPC Name><TAB><sprite id>
+ * shop/cashshop/npc:
+ * <map name>,<x>,<y>,<facing><TAB>duplicate(<name of target>)<TAB><NPC Name><TAB><sprite id>
+ * npc:
+ * -<TAB>duplicate(<name of target>)<TAB><NPC Name><TAB><sprite id>,<triggerX>,<triggerY>
+ * npc:
+ * <map name>,<x>,<y>,<facing><TAB>duplicate(<name of target>)<TAB><NPC Name><TAB><sprite id>,<triggerX>,<triggerY>
+ * @endcode
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[in] options NPC parse/load options (@see enum npc_parse_options).
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ *
+ * @remark
+ * Only `NPO_ONINIT` is available trough the options argument.
+ */
+const char *npc_parse_duplicate(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval)
+{
int x, y, dir, m, xs = -1, ys = -1;
char srcname[128];
const char *end;
@@ -3477,9 +3577,32 @@ int npc_do_atcmd_event(struct map_session_data* sd, const char* command, const c
return 0;
}
-/// Parses a function.
-/// function%TAB%script%TAB%<function name>%TAB%{<code>}
-const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+/**
+ * Parses a function.
+ *
+ * Example:
+ * @code
+ * function<TAB>script<TAB><function name><TAB>{
+ * <code>
+ * }
+ * @endcode
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_function(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
DBMap* func_db;
DBData old_data;
struct script_code *scriptroot;
@@ -3537,7 +3660,25 @@ void npc_parse_mob2(struct spawn_data* mobspawn)
}
}
-const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+/**
+ * Parses a mob permanent spawn.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_mob(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
int num, class_, m,x,y,xs,ys, i,j;
int mob_lv = -1, ai = -1, size = -1;
char mapname[32], mobname[NAME_LENGTH];
@@ -3705,19 +3846,47 @@ const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const char* st
return strchr(start,'\n');// continue
}
-void npc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char* start, const char* buffer, const char* filepath, int *retval)
+/**
+ * Parses an unknown mapflag.
+ *
+ * The purpose of this function is to be an override or hooking point for plugins.
+ *
+ * @see npc_parse_mapflag
+ */
+void npc_parse_unknown_mapflag(const char *name, const char *w3, const char *w4, const char* start, const char* buffer, const char* filepath, int *retval)
{
ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.\n", w3, filepath, strline(buffer,start-buffer));
if (retval)
*retval = EXIT_FAILURE;
}
-/*==========================================
- * Set or disable mapflag on map
- * eg : bat_c01<TAB>mapflag<TAB>battleground<TAB>2
- * also chking if mapflag conflict with another
- *------------------------------------------*/
-const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int *retval) {
+/**
+ * Parses a mapflag and sets or disables it on a map.
+ *
+ * @remark
+ * This also checks if the mapflag conflicts with another.
+ *
+ * Example:
+ * @code
+ * bat_c01<TAB>mapflag<TAB>battleground<TAB>2
+ * @endcode
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
+{
int16 m;
char mapname[32];
int state = 1;
@@ -4125,7 +4294,24 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char
return strchr(start,'\n');// continue
}
-const char* npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char* start, const char* buffer, const char* filepath, int *retval)
+/**
+ * Parses an unknown NPC object. This function may be used as override or hooking point by plugins.
+ *
+ * @param[in] w1 First tab-delimited part of the string to parse.
+ * @param[in] w2 Second tab-delimited part of the string to parse.
+ * @param[in] w3 Third tab-delimited part of the string to parse.
+ * @param[in] w4 Fourth tab-delimited part of the string to parse.
+ * @param[in] start Pointer to the beginning of the string inside buffer.
+ * This must point to the same buffer as `buffer`.
+ * @param[in] buffer Pointer to the buffer containing the script. For
+ * single-line mapflags not inside a script, this may be
+ * an empty (but initialized) single-character buffer.
+ * @param[in] filepath Source file path.
+ * @param[out] retval Pointer to return the success (EXIT_SUCCESS) or failure
+ * (EXIT_FAILURE) status. May be NULL.
+ * @return A pointer to the advanced buffer position.
+ */
+const char *npc_parse_unknown_object(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval)
{
ShowError("npc_parsesrcfile: Unable to parse, probably a missing or extra TAB in file '%s', line '%d'. Skipping line...\n * w1=%s\n * w2=%s\n * w3=%s\n * w4=%s\n", filepath, strline(buffer,start-buffer), w1, w2, w3, w4);
start = strchr(start,'\n');// skip and continue
diff --git a/src/map/npc.h b/src/map/npc.h
index d5e4618a1..6f288d722 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_NPC_H
#define MAP_NPC_H
@@ -234,18 +250,18 @@ struct npc_interface {
bool (*viewisid) (const char *viewid);
struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
- const char* (*parse_warp) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
- const char* (*parse_shop) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
- const char* (*parse_unknown_object) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_warp) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_shop) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_unknown_object) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*convertlabel_db) (struct npc_label_list *label_list, const char *filepath);
const char* (*skip_script) (const char *start, const char *buffer, const char *filepath, int *retval);
- const char* (*parse_script) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval);
+ const char *(*parse_script) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval);
void (*add_to_location) (struct npc_data *nd);
bool (*duplicate_script_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
bool (*duplicate_shop_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
bool (*duplicate_warp_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
bool (*duplicate_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
- const char* (*parse_duplicate) (char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval);
+ const char *(*parse_duplicate) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval);
int (*duplicate4instance) (struct npc_data *snd, int16 m);
void (*setcells) (struct npc_data *nd);
int (*unsetcells_sub) (struct block_list *bl, va_list ap);
@@ -254,11 +270,11 @@ struct npc_interface {
void (*setdisplayname) (struct npc_data *nd, const char *newname);
void (*setclass) (struct npc_data *nd, short class_);
int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname);
- const char* (*parse_function) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_function) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
void (*parse_mob2) (struct spawn_data *mobspawn);
- const char* (*parse_mob) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
- const char* (*parse_mapflag) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
- void (*parse_unknown_mapflag) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_mob) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char *(*parse_mapflag) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ void (*parse_unknown_mapflag) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
int (*parsesrcfile) (const char *filepath, bool runOnInit);
int (*script_event) (struct map_session_data *sd, enum npce_event type);
void (*read_event_script) (void);
diff --git a/src/map/npc_chat.c b/src/map/npc_chat.c
index edcd755bc..8950df1ee 100644
--- a/src/map/npc_chat.c
+++ b/src/map/npc_chat.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#ifdef PCRE_SUPPORT
diff --git a/src/map/packets.h b/src/map/packets.h
index ffa40ff7c..0efdcb1ec 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1,5 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
//Included directly by clif.h in packet_loaddb()
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 4a3fb6a4f..a9ccc019d 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -1,5 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
/* Hercules Renewal: Phase Two http://herc.ws/board/topic/383-hercules-renewal-phase-two/ */
diff --git a/src/map/party.c b/src/map/party.c
index 3a0b6d518..1b5989f41 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // GP_BOUND_ITEMS, RENEWAL_EXP
diff --git a/src/map/party.h b/src/map/party.h
index bcc905b94..eb3442b92 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_PARTY_H
#define MAP_PARTY_H
diff --git a/src/map/path.c b/src/map/path.c
index 6d9b48837..543497c33 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // CELL_NOSTACK, CIRCULAR_AREA
diff --git a/src/map/path.h b/src/map/path.h
index 14885d566..c84b77eb0 100644
--- a/src/map/path.h
+++ b/src/map/path.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_PATH_H
#define MAP_PATH_H
diff --git a/src/map/pc.c b/src/map/pc.c
index 5ef0075bc..567348d20 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // DBPATH, GP_BOUND_ITEMS, MAX_SPIRITBALL, RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EXP, SECURE_NPCTIMEOUT
@@ -1167,6 +1183,9 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
clif->authfail_fd(sd->fd, 0);
return false;
}
+ } else if (map->getcell(map->mapindex2mapid(sd->status.last_point.map), &sd->bl, sd->status.last_point.x, sd->status.last_point.y, CELL_CHKNOPASS)) {
+ //warp player stuck in invaild cell
+ pc->setpos(sd,sd->status.last_point.map,0,0,CLR_OUTSIGHT);
}
clif->authok(sd);
@@ -2842,6 +2861,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val) {
if (sd->state.lr_flag != 2)
pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, map->race_id2mask(RC_ALL), 10000);
break;
+ case SP_ADDMAXWEIGHT:
+ if (sd->state.lr_flag != 2)
+ sd->max_weight += val;
+ break;
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
break;
@@ -3603,13 +3626,13 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
break;
case SP_ADD_MONSTER_DROP_CHAINITEM:
{
- uint32 race_mask = map->race_id2mask(type2);
+ uint32 race_mask = map->race_id2mask(val);
if (race_mask == RCMASK_NONE) {
- ShowWarning("pc_bonus2: SP_ADD_MONSTER_DROP_CHAINITEM: Invalid Race (%d)\n", type2);
+ ShowWarning("pc_bonus2: SP_ADD_MONSTER_DROP_CHAINITEM: Invalid Race (%d)\n", val);
break;
}
if (sd->state.lr_flag != 2)
- pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, val, race_mask, 10000);
+ pc->bonus_item_drop(sd->add_drop, ARRAYLENGTH(sd->add_drop), 0, type2, race_mask, 10000);
}
break;
#ifdef RENEWAL
@@ -3642,7 +3665,7 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
switch(type){
case SP_ADD_MONSTER_DROP_ITEM:
{
- uint32 race_mask = map->race_id2mask(type2);
+ uint32 race_mask = map->race_id2mask(type3);
if (race_mask == RCMASK_NONE) {
ShowWarning("pc_bonus2: SP_ADD_MONSTER_DROP_ITEM: Invalid Race (%d)\n", type3);
break;
@@ -4711,7 +4734,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
case ITEMID_THICK_MANUAL50:
case ITEMID_NOBLE_NAMEPLATE:
case ITEMID_BATTLE_MANUAL25:
- case ITEMIDBATTLE_MANUAL100:
+ case ITEMID_BATTLE_MANUAL100:
case ITEMID_BATTLE_MANUAL_X3:
if( sd->sc.data[SC_CASH_PLUSEXP] )
return 0;
@@ -4861,7 +4884,7 @@ int pc_useitem(struct map_session_data *sd,int n) {
sd->sc.data[SC_DEEP_SLEEP] ||
sd->sc.data[SC_SATURDAY_NIGHT_FEVER] ||
sd->sc.data[SC_COLD] ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
+ pc_ismuted(&sd->sc, MANNER_NOITEM)
))
return 0;
@@ -6553,6 +6576,8 @@ void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsigned in
if (sd->sc.data[SC_CASH_PLUSEXP])
bonus += sd->sc.data[SC_CASH_PLUSEXP]->val1;
+ if (sd->sc.data[SC_OVERLAPEXPUP])
+ bonus += sd->sc.data[SC_OVERLAPEXPUP]->val1;
*base_exp = (unsigned int) cap_value(*base_exp + (double)*base_exp * bonus/100., 1, UINT_MAX);
@@ -8850,7 +8875,7 @@ bool pc_can_talk( struct map_session_data *sd ) {
if( sd->sc.data[SC_BERSERK] ||
(sd->sc.data[SC_DEEP_SLEEP] && sd->sc.data[SC_DEEP_SLEEP]->val2) ||
- (sd->sc.data[SC_NOCHAT] && sd->sc.data[SC_NOCHAT]->val1&MANNER_NOCHAT) )
+ pc_ismuted(&sd->sc, MANNER_NOCHAT) )
return false;
return true;
diff --git a/src/map/pc.h b/src/map/pc.h
index ef9983371..93173f6c8 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_PC_H
#define MAP_PC_H
@@ -604,6 +620,7 @@ END_ZEROED_BLOCK;
#define pc_ishiding(sd) ( (sd)->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK) )
#define pc_iscloaking(sd) ( !((sd)->sc.option&OPTION_CHASEWALK) && ((sd)->sc.option&OPTION_CLOAK) )
#define pc_ischasewalk(sd) ( (sd)->sc.option&OPTION_CHASEWALK )
+#define pc_ismuted(sc,type) ( (sc)->data[SC_NOCHAT] && (sc)->data[SC_NOCHAT]->val1&(type) )
#ifdef NEW_CARTS
#define pc_iscarton(sd) ( (sd)->sc.data[SC_PUSH_CART] )
diff --git a/src/map/pc_groups.c b/src/map/pc_groups.c
index f9633571c..675a8b62e 100644
--- a/src/map/pc_groups.c
+++ b/src/map/pc_groups.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "pc_groups.h"
diff --git a/src/map/pc_groups.h b/src/map/pc_groups.h
index 6f92a7955..62704fb12 100644
--- a/src/map/pc_groups.h
+++ b/src/map/pc_groups.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_PC_GROUPS_H
#define MAP_PC_GROUPS_H
diff --git a/src/map/pet.c b/src/map/pet.c
index aed49df63..18a5ba915 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // DBPATH
diff --git a/src/map/pet.h b/src/map/pet.h
index 84df856bf..2442a381f 100644
--- a/src/map/pet.h
+++ b/src/map/pet.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_PET_H
#define MAP_PET_H
diff --git a/src/map/quest.c b/src/map/quest.c
index e4216b18e..9a6200138 100644
--- a/src/map/quest.c
+++ b/src/map/quest.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "quest.h"
diff --git a/src/map/quest.h b/src/map/quest.h
index ccb3e58f9..567f0692a 100644
--- a/src/map/quest.h
+++ b/src/map/quest.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_QUEST_H
#define MAP_QUEST_H
diff --git a/src/map/script.c b/src/map/script.c
index cfc7ed052..401b0308a 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // RENEWAL, RENEWAL_ASPD, RENEWAL_CAST, RENEWAL_DROP, RENEWAL_EDP, RENEWAL_EXP, RENEWAL_LVDMG, SCRIPT_CALLFUNC_CHECK, SECURE_NPCTIMEOUT, SECURE_NPCTIMEOUT_INTERVAL
@@ -11747,9 +11763,9 @@ BUILDIN(setmapflag) {
case MF_NOWARPTO: map->list[m].flag.nowarpto = 1; break;
case MF_NIGHTMAREDROP: map->list[m].flag.pvp_nightmaredrop = 1; break;
case MF_ZONE:
- if( val2 ) {
- char zone[6] = "zone\0";
- char empty[1] = "\0";
+ if (val2 != NULL) {
+ const char *zone = "zone";
+ const char *empty = "";
char params[MAP_ZONE_MAPFLAG_LENGTH];
memcpy(params, val2, MAP_ZONE_MAPFLAG_LENGTH);
npc->parse_mapflag(map->list[m].name, empty, zone, params, empty, empty, empty, NULL);
@@ -14620,8 +14636,19 @@ BUILDIN(setbattleflag)
BUILDIN(getbattleflag)
{
const char *flag;
+ int value;
+
flag = script_getstr(st,2);
- script_pushint(st,battle->config_get_value(flag));
+
+ if (battle->config_get_value(flag, &value)) {
+ script_pushint(st,value);
+ return true;
+ } else {
+ script_pushint(st,0);
+ ShowWarning("buildin_getbattleflag: non-exist battle config requested %s \n", flag);
+ return false;
+ }
+
return true;
}
diff --git a/src/map/script.h b/src/map/script.h
index b153cf81a..c47956eeb 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_SCRIPT_H
#define MAP_SCRIPT_H
@@ -596,7 +612,7 @@ struct script_interface {
FILE *lang_export_fp;
char *lang_export_file;/* for lang_export_fp */
/* set and unset on npc_parse_script */
- char *parser_current_npc_name;
+ const char *parser_current_npc_name;
/* */
int buildin_mes_offset;
int buildin_select_offset;
diff --git a/src/map/searchstore.c b/src/map/searchstore.c
index cdcf51b0e..560063e8b 100644
--- a/src/map/searchstore.c
+++ b/src/map/searchstore.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "searchstore.h" // struct s_search_store_info
diff --git a/src/map/searchstore.h b/src/map/searchstore.h
index 24d7665e0..8edfcd2a8 100644
--- a/src/map/searchstore.h
+++ b/src/map/searchstore.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_SEARCHSTORE_H
#define MAP_SEARCHSTORE_H
diff --git a/src/map/skill.c b/src/map/skill.c
index b20e25eb1..8d97409fb 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // DBPATH, MAGIC_REFLECTION_TYPE, OFFICIAL_WALKPATH, RENEWAL, RENEWAL_CAST, VARCAST_REDUCTION()
@@ -14327,6 +14343,8 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
req.sp -= req.sp * sc->data[SC_TELEKINESIS_INTENSE]->val2 / 100;
if (sc->data[SC_TARGET_ASPD])
req.sp -= req.sp * sc->data[SC_TARGET_ASPD]->val1 / 100;
+ if (sc->data[SC_MVPCARD_MISTRESS])
+ req.sp -= req.sp * sc->data[SC_MVPCARD_MISTRESS]->val1 / 100;
}
req.zeny = skill->dbs->db[idx].zeny[skill_lv-1];
@@ -14406,22 +14424,24 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
if (itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN) {
if (sd->special_state.no_gemstone) {
// All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card [helvetica]
- if( skill_id != SA_ABRACADABRA )
+ if (skill_id != SA_ABRACADABRA)
req.itemid[i] = req.amount[i] = 0;
- else if( --req.amount[i] < 1 )
+ else if (--req.amount[i] < 1)
req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
}
- if(sc && sc->data[SC_INTOABYSS])
- {
- if( skill_id != SA_ABRACADABRA )
+ if (sc && sc->data[SC_INTOABYSS]) {
+ if (skill_id != SA_ABRACADABRA)
req.itemid[i] = req.amount[i] = 0;
- else if( --req.amount[i] < 1 )
+ else if (--req.amount[i] < 1)
req.amount[i] = 1; // Hocus Pocus always use at least 1 gem
}
+ if (sc && sc->data[SC_MVPCARD_MISTRESS]) {
+ req.itemid[i] = req.amount[i] = 0;
+ }
}
- if( skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0){
+ if (skill_id >= HT_SKIDTRAP && skill_id <= HT_TALKIEBOX && pc->checkskill(sd, RA_RESEARCHTRAP) > 0) {
int16 item_index;
- if ((item_index = pc->search_inventory(sd,req.itemid[i])) == INDEX_NOT_FOUND
+ if ((item_index = pc->search_inventory(sd, req.itemid[i])) == INDEX_NOT_FOUND
|| sd->status.inventory[item_index].amount < req.amount[i]
) {
req.itemid[i] = ITEMID_TRAP_ALLOY;
diff --git a/src/map/skill.h b/src/map/skill.h
index b8be9ac8f..96bef090a 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_SKILL_H
#define MAP_SKILL_H
diff --git a/src/map/status.c b/src/map/status.c
index 9062e7227..841f9c855 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // ANTI_MAYAP_CHEAT, DBPATH, DEFTYPE_MAX, DEFTYPE_MIN, DEVOTION_REFLECT_DAMAGE, RENEWAL, RENEWAL_ASPD, RENEWAL_EDP
@@ -803,6 +819,7 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
status->dbs->IconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
status->dbs->IconChangeTable[SC_FOOD_CRITICALSUCCESSVALUE] = SI_FOOD_CRITICALSUCCESSVALUE;
+ status->dbs->IconChangeTable[SC_MORA_BUFF] = SI_MORA_BUFF;
// Cash Items
status->dbs->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
@@ -830,6 +847,7 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_ATKER_ASPD] = SI_ATKER_ASPD;
status->dbs->IconChangeTable[SC_ATKER_MOVESPEED] = SI_ATKER_MOVESPEED;
status->dbs->IconChangeTable[SC_CUP_OF_BOZA] = SI_CUP_OF_BOZA;
+ status->dbs->IconChangeTable[SC_OVERLAPEXPUP] = SI_OVERLAPEXPUP;
// Eden Crystal Synthesis
status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1;
@@ -842,6 +860,12 @@ void initChangeTables(void) {
status->dbs->IconChangeTable[SC_GEFFEN_MAGIC3] = SI_GEFFEN_MAGIC3;
status->dbs->IconChangeTable[SC_FENRIR_CARD] = SI_FENRIR_CARD;
+ // MVP Scrolls
+ status->dbs->IconChangeTable[SC_MVPCARD_TAOGUNKA] = SI_MVPCARD_TAOGUNKA;
+ status->dbs->IconChangeTable[SC_MVPCARD_MISTRESS] = SI_MVPCARD_MISTRESS;
+ status->dbs->IconChangeTable[SC_MVPCARD_ORCHERO] = SI_MVPCARD_ORCHERO;
+ status->dbs->IconChangeTable[SC_MVPCARD_ORCLORD] = SI_MVPCARD_ORCLORD;
+
// Mercenary Bonus Effects
status->dbs->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
status->dbs->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
@@ -990,7 +1014,6 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
- status->dbs->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_TARGET_BLOOD] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_TARGET_ASPD] |= SCB_MAXSP;
status->dbs->ChangeFlagTable[SC_ATKER_ASPD] |= SCB_MAXHP | SCB_ALL;
@@ -1078,6 +1101,12 @@ void initChangeTables(void) {
status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC3] |= SCB_ALL;
status->dbs->ChangeFlagTable[SC_FENRIR_CARD] |= SCB_MATK | SCB_ALL;
+ // MVP Scrolls
+ status->dbs->ChangeFlagTable[SC_MVPCARD_TAOGUNKA] |= SCB_MAXHP | SCB_DEF | SCB_MDEF;
+ status->dbs->ChangeFlagTable[SC_MVPCARD_MISTRESS] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_MVPCARD_ORCHERO] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_MVPCARD_ORCLORD] |= SCB_ALL;
+
// Costume
status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
@@ -1797,7 +1826,7 @@ int status_check_skilluse(struct block_list *src, struct block_list *target, uin
(sc->data[SC_VOLCANO] && skill_id == WZ_ICEWALL) ||
(sc->data[SC_ROKISWEIL] && skill_id != BD_ADAPTATION) ||
(sc->data[SC_HERMODE] && skill->get_inf(skill_id) & INF_SUPPORT_SKILL) ||
- (sc->data[SC_NOCHAT] && sc->data[SC_NOCHAT]->val1&MANNER_NOSKILL)
+ pc_ismuted(sc, MANNER_NOSKILL)
)
return 0;
@@ -2512,12 +2541,6 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
}
}
- if( sc->count && sc->data[SC_ITEMSCRIPT] ) {
- struct item_data *data = itemdb->exists(sc->data[SC_ITEMSCRIPT]->val1);
- if( data && data->script )
- script->run_use_script(sd, data, 0);
- }
-
status->calc_pc_additional(sd, opt);
if( sd->pd ) { // Pet Bonus
@@ -5131,14 +5154,16 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def
def += sc->data[SC_SHIELDSPELL_REF]->val2;
if (sc->data[SC_PRESTIGE])
def += sc->data[SC_PRESTIGE]->val1;
- if (sc->data[SC_VOLCANIC_ASH] && (bl->type==BL_MOB)) {
- if (status_get_race(bl)==RC_PLANT)
+ if (sc->data[SC_VOLCANIC_ASH] && (bl->type == BL_MOB)) {
+ if (status_get_race(bl) == RC_PLANT)
def /= 2;
}
if (sc->data[SC_UNLIMIT])
return 1;
if (sc->data[SC_ARMORSCROLL])
def += sc->data[SC_ARMORSCROLL]->val1;
+ if (sc->data[SC_MVPCARD_TAOGUNKA])
+ def -= sc->data[SC_MVPCARD_TAOGUNKA]->val2;
return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX);
}
@@ -5269,6 +5294,8 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md
return 1;
if (sc->data[SC_FREYJASCROLL])
mdef += sc->data[SC_FREYJASCROLL]->val1;
+ if (sc->data[SC_MVPCARD_TAOGUNKA])
+ mdef -= sc->data[SC_MVPCARD_TAOGUNKA]->val3;
return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX);
}
@@ -5415,7 +5442,7 @@ unsigned short status_calc_speed(struct block_list *bl, struct status_change *sc
if( sc->data[SC_MELON_BOMB] )
val = max( val, sc->data[SC_MELON_BOMB]->val1 );
if (sc->data[SC_STOMACHACHE])
- val = max(val, 50);
+ val = max(val, sc->data[SC_STOMACHACHE]->val2);
if( sc->data[SC_MARSHOFABYSS] ) // It stacks to other statuses so always put this at the end.
val = max( 50, val + 10 * sc->data[SC_MARSHOFABYSS]->val1 );
@@ -5873,6 +5900,8 @@ unsigned int status_calc_maxhp(struct block_list *bl, struct status_change *sc,
maxhp += maxhp * sc->data[SC_SOULSCROLL]->val1 / 100;
if (sc->data[SC_ATKER_ASPD])
maxhp += maxhp * sc->data[SC_ATKER_ASPD]->val1 / 100;
+ if (sc->data[SC_MVPCARD_TAOGUNKA])
+ maxhp += maxhp * sc->data[SC_MVPCARD_TAOGUNKA]->val1 / 100;
return (unsigned int)cap_value(maxhp,1,UINT_MAX);
}
@@ -6736,9 +6765,11 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ
if (sc) {
if (sc->data[SC_SCRESIST])
- sc_def += sc->data[SC_SCRESIST]->val1*100; //Status resist
+ sc_def += sc->data[SC_SCRESIST]->val1 * 100; //Status resist
else if (sc->data[SC_SIEGFRIED])
- sc_def += sc->data[SC_SIEGFRIED]->val3*100; //Status resistance.
+ sc_def += sc->data[SC_SIEGFRIED]->val3 * 100; //Status resistance.
+ if (sc && sc->data[SC_MVPCARD_ORCHERO])
+ sc_def += sc->data[SC_MVPCARD_ORCHERO]->val1 * 100;
}
//When tick def not set, reduction is the same for both.
@@ -8524,6 +8555,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
break;
case SC_CASH_PLUSEXP:
case SC_CASH_PLUSONLYJOBEXP:
+ case SC_OVERLAPEXPUP:
if (val1 < 0)
val1 = 0;
break;
@@ -8580,6 +8612,9 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_SPL_MATK:
val2 = 2; // Splendide group
break;
+ case SC_MORA_BUFF:
+ val2 = 3; // Mora group
+ break;
/**
* General
**/
@@ -9087,7 +9122,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val1 = 15;
break;
case SC_STOMACHACHE:
- val2 = 8; // SP consume.
+ val3 = 8; // SP consume.
val4 = tick / 10000;
tick_time = 10000; // [GodLesZ] tick time
break;
@@ -9374,6 +9409,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_CASH_PLUSONLYJOBEXP:
case SC_MONSTER_TRANSFORM:
case SC_CASH_RECEIVEITEM:
+ case SC_OVERLAPEXPUP:
val_flag |= 1;
break;
}
@@ -9451,31 +9487,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
if (battle_config.sc_castcancel&bl->type)
unit->skillcastcancel(bl, 0);
break;
- /* */
- case SC_ITEMSCRIPT:
- if( sd ) {
- switch( val1 ) {
- case ITEMID_PHREEONI_CARD:
- clif->status_change(bl, SI_FOOD_BASICHIT, 1, tick, 0, 0, 0);
- break;
- case ITEMID_GHOSTRING_CARD:
- clif->status_change(bl,SI_ARMOR_PROPERTY,1,tick,0,0,0);
- break;
- case ITEMID_TAO_GUNKA_CARD:
- clif->status_change(bl,SI_MVPCARD_TAOGUNKA,1,tick,0,0,0);
- break;
- case ITEMID_MISTRESS_CARD:
- clif->status_change(bl,SI_MVPCARD_MISTRESS,1,tick,0,0,0);
- break;
- case ITEMID_ORC_HERO_CARD:
- clif->status_change(bl,SI_MVPCARD_ORCHERO,1,tick,0,0,0);
- break;
- case ITEMID_ORC_LOAD_CARD:
- clif->status_change(bl,SI_MVPCARD_ORCLORD,1,tick,0,0,0);
- break;
- }
- }
- break;
}
// Set option as needed.
@@ -10342,30 +10353,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
if( sce->val2 )
status_change_end(bl, (sc_type)sce->val2, INVALID_TIMER);
break;
- case SC_ITEMSCRIPT:
- if( sd ) {
- switch( sce->val1 ) {
- case ITEMID_PHREEONI_CARD:
- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_FOOD_BASICHIT);
- break;
- case ITEMID_GHOSTRING_CARD:
- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_ARMOR_PROPERTY);
- break;
- case ITEMID_TAO_GUNKA_CARD:
- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_TAOGUNKA);
- break;
- case ITEMID_MISTRESS_CARD:
- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_MISTRESS);
- break;
- case ITEMID_ORC_HERO_CARD:
- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCHERO);
- break;
- case ITEMID_ORC_LOAD_CARD:
- clif->sc_end(&sd->bl, sd->bl.id, SELF, SI_MVPCARD_ORCLORD);
- break;
- }
- }
- break;
case SC_OVERED_BOOST:
switch( bl->type ){
case BL_HOM:
@@ -11426,10 +11413,10 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
break;
case SC_STOMACHACHE:
- if( --(sce->val4) > 0 ) {
- status->charge(bl,0,sce->val2); // Reduce 8 every 10 seconds.
- if( sd && !pc_issit(sd) ) { // Force to sit every 10 seconds.
- pc_stop_walking(sd, STOPWALKING_FLAG_FIXPOS|STOPWALKING_FLAG_NEXTCELL);
+ if (--(sce->val4) > 0) {
+ status->charge(bl, 0, sce->val3); // Reduce 8 every 10 seconds.
+ if (sd && !pc_issit(sd)) { // Force to sit every 10 seconds.
+ pc_stop_walking(sd, STOPWALKING_FLAG_FIXPOS | STOPWALKING_FLAG_NEXTCELL);
pc_stop_attack(sd);
pc_setsit(sd);
clif->sitting(bl);
@@ -12296,7 +12283,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
avg_increment = 1;
}
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->dbs->SP_table[idx][i] = min(avg_increment * i, battle_config.max_sp);
+ status->dbs->SP_table[idx][i] = min(base + avg_increment * i, battle_config.max_sp);
}
}
}
@@ -12357,7 +12344,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
} else {
avg_increment = 1;
}
- for ( ; level <= pc->max_level[idx][0]; level++ ) {
+ for (++level; level <= pc->max_level[idx][0]; level++ ) {
status->dbs->SP_table[idx][level] = min(base + avg_increment * level, battle_config.max_sp);
}
}
diff --git a/src/map/status.h b/src/map/status.h
index a9538724d..d44cc9bca 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_STATUS_H
#define MAP_STATUS_H
@@ -374,8 +390,8 @@ typedef enum sc_type {
//SC_DEFRATIOATK,
//SC_HPDRAIN,
//SC_SKILLATKBONUS,
- SC_ITEMSCRIPT = 290,
- SC_S_LIFEPOTION,
+ //SC_ITEMSCRIPT,
+ SC_S_LIFEPOTION = 291,
SC_L_LIFEPOTION,
SC_CASH_PLUSONLYJOBEXP,
//SC_IGNOREDEF,
@@ -773,9 +789,16 @@ typedef enum sc_type {
SC_ATKER_ASPD,
SC_ATKER_MOVESPEED,
-
SC_FOOD_CRITICALSUCCESSVALUE, // 610
SC_CUP_OF_BOZA,
+ SC_OVERLAPEXPUP,
+ SC_MORA_BUFF,
+
+ // MVP Scrolls
+ SC_MVPCARD_TAOGUNKA,
+ SC_MVPCARD_MISTRESS,
+ SC_MVPCARD_ORCHERO,
+ SC_MVPCARD_ORCLORD,
SC_MAX, //Automatically updated max, used in for's to check we are within bounds.
} sc_type;
@@ -953,8 +976,8 @@ enum si_type {
//SI_FRIENDUP = 163,
//SI_SG_WARM = 164,
SI_SG_SUN_WARM = 165,
- //SI_SG_MOON_WARM = 166 | The three show the exact same display: ultra red character (165, 166, 167)
- //SI_SG_STAR_WARM = 167 | Their names would be SI_SG_SUN_WARM, SI_SG_MOON_WARM, SI_SG_STAR_WARM
+ //SI_SG_MOON_WARM = 166, // The three show the exact same display: ultra red character (165, 166, 167)
+ //SI_SG_STAR_WARM = 167,
//SI_EMOTION = 168,
SI_SUN_COMFORT = 169,
SI_MOON_COMFORT = 170,
@@ -1049,11 +1072,11 @@ enum si_type {
//SI_DA_SPACE = 257,
//SI_DA_TRANSFORM = 258,
//SI_DA_ITEMREBUILD = 259,
- //SI_DA_ILLUSION = 260, //All mobs display as Turtle General
+ //SI_DA_ILLUSION = 260, // All mobs display as Turtle General
//SI_DA_DARKPOWER = 261,
//SI_DA_EARPLUG = 262,
- //SI_DA_CONTRACT = 263, //Bio Mob effect on you and SI_TRICKDEAD icon
- //SI_DA_BLACK = 264, //For short time blurry screen
+ //SI_DA_CONTRACT = 263, // Bio Mob effect on you and SI_TRICKDEAD icon
+ //SI_DA_BLACK = 264, // For short time blurry screen
//SI_DA_MAGICCART = 265,
//SI_CRYSTAL = 266,
//SI_DA_REBUILD = 267,
@@ -1381,7 +1404,7 @@ enum si_type {
SI_ODINS_POWER = 583,
SI_STYLE_CHANGE = 584,
SI_SONIC_CLAW_POSTDELAY = 585,
- // ID's 586 - 595 Currently Unused
+ /* IDs 586 - 595 Currently Unused */
SI_SILVERVEIN_RUSH_POSTDELAY = 596,
SI_MIDNIGHT_FRENZY_POSTDELAY = 597,
SI_GOLDENE_FERSE = 598,
@@ -1524,23 +1547,23 @@ enum si_type {
SI_2013_VALENTINE2 = 732,
SI_2013_VALENTINE3 = 733,
SI_ILLUSIONDOPING = 734,
- //SI_WIDEWEB = 735,
+ //SI_WIDEWEB = 735,
SI_CHILL = 736,
SI_BURNT = 737,
- //SI_PCCAFE_PLAY_TIME = 738,
- //SI_TWISTED_TIME = 739,
+ //SI_PCCAFE_PLAY_TIME = 738,
+ //SI_TWISTED_TIME = 739,
SI_FLASHCOMBO = 740,
-
- //SI_JITTER_BUFF1 = 741,
- //SI_JITTER_BUFF2 = 742,
- //SI_JITTER_BUFF3 = 743,
- //SI_JITTER_BUFF4 = 744,
- //SI_JITTER_BUFF5 = 745,
- //SI_JITTER_BUFF6 = 746,
- //SI_JITTER_BUFF7 = 747,
- //SI_JITTER_BUFF8 = 748,
- //SI_JITTER_BUFF9 = 749,
- //SI_JITTER_BUFF10 = 750,
+ //SI_JITTER_BUFF1 = 741,
+ //SI_JITTER_BUFF2 = 742,
+ //SI_JITTER_BUFF3 = 743,
+ //SI_JITTER_BUFF4 = 744,
+ //SI_JITTER_BUFF5 = 745,
+ //SI_JITTER_BUFF6 = 746,
+ //SI_JITTER_BUFF7 = 747,
+ //SI_JITTER_BUFF8 = 748,
+ //SI_JITTER_BUFF9 = 749,
+
+ //SI_JITTER_BUFF10 = 750,
SI_CUP_OF_BOZA = 751,
SI_B_TRAP = 752,
SI_E_CHAIN = 753,
@@ -1567,142 +1590,150 @@ enum si_type {
SI_PACKING_ENVELOPE9 = 774,
SI_PACKING_ENVELOPE10 = 775,
SI_GLASTHEIM_TRANS = 776,
- //SI_ZONGZI_POUCH_TRANS = 777,
+ //SI_ZONGZI_POUCH_TRANS = 777,
SI_HEAT_BARREL_AFTER = 778,
SI_DECORATION_OF_MUSIC = 779,
- //SI_OVERSEAEXPUP = 780,
- //SI_CLOWN_N_GYPSY_CARD = 781,
- //SI_OPEN_NPC_MARKET = 782,
- //SI_BEEF_RIB_STEW = 783,
- //SI_PORK_RIB_STEW = 784,
- //SI_CHUSEOK_MONDAY = 785,
- //SI_CHUSEOK_TUESDAY = 786,
- //SI_CHUSEOK_WEDNESDAY = 787,
- //SI_CHUSEOK_THURSDAY = 788,
- //SI_CHUSEOK_FRIDAY = 789,
- //SI_CHUSEOK_WEEKEND = 790,
- //SI_ALL_LIGHTGUARD = 791,
- //SI_ALL_LIGHTGUARD_COOL_TIME = 792,
- //SI_MTF_MHP = 793,
- //SI_MTF_MSP = 794,
- //SI_MTF_PUMPKIN = 795,
- //SI_MTF_HITFLEE = 796,
- //SI_MTF_CRIDAMAGE2 = 797,
- //SI_MTF_SPDRAIN = 798,
- //SI_ACUO_MINT_GUM = 799,
-
- //SI_S_HEALPOTION = 800,
- //SI_REUSE_LIMIT_S_HEAL_POTION = 801,
- //SI_PLAYTIME_STATISTICS = 802,
- //SI_GN_CHANGEMATERIAL_OPERATOR = 803,
- //SI_GN_MIX_COOKING_OPERATOR = 804,
- //SI_GN_MAKEBOMB_OPERATOR = 805,
- //SI_GN_S_PHARMACY_OPERATOR = 806,
- //SI_SO_EL_ANALYSIS_DISASSEMBLY_OPERATOR = 807,
- //SI_SO_EL_ANALYSIS_COMBINATION_OPERATOR = 808,
- //SI_NC_MAGICDECOY_OPERATOR = 809,
- //SI_GUILD_STORAGE = 810,
- //SI_GC_POISONINGWEAPON_OPERATOR = 811,
- //SI_WS_WEAPONREFINE_OPERATOR = 812,
- //SI_BS_REPAIRWEAPON_OPERATOR = 813,
- //SI_GET_MAILBOX = 814,
- //SI_JUMPINGCLAN = 815,
- //SI_JP_OTP = 816,
- //SI_HANDICAPTOLERANCE_LEVELGAP = 817,
- //SI_MTF_RANGEATK2 = 818,
- //SI_MTF_ASPD2 = 819,
- //SI_MTF_MATK2 = 820,
- //SI_QSCARABA = 825,
+ //SI_OVERSEAEXPUP = 780,
+ //SI_CLOWN_N_GYPSY_CARD = 781,
+ //SI_OPEN_NPC_MARKET = 782,
+ //SI_BEEF_RIB_STEW = 783,
+ //SI_PORK_RIB_STEW = 784,
+ //SI_CHUSEOK_MONDAY = 785,
+ //SI_CHUSEOK_TUESDAY = 786,
+ //SI_CHUSEOK_WEDNESDAY = 787,
+ //SI_CHUSEOK_THURSDAY = 788,
+ //SI_CHUSEOK_FRIDAY = 789,
+ //SI_CHUSEOK_WEEKEND = 790,
+ //SI_ALL_LIGHTGUARD = 791,
+ //SI_ALL_LIGHTGUARD_COOL_TIME = 792,
+ //SI_MTF_MHP = 793,
+ //SI_MTF_MSP = 794,
+ //SI_MTF_PUMPKIN = 795,
+ //SI_MTF_HITFLEE = 796,
+ //SI_MTF_CRIDAMAGE2 = 797,
+ //SI_MTF_SPDRAIN = 798,
+ //SI_ACUO_MINT_GUM = 799,
+
+ //SI_S_HEALPOTION = 800,
+ //SI_REUSE_LIMIT_S_HEAL_POTION = 801,
+ //SI_PLAYTIME_STATISTICS = 802,
+ //SI_GN_CHANGEMATERIAL_OPERATOR = 803,
+ //SI_GN_MIX_COOKING_OPERATOR = 804,
+ //SI_GN_MAKEBOMB_OPERATOR = 805,
+ //SI_GN_S_PHARMACY_OPERATOR = 806,
+ //SI_SO_EL_ANALYSIS_DISASSEMBLY_OPERATOR = 807,
+ //SI_SO_EL_ANALYSIS_COMBINATION_OPERATOR = 808,
+ //SI_NC_MAGICDECOY_OPERATOR = 809,
+ //SI_GUILD_STORAGE = 810,
+ //SI_GC_POISONINGWEAPON_OPERATOR = 811,
+ //SI_WS_WEAPONREFINE_OPERATOR = 812,
+ //SI_BS_REPAIRWEAPON_OPERATOR = 813,
+ //SI_GET_MAILBOX = 814,
+ //SI_JUMPINGCLAN = 815,
+ //SI_JP_OTP = 816,
+ //SI_HANDICAPTOLERANCE_LEVELGAP = 817,
+ //SI_MTF_RANGEATK2 = 818,
+ //SI_MTF_ASPD2 = 819,
+ //SI_MTF_MATK2 = 820,
+ /* IDs 821 - 824 Currently Unused */
+ //SI_QSCARABA = 825,
SI_LJOSALFAR = 826,
- //SI_PAD_READER_KNIGHT = 827,
- //SI_PAD_READER_CRUSADER = 828,
- //SI_PAD_READER_BLACKSMITH = 829,
- //SI_PAD_READER_ALCHEMIST = 830,
- //SI_PAD_READER_ASSASSIN = 831,
- //SI_PAD_READER_ROGUE = 832,
- //SI_PAD_READER_WIZARD = 833,
- //SI_PAD_READER_SAGE = 834,
- //SI_PAD_READER_PRIEST = 835,
- //SI_PAD_READER_MONK = 836,
- //SI_PAD_READER_HUNTER = 837,
- //SI_PAD_READER_BARD = 838,
- //SI_PAD_READER_DANCER = 839,
- //SI_PAD_READER_TAEKWON = 840,
- //SI_PAD_READER_NINJA = 841,
- //SI_PAD_READER_GUNSLINGER = 842,
- //SI_PAD_READER_SUPERNOVICE = 843,
- //SI_ESSENCE_OF_TIME = 844,
- //SI_MTF_MARIONETTE = 860,
- //SI_MTF_LUDE = 861,
- //SI_MTF_CRUISER = 862,
+ //SI_PAD_READER_KNIGHT = 827,
+ //SI_PAD_READER_CRUSADER = 828,
+ //SI_PAD_READER_BLACKSMITH = 829,
+ //SI_PAD_READER_ALCHEMIST = 830,
+ //SI_PAD_READER_ASSASSIN = 831,
+ //SI_PAD_READER_ROGUE = 832,
+ //SI_PAD_READER_WIZARD = 833,
+ //SI_PAD_READER_SAGE = 834,
+ //SI_PAD_READER_PRIEST = 835,
+ //SI_PAD_READER_MONK = 836,
+ //SI_PAD_READER_HUNTER = 837,
+ //SI_PAD_READER_BARD = 838,
+ //SI_PAD_READER_DANCER = 839,
+ //SI_PAD_READER_TAEKWON = 840,
+ //SI_PAD_READER_NINJA = 841,
+ //SI_PAD_READER_GUNSLINGER = 842,
+ //SI_PAD_READER_SUPERNOVICE = 843,
+ //SI_ESSENCE_OF_TIME = 844,
+
+ /* IDs 845 - 859 Currently Unused */
+ //SI_MTF_MARIONETTE = 860,
+ //SI_MTF_LUDE = 861,
+ //SI_MTF_CRUISER = 862,
SI_MERMAID_LONGING = 863,
- //SI_DRACULA_CARD = 865,
- //SI_LIMIT_POWER_BOOSTER = 867,
- //SI_TIME_ACCESSORY = 872,
- //SI_EP16_DEF = 873,
- //SI_NORMAL_ATKED_SP = 874,
- //SI_BODYSTATE_STONECURSE = 875,
- //SI_BODYSTATE_FREEZING = 876,
- //SI_BODYSTATE_STUN = 877,
- //SI_BODYSTATE_SLEEP = 878,
- //SI_BODYSTATE_UNDEAD = 879,
- //SI_BODYSTATE_STONECURSE_ING = 880,
- //SI_BODYSTATE_BURNNING = 881,
- //SI_BODYSTATE_IMPRISON = 882,
- //SI_HEALTHSTATE_POISON = 883,
- //SI_HEALTHSTATE_CURSE = 884,
- //SI_HEALTHSTATE_SILENCE = 885,
- //SI_HEALTHSTATE_CONFUSION = 886,
- //SI_HEALTHSTATE_BLIND = 887,
- //SI_HEALTHSTATE_ANGELUS = 888,
- //SI_HEALTHSTATE_BLOODING = 889,
- //SI_HEALTHSTATE_HEAVYPOISON = 890,
- //SI_HEALTHSTATE_FEAR = 891,
- //SI_CHERRY_BLOSSOM_CAKE = 892,
- //SI_SU_STOOP = 893,
- //SI_CATNIPPOWDER = 894,
- //SI_ATTACK_PROPERTY_NOTHING = 897,
- //SI_ATTACK_PROPERTY_WATER = 898,
- //SI_ATTACK_PROPERTY_GROUND = 899,
-
- //SI_ATTACK_PROPERTY_FIRE = 900,
- //SI_ATTACK_PROPERTY_WIND = 901,
- //SI_ATTACK_PROPERTY_POISON = 902,
- //SI_ATTACK_PROPERTY_SAINT = 903,
- //SI_ATTACK_PROPERTY_DARKNESS = 904,
- //SI_ATTACK_PROPERTY_TELEKINESIS = 905,
- //SI_ATTACK_PROPERTY_UNDEAD = 906,
- //SI_RESIST_PROPERTY_NOTHING = 907,
- //SI_RESIST_PROPERTY_WATER = 908,
- //SI_RESIST_PROPERTY_GROUND = 909,
- //SI_RESIST_PROPERTY_FIRE = 910,
- //SI_RESIST_PROPERTY_WIND = 911,
- //SI_RESIST_PROPERTY_POISON = 912,
- //SI_RESIST_PROPERTY_SAINT = 913,
- //SI_RESIST_PROPERTY_DARKNESS = 914,
- //SI_RESIST_PROPERTY_TELEKINESIS = 915,
- //SI_RESIST_PROPERTY_UNDEAD = 916,
- //SI_PERIOD_RECEIVEITEM = 922,
- //SI_PERIOD_PLUSEXP = 923,
- //SI_PERIOD_PLUSJOBEXP = 924,
- //SI_RUNEHELM = 925,
- //SI_HELM_VERKANA = 926,
- //SI_HELM_RHYDO = 927,
- //SI_HELM_TURISUS = 928,
- //SI_HELM_HAGALAS = 929,
- //SI_HELM_ISIA = 930,
- //SI_HELM_ASIR = 931,
- //SI_HELM_URJ = 932,
- //SI_SV_ROOTTWIST = 896,
- //SI_BITESCAR = 917,
- //SI_ARCLOUSEDASH = 918,
- //SI_TUNAPARTY = 919,
- //SI_SHRIMP = 920,
- //SI_FRESHSHRIMP = 921,
- //SI_SUHIDE = 933,
- //SI_SPRITEMABLE = 937,
- //SI_DORAM_BUF_01 = 935,
- //SI_DORAM_BUF_02 = 936,
+ /* IDs 864 Currently Unused */
+ //SI_DRACULA_CARD = 865,
+ /* ID 866 Currently Unused */
+ //SI_LIMIT_POWER_BOOSTER = 867,
+ /* IDs 868 - 871 Currently Unused */
+ //SI_TIME_ACCESSORY = 872,
+ //SI_EP16_DEF = 873,
+ //SI_NORMAL_ATKED_SP = 874,
+ //SI_BODYSTATE_STONECURSE = 875,
+ //SI_BODYSTATE_FREEZING = 876,
+ //SI_BODYSTATE_STUN = 877,
+ //SI_BODYSTATE_SLEEP = 878,
+ //SI_BODYSTATE_UNDEAD = 879,
+ //SI_BODYSTATE_STONECURSE_ING = 880,
+ //SI_BODYSTATE_BURNNING = 881,
+ //SI_BODYSTATE_IMPRISON = 882,
+ //SI_HEALTHSTATE_POISON = 883,
+ //SI_HEALTHSTATE_CURSE = 884,
+ //SI_HEALTHSTATE_SILENCE = 885,
+ //SI_HEALTHSTATE_CONFUSION = 886,
+ //SI_HEALTHSTATE_BLIND = 887,
+ //SI_HEALTHSTATE_ANGELUS = 888,
+ //SI_HEALTHSTATE_BLOODING = 889,
+ //SI_HEALTHSTATE_HEAVYPOISON = 890,
+ //SI_HEALTHSTATE_FEAR = 891,
+ //SI_CHERRY_BLOSSOM_CAKE = 892,
+ //SI_SU_STOOP = 893,
+ //SI_CATNIPPOWDER = 894,
+ /* ID 895 Currently Unused */
+ //SI_SV_ROOTTWIST = 896,
+ //SI_ATTACK_PROPERTY_NOTHING = 897,
+ //SI_ATTACK_PROPERTY_WATER = 898,
+ //SI_ATTACK_PROPERTY_GROUND = 899,
+
+ //SI_ATTACK_PROPERTY_FIRE = 900,
+ //SI_ATTACK_PROPERTY_WIND = 901,
+ //SI_ATTACK_PROPERTY_POISON = 902,
+ //SI_ATTACK_PROPERTY_SAINT = 903,
+ //SI_ATTACK_PROPERTY_DARKNESS = 904,
+ //SI_ATTACK_PROPERTY_TELEKINESIS = 905,
+ //SI_ATTACK_PROPERTY_UNDEAD = 906,
+ //SI_RESIST_PROPERTY_NOTHING = 907,
+ //SI_RESIST_PROPERTY_WATER = 908,
+ //SI_RESIST_PROPERTY_GROUND = 909,
+ //SI_RESIST_PROPERTY_FIRE = 910,
+ //SI_RESIST_PROPERTY_WIND = 911,
+ //SI_RESIST_PROPERTY_POISON = 912,
+ //SI_RESIST_PROPERTY_SAINT = 913,
+ //SI_RESIST_PROPERTY_DARKNESS = 914,
+ //SI_RESIST_PROPERTY_TELEKINESIS = 915,
+ //SI_RESIST_PROPERTY_UNDEAD = 916,
+ //SI_BITESCAR = 917,
+ //SI_ARCLOUSEDASH = 918,
+ //SI_TUNAPARTY = 919,
+ //SI_SHRIMP = 920,
+ //SI_FRESHSHRIMP = 921,
+ //SI_PERIOD_RECEIVEITEM = 922,
+ //SI_PERIOD_PLUSEXP = 923,
+ //SI_PERIOD_PLUSJOBEXP = 924,
+ //SI_RUNEHELM = 925,
+ //SI_HELM_VERKANA = 926,
+ //SI_HELM_RHYDO = 927,
+ //SI_HELM_TURISUS = 928,
+ //SI_HELM_HAGALAS = 929,
+ //SI_HELM_ISIA = 930,
+ //SI_HELM_ASIR = 931,
+ //SI_HELM_URJ = 932,
+ //SI_SUHIDE = 933,
+ /* ID 934 Currently Unused */
+ //SI_DORAM_BUF_01 = 935,
+ //SI_DORAM_BUF_02 = 936,
+ //SI_SPRITEMABLE = 937,
SI_MAX,
};
diff --git a/src/map/storage.c b/src/map/storage.c
index 29f44f5e7..f938a41ad 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "storage.h"
diff --git a/src/map/storage.h b/src/map/storage.h
index 37f894f76..bddd03770 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_STORAGE_H
#define MAP_STORAGE_H
diff --git a/src/map/trade.c b/src/map/trade.c
index 8af3ddf4a..6352c3a4d 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "trade.h"
diff --git a/src/map/trade.h b/src/map/trade.h
index 010f67e26..eba91a1d9 100644
--- a/src/map/trade.h
+++ b/src/map/trade.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_TRADE_H
#define MAP_TRADE_H
diff --git a/src/map/unit.c b/src/map/unit.c
index 7f53966e2..4c5254373 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "config/core.h" // RENEWAL_CAST
diff --git a/src/map/unit.h b/src/map/unit.h
index 0f7a1aec5..f0933aa9a 100644
--- a/src/map/unit.h
+++ b/src/map/unit.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_UNIT_H
#define MAP_UNIT_H
diff --git a/src/map/vending.c b/src/map/vending.c
index 80c79984e..810e6b07a 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "vending.h"
diff --git a/src/map/vending.h b/src/map/vending.h
index 2f624fac7..6684ed256 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -1,7 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#ifndef MAP_VENDING_H
#define MAP_VENDING_H
diff --git a/src/plugins/HPMHooking.c b/src/plugins/HPMHooking.c
index a975c034e..18bfaf220 100644
--- a/src/plugins/HPMHooking.c
+++ b/src/plugins/HPMHooking.c
@@ -1,7 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Sample Hercules Plugin
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include "common/hercules.h"
#include "common/db.h"
#include "common/memmgr.h"
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
index c5f135937..aefb3aa93 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HPMHooksCore.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
struct {
struct HPMHookPoint *HP_HCache_init_pre;
@@ -347,6 +366,8 @@ struct {
struct HPMHookPoint *HP_console_final_post;
struct HPMHookPoint *HP_console_display_title_pre;
struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_console_display_gplnotice_pre;
+ struct HPMHookPoint *HP_console_display_gplnotice_post;
struct HPMHookPoint *HP_core_shutdown_callback_pre;
struct HPMHookPoint *HP_core_shutdown_callback_post;
struct HPMHookPoint *HP_DB_fix_options_pre;
@@ -1722,6 +1743,8 @@ struct {
int HP_console_final_post;
int HP_console_display_title_pre;
int HP_console_display_title_post;
+ int HP_console_display_gplnotice_pre;
+ int HP_console_display_gplnotice_post;
int HP_core_shutdown_callback_pre;
int HP_core_shutdown_callback_post;
int HP_DB_fix_options_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
index 59c82f0e2..3c442c4ab 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.HookingPoints.inc
@@ -1,8 +1,26 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
struct HookingPointData HookingPoints[] = {
/* HCache */
@@ -180,6 +198,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(console->init, HP_console_init) },
{ HP_POP(console->final, HP_console_final) },
{ HP_POP(console->display_title, HP_console_display_title) },
+ { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) },
/* core */
{ HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
/* DB */
diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
index e113611e4..3e9e6e1d2 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
/* HCache */
void HP_HCache_init(void) {
@@ -4543,6 +4562,32 @@ void HP_console_display_title(void) {
}
return;
}
+void HP_console_display_gplnotice(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_display_gplnotice_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.display_gplnotice();
+ }
+ if( HPMHooks.count.HP_console_display_gplnotice_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* core */
void HP_core_shutdown_callback(void) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_char.sources.inc b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
index 489917771..92623f516 100644
--- a/src/plugins/HPMHooking/HPMHooking_char.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_char.sources.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.chr, chr, sizeof(struct char_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
index 4edefd5b7..5540e15b3 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HPMHooksCore.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
struct {
struct HPMHookPoint *HP_HCache_init_pre;
@@ -29,6 +48,8 @@ struct {
struct HPMHookPoint *HP_console_final_post;
struct HPMHookPoint *HP_console_display_title_pre;
struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_console_display_gplnotice_pre;
+ struct HPMHookPoint *HP_console_display_gplnotice_post;
struct HPMHookPoint *HP_core_shutdown_callback_pre;
struct HPMHookPoint *HP_core_shutdown_callback_post;
struct HPMHookPoint *HP_DB_fix_options_pre;
@@ -600,6 +621,8 @@ struct {
int HP_console_final_post;
int HP_console_display_title_pre;
int HP_console_display_title_post;
+ int HP_console_display_gplnotice_pre;
+ int HP_console_display_gplnotice_post;
int HP_core_shutdown_callback_pre;
int HP_core_shutdown_callback_post;
int HP_DB_fix_options_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
index cdcdedcb5..27e0f857d 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.HookingPoints.inc
@@ -1,8 +1,26 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
struct HookingPointData HookingPoints[] = {
/* HCache */
@@ -20,6 +38,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(console->init, HP_console_init) },
{ HP_POP(console->final, HP_console_final) },
{ HP_POP(console->display_title, HP_console_display_title) },
+ { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) },
/* core */
{ HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
/* DB */
diff --git a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
index 5d4fad4d8..012240bb3 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.Hooks.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
/* HCache */
void HP_HCache_init(void) {
@@ -325,6 +344,32 @@ void HP_console_display_title(void) {
}
return;
}
+void HP_console_display_gplnotice(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_display_gplnotice_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.display_gplnotice();
+ }
+ if( HPMHooks.count.HP_console_display_gplnotice_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* core */
void HP_core_shutdown_callback(void) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_login.sources.inc b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
index aed0dc77f..38500f0ee 100644
--- a/src/plugins/HPMHooking/HPMHooking_login.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_login.sources.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.cmdline, cmdline, sizeof(struct cmdline_interface));
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index b6afa8fcf..59844e766 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
struct {
struct HPMHookPoint *HP_HCache_init_pre;
@@ -1845,6 +1864,8 @@ struct {
struct HPMHookPoint *HP_console_final_post;
struct HPMHookPoint *HP_console_display_title_pre;
struct HPMHookPoint *HP_console_display_title_post;
+ struct HPMHookPoint *HP_console_display_gplnotice_pre;
+ struct HPMHookPoint *HP_console_display_gplnotice_post;
struct HPMHookPoint *HP_core_shutdown_callback_pre;
struct HPMHookPoint *HP_core_shutdown_callback_post;
struct HPMHookPoint *HP_DB_fix_options_pre;
@@ -3481,6 +3502,24 @@ struct {
struct HPMHookPoint *HP_mob_clear_spawninfo_post;
struct HPMHookPoint *HP_mob_destroy_mob_db_pre;
struct HPMHookPoint *HP_mob_destroy_mob_db_post;
+ struct HPMHookPoint *HP_npc_chat_sub_pre;
+ struct HPMHookPoint *HP_npc_chat_sub_post;
+ struct HPMHookPoint *HP_npc_chat_finalize_pre;
+ struct HPMHookPoint *HP_npc_chat_finalize_post;
+ struct HPMHookPoint *HP_npc_chat_def_pattern_pre;
+ struct HPMHookPoint *HP_npc_chat_def_pattern_post;
+ struct HPMHookPoint *HP_npc_chat_create_pcrematch_entry_pre;
+ struct HPMHookPoint *HP_npc_chat_create_pcrematch_entry_post;
+ struct HPMHookPoint *HP_npc_chat_delete_pcreset_pre;
+ struct HPMHookPoint *HP_npc_chat_delete_pcreset_post;
+ struct HPMHookPoint *HP_npc_chat_deactivate_pcreset_pre;
+ struct HPMHookPoint *HP_npc_chat_deactivate_pcreset_post;
+ struct HPMHookPoint *HP_npc_chat_activate_pcreset_pre;
+ struct HPMHookPoint *HP_npc_chat_activate_pcreset_post;
+ struct HPMHookPoint *HP_npc_chat_lookup_pcreset_pre;
+ struct HPMHookPoint *HP_npc_chat_lookup_pcreset_post;
+ struct HPMHookPoint *HP_npc_chat_finalize_pcrematch_entry_pre;
+ struct HPMHookPoint *HP_npc_chat_finalize_pcrematch_entry_post;
struct HPMHookPoint *HP_npc_init_pre;
struct HPMHookPoint *HP_npc_init_post;
struct HPMHookPoint *HP_npc_final_pre;
@@ -4267,6 +4306,22 @@ struct {
struct HPMHookPoint *HP_pc_check_job_name_post;
struct HPMHookPoint *HP_pc_update_idle_time_pre;
struct HPMHookPoint *HP_pc_update_idle_time_post;
+ struct HPMHookPoint *HP_libpcre_compile_pre;
+ struct HPMHookPoint *HP_libpcre_compile_post;
+ struct HPMHookPoint *HP_libpcre_study_pre;
+ struct HPMHookPoint *HP_libpcre_study_post;
+ struct HPMHookPoint *HP_libpcre_exec_pre;
+ struct HPMHookPoint *HP_libpcre_exec_post;
+ struct HPMHookPoint *HP_libpcre_free_pre;
+ struct HPMHookPoint *HP_libpcre_free_post;
+ struct HPMHookPoint *HP_libpcre_copy_substring_pre;
+ struct HPMHookPoint *HP_libpcre_copy_substring_post;
+ struct HPMHookPoint *HP_libpcre_free_substring_pre;
+ struct HPMHookPoint *HP_libpcre_free_substring_post;
+ struct HPMHookPoint *HP_libpcre_copy_named_substring_pre;
+ struct HPMHookPoint *HP_libpcre_copy_named_substring_post;
+ struct HPMHookPoint *HP_libpcre_get_substring_pre;
+ struct HPMHookPoint *HP_libpcre_get_substring_post;
struct HPMHookPoint *HP_pet_init_pre;
struct HPMHookPoint *HP_pet_init_post;
struct HPMHookPoint *HP_pet_final_pre;
@@ -7628,6 +7683,8 @@ struct {
int HP_console_final_post;
int HP_console_display_title_pre;
int HP_console_display_title_post;
+ int HP_console_display_gplnotice_pre;
+ int HP_console_display_gplnotice_post;
int HP_core_shutdown_callback_pre;
int HP_core_shutdown_callback_post;
int HP_DB_fix_options_pre;
@@ -9264,6 +9321,24 @@ struct {
int HP_mob_clear_spawninfo_post;
int HP_mob_destroy_mob_db_pre;
int HP_mob_destroy_mob_db_post;
+ int HP_npc_chat_sub_pre;
+ int HP_npc_chat_sub_post;
+ int HP_npc_chat_finalize_pre;
+ int HP_npc_chat_finalize_post;
+ int HP_npc_chat_def_pattern_pre;
+ int HP_npc_chat_def_pattern_post;
+ int HP_npc_chat_create_pcrematch_entry_pre;
+ int HP_npc_chat_create_pcrematch_entry_post;
+ int HP_npc_chat_delete_pcreset_pre;
+ int HP_npc_chat_delete_pcreset_post;
+ int HP_npc_chat_deactivate_pcreset_pre;
+ int HP_npc_chat_deactivate_pcreset_post;
+ int HP_npc_chat_activate_pcreset_pre;
+ int HP_npc_chat_activate_pcreset_post;
+ int HP_npc_chat_lookup_pcreset_pre;
+ int HP_npc_chat_lookup_pcreset_post;
+ int HP_npc_chat_finalize_pcrematch_entry_pre;
+ int HP_npc_chat_finalize_pcrematch_entry_post;
int HP_npc_init_pre;
int HP_npc_init_post;
int HP_npc_final_pre;
@@ -10050,6 +10125,22 @@ struct {
int HP_pc_check_job_name_post;
int HP_pc_update_idle_time_pre;
int HP_pc_update_idle_time_post;
+ int HP_libpcre_compile_pre;
+ int HP_libpcre_compile_post;
+ int HP_libpcre_study_pre;
+ int HP_libpcre_study_post;
+ int HP_libpcre_exec_pre;
+ int HP_libpcre_exec_post;
+ int HP_libpcre_free_pre;
+ int HP_libpcre_free_post;
+ int HP_libpcre_copy_substring_pre;
+ int HP_libpcre_copy_substring_post;
+ int HP_libpcre_free_substring_pre;
+ int HP_libpcre_free_substring_post;
+ int HP_libpcre_copy_named_substring_pre;
+ int HP_libpcre_copy_named_substring_post;
+ int HP_libpcre_get_substring_pre;
+ int HP_libpcre_get_substring_post;
int HP_pet_init_pre;
int HP_pet_init_post;
int HP_pet_final_pre;
@@ -11603,12 +11694,14 @@ struct {
struct mapreg_interface mapreg;
struct mercenary_interface mercenary;
struct mob_interface mob;
+ struct npc_chat_interface npc_chat;
struct npc_interface npc;
struct nullpo_interface nullpo;
struct party_interface party;
struct path_interface path;
struct pc_groups_interface pcg;
struct pc_interface pc;
+ struct pcre_interface libpcre;
struct pet_interface pet;
struct quest_interface quest;
struct script_interface script;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index c937241f3..bc78fe8b4 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -1,8 +1,26 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
struct HookingPointData HookingPoints[] = {
/* HCache */
@@ -936,6 +954,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(console->init, HP_console_init) },
{ HP_POP(console->final, HP_console_final) },
{ HP_POP(console->display_title, HP_console_display_title) },
+ { HP_POP(console->display_gplnotice, HP_console_display_gplnotice) },
/* core */
{ HP_POP(core->shutdown_callback, HP_core_shutdown_callback) },
/* DB */
@@ -1775,6 +1794,16 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(mob->load, HP_mob_load) },
{ HP_POP(mob->clear_spawninfo, HP_mob_clear_spawninfo) },
{ HP_POP(mob->destroy_mob_db, HP_mob_destroy_mob_db) },
+/* npc_chat */
+ { HP_POP(npc_chat->sub, HP_npc_chat_sub) },
+ { HP_POP(npc_chat->finalize, HP_npc_chat_finalize) },
+ { HP_POP(npc_chat->def_pattern, HP_npc_chat_def_pattern) },
+ { HP_POP(npc_chat->create_pcrematch_entry, HP_npc_chat_create_pcrematch_entry) },
+ { HP_POP(npc_chat->delete_pcreset, HP_npc_chat_delete_pcreset) },
+ { HP_POP(npc_chat->deactivate_pcreset, HP_npc_chat_deactivate_pcreset) },
+ { HP_POP(npc_chat->activate_pcreset, HP_npc_chat_activate_pcreset) },
+ { HP_POP(npc_chat->lookup_pcreset, HP_npc_chat_lookup_pcreset) },
+ { HP_POP(npc_chat->finalize_pcrematch_entry, HP_npc_chat_finalize_pcrematch_entry) },
/* npc */
{ HP_POP(npc->init, HP_npc_init) },
{ HP_POP(npc->final, HP_npc_final) },
@@ -2174,6 +2203,15 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(pc->autotrade_final, HP_pc_autotrade_final) },
{ HP_POP(pc->check_job_name, HP_pc_check_job_name) },
{ HP_POP(pc->update_idle_time, HP_pc_update_idle_time) },
+/* libpcre */
+ { HP_POP(libpcre->compile, HP_libpcre_compile) },
+ { HP_POP(libpcre->study, HP_libpcre_study) },
+ { HP_POP(libpcre->exec, HP_libpcre_exec) },
+ { HP_POP(libpcre->free, HP_libpcre_free) },
+ { HP_POP(libpcre->copy_substring, HP_libpcre_copy_substring) },
+ { HP_POP(libpcre->free_substring, HP_libpcre_free_substring) },
+ { HP_POP(libpcre->copy_named_substring, HP_libpcre_copy_named_substring) },
+ { HP_POP(libpcre->get_substring, HP_libpcre_get_substring) },
/* pet */
{ HP_POP(pet->init, HP_pet_init) },
{ HP_POP(pet->final, HP_pet_final) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 78c9136de..4c828dc56 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
/* HCache */
void HP_HCache_init(void) {
@@ -2344,15 +2363,15 @@ int HP_battle_config_set_value(const char *w1, const char *w2) {
}
return retVal___;
}
-int HP_battle_config_get_value(const char *w1) {
+bool HP_battle_config_get_value(const char *w1, int *value) {
int hIndex = 0;
- int retVal___ = 0;
+ bool retVal___ = false;
if( HPMHooks.count.HP_battle_config_get_value_pre ) {
- int (*preHookFunc) (const char *w1);
+ bool (*preHookFunc) (const char *w1, int *value);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_battle_config_get_value_pre[hIndex].func;
- retVal___ = preHookFunc(w1);
+ retVal___ = preHookFunc(w1, value);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
@@ -2360,13 +2379,13 @@ int HP_battle_config_get_value(const char *w1) {
}
}
{
- retVal___ = HPMHooks.source.battle.config_get_value(w1);
+ retVal___ = HPMHooks.source.battle.config_get_value(w1, value);
}
if( HPMHooks.count.HP_battle_config_get_value_post ) {
- int (*postHookFunc) (int retVal___, const char *w1);
+ bool (*postHookFunc) (bool retVal___, const char *w1, int *value);
for(hIndex = 0; hIndex < HPMHooks.count.HP_battle_config_get_value_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_battle_config_get_value_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, w1);
+ retVal___ = postHookFunc(retVal___, w1, value);
}
}
return retVal___;
@@ -24262,6 +24281,32 @@ void HP_console_display_title(void) {
}
return;
}
+void HP_console_display_gplnotice(void) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_console_display_gplnotice_pre ) {
+ void (*preHookFunc) (void);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_console_display_gplnotice_pre[hIndex].func;
+ preHookFunc();
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.console.display_gplnotice();
+ }
+ if( HPMHooks.count.HP_console_display_gplnotice_post ) {
+ void (*postHookFunc) (void);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_console_display_gplnotice_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_console_display_gplnotice_post[hIndex].func;
+ postHookFunc();
+ }
+ }
+ return;
+}
/* core */
void HP_core_shutdown_callback(void) {
int hIndex = 0;
@@ -46477,6 +46522,250 @@ void HP_mob_destroy_mob_db(int index) {
}
return;
}
+/* npc_chat */
+int HP_npc_chat_sub(struct block_list *bl, va_list ap) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_npc_chat_sub_pre ) {
+ int (*preHookFunc) (struct block_list *bl, va_list ap);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_pre; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ preHookFunc = HPMHooks.list.HP_npc_chat_sub_pre[hIndex].func;
+ retVal___ = preHookFunc(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ retVal___ = HPMHooks.source.npc_chat.sub(bl, ap___copy);
+ va_end(ap___copy);
+ }
+ if( HPMHooks.count.HP_npc_chat_sub_post ) {
+ int (*postHookFunc) (int retVal___, struct block_list *bl, va_list ap);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_sub_post; hIndex++ ) {
+ va_list ap___copy; va_copy(ap___copy, ap);
+ postHookFunc = HPMHooks.list.HP_npc_chat_sub_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, bl, ap___copy);
+ va_end(ap___copy);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_chat_finalize(struct npc_data *nd) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_chat_finalize_pre ) {
+ void (*preHookFunc) (struct npc_data *nd);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_finalize_pre[hIndex].func;
+ preHookFunc(nd);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc_chat.finalize(nd);
+ }
+ if( HPMHooks.count.HP_npc_chat_finalize_post ) {
+ void (*postHookFunc) (struct npc_data *nd);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_finalize_post[hIndex].func;
+ postHookFunc(nd);
+ }
+ }
+ return;
+}
+void HP_npc_chat_def_pattern(struct npc_data *nd, int setid, const char *pattern, const char *label) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_chat_def_pattern_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, int *setid, const char *pattern, const char *label);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_def_pattern_pre[hIndex].func;
+ preHookFunc(nd, &setid, pattern, label);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc_chat.def_pattern(nd, setid, pattern, label);
+ }
+ if( HPMHooks.count.HP_npc_chat_def_pattern_post ) {
+ void (*postHookFunc) (struct npc_data *nd, int *setid, const char *pattern, const char *label);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_def_pattern_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_def_pattern_post[hIndex].func;
+ postHookFunc(nd, &setid, pattern, label);
+ }
+ }
+ return;
+}
+struct pcrematch_entry* HP_npc_chat_create_pcrematch_entry(struct pcrematch_set *set) {
+ int hIndex = 0;
+ struct pcrematch_entry* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre ) {
+ struct pcrematch_entry* (*preHookFunc) (struct pcrematch_set *set);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_create_pcrematch_entry_pre[hIndex].func;
+ retVal___ = preHookFunc(set);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc_chat.create_pcrematch_entry(set);
+ }
+ if( HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post ) {
+ struct pcrematch_entry* (*postHookFunc) (struct pcrematch_entry* retVal___, struct pcrematch_set *set);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_create_pcrematch_entry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_create_pcrematch_entry_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, set);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_chat_delete_pcreset(struct npc_data *nd, int setid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_chat_delete_pcreset_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, int *setid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_delete_pcreset_pre[hIndex].func;
+ preHookFunc(nd, &setid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc_chat.delete_pcreset(nd, setid);
+ }
+ if( HPMHooks.count.HP_npc_chat_delete_pcreset_post ) {
+ void (*postHookFunc) (struct npc_data *nd, int *setid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_delete_pcreset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_delete_pcreset_post[hIndex].func;
+ postHookFunc(nd, &setid);
+ }
+ }
+ return;
+}
+void HP_npc_chat_deactivate_pcreset(struct npc_data *nd, int setid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, int *setid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_deactivate_pcreset_pre[hIndex].func;
+ preHookFunc(nd, &setid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc_chat.deactivate_pcreset(nd, setid);
+ }
+ if( HPMHooks.count.HP_npc_chat_deactivate_pcreset_post ) {
+ void (*postHookFunc) (struct npc_data *nd, int *setid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_deactivate_pcreset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_deactivate_pcreset_post[hIndex].func;
+ postHookFunc(nd, &setid);
+ }
+ }
+ return;
+}
+void HP_npc_chat_activate_pcreset(struct npc_data *nd, int setid) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_chat_activate_pcreset_pre ) {
+ void (*preHookFunc) (struct npc_data *nd, int *setid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_activate_pcreset_pre[hIndex].func;
+ preHookFunc(nd, &setid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc_chat.activate_pcreset(nd, setid);
+ }
+ if( HPMHooks.count.HP_npc_chat_activate_pcreset_post ) {
+ void (*postHookFunc) (struct npc_data *nd, int *setid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_activate_pcreset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_activate_pcreset_post[hIndex].func;
+ postHookFunc(nd, &setid);
+ }
+ }
+ return;
+}
+struct pcrematch_set* HP_npc_chat_lookup_pcreset(struct npc_data *nd, int setid) {
+ int hIndex = 0;
+ struct pcrematch_set* retVal___ = NULL;
+ if( HPMHooks.count.HP_npc_chat_lookup_pcreset_pre ) {
+ struct pcrematch_set* (*preHookFunc) (struct npc_data *nd, int *setid);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_lookup_pcreset_pre[hIndex].func;
+ retVal___ = preHookFunc(nd, &setid);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.npc_chat.lookup_pcreset(nd, setid);
+ }
+ if( HPMHooks.count.HP_npc_chat_lookup_pcreset_post ) {
+ struct pcrematch_set* (*postHookFunc) (struct pcrematch_set* retVal___, struct npc_data *nd, int *setid);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_lookup_pcreset_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_lookup_pcreset_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, nd, &setid);
+ }
+ }
+ return retVal___;
+}
+void HP_npc_chat_finalize_pcrematch_entry(struct pcrematch_entry *e) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre ) {
+ void (*preHookFunc) (struct pcrematch_entry *e);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_npc_chat_finalize_pcrematch_entry_pre[hIndex].func;
+ preHookFunc(e);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.npc_chat.finalize_pcrematch_entry(e);
+ }
+ if( HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post ) {
+ void (*postHookFunc) (struct pcrematch_entry *e);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_chat_finalize_pcrematch_entry_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_npc_chat_finalize_pcrematch_entry_post[hIndex].func;
+ postHookFunc(e);
+ }
+ }
+ return;
+}
/* npc */
int HP_npc_init(bool minimal) {
int hIndex = 0;
@@ -48245,11 +48534,11 @@ struct npc_data* HP_npc_add_warp(char *name, short from_mapid, short from_x, sho
}
return retVal___;
}
-const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+const char* HP_npc_parse_warp(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_warp_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_warp_pre[hIndex].func;
@@ -48264,7 +48553,7 @@ const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char
retVal___ = HPMHooks.source.npc.parse_warp(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_warp_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_warp_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_warp_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
@@ -48272,11 +48561,11 @@ const char* HP_npc_parse_warp(char *w1, char *w2, char *w3, char *w4, const char
}
return retVal___;
}
-const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+const char* HP_npc_parse_shop(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_shop_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_shop_pre[hIndex].func;
@@ -48291,7 +48580,7 @@ const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char
retVal___ = HPMHooks.source.npc.parse_shop(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_shop_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_shop_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_shop_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
@@ -48299,11 +48588,11 @@ const char* HP_npc_parse_shop(char *w1, char *w2, char *w3, char *w4, const char
}
return retVal___;
}
-const char* HP_npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+const char* HP_npc_parse_unknown_object(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_unknown_object_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_pre[hIndex].func;
@@ -48318,7 +48607,7 @@ const char* HP_npc_parse_unknown_object(char *w1, char *w2, char *w3, char *w4,
retVal___ = HPMHooks.source.npc.parse_unknown_object(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_unknown_object_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_object_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_unknown_object_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
@@ -48379,11 +48668,11 @@ const char* HP_npc_skip_script(const char *start, const char *buffer, const char
}
return retVal___;
}
-const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) {
+const char* HP_npc_parse_script(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_script_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_script_pre[hIndex].func;
@@ -48398,7 +48687,7 @@ const char* HP_npc_parse_script(char *w1, char *w2, char *w3, char *w4, const ch
retVal___ = HPMHooks.source.npc.parse_script(w1, w2, w3, w4, start, buffer, filepath, options, retval);
}
if( HPMHooks.count.HP_npc_parse_script_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_script_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_script_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval);
@@ -48540,11 +48829,11 @@ bool HP_npc_duplicate_sub(struct npc_data *nd, const struct npc_data *snd, int x
}
return retVal___;
}
-const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) {
+const char* HP_npc_parse_duplicate(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_duplicate_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_duplicate_pre[hIndex].func;
@@ -48559,7 +48848,7 @@ const char* HP_npc_parse_duplicate(char *w1, char *w2, char *w3, char *w4, const
retVal___ = HPMHooks.source.npc.parse_duplicate(w1, w2, w3, w4, start, buffer, filepath, options, retval);
}
if( HPMHooks.count.HP_npc_parse_duplicate_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *options, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_duplicate_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_duplicate_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, &options, retval);
@@ -48784,11 +49073,11 @@ int HP_npc_do_atcmd_event(struct map_session_data *sd, const char *command, cons
}
return retVal___;
}
-const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+const char* HP_npc_parse_function(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_function_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_function_pre[hIndex].func;
@@ -48803,7 +49092,7 @@ const char* HP_npc_parse_function(char *w1, char *w2, char *w3, char *w4, const
retVal___ = HPMHooks.source.npc.parse_function(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_function_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_function_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_function_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
@@ -48837,11 +49126,11 @@ void HP_npc_parse_mob2(struct spawn_data *mobspawn) {
}
return;
}
-const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+const char* HP_npc_parse_mob(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_mob_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_mob_pre[hIndex].func;
@@ -48856,7 +49145,7 @@ const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char
retVal___ = HPMHooks.source.npc.parse_mob(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_mob_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mob_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_mob_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
@@ -48864,11 +49153,11 @@ const char* HP_npc_parse_mob(char *w1, char *w2, char *w3, char *w4, const char
}
return retVal___;
}
-const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+const char* HP_npc_parse_mapflag(const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
const char* retVal___ = NULL;
if( HPMHooks.count.HP_npc_parse_mapflag_pre ) {
- const char* (*preHookFunc) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*preHookFunc) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_mapflag_pre[hIndex].func;
@@ -48883,7 +49172,7 @@ const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const c
retVal___ = HPMHooks.source.npc.parse_mapflag(w1, w2, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_mapflag_post ) {
- const char* (*postHookFunc) (const char* retVal___, char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ const char* (*postHookFunc) (const char* retVal___, const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_mapflag_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_mapflag_post[hIndex].func;
retVal___ = postHookFunc(retVal___, w1, w2, w3, w4, start, buffer, filepath, retval);
@@ -48891,10 +49180,10 @@ const char* HP_npc_parse_mapflag(char *w1, char *w2, char *w3, char *w4, const c
}
return retVal___;
}
-void HP_npc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
+void HP_npc_parse_unknown_mapflag(const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval) {
int hIndex = 0;
if( HPMHooks.count.HP_npc_parse_unknown_mapflag_pre ) {
- void (*preHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ void (*preHookFunc) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_pre[hIndex].func;
@@ -48909,7 +49198,7 @@ void HP_npc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const ch
HPMHooks.source.npc.parse_unknown_mapflag(name, w3, w4, start, buffer, filepath, retval);
}
if( HPMHooks.count.HP_npc_parse_unknown_mapflag_post ) {
- void (*postHookFunc) (const char *name, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
+ void (*postHookFunc) (const char *name, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
for(hIndex = 0; hIndex < HPMHooks.count.HP_npc_parse_unknown_mapflag_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_npc_parse_unknown_mapflag_post[hIndex].func;
postHookFunc(name, w3, w4, start, buffer, filepath, retval);
@@ -57122,6 +57411,221 @@ void HP_pc_update_idle_time(struct map_session_data *sd, enum e_battle_config_id
}
return;
}
+/* libpcre */
+pcre* HP_libpcre_compile(const char *pattern, int options, const char **errptr, int *erroffset, const unsigned char *tableptr) {
+ int hIndex = 0;
+ pcre* retVal___ = NULL;
+ if( HPMHooks.count.HP_libpcre_compile_pre ) {
+ pcre* (*preHookFunc) (const char *pattern, int *options, const char **errptr, int *erroffset, const unsigned char *tableptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_compile_pre[hIndex].func;
+ retVal___ = preHookFunc(pattern, &options, errptr, erroffset, tableptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libpcre.compile(pattern, options, errptr, erroffset, tableptr);
+ }
+ if( HPMHooks.count.HP_libpcre_compile_post ) {
+ pcre* (*postHookFunc) (pcre* retVal___, const char *pattern, int *options, const char **errptr, int *erroffset, const unsigned char *tableptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_compile_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_compile_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, pattern, &options, errptr, erroffset, tableptr);
+ }
+ }
+ return retVal___;
+}
+pcre_extra* HP_libpcre_study(const pcre *code, int options, const char **errptr) {
+ int hIndex = 0;
+ pcre_extra* retVal___ = NULL;
+ if( HPMHooks.count.HP_libpcre_study_pre ) {
+ pcre_extra* (*preHookFunc) (const pcre *code, int *options, const char **errptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_study_pre[hIndex].func;
+ retVal___ = preHookFunc(code, &options, errptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libpcre.study(code, options, errptr);
+ }
+ if( HPMHooks.count.HP_libpcre_study_post ) {
+ pcre_extra* (*postHookFunc) (pcre_extra* retVal___, const pcre *code, int *options, const char **errptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_study_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_study_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, code, &options, errptr);
+ }
+ }
+ return retVal___;
+}
+int HP_libpcre_exec(const pcre *code, const pcre_extra *extra, const char *subject, int length, int startoffset, int options, int *ovector, int ovecsize) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libpcre_exec_pre ) {
+ int (*preHookFunc) (const pcre *code, const pcre_extra *extra, const char *subject, int *length, int *startoffset, int *options, int *ovector, int *ovecsize);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_exec_pre[hIndex].func;
+ retVal___ = preHookFunc(code, extra, subject, &length, &startoffset, &options, ovector, &ovecsize);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libpcre.exec(code, extra, subject, length, startoffset, options, ovector, ovecsize);
+ }
+ if( HPMHooks.count.HP_libpcre_exec_post ) {
+ int (*postHookFunc) (int retVal___, const pcre *code, const pcre_extra *extra, const char *subject, int *length, int *startoffset, int *options, int *ovector, int *ovecsize);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_exec_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_exec_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, code, extra, subject, &length, &startoffset, &options, ovector, &ovecsize);
+ }
+ }
+ return retVal___;
+}
+void HP_libpcre_free(void *ptr) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libpcre_free_pre ) {
+ void (*preHookFunc) (void *ptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_free_pre[hIndex].func;
+ preHookFunc(ptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libpcre.free(ptr);
+ }
+ if( HPMHooks.count.HP_libpcre_free_post ) {
+ void (*postHookFunc) (void *ptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_free_post[hIndex].func;
+ postHookFunc(ptr);
+ }
+ }
+ return;
+}
+int HP_libpcre_copy_substring(const char *subject, int *ovector, int stringcount, int stringnumber, char *buffer, int buffersize) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libpcre_copy_substring_pre ) {
+ int (*preHookFunc) (const char *subject, int *ovector, int *stringcount, int *stringnumber, char *buffer, int *buffersize);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_copy_substring_pre[hIndex].func;
+ retVal___ = preHookFunc(subject, ovector, &stringcount, &stringnumber, buffer, &buffersize);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libpcre.copy_substring(subject, ovector, stringcount, stringnumber, buffer, buffersize);
+ }
+ if( HPMHooks.count.HP_libpcre_copy_substring_post ) {
+ int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int *stringcount, int *stringnumber, char *buffer, int *buffersize);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_substring_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_copy_substring_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, subject, ovector, &stringcount, &stringnumber, buffer, &buffersize);
+ }
+ }
+ return retVal___;
+}
+void HP_libpcre_free_substring(const char *stringptr) {
+ int hIndex = 0;
+ if( HPMHooks.count.HP_libpcre_free_substring_pre ) {
+ void (*preHookFunc) (const char *stringptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_free_substring_pre[hIndex].func;
+ preHookFunc(stringptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return;
+ }
+ }
+ {
+ HPMHooks.source.libpcre.free_substring(stringptr);
+ }
+ if( HPMHooks.count.HP_libpcre_free_substring_post ) {
+ void (*postHookFunc) (const char *stringptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_free_substring_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_free_substring_post[hIndex].func;
+ postHookFunc(stringptr);
+ }
+ }
+ return;
+}
+int HP_libpcre_copy_named_substring(const pcre *code, const char *subject, int *ovector, int stringcount, const char *stringname, char *buffer, int buffersize) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libpcre_copy_named_substring_pre ) {
+ int (*preHookFunc) (const pcre *code, const char *subject, int *ovector, int *stringcount, const char *stringname, char *buffer, int *buffersize);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_copy_named_substring_pre[hIndex].func;
+ retVal___ = preHookFunc(code, subject, ovector, &stringcount, stringname, buffer, &buffersize);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libpcre.copy_named_substring(code, subject, ovector, stringcount, stringname, buffer, buffersize);
+ }
+ if( HPMHooks.count.HP_libpcre_copy_named_substring_post ) {
+ int (*postHookFunc) (int retVal___, const pcre *code, const char *subject, int *ovector, int *stringcount, const char *stringname, char *buffer, int *buffersize);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_copy_named_substring_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_copy_named_substring_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, code, subject, ovector, &stringcount, stringname, buffer, &buffersize);
+ }
+ }
+ return retVal___;
+}
+int HP_libpcre_get_substring(const char *subject, int *ovector, int stringcount, int stringnumber, const char **stringptr) {
+ int hIndex = 0;
+ int retVal___ = 0;
+ if( HPMHooks.count.HP_libpcre_get_substring_pre ) {
+ int (*preHookFunc) (const char *subject, int *ovector, int *stringcount, int *stringnumber, const char **stringptr);
+ *HPMforce_return = false;
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_pre; hIndex++ ) {
+ preHookFunc = HPMHooks.list.HP_libpcre_get_substring_pre[hIndex].func;
+ retVal___ = preHookFunc(subject, ovector, &stringcount, &stringnumber, stringptr);
+ }
+ if( *HPMforce_return ) {
+ *HPMforce_return = false;
+ return retVal___;
+ }
+ }
+ {
+ retVal___ = HPMHooks.source.libpcre.get_substring(subject, ovector, stringcount, stringnumber, stringptr);
+ }
+ if( HPMHooks.count.HP_libpcre_get_substring_post ) {
+ int (*postHookFunc) (int retVal___, const char *subject, int *ovector, int *stringcount, int *stringnumber, const char **stringptr);
+ for(hIndex = 0; hIndex < HPMHooks.count.HP_libpcre_get_substring_post; hIndex++ ) {
+ postHookFunc = HPMHooks.list.HP_libpcre_get_substring_post[hIndex].func;
+ retVal___ = postHookFunc(retVal___, subject, ovector, &stringcount, &stringnumber, stringptr);
+ }
+ }
+ return retVal___;
+}
/* pet */
int HP_pet_init(bool minimal) {
int hIndex = 0;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.sources.inc b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
index 024febdf8..bab4f3931 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.sources.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.sources.inc
@@ -1,8 +1,27 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-//
-// NOTE: This file was auto-generated and should never be manually edited,
-// as it will get overwritten.
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * NOTE: This file was auto-generated and should never be manually edited,
+ * as it will get overwritten.
+ */
memcpy(&HPMHooks.source.HCache, HCache, sizeof(struct HCache_interface));
memcpy(&HPMHooks.source.atcommand, atcommand, sizeof(struct atcommand_interface));
@@ -36,12 +55,14 @@ memcpy(&HPMHooks.source.mapit, mapit, sizeof(struct mapit_interface));
memcpy(&HPMHooks.source.mapreg, mapreg, sizeof(struct mapreg_interface));
memcpy(&HPMHooks.source.mercenary, mercenary, sizeof(struct mercenary_interface));
memcpy(&HPMHooks.source.mob, mob, sizeof(struct mob_interface));
+memcpy(&HPMHooks.source.npc_chat, npc_chat, sizeof(struct npc_chat_interface));
memcpy(&HPMHooks.source.npc, npc, sizeof(struct npc_interface));
memcpy(&HPMHooks.source.nullpo, nullpo, sizeof(struct nullpo_interface));
memcpy(&HPMHooks.source.party, party, sizeof(struct party_interface));
memcpy(&HPMHooks.source.path, path, sizeof(struct path_interface));
memcpy(&HPMHooks.source.pcg, pcg, sizeof(struct pc_groups_interface));
memcpy(&HPMHooks.source.pc, pc, sizeof(struct pc_interface));
+memcpy(&HPMHooks.source.libpcre, libpcre, sizeof(struct pcre_interface));
memcpy(&HPMHooks.source.pet, pet, sizeof(struct pet_interface));
memcpy(&HPMHooks.source.quest, quest, sizeof(struct quest_interface));
memcpy(&HPMHooks.source.script, script, sizeof(struct script_interface));
diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in
index e2ae0b8c3..6e8e3bfac 100644
--- a/src/plugins/Makefile.in
+++ b/src/plugins/Makefile.in
@@ -1,5 +1,20 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2013-2015 Hercules Dev Team
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 6d4a7789c..5b5d79bac 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include "config/core.h"
#include "common/hercules.h"
@@ -238,7 +254,30 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
return it?it->nameid:0;
}
void totable(void) {
+ time_t t;
+ struct tm *lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ int year = lt->tm_year+1900;
fprintf(tosql.fp,
+ "-- This file is part of Hercules.\n"
+ "-- http://herc.ws - http://github.com/HerculesWS/Hercules\n"
+ "--\n"
+ "-- Copyright (C) 2013-%d Hercules Dev Team\n"
+ "--\n"
+ "-- Hercules is free software: you can redistribute it and/or modify\n"
+ "-- it under the terms of the GNU General Public License as published by\n"
+ "-- the Free Software Foundation, either version 3 of the License, or\n"
+ "-- (at your option) any later version.\n"
+ "--\n"
+ "-- This program is distributed in the hope that it will be useful,\n"
+ "-- but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "-- GNU General Public License for more details.\n"
+ "--\n"
+ "-- You should have received a copy of the GNU General Public License\n"
+ "-- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n"
+
"-- NOTE: This file was auto-generated and should never be manually edited,\n"
"-- as it will get overwritten. If you need to modify this file,\n"
"-- please consider modifying the corresponding .conf file inside\n"
@@ -287,7 +326,7 @@ void totable(void) {
" `unequip_script` text,\n"
" PRIMARY KEY (`id`)\n"
") ENGINE=MyISAM;\n"
- "\n",tosql.db_name,tosql.db_name,tosql.db_name);
+ "\n", year, tosql.db_name,tosql.db_name,tosql.db_name);
}
void do_db2sql(void) {
/* link */
diff --git a/src/plugins/dbghelpplug.c b/src/plugins/dbghelpplug.c
index b5f1fe485..edd47814d 100644
--- a/src/plugins/dbghelpplug.c
+++ b/src/plugins/dbghelpplug.c
@@ -1,6 +1,23 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Portions Copyright (c) Athena Dev Teams
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
// Ported from eAthena Dev Team's version @ http://eathena-project.googlecode.com/svn/trunk/src/plugins/dbghelpplug.c
// Currently supported dbghelp 5.1
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index fea25514b..1ddecdc66 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -1,6 +1,24 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Sample Hercules Plugin
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/// Sample Hercules Plugin
#include "common/hercules.h" /* Should always be the first Hercules file included! (if you don't make it first, you won't be able to use interfaces) */
#include "common/memmgr.h"
@@ -40,6 +58,8 @@ struct sample_data_struct {
unsigned int someNumber;
};
+int my_setting;
+
/* sample packet implementation */
/* cmd 0xf3 - it is a client-server existent id, for clif_parse_GlobalMessage */
/* in this sample we do nothing and simply redirect */
@@ -111,10 +131,31 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amou
}
return 1;
}
-void parse_my_setting(const char *val) {
- ShowDebug("Received 'my_setting:%s'\n",val);
+/*
+* Key is the setting name in our example it's 'my_setting' while val is the value of it.
+* this way you can manage more than one setting in one function instead of define multiable ones
+*/
+
+void parse_my_setting(const char *key, const char *val) {
+ ShowDebug("Received '%s:%s'\n",key,val);
/* do anything with the var e.g. config_switch(val) */
+ /* for our example we will save it in global variable */
+
+ /* please note, battle settings can be only returned as int for scripts and other usage */
+ if (strcmpi(key,"my_setting") == 0)
+ my_setting = atoi(val);
+}
+
+/* Battle Config Settings need to have return function in-case scripts need to read it */
+int return_my_setting(const char *key)
+{
+ /* first we check the key to know what setting we need to return with strcmpi then return it */
+ if (strcmpi(key, "my_setting") == 0)
+ return my_setting;
+
+ return 0;
}
+
/* run when server starts */
HPExport void plugin_init (void) {
ShowInfo("Server type is ");
@@ -127,13 +168,19 @@ HPExport void plugin_init (void) {
ShowInfo("I'm being run from the '%s' filename\n", SERVER_NAME);
- /* addAtcommand("command-key",command-function) tells map server to call ACMD(sample) when "sample" command is used */
- /* - it will print a warning when used on a non-map-server plugin */
- addAtcommand("sample",sample);//link our '@sample' command
+ // Atcommands only make sense on the map server
+ if (SERVER_TYPE == SERVER_TYPE_MAP) {
+ /* addAtcommand("command-key",command-function) tells map server to call ACMD(sample) when "sample" command is used */
+ /* - it will print a warning when used on a non-map-server plugin */
+ addAtcommand("sample",sample);//link our '@sample' command
+ }
- /* addScriptCommand("script-command-name","script-command-params-info",script-function) tells map server to call BUILDIN(sample) for the "sample(i)" command */
- /* - it will print a warning when used on a non-map-server plugin */
- addScriptCommand("sample","i",sample);
+ // Script commands only make sense on the map server
+ if (SERVER_TYPE == SERVER_TYPE_MAP) {
+ /* addScriptCommand("script-command-name","script-command-params-info",script-function) tells map server to call BUILDIN(sample) for the "sample(i)" command */
+ /* - it will print a warning when used on a non-map-server plugin */
+ addScriptCommand("sample","i",sample);
+ }
/* addCPCommand("console-command-name",command-function) tells server to call CPCMD(sample) for the 'this is a sample <optional-args>' console call */
/* in "console-command-name" usage of ':' indicates a category, for example 'this:is:a:sample' translates to 'this is a sample',
@@ -147,23 +194,26 @@ HPExport void plugin_init (void) {
* to trigger packetFunction in the packetIncomingPoint section ( available points listed in enum HPluginPacketHookingPoints within src/common/HPMi.h ) */
addPacket(0xf3,-1,sample_packet0f3,hpClif_Parse);
- /* in this sample we add a PreHook to pc->dropitem */
- /* to identify whether the item being dropped is on amount higher than 1 */
- /* if so, it stores the amount on a variable (my_pc_dropitem_storage) and changes the amount to 1 */
- addHookPre("pc->dropitem",my_pc_dropitem_pre);
-
- /* in this sample we add a PostHook to pc->dropitem */
- /* if the original pc->dropitem was successful and the amount stored on my_pc_dropitem_storage is higher than 1, */
- /* our posthook will display a message to the user about the cap */
- /* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */
- addHookPost("pc->dropitem",my_pc_dropitem_post);
+ // The following hooks would show an error message where pc->dropitem doesn't exist (login or char server)
+ if (SERVER_TYPE == SERVER_TYPE_MAP) {
+ /* in this sample we add a PreHook to pc->dropitem */
+ /* to identify whether the item being dropped is on amount higher than 1 */
+ /* if so, it stores the amount on a variable (my_pc_dropitem_storage) and changes the amount to 1 */
+ addHookPre("pc->dropitem",my_pc_dropitem_pre);
+
+ /* in this sample we add a PostHook to pc->dropitem */
+ /* if the original pc->dropitem was successful and the amount stored on my_pc_dropitem_storage is higher than 1, */
+ /* our posthook will display a message to the user about the cap */
+ /* - by checking whether it was successful (retVal value) it allows for the originals conditions to take place */
+ addHookPost("pc->dropitem",my_pc_dropitem_post);
+ }
}
/* triggered when server starts loading, before any server-specific data is set */
HPExport void server_preinit (void) {
/* makes map server listen to mysetting:value in any "battleconf" file (including imported or custom ones) */
/* value is not limited to numbers, its passed to our plugins handler (parse_my_setting) as const char *,
- * and thus can be manipulated at will */
- addBattleConf("my_setting",parse_my_setting);
+ * however for battle config to be returned to our script engine we need it to be number (int) so keep use it as int only */
+ addBattleConf("my_setting",parse_my_setting,return_my_setting);
}
/* run when server is ready (online) */
HPExport void server_online (void) {
diff --git a/src/plugins/script_mapquit.c b/src/plugins/script_mapquit.c
index 8ed108f82..767292f2d 100644
--- a/src/plugins/script_mapquit.c
+++ b/src/plugins/script_mapquit.c
@@ -1,21 +1,24 @@
-/*
- * Copyright (c) 2014 Hercules Dev Team
- * Base author: Haru <haru@dotalux.com>
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * This plugin is free software: you can redistribute it and/or modify
+ * Copyright (C) 2014-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * This plugin is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this plugin. If not, see <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/// Base author: Haru <haru@dotalux.com>
/// mapquit() script command
#include "common/hercules.h"
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index 328e2ef00..29331cb0f 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -1,5 +1,21 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2012-2015 Hercules Dev Team
+# Copyright (C) Athena Dev Teams
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/test/test_libconfig.c b/src/test/test_libconfig.c
index e0b5b3fca..ff742af71 100644
--- a/src/test/test_libconfig.c
+++ b/src/test/test_libconfig.c
@@ -1,6 +1,26 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-// Base author: Haru <haru@dotalux.com>
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2015 Hercules Dev Team
+ * Copyright (C) 2015 Haru <haru@dotalux.com>
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/// Base author: Haru <haru@dotalux.com>
+
#define HERCULES_CORE
#include "common/cbasetypes.h"
diff --git a/src/test/test_spinlock.c b/src/test/test_spinlock.c
index d4b2c48f9..38186a975 100644
--- a/src/test/test_spinlock.c
+++ b/src/test/test_spinlock.c
@@ -1,3 +1,23 @@
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "common/atomic.h"
diff --git a/src/tool/Makefile.in b/src/tool/Makefile.in
index b0c07b2fb..614ede4b7 100644
--- a/src/tool/Makefile.in
+++ b/src/tool/Makefile.in
@@ -1,5 +1,21 @@
-# Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-# See the LICENSE file
+# This file is part of Hercules.
+# http://herc.ws - http://github.com/HerculesWS/Hercules
+#
+# Copyright (C) 2012-2015 Hercules Dev Team
+# Copyright (C) Athena Dev Teams
+#
+# Hercules is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @configure_input@
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index 6356867e2..ec735e4e6 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -1,6 +1,23 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) Athena Dev Teams
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#define HERCULES_CORE
#include "common/cbasetypes.h"