summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char/CMakeLists.txt16
-rw-r--r--src/char/Makefile.in14
-rw-r--r--src/char/char.c32
-rw-r--r--src/char/int_guild.c2
-rw-r--r--src/char/int_pet.c2
-rw-r--r--src/common/core.c2
-rw-r--r--src/common/core.h2
-rw-r--r--src/common/mapindex.c2
-rw-r--r--src/common/sql.c2
-rw-r--r--src/common/sql.h2
-rw-r--r--src/login/Makefile.in8
-rw-r--r--src/login/login.c21
-rw-r--r--src/login/sql/CMakeLists.txt18
-rw-r--r--src/map/Makefile.in8
-rw-r--r--src/map/atcommand.c42
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/chrif.c2
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/elemental.c2
-rw-r--r--src/map/homunculus.c2
-rw-r--r--src/map/map.c6
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mob.c2
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/pc.c2
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/skill.h8
-rw-r--r--src/map/sql/CMakeLists.txt18
-rw-r--r--src/map/status.c2
-rw-r--r--src/map/unit.c2
34 files changed, 140 insertions, 101 deletions
diff --git a/src/char/CMakeLists.txt b/src/char/CMakeLists.txt
index 22b793bef..8c71a3b4c 100644
--- a/src/char/CMakeLists.txt
+++ b/src/char/CMakeLists.txt
@@ -9,7 +9,7 @@ set( SQL_CHAR_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "" )
# char sql
#
if( BUILD_SQL_SERVERS )
-message( STATUS "Creating target char-server_sql" )
+message( STATUS "Creating target char-server" )
set( SQL_CHAR_HEADERS
"${CMAKE_CURRENT_SOURCE_DIR}/char.h"
"${CMAKE_CURRENT_SOURCE_DIR}/int_auction.h"
@@ -46,15 +46,15 @@ set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_CHAR_HEADER
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
source_group( char FILES ${SQL_CHAR_HEADERS} ${SQL_CHAR_SOURCES} )
include_directories( ${INCLUDE_DIRS} )
-add_executable( char-server_sql ${SOURCE_FILES} )
-add_dependencies( char-server_sql ${DEPENDENCIES} )
-target_link_libraries( char-server_sql ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( char-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+add_executable( char-server ${SOURCE_FILES} )
+add_dependencies( char-server ${DEPENDENCIES} )
+target_link_libraries( char-server ${LIBRARIES} ${DEPENDENCIES} )
+set_target_properties( char-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server_sql" GROUP Runtime )
- install( TARGETS char-server_sql
+ cpack_add_component( Runtime_charserver_sql DESCRIPTION "char-server (sql version)" DISPLAY_NAME "char-server" GROUP Runtime )
+ install( TARGETS char-server
DESTINATION "."
COMPONENT Runtime_charserver_sql )
endif( INSTALL_COMPONENT_RUNTIME )
-message( STATUS "Creating target char-server_sql - done" )
+message( STATUS "Creating target char-server - done" )
endif( BUILD_SQL_SERVERS )
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index bfe9d1585..a64145dea 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -29,21 +29,21 @@ endif
@SET_MAKE@
#####################################################################
-.PHONY : all char-server_sql clean help
+.PHONY : all char-server clean help
-all: char-server_sql
+all: char-server
-char-server_sql: $(CHAR_SERVER_SQL_DEPENDS)
+char-server: $(CHAR_SERVER_SQL_DEPENDS)
@echo " LD $@"
- @@CC@ @LDFLAGS@ -o ../../char-server_sql@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @@CC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
clean:
@echo " CLEAN char"
- @rm -rf *.o obj_sql ../../char-server_sql@EXEEXT@
+ @rm -rf *.o obj_sql ../../char-server@EXEEXT@
help:
- @echo "possible targets are 'char-server_sql' 'all' 'clean' 'help'"
- @echo "'char-server_sql' - char server (SQL version)"
+ @echo "possible targets are 'char-server' 'all' 'clean' 'help'"
+ @echo "'char-server' - char server (SQL version)"
@echo "'all' - builds all above targets"
@echo "'clean' - cleans builds and objects"
@echo "'help' - outputs this message"
diff --git a/src/char/char.c b/src/char/char.c
index effcd6c31..e7220aa36 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1,5 +1,6 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#include "../common/cbasetypes.h"
#include "../common/core.h"
@@ -3768,7 +3769,18 @@ int parse_char(int fd)
char_id = atoi(data);
Sql_FreeResult(sql_handle);
- mmo_char_fromsql(char_id, &char_dat, true);
+
+ /* set char as online prior to loading its data so 3rd party applications will realise the sql data is not reliable */
+ set_char_online(-2,char_id,sd->account_id);
+ if( !mmo_char_fromsql(char_id, &char_dat, true) ) { /* failed? set it back offline */
+ set_char_offline(char_id, sd->account_id);
+ /* failed to load something. REJECT! */
+ WFIFOHEAD(fd,3);
+ WFIFOW(fd,0) = 0x6c;
+ WFIFOB(fd,2) = 0;
+ WFIFOSET(fd,3);
+ break;/* jump off this boat */
+ }
//Have to switch over to the DB instance otherwise data won't propagate [Kevin]
cd = (struct mmo_charstatus *)idb_get(char_db_, char_id);
@@ -3867,8 +3879,6 @@ int parse_char(int fd)
node->ip = ipl;
idb_put(auth_db, sd->account_id, node);
- set_char_online(-2,node->char_id,sd->account_id);
-
}
break;
@@ -4821,10 +4831,16 @@ int do_init(int argc, char **argv)
Sql_ShowDebug(sql_handle);
set_defaultparse(parse_char);
- char_fd = make_listen_bind(bind_ip, char_port);
- ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
-
+
+ if( (char_fd = make_listen_bind(bind_ip,char_port)) == -1 ) {
+ ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",char_port);
+ exit(EXIT_FAILURE);
+ }
+
Sql_HerculesUpdateCheck(sql_handle);
+
+ ShowStatus("The char-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %d).\n\n", char_port);
+
if( runflag != CORE_ST_STOP )
{
shutdown_callback = do_shutdown;
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index e25ebd902..7c2086722 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/char/int_pet.c b/src/char/int_pet.c
index 7a6c217f9..311ccd4be 100644
--- a/src/char/int_pet.c
+++ b/src/char/int_pet.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/common/core.c b/src/common/core.c
index 73416497d..4495cf1a2 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/common/core.h b/src/common/core.h
index dc4db6004..ccdfa6c35 100644
--- a/src/common/core.h
+++ b/src/common/core.h
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 685af641c..edf9f26f8 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/common/sql.c b/src/common/sql.c
index c0ab19e4e..3df9bc1c5 100644
--- a/src/common/sql.c
+++ b/src/common/sql.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/common/sql.h b/src/common/sql.h
index ebbd1711f..319581504 100644
--- a/src/common/sql.h
+++ b/src/common/sql.h
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index d0fc34756..543b31b93 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -31,11 +31,11 @@ endif
all: sql
-sql: obj_sql login-server_sql
+sql: obj_sql login-server
clean:
@echo " CLEAN login"
- @rm -rf *.o obj_sql ../../login-server@EXEEXT@ ../../login-server_sql@EXEEXT@
+ @rm -rf *.o obj_sql ../../login-server@EXEEXT@ ../../login-server@EXEEXT@
help:
@echo "possible targets are 'sql' 'all' 'clean' 'help'"
@@ -58,9 +58,9 @@ obj_sql:
#executables
-login-server_sql: $(LOGIN_SERVER_SQL_DEPENDS)
+login-server: $(LOGIN_SERVER_SQL_DEPENDS)
@echo " LD $@"
- @@CC@ @LDFLAGS@ -o ../../login-server_sql@EXEEXT@ $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @@CC@ @LDFLAGS@ -o ../../login-server@EXEEXT@ $(LOGIN_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# login object files
diff --git a/src/login/login.c b/src/login/login.c
index c7e250040..1ced8cb93 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
@@ -1863,24 +1863,25 @@ int do_init(int argc, char** argv)
}
}
- if( login_config.console )
- {
+ if( login_config.console ) {
//##TODO invoke a CONSOLE_START plugin event
}
- // server port open & binding
- login_fd = make_listen_bind(login_config.login_ip, login_config.login_port);
+ // server port open & binding
+ if( (login_fd = make_listen_bind(login_config.login_ip,login_config.login_port)) == -1 ) {
+ ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",login_config.login_port);
+ exit(EXIT_FAILURE);
+ }
- if( runflag != CORE_ST_STOP )
- {
+ if( runflag != CORE_ST_STOP ) {
shutdown_callback = do_shutdown;
runflag = LOGINSERVER_ST_RUNNING;
}
- 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");
-
account_db_sql_up(accounts);
+ 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");
+
return 0;
}
diff --git a/src/login/sql/CMakeLists.txt b/src/login/sql/CMakeLists.txt
index 1355f17ee..46cf4db02 100644
--- a/src/login/sql/CMakeLists.txt
+++ b/src/login/sql/CMakeLists.txt
@@ -3,7 +3,7 @@
# login sql
#
if( BUILD_SQL_SERVERS )
-message( STATUS "Creating target login-server_sql" )
+message( STATUS "Creating target login-server" )
set( SQL_LOGIN_HEADERS
"${SQL_LOGIN_SOURCE_DIR}/account.h"
"${SQL_LOGIN_SOURCE_DIR}/ipban.h"
@@ -24,16 +24,16 @@ set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_LOGIN_HEADE
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
source_group( login FILES ${SQL_LOGIN_HEADERS} ${SQL_LOGIN_SOURCES} )
include_directories( ${INCLUDE_DIRS} )
-add_executable( login-server_sql ${SOURCE_FILES} )
-add_dependencies( login-server_sql ${DEPENDENCIES} )
-target_link_libraries( login-server_sql ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( login-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+add_executable( login-server ${SOURCE_FILES} )
+add_dependencies( login-server ${DEPENDENCIES} )
+target_link_libraries( login-server ${LIBRARIES} ${DEPENDENCIES} )
+set_target_properties( login-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server_sql" GROUP Runtime )
- install( TARGETS login-server_sql
+ cpack_add_component( Runtime_loginserver_sql DESCRIPTION "login-server (sql version)" DISPLAY_NAME "login-server" GROUP Runtime )
+ install( TARGETS login-server
DESTINATION "."
COMPONENT Runtime_loginserver_sql )
endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} login-server_sql CACHE INTERNAL "" )
-message( STATUS "Creating target login-server_sql - done" )
+set( TARGET_LIST ${TARGET_LIST} login-server CACHE INTERNAL "" )
+message( STATUS "Creating target login-server - done" )
endif( BUILD_SQL_SERVERS )
diff --git a/src/map/Makefile.in b/src/map/Makefile.in
index 8e97221a7..d2c9d63d0 100644
--- a/src/map/Makefile.in
+++ b/src/map/Makefile.in
@@ -32,7 +32,7 @@ MAP_H = map.h chrif.h clif.h pc.h status.h npc.h \
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
ALL_DEPENDS=txt sql
- SQL_DEPENDS=map-server_sql
+ SQL_DEPENDS=map-server
else
ALL_TARGET=txt
SQL_DEPENDS=needs_mysql
@@ -59,7 +59,7 @@ sql: $(SQL_DEPENDS)
clean:
@echo " CLEAN map"
- @rm -rf *.o obj_txt obj_sql ../../map-server@EXEEXT@ ../../map-server_sql@EXEEXT@
+ @rm -rf *.o obj_txt obj_sql ../../map-server@EXEEXT@ ../../map-server@EXEEXT@
help:
ifeq ($(HAVE_MYSQL),yes)
@@ -90,9 +90,9 @@ obj_sql:
# executables
-map-server_sql: obj_sql $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a
+map-server: obj_sql $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a
@echo " LD $@"
- @@CC@ @LDFLAGS@ -o ../../map-server_sql@EXEEXT@ $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@
+ @@CC@ @LDFLAGS@ -o ../../map-server@EXEEXT@ $(MAP_SQL_OBJ) ../common/obj_sql/common_sql.a ../common/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @PCRE_LIBS@ @MYSQL_LIBS@
# map object files
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index e54166019..320ca83ff 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -5379,27 +5379,47 @@ ACMD_FUNC(clearcart)
* @skillid by [MouseJstr]
* lookup a skill by name
*------------------------------------------*/
-ACMD_FUNC(skillid)
-{
- int skillen, idx;
+#define MAX_SKILLID_PARTIAL_RESULTS 5
+#define MAX_SKILLID_PARTIAL_RESULTS_LEN 74 /* "skill " (6) + "%d:" (up to 5) + "%s" (up to 30) + " (%s)" (up to 33) */
+ACMD_FUNC(skillid) {
+ int skillen, idx, i, found = 0;
+ DBIterator* iter;
+ DBKey key;
+ DBData *data;
+ char partials[MAX_SKILLID_PARTIAL_RESULTS][MAX_SKILLID_PARTIAL_RESULTS_LEN];
+
nullpo_retr(-1, sd);
- if (!message || !*message)
- {
+ if (!message || !*message) {
clif_displaymessage(fd, msg_txt(1163)); // Please enter a skill name to look up (usage: @skillid <skill name>).
return -1;
}
skillen = strlen(message);
-
- for (idx = 0; idx < MAX_SKILL_DB; idx++) {
- if (strnicmp(skill_db[idx].name, message, skillen) == 0 || strnicmp(skill_db[idx].desc, message, skillen) == 0)
- {
- sprintf(atcmd_output, msg_txt(1164), idx, skill_db[idx].desc); // skill %d: %s
+
+ iter = db_iterator(skilldb_name2id);
+
+ for( data = iter->first(iter,&key); iter->exists(iter); data = iter->next(iter,&key) ) {
+ idx = skill_get_index(db_data2i(data));
+ if (strnicmp(key.str, message, skillen) == 0 || strnicmp(skill_db[idx].desc, message, skillen) == 0) {
+ sprintf(atcmd_output, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str); // skill %d: %s (%s)
clif_displaymessage(fd, atcmd_output);
+ } else if ( found < MAX_SKILLID_PARTIAL_RESULTS && ( stristr(key.str,message) || stristr(skill_db[idx].desc,message) ) ) {
+ snprintf(partials[found++], MAX_SKILLID_PARTIAL_RESULTS_LEN, msg_txt(1164), db_data2i(data), skill_db[idx].desc, key.str);
}
}
-
+
+ dbi_destroy(iter);
+
+ if( found ) {
+ sprintf(atcmd_output, msg_txt(1398), found); // -- Displaying first %d partial matches
+ clif_displaymessage(fd, atcmd_output);
+ }
+
+ for(i = 0; i < found; i++) { /* partials */
+ clif_displaymessage(fd, partials[i]);
+ }
+
return 0;
}
diff --git a/src/map/battle.c b/src/map/battle.c
index a6605da5e..cfb3df52e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/battle.h b/src/map/battle.h
index e3a0a51ab..14bd70fee 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 06eef0564..573fd8501 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/clif.c b/src/map/clif.c
index 6d9e57bd2..ed2044127 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
@@ -17119,7 +17119,7 @@ int do_init_clif(void) {
set_defaultparse(clif_parse);
if( make_listen_bind(bind_ip,map_port) == -1 ) {
- ShowFatalError("can't bind game port\n");
+ ShowFatalError("Failed to bind to port '"CL_WHITE"%d"CL_RESET"'\n",map_port);
exit(EXIT_FAILURE);
}
diff --git a/src/map/elemental.c b/src/map/elemental.c
index 33ef4d1b9..453845288 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index 92868c7c7..6cc671526 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/map.c b/src/map/map.c
index dde922f39..c02506073 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
@@ -3985,10 +3985,10 @@ int do_init(int argc, char *argv[])
if (battle_config.pk_mode)
ShowNotice("Server is running on '"CL_WHITE"PK Mode"CL_RESET"'.\n");
- ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
-
Sql_HerculesUpdateCheck(mmysql_handle);
+ ShowStatus("Server is '"CL_GREEN"ready"CL_RESET"' and listening on port '"CL_WHITE"%d"CL_RESET"'.\n\n", map_port);
+
if( runflag != CORE_ST_STOP )
{
shutdown_callback = do_shutdown;
diff --git a/src/map/map.h b/src/map/map.h
index 861a55d0a..38d9726cb 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index a97651b87..665e6aeac 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/mob.c b/src/map/mob.c
index 4f28923e9..b85238899 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/npc.c b/src/map/npc.c
index 671b4485a..d734381af 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/pc.c b/src/map/pc.c
index ad779a268..77b9948c4 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/pc.h b/src/map/pc.h
index 6e56a612e..1b00b7191 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/script.c b/src/map/script.c
index fe00599a6..dd137d575 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/skill.c b/src/map/skill.c
index 86a03b64b..51124e93b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
@@ -63,8 +63,6 @@ static struct eri *skill_timer_ers = NULL; //For handling skill_timerskills [Sko
DBMap* skillunit_db = NULL; // int id -> struct skill_unit*
-DBMap* skilldb_name2id = NULL;
-
/**
* Skill Cool Down Delay Saving
* Struct skill_cd is not a member of struct map_session_data
diff --git a/src/map/skill.h b/src/map/skill.h
index 9b6ba1b0c..94159d524 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -1,10 +1,12 @@
-// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
-// For more information, see LICENCE in the main folder
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// See the LICENSE file
+// Portions Copyright (c) Athena Dev Teams
#ifndef _SKILL_H_
#define _SKILL_H_
#include "../common/mmo.h" // MAX_SKILL, struct square
+#include "../common/db.h"
#include "map.h" // struct block_list
struct map_session_data;
struct homun_data;
@@ -22,6 +24,8 @@ struct status_change_entry;
#define MAX_SKILL_LEVEL 100
+DBMap* skilldb_name2id;
+
//Constants to identify the skill's inf value:
enum e_skill_inf
{
diff --git a/src/map/sql/CMakeLists.txt b/src/map/sql/CMakeLists.txt
index 47c8e495c..1d8bd5fe2 100644
--- a/src/map/sql/CMakeLists.txt
+++ b/src/map/sql/CMakeLists.txt
@@ -3,7 +3,7 @@
# map sql
#
if( BUILD_SQL_SERVERS )
-message( STATUS "Creating target map-server_sql" )
+message( STATUS "Creating target map-server" )
set( SQL_MAP_HEADERS
"${SQL_MAP_SOURCE_DIR}/atcommand.h"
"${SQL_MAP_SOURCE_DIR}/battle.h"
@@ -97,16 +97,16 @@ set( SOURCE_FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} ${SQL_MAP_HEADERS
source_group( common FILES ${COMMON_BASE_HEADERS} ${COMMON_SQL_HEADERS} )
source_group( map FILES ${SQL_MAP_HEADERS} ${SQL_MAP_SOURCES} )
include_directories( ${INCLUDE_DIRS} )
-add_executable( map-server_sql ${SOURCE_FILES} )
-add_dependencies( map-server_sql ${DEPENDENCIES} )
-target_link_libraries( map-server_sql ${LIBRARIES} ${DEPENDENCIES} )
-set_target_properties( map-server_sql PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
+add_executable( map-server ${SOURCE_FILES} )
+add_dependencies( map-server ${DEPENDENCIES} )
+target_link_libraries( map-server ${LIBRARIES} ${DEPENDENCIES} )
+set_target_properties( map-server PROPERTIES COMPILE_FLAGS "${DEFINITIONS}" )
if( INSTALL_COMPONENT_RUNTIME )
- cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server_sql" GROUP Runtime )
- install( TARGETS map-server_sql
+ cpack_add_component( Runtime_mapserver_sql DESCRIPTION "map-server (sql version)" DISPLAY_NAME "map-server" GROUP Runtime )
+ install( TARGETS map-server
DESTINATION "."
COMPONENT Runtime_mapserver_sql )
endif( INSTALL_COMPONENT_RUNTIME )
-set( TARGET_LIST ${TARGET_LIST} map-server_sql CACHE INTERNAL "" )
-message( STATUS "Creating target map-server_sql - done" )
+set( TARGET_LIST ${TARGET_LIST} map-server CACHE INTERNAL "" )
+message( STATUS "Creating target map-server - done" )
endif( BUILD_SQL_SERVERS )
diff --git a/src/map/status.c b/src/map/status.c
index 97b7c61a1..b07625322 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
diff --git a/src/map/unit.c b/src/map/unit.c
index 60de14093..4ca64d7f8 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1,4 +1,4 @@
-// Copyright (c) Hercules dev team, licensed under GNU GPL.
+// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams