From e6be5b2441baa5bc10613f1576ed6d6f3335bbef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Jun 2020 06:42:34 +0300 Subject: Force to use signed chars --- configure | 31 +++++++++++++++++++++++++++++-- configure.ac | 2 ++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a8ca071cb..9341c504a 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac 2b51b41ab. +# From configure.ac 6d5542195. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -6460,7 +6460,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=pointer-compare" >&5 $as_echo_n "checking whether $CC supports -fsanitize=pointer-compare... " >&6; } OLD_CFLAGS="$CFLAGS" @@ -6708,6 +6707,34 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsigned-char" >&5 +$as_echo_n "checking whether $CC supports -fsigned-char... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fsigned-char" + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -fsigned-char" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wno-unused-parameter" >&5 $as_echo_n "checking whether $CC supports -Wno-unused-parameter... " >&6; } OLD_CFLAGS="$CFLAGS" diff --git a/configure.ac b/configure.ac index 1d02fdf79..09a5ad6ad 100644 --- a/configure.ac +++ b/configure.ac @@ -1098,6 +1098,8 @@ AC_DEFUN([AC_CHECK_COMPILER_WNOFLAG], ] ) +AC_CHECK_FLAG(-fsigned-char) + AC_CHECK_COMPILER_WNOFLAG(unused-parameter, [int foo(int bar) { return 0; }]) AC_CHECK_COMPILER_WNOFLAG(clobbered) AC_CHECK_COMPILER_WFLAG(empty-body) -- cgit v1.2.3-60-g2f50 From 40eecd7dee4626f829c3e5e05a1681090d561dbe Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Jun 2020 08:33:26 +0300 Subject: Disable error in atomic.h --- src/common/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/atomic.h b/src/common/atomic.h index 518d2e6ab..0d15d50d7 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -104,7 +104,7 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v // The __sync functions are available on x86 or ARMv6+ #if !defined(__x86_64__) && !defined(__i386__) \ && ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 ) -#error Your Target Platfrom is not supported +//#error Your Target Platfrom is not supported #endif static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64 increment){ -- cgit v1.2.3-60-g2f50 From 4223930c595f2d6b7ef7734da7290686ec6cdbf7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Jun 2020 07:28:08 +0300 Subject: Reduce travis clone depth to 1 --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 263f66776..76bc2eb06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,9 @@ script: compiler: false # Necessary at the top level because referenced by allow_failures env: ignore=this # Necessary at the top level because referenced by allow_failures +git: + depth: 1 + jobs: allow_failures: - compiler: clang -- cgit v1.2.3-60-g2f50 From 4f21b8d169f762608680a1f98f0b4dbc73a3f405 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Jun 2020 09:13:02 +0300 Subject: Show runlog.txt on libconfig tests crash --- tools/ci/travis.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 10c653925..489e15bc7 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -71,7 +71,8 @@ function run_server { function run_test { echo "Running: test_$1" sysctl -w kernel.core_pattern=core || true - ./test_$1 2>runlog.txt + rm -rf core* || true + CRASH_PLEASE=1 ./test_$1 2>runlog.txt export errcode=$? export teststr=$(head -c 10000 runlog.txt) if [[ -n "${teststr}" ]]; then @@ -83,6 +84,13 @@ function run_test { fi if [ ${errcode} -ne 0 ]; then echo "test $1 terminated with exit code ${errcode}" + echo cat runlog.txt + cat runlog.txt + echo crash dump + COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) + if [[ -f "$COREFILE" ]]; then + gdb -c "$COREFILE" $1 -ex "thread apply all bt" -ex "set pagination 0" -batch + fi aborterror "Test failed" fi } -- cgit v1.2.3-60-g2f50 From 993d28e6afc3a3406c0197973dc9289a95c5d81e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Jun 2020 07:09:31 +0300 Subject: Use python2 in validateinterfaces.py --- tools/validateinterfaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/validateinterfaces.py b/tools/validateinterfaces.py index e031c34ab..6758ba44f 100755 --- a/tools/validateinterfaces.py +++ b/tools/validateinterfaces.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python2 # -*- coding: utf8 -*- # # This file is part of Hercules. -- cgit v1.2.3-60-g2f50 From 56a402c6b096a4b3f7bd6e27ba1dace44638c4dc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Jun 2020 07:55:16 +0300 Subject: Convert validateinterfaces.py to python3 --- tools/validateinterfaces.py | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/tools/validateinterfaces.py b/tools/validateinterfaces.py index 6758ba44f..324a2aeec 100755 --- a/tools/validateinterfaces.py +++ b/tools/validateinterfaces.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python2 +#! /usr/bin/env python # -*- coding: utf8 -*- # # This file is part of Hercules. @@ -23,7 +23,6 @@ import os import re import sys -from sets import Set interfaceRe = re.compile("struct (?P[a-z_]+)_interface (?P[a-z_]+)_s;") @@ -44,7 +43,7 @@ def searchStructStart(r, ifname): return False def readCFile(tracker, cFile): - methods = Set() + methods = set() shortIfName = "" with open(cFile, "r") as r: for line in r: @@ -78,7 +77,7 @@ def readCFile(tracker, cFile): return (None, shortIfName, methods) def readHFile(tracker, hFile, ifname): - methods = Set() + methods = set() with open(hFile, "r") as r: if searchStructStart(r, ifname) == False: return methods @@ -108,7 +107,7 @@ def checkIfFile(tracker, cFile, hFile): tracker.arr[ifname + "_" + method] = list() tracker.methods.add(ifname + "_" + method) if method not in cMethods: - print "Missing initialisation in file {0}: {1}".format(cFile, method) + print("Missing initialisation in file {0}: {1}".format(cFile, method)) tracker.retCode = 1 # for method in cMethods: # if method not in hMethods: @@ -175,13 +174,13 @@ def processDir(tracker, srcDir): checkFile(tracker, cPath) def reportMethods(tracker): - print "\n" + print("\n") for method in tracker.methods: if len(tracker.arr[method]) > 2: - print method + print(method) for t in tracker.arr[method]: - print t - print "\n" + print(t) + print("\n") def checkLostFile(tracker, cFile): @@ -198,7 +197,7 @@ def checkLostFile(tracker, cFile): continue if name not in tracker.fullmethods: # print "src : " + line - print name + print(name) def processLostDir(tracker, srcDir): files = os.listdir(srcDir) @@ -232,9 +231,9 @@ def runLong(): tracker = Tracker() tracker.arr = dict() -tracker.methods = Set() -tracker.fullmethods = Set() -tracker.interfaces = Set() +tracker.methods = set() +tracker.fullmethods = set() +tracker.interfaces = set() tracker.retCode = 0 if len(sys.argv) > 1: @@ -245,19 +244,19 @@ else: if cmd == "silent": runIf() elif cmd == "init": - print "Checking interfaces initialisation" + print("Checking interfaces initialisation") runIf() elif cmd == "lost": - print "Checking not added functions to interfaces" + print("Checking not added functions to interfaces") runLost(); elif cmd == "long": - print "Checking interfaces usage" + print("Checking interfaces usage") runLong(); else: - print "Checking interfaces initialisation" + print("Checking interfaces initialisation") runIf() - print "Checking not added functions to interfaces" + print("Checking not added functions to interfaces") runLost(); - print "Checking interfaces usage" + print("Checking interfaces usage") runLong(); exit(tracker.retCode) -- cgit v1.2.3-60-g2f50 From 93f613c3565151fd8478a6b7563d2af1850b2a86 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Jun 2020 07:33:14 +0300 Subject: Add workaround for create sql user and grant rights to it In some mysql version default grant code not works. --- tools/ci/travis.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 489e15bc7..a268f38eb 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -154,7 +154,12 @@ case "$MODE" in ;; adduser) echo "Adding user $NEWUSER as $DBUSER, with access to database $DBNAME..." - mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" + echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';"' || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true ;; build) (cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error." -- cgit v1.2.3-60-g2f50 From d27c70c87ba0728bd12193ceb15484a1919fa068 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Jun 2020 09:26:53 +0300 Subject: Update travis.sh with fixes for travis and new os --- tools/ci/travis.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index a268f38eb..2e0684dbf 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -37,6 +37,7 @@ function usage { echo " $0 build [configure args]" echo " $0 test [dbuser] [dbpassword] [dbhost]" echo " $0 getplugins" + echo " $0 startmysql" exit 1 } @@ -154,12 +155,14 @@ case "$MODE" in ;; adduser) echo "Adding user $NEWUSER as $DBUSER, with access to database $DBNAME..." - echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true - echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';"' || true mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true - echo 'mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';"' || true mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG --execute="ALTER USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="CREATE USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="GRANT SELECT,INSERT,UPDATE,DELETE ON $DBNAME.* TO '$NEWUSER'@'$DBHOST';" || true + mysql --defaults-file=/etc/mysql/debian.cnf $DBPASS_ARG $DBHOST_ARG --execute="ALTER USER '$NEWUSER'@'$DBHOST' IDENTIFIED BY '$NEWPASS';" || true + ;; build) (cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error." @@ -251,6 +254,13 @@ EOF # echo "Plugin not found, skipping advanced tests." #fi ;; + startmysql) + echo "Starting mysql..." + service mysql status || true + service mysql stop || true + service mysql start || true + service mysql status || true + ;; *) usage ;; -- cgit v1.2.3-60-g2f50 From c5d05224e5961588b3b4905d0bc4f811f544f5b2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Jun 2020 02:34:55 +0300 Subject: Add arm64 and ppc64le builds Also add gcc-10 builds into travis. --- .travis.yml | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 139 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 76bc2eb06..62c6f9a8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,17 @@ addons: install: - ./tools/ci/travis.sh getplugins || true +arch: + - amd64 + before_script: - uname -a + - env - ulimit -c unlimited -S - - ./tools/ci/travis.sh createdb ragnarok root - - ./tools/ci/travis.sh importdb ragnarok root - - ./tools/ci/travis.sh adduser ragnarok travis travis root + - if [[ "$(uname -m)" != "x86_64" ]]; then $SUDO ./tools/ci/travis.sh startmysql; fi + - $SUDO ./tools/ci/travis.sh createdb ragnarok root + - $SUDO ./tools/ci/travis.sh importdb ragnarok root + - $SUDO ./tools/ci/travis.sh adduser ragnarok travis travis root script: - if [[ ! -z "${HPM}" ]]; then ./tools/ci/travis.sh buildhpm $CONFIGURE_FLAGS; fi @@ -117,9 +122,57 @@ jobs: - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-buildbot" - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug CC=gcc-10 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server + - compiler: gcc + env: CONFIGURE_FLAGS="--enable-debug CC=gcc-10 --disable-renewal --enable-Werror --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server + - compiler: gcc + env: CONFIGURE_FLAGS="--enable-debug CC=gcc --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc + - libpcre3-dev + - mysql-server + - compiler: gcc + env: CONFIGURE_FLAGS="--enable-debug CC=gcc --disable-renewal --enable-Werror --enable-packetver=20200304 --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc + - libpcre3-dev + - mysql-server + - compiler: gcc + env: CONFIGURE_FLAGS="--enable-debug CC=gcc-10 --enable-packetver-zero --enable-Werror --enable-packetver=20200304 --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: @@ -192,6 +245,87 @@ jobs: packages: - gdb - gcc-8 + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server + - compiler: gcc + env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - gdb + - gcc-10 + - libpcre3-dev + - mysql-server + - compiler: gcc + arch: arm64 + env: CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - libpcre3-dev + - gdb + - mysql-server + - gcc-10 + - compiler: gcc + arch: arm64 + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror CC=gcc-10 --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" + dist: focal + addons: + apt: + packages: + - libpcre3-dev + - gdb + - mysql-server + - gcc-10 + - compiler: gcc + arch: ppc64le + env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" + dist: bionic + addons: + apt: + packages: + - libpcre3-dev + - gdb + - mysql-server +# big endian not supported +# - compiler: gcc +# arch: s390x +# env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" ROOT="true" +# addons: +# apt: +# packages: +# - libpcre3-dev +# - gdb notifications: email: false -- cgit v1.2.3-60-g2f50 From f73dd1e9a43eb3914ba040944b5a21c663cb8ca7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Jun 2020 03:42:08 +0300 Subject: Fix HPM data check violations between server and plugins --- src/common/hercules.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/common/hercules.h b/src/common/hercules.h index 89ea761b4..e62656494 100644 --- a/src/common/hercules.h +++ b/src/common/hercules.h @@ -23,11 +23,15 @@ #include "config/core.h" #include "common/cbasetypes.h" +#ifdef HERCULES_CORE +#define HPExport static +#else // HERCULES_CORE #ifdef WIN32 - #define HPExport __declspec(dllexport) -#else - #define HPExport __attribute__((visibility("default"))) -#endif +#define HPExport __declspec(dllexport) +#else // WIN32 +#define HPExport __attribute__((visibility("default"))) +#endif // WIN32 +#endif // HERCULES_CORE #define HPShared extern -- cgit v1.2.3-60-g2f50 From 6a491c515944da24d995d80face1a57133b230f6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 03:50:27 +0300 Subject: Disable odr violation detection in ci --- tools/ci/travis.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 2e0684dbf..195bee2f8 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -227,9 +227,9 @@ EOF echo "run tests" if [[ $DBUSER == "travis" ]]; then echo "Disable leak dection on travis" - export ASAN_OPTIONS=detect_leaks=0:detect_stack_use_after_return=true:strict_init_order=true + export ASAN_OPTIONS=detect_leaks=0:detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=0 else - export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true + export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=0 fi # run_test spinlock # Not running the spinlock test for the time being (too time consuming) run_test libconfig -- cgit v1.2.3-60-g2f50 From 4310e652e08c43531ffa2d190ca24b8c1cf412ad Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 08:38:45 +0300 Subject: Reduce travis jobs count --- .travis.yml | 137 ------------------------------------------------------------ 1 file changed, 137 deletions(-) diff --git a/.travis.yml b/.travis.yml index 62c6f9a8b..151d48c3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,82 +97,12 @@ jobs: packages: - gdb - clang-4.0 - - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --enable-Werror --enable-packetver=20130724 --enable-packetver-re --enable-buildbot" - addons: - apt: - sources: - - llvm-toolchain-trusty-4.0 - - ubuntu-toolchain-r-test - packages: - - gdb - - clang-4.0 - - compiler: clang - env: CONFIGURE_FLAGS="--enable-debug CC=clang-4.0 --disable-renewal --enable-Werror --enable-buildbot" - addons: - apt: - sources: - - llvm-toolchain-trusty-4.0 - - ubuntu-toolchain-r-test - packages: - - gdb - - clang-4.0 - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-buildbot" - compiler: clang env: CONFIGURE_FLAGS="--enable-debug --disable-renewal --enable-Werror --enable-buildbot" - compiler: gcc env: CONFIGURE_FLAGS="--enable-debug --enable-Werror --enable-packetver=20200304 --enable-buildbot" - - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug CC=gcc-10 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug CC=gcc-10 --disable-renewal --enable-Werror --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug CC=gcc --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc - - libpcre3-dev - - mysql-server - - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug CC=gcc --disable-renewal --enable-Werror --enable-packetver=20200304 --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc - - libpcre3-dev - - mysql-server - - compiler: gcc - env: CONFIGURE_FLAGS="--enable-debug CC=gcc-10 --enable-packetver-zero --enable-Werror --enable-packetver=20200304 --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: @@ -182,15 +112,6 @@ jobs: packages: - gdb - gcc-5 - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-5 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gdb - - gcc-5 - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" addons: @@ -200,24 +121,6 @@ jobs: packages: - gdb - gcc-6 - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-6 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gdb - - gcc-6 - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug CC=gcc-7 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gdb - - gcc-7 - compiler: gcc env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-7 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" addons: @@ -245,46 +148,6 @@ jobs: packages: - gdb - gcc-8 - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" SUDO="sudo" - dist: focal - addons: - apt: - packages: - - gdb - - gcc-10 - - libpcre3-dev - - mysql-server - compiler: gcc arch: arm64 env: CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-10 --enable-Werror --enable-packetver=20200304 --enable-packetver-re --enable-buildbot --disable-manager" SUDO="sudo" -- cgit v1.2.3-60-g2f50 From 3f90a0ffa8728d5cda375d9e1f5a6d53c112db30 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 10:22:19 +0300 Subject: Read battle config in minimal run This allow fix warnings in different service plugins. --- src/map/map.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/map.c b/src/map/map.c index 24d571498..644994c09 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6691,6 +6691,8 @@ int do_init(int argc, char *argv[]) atcommand->msg_read(map->MSG_CONF_NAME, false); map->inter_config_read(map->INTER_CONF_NAME, false); logs->config_read(map->LOG_CONF_NAME, false); + } else { + battle->config_read(map->BATTLE_CONF_FILENAME, false); } script->config_read(map->SCRIPT_CONF_NAME, false); -- cgit v1.2.3-60-g2f50 From a3f5054b25c492ce881a1285fb1a13e433ab3ecf Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 10:23:05 +0300 Subject: Disable not existing maps in map index and npc scripts --- db/map_index.txt | 6 +++--- npc/mapflag/night.txt | 4 ++-- npc/mapflag/nobranch.txt | 4 ++-- npc/mapflag/nomemo.txt | 4 ++-- npc/mapflag/noteleport.txt | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/db/map_index.txt b/db/map_index.txt index fbbf4d25a..6e77cb838 100644 --- a/db/map_index.txt +++ b/db/map_index.txt @@ -642,9 +642,9 @@ ve_fild04 ve_fild05 ve_fild06 ve_fild07 -poring_c01 -poring_c02 -que_ng +//poring_c01 628 +//poring_c02 629 +que_ng 630 nameless_i nameless_n nameless_in diff --git a/npc/mapflag/night.txt b/npc/mapflag/night.txt index 3e421bf13..444189412 100644 --- a/npc/mapflag/night.txt +++ b/npc/mapflag/night.txt @@ -263,8 +263,8 @@ ve_fild06 mapflag nightenabled ve_fild07 mapflag nightenabled //Episode 12 ==================== -poring_c01 mapflag nightenabled -poring_c02 mapflag nightenabled +//poring_c01 mapflag nightenabled +//poring_c02 mapflag nightenabled nameless_i mapflag nightenabled nameless_n mapflag nightenabled poring_w01 mapflag nightenabled diff --git a/npc/mapflag/nobranch.txt b/npc/mapflag/nobranch.txt index 4007c8203..7e4f3b49d 100644 --- a/npc/mapflag/nobranch.txt +++ b/npc/mapflag/nobranch.txt @@ -153,8 +153,8 @@ que_god01 mapflag nobranch que_god02 mapflag nobranch que_bingo mapflag nobranch que_hugel mapflag nobranch -poring_c01 mapflag nobranch -poring_c02 mapflag nobranch +//poring_c01 mapflag nobranch +//poring_c02 mapflag nobranch kh_mansion mapflag nobranch kh_rossi mapflag nobranch kh_school mapflag nobranch diff --git a/npc/mapflag/nomemo.txt b/npc/mapflag/nomemo.txt index 548f1563e..d4f7140fe 100644 --- a/npc/mapflag/nomemo.txt +++ b/npc/mapflag/nomemo.txt @@ -259,8 +259,8 @@ que_hugel mapflag nomemo que_rachel mapflag nomemo que_san04 mapflag nomemo que_thor mapflag nomemo -poring_c01 mapflag nomemo -poring_c02 mapflag nomemo +//poring_c01 mapflag nomemo +//poring_c02 mapflag nomemo // Dungeons ================= alde_dun01 mapflag nomemo alde_dun02 mapflag nomemo diff --git a/npc/mapflag/noteleport.txt b/npc/mapflag/noteleport.txt index 537781075..9f41e4342 100644 --- a/npc/mapflag/noteleport.txt +++ b/npc/mapflag/noteleport.txt @@ -186,8 +186,8 @@ kh_kiehl01 mapflag noteleport kh_kiehl02 mapflag noteleport que_rachel mapflag noteleport que_thor mapflag noteleport -poring_c01 mapflag noteleport -poring_c02 mapflag noteleport +//poring_c01 mapflag noteleport +//poring_c02 mapflag noteleport que_job01 mapflag noteleport que_job02 mapflag noteleport que_job03 mapflag noteleport -- cgit v1.2.3-60-g2f50 From 8b5fc0b67b78a6f4336705e22806c837257cdead Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 10:30:57 +0300 Subject: Fix double fclose in map cache plugin --- src/plugins/mapcache.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/mapcache.c b/src/plugins/mapcache.c index 3dc6e3b34..2b8e4c6f8 100644 --- a/src/plugins/mapcache.c +++ b/src/plugins/mapcache.c @@ -402,7 +402,6 @@ bool fix_md5_truncation_sub(FILE *fp, const char *map_name) fseek(fp, 0, SEEK_SET); fwrite(&mheader, sizeof(mheader), 1, fp); - fclose(fp); return true; } -- cgit v1.2.3-60-g2f50 From 9e3f2e60952846bee1f58ed81e777c75cbd17f28 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 11:14:39 +0300 Subject: Add missing plugins into make file --- src/plugins/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index e44412bfa..073cd8d41 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -43,7 +43,7 @@ HPMHOOKING = $(addprefix HPMHooking_, login char map) ALLPLUGINS = $(filter-out HPMHooking, $(basename $(wildcard *.c))) $(HPMHOOKING) # Plugins that will be built through 'make plugins' or 'make all' -PLUGINS = sample db2sql HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) +PLUGINS = sample db2sql constdb2doc generate-translations mapcache script_mapquit HPMHooking_char HPMHooking_login HPMHooking_map $(MYPLUGINS) COMMON_D = ../common # Includes private headers (plugins might need them) -- cgit v1.2.3-60-g2f50 From ad15a28454e81aa1258868a5002eab0c31fabf2f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 10:36:26 +0300 Subject: Run servers in travis.sh with all existing plugins --- tools/ci/travis.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 195bee2f8..1014787a8 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -223,7 +223,7 @@ EOF [ $? -eq 0 ] || aborterror "Unable to override inter-server configuration, aborting tests." ARGS="--load-script npc/dev/test.txt " ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt" - PLUGINS="--load-plugin HPMHooking --load-plugin sample" + PLUGINS="--load-plugin HPMHooking" echo "run tests" if [[ $DBUSER == "travis" ]]; then echo "Disable leak dection on travis" @@ -237,10 +237,31 @@ EOF run_server ./login-server run_server ./char-server run_server ./map-server "$ARGS" - echo "run all servers wit HPM" + echo "run all servers with HPM" run_server ./login-server "$PLUGINS" run_server ./char-server "$PLUGINS" run_server ./map-server "$ARGS $PLUGINS" + echo "run all servers with sample plugin" + run_server ./login-server "$PLUGINS --load-plugin sample" + run_server ./char-server "$PLUGINS --load-plugin sample" + run_server ./map-server "$PLUGINS --load-plugin sample" + echo "run all servers with constdb2doc" + run_server ./map-server "$PLUGINS --load-plugin constdb2doc --constdb2doc" + echo "run all servers with db2sql" + run_server ./map-server "$PLUGINS --load-plugin db2sql --db2sql" + run_server ./map-server "$PLUGINS --load-plugin db2sql --itemdb2sql" + run_server ./map-server "$PLUGINS --load-plugin db2sql --mobdb2sql" +# echo "run all servers with dbghelpplug" +# run_server ./login-server "$PLUGINS --load-plugin dbghelpplug" +# run_server ./char-server "$PLUGINS --load-plugin dbghelpplug" +# run_server ./map-server "$PLUGINS --load-plugin dbghelpplug" + echo "run all servers with generate-translations" + run_server ./map-server "$PLUGINS --load-plugin generate-translations --generate-translations" + echo "run all servers with mapcache" +# for other flags need grf or other files + run_server ./map-server "$PLUGINS --load-plugin mapcache --fix-md5" + echo "run all servers with script_mapquit" + run_server ./map-server "$PLUGINS --load-plugin script_mapquit" ;; getplugins) echo "Cloning plugins repository..." -- cgit v1.2.3-60-g2f50 From a496359909959ae1dca2c95e830c63aa37f714d5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2020 13:46:52 +0300 Subject: Call all plugin events even if map server running in minimal mode --- src/map/battle.c | 2 ++ src/map/map.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 611154953..d8c1be83e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7681,6 +7681,8 @@ static void do_init_battle(bool minimal) static void do_final_battle(void) { + if (map->minimal) + return; ers_destroy(battle->delay_damage_ers); } diff --git a/src/map/map.c b/src/map/map.c index 644994c09..3312680da 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -6743,8 +6743,8 @@ int do_init(int argc, char *argv[]) timer->add_func_list(map->removemobs_timer, "map_removemobs_timer"); timer->add_interval(timer->gettick()+1000, map->freeblock_timer, 0, 0, 60*1000); - HPM->event(HPET_INIT); } + HPM->event(HPET_INIT); atcommand->init(minimal); battle->init(minimal); @@ -6791,8 +6791,12 @@ int do_init(int argc, char *argv[]) exit(EXIT_SUCCESS); } - if( minimal ) { + if (minimal) { HPM->event(HPET_READY); + HPM->event(HPET_FINAL); + battle->final(); + HPM_map_do_final(); + HPM->event(HPET_POST_FINAL); exit(EXIT_SUCCESS); } -- cgit v1.2.3-60-g2f50 From 26b2f536b9e28744d993abad6785b19a6c3bbe64 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 06:57:37 +0300 Subject: Fix conflicting battle ground npc names in custom scripts --- npc/custom/battleground/bg_common.txt | 104 +++++++++++++++++----------------- npc/custom/battleground/bg_kvm01.txt | 52 ++++++++--------- npc/custom/battleground/bg_kvm02.txt | 52 ++++++++--------- npc/custom/battleground/bg_kvm03.txt | 52 ++++++++--------- 4 files changed, 130 insertions(+), 130 deletions(-) diff --git a/npc/custom/battleground/bg_common.txt b/npc/custom/battleground/bg_common.txt index 7ba3eecb0..81ec22963 100644 --- a/npc/custom/battleground/bg_common.txt +++ b/npc/custom/battleground/bg_common.txt @@ -5,7 +5,7 @@ // BattleGround Warper - Entrance // ********************************************************************* -- script Maroll Battle Recruiter::BatRecruit 4_F_JOB_KNIGHT,{ +- script Maroll Battle Recruiter::BatRecruit#custom 4_F_JOB_KNIGHT,{ mes "[Maroll Battle Recruiter]"; mes "Good day, adventurer."; mes "I'm a knight from a far country called Maroll Kingdom."; @@ -26,12 +26,12 @@ end; } -payon,189,104,3 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit1 4_F_JOB_KNIGHT -prontera,123,83,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit2 4_F_JOB_KNIGHT -rachel,149,138,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit3 4_F_JOB_KNIGHT -moc_ruins,75,162,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit4 4_F_JOB_KNIGHT -aldebaran,146,109,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit5 4_F_JOB_KNIGHT -lighthalzen,153,86,5 duplicate(BatRecruit) Maroll Battle Recruiter::BatRecruit6 4_F_JOB_KNIGHT +payon,189,104,3 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit1#custom 4_F_JOB_KNIGHT +prontera,123,83,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit2#custom 4_F_JOB_KNIGHT +rachel,149,138,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit3#custom 4_F_JOB_KNIGHT +moc_ruins,75,162,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit4#custom 4_F_JOB_KNIGHT +aldebaran,146,109,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit5#custom 4_F_JOB_KNIGHT +lighthalzen,153,86,5 duplicate(BatRecruit#custom) Maroll Battle Recruiter::BatRecruit6#custom 4_F_JOB_KNIGHT // BattleGround Warper - Exit // ********************************************************************* @@ -59,14 +59,14 @@ bat_room,148,150,4 script Teleporter#bat 4_F_TELEPORTER,{ // Kafra // ********************************************************************* -bat_room,148,147,4 script Kafra Staff::kaf_bat 4_F_KAFRA9,{ +bat_room,148,147,4 script Kafra Staff::kaf_bat#custom 4_F_KAFRA9,{ cutin "kafra_09",2; callfunc "F_Kafra",0,2,1,150,0; } // General Guillaume // ********************************************************************* -bat_room,160,159,3 script General Guillaume 4_M_KY_KIYOM,{ +bat_room,160,159,3 script General Guillaume#custom 4_M_KY_KIYOM,{ cutin "bat_kiyom2",2; mes "[General Guillaume]"; mes "Hot-blooded adventurer, we need your ability to win this battle."; @@ -105,7 +105,7 @@ bat_room,160,159,3 script General Guillaume 4_M_KY_KIYOM,{ // General Croix // ********************************************************************* -bat_room,160,140,3 script Prince Croix 4_M_CRU_CRUA,{ +bat_room,160,140,3 script Prince Croix#custom 4_M_CRU_CRUA,{ cutin "bat_crua1",2; mes "[Prince Croix]"; mes "Wise adventurer, why don't you lend us your power for victory?"; @@ -171,7 +171,7 @@ function script Time2Str { // Guillaume Knight - Tierra Valley // ********************************************************************* -bat_room,159,178,5 script Guillaume Knight#1 4_M_KY_SOLD,{ +bat_room,159,178,5 script Guillaume Knight#1c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -241,7 +241,7 @@ bat_room,156,178,5 script Tierra Valley Officer#1 4_M_KY_KNT,{ // Croix Knight - Tierra Valley // ********************************************************************* -bat_room,159,121,1 script Croix Knight#1 4_M_CRU_SOLD,{ +bat_room,159,121,1 script Croix Knight#1c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -311,7 +311,7 @@ bat_room,156,121,1 script Tierra Valley Officer#2 4_M_CRU_KNT,{ // Guillaume Knight - Tierra // ********************************************************************* -bat_room,167,178,5 script Guillaume Knight#2 4_M_KY_SOLD,{ +bat_room,167,178,5 script Guillaume Knight#2c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -381,7 +381,7 @@ bat_room,164,178,5 script Tierra Valley Officer#3 4_M_KY_KNT,{ // Croix Knight - Tierra // ********************************************************************* -bat_room,167,121,1 script Croix Knight#2 4_M_CRU_SOLD,{ +bat_room,167,121,1 script Croix Knight#2c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "Tierra Gorge is a very steep canyon with two forts residing in the north and south ends of the map."; next; @@ -451,7 +451,7 @@ bat_room,164,121,1 script Tierra Valley Officer#4 4_M_CRU_KNT,{ // Guillaune Knight - Flavius // ********************************************************************* -bat_room,175,178,5 script Guillaume Knight#3 4_M_KY_SOLD,{ +bat_room,175,178,5 script Guillaume Knight#3c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -522,7 +522,7 @@ bat_room,172,178,5 script Flavius Officer#1 4_M_KY_KNT,{ // Croix Knight - Flavius // ********************************************************************* -bat_room,175,121,1 script Croix Knight#3 4_M_CRU_SOLD,{ +bat_room,175,121,1 script Croix Knight#3c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -593,7 +593,7 @@ bat_room,172,121,1 script Flavius Officer#2 4_M_CRU_KNT,{ // Guillaune Knight - Flavius // ********************************************************************* -bat_room,151,178,5 script Guillaume Knight#4 4_M_KY_SOLD,{ +bat_room,151,178,5 script Guillaume Knight#4c 4_M_KY_SOLD,{ mes "[Guillaume Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -664,7 +664,7 @@ bat_room,148,178,5 script Flavius Officer#3 4_M_KY_KNT,{ // Croix Knight - Flavius // ********************************************************************* -bat_room,151,121,1 script Croix Knight#4 4_M_CRU_SOLD,{ +bat_room,151,121,1 script Croix Knight#4c 4_M_CRU_SOLD,{ mes "[Croix Knight]"; mes "The objective of the Flavius Battle is to score 2 points before your enemy by destroying their crystal."; next; @@ -1167,58 +1167,58 @@ OnTouch: } // Flavius bat_b02 -bat_room,57,81,0 duplicate(warp2bat_room) bat1 WARPNPC,1,1 -bat_room,57,90,0 duplicate(warp2bat_room) bat2 WARPNPC,1,1 +bat_room,57,81,0 duplicate(warp2bat_room) bat1#custom WARPNPC,1,1 +bat_room,57,90,0 duplicate(warp2bat_room) bat2#custom WARPNPC,1,1 // Free BG -bat_room,57,220,0 duplicate(warp2bat_room) bat3 WARPNPC,1,1 -bat_room,57,211,0 duplicate(warp2bat_room) bat4 WARPNPC,1,1 +bat_room,57,220,0 duplicate(warp2bat_room) bat3#custom WARPNPC,1,1 +bat_room,57,211,0 duplicate(warp2bat_room) bat4#custom WARPNPC,1,1 // Tierra Valley bat_a02 -bat_room,85,81,0 duplicate(warp2bat_room) bat5 WARPNPC,1,1 -bat_room,85,90,0 duplicate(warp2bat_room) bat6 WARPNPC,1,1 +bat_room,85,81,0 duplicate(warp2bat_room) bat5#custom WARPNPC,1,1 +bat_room,85,90,0 duplicate(warp2bat_room) bat6#custom WARPNPC,1,1 // Tierra Valley bat_a01 -bat_room,85,220,0 duplicate(warp2bat_room) bat7 WARPNPC,1,1 -bat_room,85,211,0 duplicate(warp2bat_room) bat8 WARPNPC,1,1 +bat_room,85,220,0 duplicate(warp2bat_room) bat7#custom WARPNPC,1,1 +bat_room,85,211,0 duplicate(warp2bat_room) bat8#custom WARPNPC,1,1 // Free BG -bat_room,113,81,0 duplicate(warp2bat_room) bat9 WARPNPC,1,1 -bat_room,113,90,0 duplicate(warp2bat_room) bat10 WARPNPC,1,1 +bat_room,113,81,0 duplicate(warp2bat_room) bat9#custom WARPNPC,1,1 +bat_room,113,90,0 duplicate(warp2bat_room) bat10#custom WARPNPC,1,1 // Free BG -bat_room,113,220,0 duplicate(warp2bat_room) bat11 WARPNPC,1,1 -bat_room,113,211,0 duplicate(warp2bat_room) bat12 WARPNPC,1,1 +bat_room,113,220,0 duplicate(warp2bat_room) bat11#custom WARPNPC,1,1 +bat_room,113,211,0 duplicate(warp2bat_room) bat12#custom WARPNPC,1,1 // Free BG -bat_room,141,81,0 duplicate(warp2bat_room) bat13 WARPNPC,1,1 -bat_room,141,90,0 duplicate(warp2bat_room) bat14 WARPNPC,1,1 +bat_room,141,81,0 duplicate(warp2bat_room) bat13#custom WARPNPC,1,1 +bat_room,141,90,0 duplicate(warp2bat_room) bat14#custom WARPNPC,1,1 // Free BG -bat_room,141,220,0 duplicate(warp2bat_room) bat15 WARPNPC,1,1 -bat_room,141,211,0 duplicate(warp2bat_room) bat16 WARPNPC,1,1 +bat_room,141,220,0 duplicate(warp2bat_room) bat15#custom WARPNPC,1,1 +bat_room,141,211,0 duplicate(warp2bat_room) bat16#custom WARPNPC,1,1 // Free BG -bat_room,169,81,0 duplicate(warp2bat_room) bat17 WARPNPC,1,1 -bat_room,169,90,0 duplicate(warp2bat_room) bat18 WARPNPC,1,1 +bat_room,169,81,0 duplicate(warp2bat_room) bat17#custom WARPNPC,1,1 +bat_room,169,90,0 duplicate(warp2bat_room) bat18#custom WARPNPC,1,1 // Free BG -bat_room,169,220,0 duplicate(warp2bat_room) bat19 WARPNPC,1,1 -bat_room,169,211,0 duplicate(warp2bat_room) bat20 WARPNPC,1,1 +bat_room,169,220,0 duplicate(warp2bat_room) bat19#custom WARPNPC,1,1 +bat_room,169,211,0 duplicate(warp2bat_room) bat20#custom WARPNPC,1,1 // Free BG -bat_room,197,81,0 duplicate(warp2bat_room) bat21 WARPNPC,1,1 -bat_room,197,90,0 duplicate(warp2bat_room) bat22 WARPNPC,1,1 +bat_room,197,81,0 duplicate(warp2bat_room) bat21#custom WARPNPC,1,1 +bat_room,197,90,0 duplicate(warp2bat_room) bat22#custom WARPNPC,1,1 // KvM bat_c03 -bat_room,197,220,0 duplicate(warp2bat_room) bat23 WARPNPC,1,1 -bat_room,197,211,0 duplicate(warp2bat_room) bat24 WARPNPC,1,1 +bat_room,197,220,0 duplicate(warp2bat_room) bat23#custom WARPNPC,1,1 +bat_room,197,211,0 duplicate(warp2bat_room) bat24#custom WARPNPC,1,1 // Free BG -bat_room,225,81,0 duplicate(warp2bat_room) bat25 WARPNPC,1,1 -bat_room,225,90,0 duplicate(warp2bat_room) bat26 WARPNPC,1,1 +bat_room,225,81,0 duplicate(warp2bat_room) bat25#custom WARPNPC,1,1 +bat_room,225,90,0 duplicate(warp2bat_room) bat26#custom WARPNPC,1,1 // KvM bat_c02 -bat_room,225,220,0 duplicate(warp2bat_room) bat27 WARPNPC,1,1 -bat_room,225,211,0 duplicate(warp2bat_room) bat28 WARPNPC,1,1 +bat_room,225,220,0 duplicate(warp2bat_room) bat27#custom WARPNPC,1,1 +bat_room,225,211,0 duplicate(warp2bat_room) bat28#custom WARPNPC,1,1 // Flavius bat_b01 -bat_room,253,81,0 duplicate(warp2bat_room) bat29 WARPNPC,1,1 -bat_room,253,90,0 duplicate(warp2bat_room) bat30 WARPNPC,1,1 +bat_room,253,81,0 duplicate(warp2bat_room) bat29#custom WARPNPC,1,1 +bat_room,253,90,0 duplicate(warp2bat_room) bat30#custom WARPNPC,1,1 // KvM bat_c01 -bat_room,253,220,0 duplicate(warp2bat_room) bat31 WARPNPC,1,1 -bat_room,253,211,0 duplicate(warp2bat_room) bat32 WARPNPC,1,1 +bat_room,253,220,0 duplicate(warp2bat_room) bat31#custom WARPNPC,1,1 +bat_room,253,211,0 duplicate(warp2bat_room) bat32#custom WARPNPC,1,1 // Badges Repairman // ********************************************************************* -bat_room,138,144,5 script Repairman#bg 4W_M_03,{ +bat_room,138,144,5 script Repairman#bgc 4W_M_03,{ callfunc "repairmain","Repairman"; end; } @@ -1226,7 +1226,7 @@ bat_room,138,144,5 script Repairman#bg 4W_M_03,{ // Badges Exchange // ********************************************************************* -bat_room,160,150,3 script Erundek 4_M_MANAGER,{ +bat_room,160,150,3 script Erundek#custom 4_M_MANAGER,{ mes "[Erundek]"; mes "Welcome, mighty warrior."; mes "What can I do for you today ?"; diff --git a/npc/custom/battleground/bg_kvm01.txt b/npc/custom/battleground/bg_kvm01.txt index bb3ba3e06..cf2d8aa15 100644 --- a/npc/custom/battleground/bg_kvm01.txt +++ b/npc/custom/battleground/bg_kvm01.txt @@ -5,27 +5,27 @@ // Registration NPC's // ********************************************************************* -bat_room,253,227,4 script Registration::KvM01R_Guillaume 4_M_KY_KNT,{ // KvM Guillaume +bat_room,253,227,4 script Registration::KvM01R_Guillaume#custom 4_M_KY_KNT,{ // KvM Guillaume end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnGuillaumeJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM01_BG#custom::OnGuillaumeJoin",1; end; OnEnterBG: - set $@KvM01BG_id1, waitingroom2bg("bat_c01",53,128,"KvM01_BG::OnGuillaumeQuit","KvM01_BG::OnGuillaumeDie"); + set $@KvM01BG_id1, waitingroom2bg("bat_c01",53,128,"KvM01_BG#custom::OnGuillaumeQuit","KvM01_BG#custom::OnGuillaumeDie"); end; } -bat_room,253,204,0 script Registration::KvM01R_Croix 4_M_CRU_KNT,{ // KvM Croix +bat_room,253,204,0 script Registration::KvM01R_Croix#custom 4_M_CRU_KNT,{ // KvM Croix end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM01_BG::OnCroixJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM01_BG#custom::OnCroixJoin",1; end; OnEnterBG: - set $@KvM01BG_id2, waitingroom2bg("bat_c01",146,55,"KvM01_BG::OnCroixQuit","KvM01_BG::OnCroixDie"); + set $@KvM01BG_id2, waitingroom2bg("bat_c01",146,55,"KvM01_BG#custom::OnCroixQuit","KvM01_BG#custom::OnCroixDie"); end; } @@ -49,7 +49,7 @@ bat_c01,145,60,0 duplicate(#bat_c01a) #bat_c01f HIDDEN_NPC // Battleground Engine // ********************************************************************* -- script KvM01_BG FAKE_NPC,{ +- script KvM01_BG#custom FAKE_NPC,{ end; OnInit: @@ -65,7 +65,7 @@ OnInit: OnGuillaumeJoin: OnCroixJoin: - donpcevent "KvM01_BG::OnReadyCheck"; + donpcevent "KvM01_BG#custom::OnReadyCheck"; end; OnGuillaumeQuit: @@ -76,7 +76,7 @@ OnGuillaumeDie: set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; - if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) donpcevent "KvM01_BG#custom::OnCroixWin"; } end; @@ -88,15 +88,15 @@ OnCroixDie: set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c01",.Guillaume_Score,.Croix_Score; - if( .Croix_Count < 1 ) donpcevent "KvM01_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) donpcevent "KvM01_BG#custom::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM01BG ) end; - set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM01R_Croix"); + set .@Guillaume, getwaitingroomstate(0,"KvM01R_Guillaume#custom"); + set .@Croix, getwaitingroomstate(0,"KvM01R_Croix#custom"); if( .@Guillaume < 5 || .@Croix < 5 ) { @@ -111,9 +111,9 @@ OnReadyCheck: } set $@KvM01BG, 1; // Starting - donpcevent "KvM01R_Croix::OnEnterBG"; - donpcevent "KvM01R_Guillaume::OnEnterBG"; - donpcevent "KvM01_BG::OnStart"; + donpcevent "KvM01R_Croix#custom::OnEnterBG"; + donpcevent "KvM01R_Guillaume#custom::OnEnterBG"; + donpcevent "KvM01_BG#custom::OnStart"; end; OnStart: @@ -166,7 +166,7 @@ OnTimer30000: mapannounce "bat_c01","There are not enough players to start the battle",1,0x696969; stopnpctimer; sleep 2000; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; end; } @@ -187,9 +187,9 @@ OnTimer300000: OnTimer330000: if( .Croix_Count > .Guillaume_Count ) - donpcevent "KvM01_BG::OnCroixWin"; + donpcevent "KvM01_BG#custom::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) - donpcevent "KvM01_BG::OnGuillaumeWin"; + donpcevent "KvM01_BG#custom::OnGuillaumeWin"; else { // Draw Game set $@KvM01BG, 3; @@ -198,7 +198,7 @@ OnTimer330000: stopnpctimer; sleep 2000; mapannounce "bat_c01","The time is out! This is a Tie...",1,0x696969; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; } end; @@ -209,7 +209,7 @@ OnGuillaumeWin: stopnpctimer; sleep 2000; mapannounce "bat_c01","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; end; OnCroixWin: @@ -219,7 +219,7 @@ OnCroixWin: stopnpctimer; sleep 2000; mapannounce "bat_c01","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000; - donpcevent "KvM01_BG::OnStop"; + donpcevent "KvM01_BG#custom::OnStop"; end; OnStop: @@ -230,12 +230,12 @@ OnStop: // Warp Teams bg_warp $@KvM01BG_id1,"bat_c01",53,128; bg_warp $@KvM01BG_id2,"bat_c01",146,55; - donpcevent "KvM01_BG_Out::OnBegin"; + donpcevent "KvM01_BG_Out#custom::OnBegin"; end; OnReset: stopnpctimer; - stopnpctimer "KvM01_BG_Out"; + stopnpctimer "KvM01_BG_Out#custom"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; @@ -254,11 +254,11 @@ OnReset: bg_updatescore "bat_c01",0,0; sleep 2000; set $@KvM01BG, 0; - donpcevent "KvM01_BG::OnReadyCheck"; // Maybe a game is ready to start + donpcevent "KvM01_BG#custom::OnReadyCheck"; // Maybe a game is ready to start end; } -- script KvM01_BG_Out FAKE_NPC,{ +- script KvM01_BG_Out#custom FAKE_NPC,{ end; OnBegin: @@ -275,7 +275,7 @@ OnTimer50000: mapannounce "bat_c01","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0x696969; end; OnTimer60000: - donpcevent "KvM01_BG::OnReset"; + donpcevent "KvM01_BG#custom::OnReset"; end; } diff --git a/npc/custom/battleground/bg_kvm02.txt b/npc/custom/battleground/bg_kvm02.txt index a6cadb3af..9ffc508a6 100644 --- a/npc/custom/battleground/bg_kvm02.txt +++ b/npc/custom/battleground/bg_kvm02.txt @@ -5,27 +5,27 @@ // Registration NPC's // ********************************************************************* -bat_room,225,227,4 script Registration::KvM02R_Guillaume 4_M_KY_KNT,{ // KvM Guillaume +bat_room,225,227,4 script Registration::KvM02R_Guillaume#custom 4_M_KY_KNT,{ // KvM Guillaume end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnGuillaumeJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM02_BG#custom::OnGuillaumeJoin",1; end; OnEnterBG: - set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG::OnGuillaumeQuit","KvM02_BG::OnGuillaumeDie"); + set $@KvM02BG_id1, waitingroom2bg("bat_c02",53,128,"KvM02_BG#custom::OnGuillaumeQuit","KvM02_BG#custom::OnGuillaumeDie"); end; } -bat_room,225,204,0 script Registration::KvM02R_Croix 4_M_CRU_KNT,{ // KvM Croix +bat_room,225,204,0 script Registration::KvM02R_Croix#custom 4_M_CRU_KNT,{ // KvM Croix end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM02_BG::OnCroixJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM02_BG#custom::OnCroixJoin",1; end; OnEnterBG: - set $@KvM02BG_id2, waitingroom2bg("bat_c02",146,55,"KvM02_BG::OnCroixQuit","KvM02_BG::OnCroixDie"); + set $@KvM02BG_id2, waitingroom2bg("bat_c02",146,55,"KvM02_BG#custom::OnCroixQuit","KvM02_BG#custom::OnCroixDie"); end; } @@ -49,7 +49,7 @@ bat_c02,145,60,0 duplicate(#bat_c02a) #bat_c02f HIDDEN_NPC // Battleground Engine // ********************************************************************* -- script KvM02_BG FAKE_NPC,{ +- script KvM02_BG#custom FAKE_NPC,{ end; OnInit: @@ -65,7 +65,7 @@ OnInit: OnGuillaumeJoin: OnCroixJoin: - donpcevent "KvM02_BG::OnReadyCheck"; + donpcevent "KvM02_BG#custom::OnReadyCheck"; end; OnGuillaumeQuit: @@ -76,7 +76,7 @@ OnGuillaumeDie: set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; - if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) donpcevent "KvM02_BG#custom::OnCroixWin"; } end; @@ -88,15 +88,15 @@ OnCroixDie: set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c02",.Guillaume_Score,.Croix_Score; - if( .Croix_Count < 1 ) donpcevent "KvM02_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) donpcevent "KvM02_BG#custom::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM02BG ) end; - set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM02R_Croix"); + set .@Guillaume, getwaitingroomstate(0,"KvM02R_Guillaume#custom"); + set .@Croix, getwaitingroomstate(0,"KvM02R_Croix#custom"); if( .@Guillaume < 5 || .@Croix < 5 ) { @@ -111,9 +111,9 @@ OnReadyCheck: } set $@KvM02BG, 1; // Starting - donpcevent "KvM02R_Croix::OnEnterBG"; - donpcevent "KvM02R_Guillaume::OnEnterBG"; - donpcevent "KvM02_BG::OnStart"; + donpcevent "KvM02R_Croix#custom::OnEnterBG"; + donpcevent "KvM02R_Guillaume#custom::OnEnterBG"; + donpcevent "KvM02_BG#custom::OnStart"; end; OnStart: @@ -166,7 +166,7 @@ OnTimer30000: mapannounce "bat_c02","There are not enough players to start the battle",1,0x808080; stopnpctimer; sleep 2000; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; end; } @@ -187,9 +187,9 @@ OnTimer300000: OnTimer330000: if( .Croix_Count > .Guillaume_Count ) - donpcevent "KvM02_BG::OnCroixWin"; + donpcevent "KvM02_BG#custom::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) - donpcevent "KvM02_BG::OnGuillaumeWin"; + donpcevent "KvM02_BG#custom::OnGuillaumeWin"; else { // Draw Game set $@KvM02BG, 3; @@ -198,7 +198,7 @@ OnTimer330000: stopnpctimer; sleep 2000; mapannounce "bat_c02","The time is out! This is a Tie...",1,0x808080; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; } end; @@ -209,7 +209,7 @@ OnGuillaumeWin: stopnpctimer; sleep 2000; mapannounce "bat_c02","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; end; OnCroixWin: @@ -219,7 +219,7 @@ OnCroixWin: stopnpctimer; sleep 2000; mapannounce "bat_c02","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000; - donpcevent "KvM02_BG::OnStop"; + donpcevent "KvM02_BG#custom::OnStop"; end; OnStop: @@ -230,12 +230,12 @@ OnStop: // Warp Teams bg_warp $@KvM02BG_id1,"bat_c02",53,128; bg_warp $@KvM02BG_id2,"bat_c02",146,55; - donpcevent "KvM02_BG_Out::OnBegin"; + donpcevent "KvM02_BG_Out#custom::OnBegin"; end; OnReset: stopnpctimer; - stopnpctimer "KvM02_BG_Out"; + stopnpctimer "KvM02_BG_Out#custom"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; @@ -254,11 +254,11 @@ OnReset: bg_updatescore "bat_c02",0,0; sleep 2000; set $@KvM02BG, 0; - donpcevent "KvM02_BG::OnReadyCheck"; // Maybe a game is ready to start + donpcevent "KvM02_BG#custom::OnReadyCheck"; // Maybe a game is ready to start end; } -- script KvM02_BG_Out FAKE_NPC,{ +- script KvM02_BG_Out#custom FAKE_NPC,{ end; OnBegin: @@ -275,7 +275,7 @@ OnTimer50000: mapannounce "bat_c02","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0x808080; end; OnTimer60000: - donpcevent "KvM02_BG::OnReset"; + donpcevent "KvM02_BG#custom::OnReset"; end; } diff --git a/npc/custom/battleground/bg_kvm03.txt b/npc/custom/battleground/bg_kvm03.txt index 8f255c90f..14d7c03a3 100644 --- a/npc/custom/battleground/bg_kvm03.txt +++ b/npc/custom/battleground/bg_kvm03.txt @@ -5,27 +5,27 @@ // Registration NPC's // ********************************************************************* -bat_room,197,227,4 script Registration::KvM03R_Guillaume 4_M_KY_KNT,{ // KvM Guillaume +bat_room,197,227,4 script Registration::KvM03R_Guillaume#custom 4_M_KY_KNT,{ // KvM Guillaume end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnGuillaumeJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM03_BG#custom::OnGuillaumeJoin",1; end; OnEnterBG: - set $@KvM03BG_id1, waitingroom2bg("bat_c03",53,128,"KvM03_BG::OnGuillaumeQuit","KvM03_BG::OnGuillaumeDie"); + set $@KvM03BG_id1, waitingroom2bg("bat_c03",53,128,"KvM03_BG#custom::OnGuillaumeQuit","KvM03_BG#custom::OnGuillaumeDie"); end; } -bat_room,197,204,0 script Registration::KvM03R_Croix 4_M_CRU_KNT,{ // KvM Croix +bat_room,197,204,0 script Registration::KvM03R_Croix#custom 4_M_CRU_KNT,{ // KvM Croix end; OnInit: - waitingroom "Battle Station 5 Players",5,"KvM03_BG::OnCroixJoin",1; + waitingroom "Battle Station 5 Players",5,"KvM03_BG#custom::OnCroixJoin",1; end; OnEnterBG: - set $@KvM03BG_id2, waitingroom2bg("bat_c03",146,55,"KvM03_BG::OnCroixQuit","KvM03_BG::OnCroixDie"); + set $@KvM03BG_id2, waitingroom2bg("bat_c03",146,55,"KvM03_BG#custom::OnCroixQuit","KvM03_BG#custom::OnCroixDie"); end; } @@ -49,7 +49,7 @@ bat_c03,145,60,0 duplicate(#bat_c03a) #bat_c03f HIDDEN_NPC // Battleground Engine // ********************************************************************* -- script KvM03_BG FAKE_NPC,{ +- script KvM03_BG#custom FAKE_NPC,{ end; OnInit: @@ -65,7 +65,7 @@ OnInit: OnGuillaumeJoin: OnCroixJoin: - donpcevent "KvM03_BG::OnReadyCheck"; + donpcevent "KvM03_BG#custom::OnReadyCheck"; end; OnGuillaumeQuit: @@ -76,7 +76,7 @@ OnGuillaumeDie: set .Guillaume_Count, .Guillaume_Count - 1; set .Croix_Score, .Croix_Score + 1; bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score; - if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG::OnCroixWin"; + if( .Guillaume_Count < 1 ) donpcevent "KvM03_BG#custom::OnCroixWin"; } end; @@ -88,15 +88,15 @@ OnCroixDie: set .Croix_Count, .Croix_Count - 1; set .Guillaume_Score, .Guillaume_Score + 1; bg_updatescore "bat_c03",.Guillaume_Score,.Croix_Score; - if( .Croix_Count < 1 ) donpcevent "KvM03_BG::OnGuillaumeWin"; + if( .Croix_Count < 1 ) donpcevent "KvM03_BG#custom::OnGuillaumeWin"; } end; OnReadyCheck: if( $@KvM03BG ) end; - set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume"); - set .@Croix, getwaitingroomstate(0,"KvM03R_Croix"); + set .@Guillaume, getwaitingroomstate(0,"KvM03R_Guillaume#custom"); + set .@Croix, getwaitingroomstate(0,"KvM03R_Croix#custom"); if( .@Guillaume < 5 || .@Croix < 5 ) { @@ -111,9 +111,9 @@ OnReadyCheck: } set $@KvM03BG, 1; // Starting - donpcevent "KvM03R_Croix::OnEnterBG"; - donpcevent "KvM03R_Guillaume::OnEnterBG"; - donpcevent "KvM03_BG::OnStart"; + donpcevent "KvM03R_Croix#custom::OnEnterBG"; + donpcevent "KvM03R_Guillaume#custom::OnEnterBG"; + donpcevent "KvM03_BG#custom::OnStart"; end; OnStart: @@ -166,7 +166,7 @@ OnTimer30000: mapannounce "bat_c03","There are not enough players to start the battle",1,0xC0C0C0; stopnpctimer; sleep 2000; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; end; } @@ -187,9 +187,9 @@ OnTimer300000: OnTimer330000: if( .Croix_Count > .Guillaume_Count ) - donpcevent "KvM03_BG::OnCroixWin"; + donpcevent "KvM03_BG#custom::OnCroixWin"; else if( .Croix_Count < .Guillaume_Count ) - donpcevent "KvM03_BG::OnGuillaumeWin"; + donpcevent "KvM03_BG#custom::OnGuillaumeWin"; else { // Draw Game set $@KvM03BG, 3; @@ -198,7 +198,7 @@ OnTimer330000: stopnpctimer; sleep 2000; mapannounce "bat_c03","The time is out! This is a Tie...",1,0xC0C0C0; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; } end; @@ -209,7 +209,7 @@ OnGuillaumeWin: stopnpctimer; sleep 2000; mapannounce "bat_c03","The Guillaume Army has won the Battle of Kreiger Von Midgard",1,0x0000FF; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; end; OnCroixWin: @@ -219,7 +219,7 @@ OnCroixWin: stopnpctimer; sleep 2000; mapannounce "bat_c03","The Croix Army has won the Battle of Kreiger Von Midgard",1,0xFF0000; - donpcevent "KvM03_BG::OnStop"; + donpcevent "KvM03_BG#custom::OnStop"; end; OnStop: @@ -230,12 +230,12 @@ OnStop: // Warp Teams bg_warp $@KvM03BG_id1,"bat_c03",53,128; bg_warp $@KvM03BG_id2,"bat_c03",146,55; - donpcevent "KvM03_BG_Out::OnBegin"; + donpcevent "KvM03_BG_Out#custom::OnBegin"; end; OnReset: stopnpctimer; - stopnpctimer "KvM03_BG_Out"; + stopnpctimer "KvM03_BG_Out#custom"; set .Croix_Count, 0; set .Guillaume_Count, 0; set .Croix_Score, 0; @@ -254,11 +254,11 @@ OnReset: bg_updatescore "bat_c03",0,0; sleep 2000; set $@KvM03BG, 0; - donpcevent "KvM03_BG::OnReadyCheck"; // Maybe a game is ready to start + donpcevent "KvM03_BG#custom::OnReadyCheck"; // Maybe a game is ready to start end; } -- script KvM03_BG_Out FAKE_NPC,{ +- script KvM03_BG_Out#custom FAKE_NPC,{ end; OnBegin: @@ -275,7 +275,7 @@ OnTimer50000: mapannounce "bat_c03","Battle of Kreiger Von Midgard will close in 10 seconds!",1,0xC0C0C0; end; OnTimer60000: - donpcevent "KvM03_BG::OnReset"; + donpcevent "KvM03_BG#custom::OnReset"; end; } -- cgit v1.2.3-60-g2f50 From 318a9cd7c7d0ae20d4bfa0d6226380f4cf2f6cef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 06:59:48 +0300 Subject: Remove duplicated function time2str from bg_common.txt --- npc/custom/battleground/bg_common.txt | 36 ----------------------------------- 1 file changed, 36 deletions(-) diff --git a/npc/custom/battleground/bg_common.txt b/npc/custom/battleground/bg_common.txt index 81ec22963..d997263e6 100644 --- a/npc/custom/battleground/bg_common.txt +++ b/npc/custom/battleground/bg_common.txt @@ -133,42 +133,6 @@ bat_room,160,140,3 script Prince Croix#custom 4_M_CRU_CRUA,{ end; } -// Time calculation Function -// ********************************************************************* -function script Time2Str { - set .@time_left, getarg(0) - gettimetick(2); - - set .@Days, .@time_left / 86400; - set .@time_left, .@time_left - (.@Days * 86400); - set .@Hours, .@time_left / 3600; - set .@time_left, .@time_left - (.@Hours * 3600); - set .@Minutes, .@time_left / 60; - set .@time_left, .@time_left - (.@Minutes * 60); - - set .@Time$, ""; - if( .@Days > 1 ) - set .@Time$, .@Time$ + .@Days + " days, "; - else if( .@Days > 0 ) - set .@Time$, .@Time$ + .@Days + " day, "; - - if( .@Hours > 1 ) - set .@Time$, .@Time$ + .@Hours + " hours, "; - else if( .@Hours > 0 ) - set .@Time$, .@Time$ + .@Hours + " hour, "; - - if( .@Minutes > 1 ) - set .@Time$, .@Time$ + .@Minutes + " minutes, "; - else if( .@Minutes > 0 ) - set .@Time$, .@Time$ + .@Minutes + " minute, "; - - if( .@time_left > 1 || .@time_left == 0 ) - set .@Time$, .@Time$ + .@time_left + " seconds."; - else if( .@time_left == 1 ) - set .@Time$, .@Time$ + .@time_left + " second."; - - return .@Time$; -} - // Guillaume Knight - Tierra Valley // ********************************************************************* bat_room,159,178,5 script Guillaume Knight#1c 4_M_KY_SOLD,{ -- cgit v1.2.3-60-g2f50 From a81baf345ec192ebdb1b857cbb55d909c2e6475b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 07:50:42 +0300 Subject: Add missing mobs and items for custom or disabled scripts in pre-re --- db/pre-re/item_db.conf | 5 +++++ db/pre-re/mob_db.conf | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf index cc7f5040d..c548209c8 100644 --- a/db/pre-re/item_db.conf +++ b/db/pre-re/item_db.conf @@ -98798,6 +98798,11 @@ item_db: ( AegisName: "Ein_1HMAGGER" Name: "Ein_1HMAGGER" }, +{ + Id: 28900 + AegisName: "Praetorian_Shield" + Name: "Praetorian Shield" +}, { Id: 28922 AegisName: "Herald_Of_GOD_IL" diff --git a/db/pre-re/mob_db.conf b/db/pre-re/mob_db.conf index 92fd149f3..eb0cf663b 100644 --- a/db/pre-re/mob_db.conf +++ b/db/pre-re/mob_db.conf @@ -50153,4 +50153,50 @@ mob_db: ( DamageMotion: 480 MvpExp: 0 }, +{ + Id: 2248 + SpriteName: "GOLDPORING" + Name: "Golden Poring" + Lv: 1 + Hp: 15 + Sp: 1 + Exp: 0 + JExp: 0 + AttackRange: 0 + Attack: [0, 0] + Def: 127 + Mdef: 5 + Stats: { + Str: 1 + Agi: 1 + Vit: 1 + Int: 1 + Dex: 999 + Luk: 1 + } + ViewRange: 10 + ChaseRange: 12 + Size: "Size_Medium" + Race: "RC_Plant" + Element: ("Ele_Water", 1) + Mode: { + CanMove: true + CanAttack: true + } + MoveSpeed: 400 + AttackDelay: 1872 + AttackMotion: 672 + DamageMotion: 480 + MvpExp: 0 +// Drops: { +// Blue_Card_C: 4000 +// BlueCard_2: 4000 +// BlueCard_0: 4000 +// BlueCard_1: 4000 +// BlueCard_W: 4000 +// BlueCard_R: 4000 +// RWC_Cele_Fire: 10000 +// RWC_Cele_Fire2: 10000 +// } +}, ) -- cgit v1.2.3-60-g2f50 From 4632f938b260492d4dae995b87f52af0deb7663b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 07:51:37 +0300 Subject: Fix conflicting npc names in re/merchants/hd_refiner.txt --- npc/re/merchants/hd_refiner.txt | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/npc/re/merchants/hd_refiner.txt b/npc/re/merchants/hd_refiner.txt index 43cdc2c01..7b032efff 100644 --- a/npc/re/merchants/hd_refiner.txt +++ b/npc/re/merchants/hd_refiner.txt @@ -38,7 +38,7 @@ //========================================================================= //== Blacksmith Mighty Hammer (+7~9) ======================= -- script ::MightyHammer FAKE_NPC,{ +- script ::MightyHammer#re FAKE_NPC,{ mes("[Blacksmith Mighty Hammer]"); mes("I'm a blacksmith skilled in refining weapons and armors."); mes("I can refine an item of your choice among the items you are equipped with."); @@ -171,20 +171,20 @@ mes "I am sure a person like you would never blame me for a decrease in refine level by 1. Hmm."; close; } -prt_in,59,54,3 duplicate(MightyHammer) Mighty Hammer#prt 4_M_DWARF -morocc_in,65,30,3 duplicate(MightyHammer) Mighty Hammer#morocc 4_M_DWARF -payon,148,176,3 duplicate(MightyHammer) Mighty Hammer#pay 4_M_DWARF -alberta_in,16,56,3 duplicate(MightyHammer) Mighty Hammer#alb 4_M_DWARF -yuno_in01,171,18,3 duplicate(MightyHammer) Mighty Hammer#yuno 4_M_DWARF -ein_in01,22,82,3 duplicate(MightyHammer) Mighty Hammer#ein 4_M_DWARF -lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 4_M_DWARF +prt_in,59,54,3 duplicate(MightyHammer#re) Mighty Hammer#prtre 4_M_DWARF +morocc_in,65,30,3 duplicate(MightyHammer#re) Mighty Hammer#moroccre 4_M_DWARF +payon,148,176,3 duplicate(MightyHammer#re) Mighty Hammer#payre 4_M_DWARF +alberta_in,16,56,3 duplicate(MightyHammer#re) Mighty Hammer#albre 4_M_DWARF +yuno_in01,171,18,3 duplicate(MightyHammer#re) Mighty Hammer#yunore 4_M_DWARF +ein_in01,22,82,3 duplicate(MightyHammer#re) Mighty Hammer#einre 4_M_DWARF +lhz_in02,280,19,3 duplicate(MightyHammer#re) Mighty Hammer#lhzre 4_M_DWARF //- iRO NPC locations - -//moc_para01,38,185,4 duplicate(MightyHammer) Mighty Hammer#ed 4_M_DWARF -//payon,174,133,4 duplicate(MightyHammer) Mighty Hammer#im 4_M_DWARF +//moc_para01,38,185,4 duplicate(MightyHammer#re) Mighty Hammer#edre 4_M_DWARF +//payon,174,133,4 duplicate(MightyHammer#re) Mighty Hammer#imre 4_M_DWARF //== Basta (+10 and up) ==================================== -- script ::Basta FAKE_NPC,{ +- script ::Basta#re FAKE_NPC,{ disable_items; mes "[Basta]"; mes "I'm the best Blacksmith in the whole world, Basta."; @@ -327,10 +327,10 @@ lhz_in02,280,19,3 duplicate(MightyHammer) Mighty Hammer#lhz 4_M_DWARF mes "I'll do better next time! Don't worry!"; close; } -prt_in,57,54,3 duplicate(Basta) Basta#prt 4_M_DWARF -morocc_in,68,30,3 duplicate(Basta) Basta#morocc 4_M_DWARF -payon,148,174,3 duplicate(Basta) Basta#payon 4_M_DWARF -alberta_in,18,56,3 duplicate(Basta) Basta#alberta 4_M_DWARF -yuno_in01,173,18,3 duplicate(Basta) Basta#yuno 4_M_DWARF -ein_in01,24,82,3 duplicate(Basta) Basta#einbroch 4_M_DWARF -lhz_in02,280,17,3 duplicate(Basta) Basta#lighthalzen 4_M_DWARF +prt_in,57,54,3 duplicate(Basta#re) Basta#prtre 4_M_DWARF +morocc_in,68,30,3 duplicate(Basta#re) Basta#moroccre 4_M_DWARF +payon,148,174,3 duplicate(Basta#re) Basta#payonre 4_M_DWARF +alberta_in,18,56,3 duplicate(Basta#re) Basta#albertare 4_M_DWARF +yuno_in01,173,18,3 duplicate(Basta#re) Basta#yunore 4_M_DWARF +ein_in01,24,82,3 duplicate(Basta#re) Basta#einbrochre 4_M_DWARF +lhz_in02,280,17,3 duplicate(Basta#re) Basta#lighthalzenre 4_M_DWARF -- cgit v1.2.3-60-g2f50 From b259c7f34f677ba28e204c21d634ae24fa2b37f5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 07:54:07 +0300 Subject: Disable npc/events/halloween_2008.txt in other way for avoid auto uncommenting --- npc/scripts.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/npc/scripts.conf b/npc/scripts.conf index 086370899..c5dd2b54b 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -120,7 +120,8 @@ "npc/events/god_se_festival.txt", // - Official Halloween Events (iRO) //"npc/events/halloween_2006.txt", -//"npc/events/halloween_2008.txt", +// missing map +// "npc/events/halloween_2008.txt", //"npc/events/halloween_2009.txt", // - Official idRO Idul Fitri Event //"npc/events/idul_fitri.txt", -- cgit v1.2.3-60-g2f50 From 0dfeb4a25fc55f965f57c8517095999a1030c72d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 08:18:06 +0300 Subject: Add into travis.sh check with all custom scripts uncommented --- .github/workflows/clang10_test.yml | 6 ++++++ .github/workflows/gcc10_test.yml | 6 ++++++ .github/workflows/gcc9_test.yml | 6 ++++++ .github/workflows/mariadb.yml | 11 +++++++++++ .github/workflows/mysql.yml | 6 ++++++ tools/ci/travis.sh | 11 +++++++++++ tools/ci/uncomment.sh | 4 ++++ 7 files changed, 50 insertions(+) create mode 100755 tools/ci/uncomment.sh diff --git a/.github/workflows/clang10_test.yml b/.github/workflows/clang10_test.yml index 28cb144f6..5fd53c371 100644 --- a/.github/workflows/clang10_test.yml +++ b/.github/workflows/clang10_test.yml @@ -41,6 +41,7 @@ jobs: SQLHOST: mariadb CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -70,3 +71,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/gcc10_test.yml b/.github/workflows/gcc10_test.yml index 1b0909be8..2225fbba1 100644 --- a/.github/workflows/gcc10_test.yml +++ b/.github/workflows/gcc10_test.yml @@ -40,6 +40,7 @@ jobs: SQLHOST: mariadb CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} --enable-lto + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -69,3 +70,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/gcc9_test.yml b/.github/workflows/gcc9_test.yml index 4e9dc9bd9..798b6c476 100644 --- a/.github/workflows/gcc9_test.yml +++ b/.github/workflows/gcc9_test.yml @@ -40,6 +40,7 @@ jobs: SQLHOST: mariadb CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} --enable-lto + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -69,3 +70,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/mariadb.yml b/.github/workflows/mariadb.yml index 4479e9e4d..5293dd98b 100644 --- a/.github/workflows/mariadb.yml +++ b/.github/workflows/mariadb.yml @@ -38,6 +38,7 @@ jobs: SQLHOST: mysql CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -67,3 +68,13 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/.github/workflows/mysql.yml b/.github/workflows/mysql.yml index 98e760a87..f26f86892 100644 --- a/.github/workflows/mysql.yml +++ b/.github/workflows/mysql.yml @@ -38,6 +38,7 @@ jobs: SQLHOST: mysql CC: ${{ matrix.CC }} CONFIGURE_FLAGS: CC=${{ matrix.CC }} --enable-debug --enable-Werror --enable-buildbot ${{ matrix.RENEWAL }} ${{ matrix.CLIENT_TYPE }} ${{ matrix.SANITIZER }} ${{ matrix.PACKET_VERSION }} + PACKET_VERSION: ${{ matrix.PACKET_VERSION }} steps: - uses: actions/checkout@v1 with: @@ -67,3 +68,8 @@ jobs: - name: test run: | ./tools/ci/travis.sh test ragnarok ragnarok ragnarok $SQLHOST + + - name: extra test + if: env.PACKET_VERSION != '--enable-packetver=20130724' + run: | + ./tools/ci/travis.sh extratest diff --git a/tools/ci/travis.sh b/tools/ci/travis.sh index 1014787a8..a1a3c7700 100755 --- a/tools/ci/travis.sh +++ b/tools/ci/travis.sh @@ -38,6 +38,7 @@ function usage { echo " $0 test [dbuser] [dbpassword] [dbhost]" echo " $0 getplugins" echo " $0 startmysql" + echo " $0 extratest" exit 1 } @@ -251,6 +252,7 @@ EOF run_server ./map-server "$PLUGINS --load-plugin db2sql --db2sql" run_server ./map-server "$PLUGINS --load-plugin db2sql --itemdb2sql" run_server ./map-server "$PLUGINS --load-plugin db2sql --mobdb2sql" +# look like works on windows only # echo "run all servers with dbghelpplug" # run_server ./login-server "$PLUGINS --load-plugin dbghelpplug" # run_server ./char-server "$PLUGINS --load-plugin dbghelpplug" @@ -263,6 +265,15 @@ EOF echo "run all servers with script_mapquit" run_server ./map-server "$PLUGINS --load-plugin script_mapquit" ;; + extratest) + export ASAN_OPTIONS=detect_stack_use_after_return=true:strict_init_order=true:detect_odr_violation=0 + PLUGINS="--load-plugin HPMHooking" + echo "run map server with uncommented old and custom scripts" + find ./npc -type f -name "*.conf" -exec ./tools/ci/uncomment.sh {} \; + run_server ./login-server "$PLUGINS" + run_server ./char-server "$PLUGINS" + run_server ./map-server "$ARGS $PLUGINS" + ;; getplugins) echo "Cloning plugins repository..." # Nothing to clone right now, all relevant plugins are part of the repository. diff --git a/tools/ci/uncomment.sh b/tools/ci/uncomment.sh new file mode 100755 index 000000000..22fe4e966 --- /dev/null +++ b/tools/ci/uncomment.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +sed -i "s|//\"npc/|\"npc/|g" $1 +sed -i "s|\"npc/location/to/script.txt\"|//\"npc/location/to/script.txt\"|g" $1 -- cgit v1.2.3-60-g2f50 From d20b5cff0c3a435ddc8d0643ed543457cd978cca Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Jun 2020 13:40:22 +0300 Subject: Disable asan in gcc-7 build in .travis.yml Disabled because it works too slow for travis. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 151d48c3c..77875e490 100644 --- a/.travis.yml +++ b/.travis.yml @@ -122,7 +122,7 @@ jobs: - gdb - gcc-6 - compiler: gcc - env: LDFLAGS="-fuse-ld=gold" CONFIGURE_FLAGS="--enable-debug --enable-sanitize=full CC=gcc-7 --disable-manager --disable-renewal --enable-Werror --enable-buildbot" + env: CONFIGURE_FLAGS="--enable-debug --disable-manager --disable-renewal --enable-Werror --enable-buildbot" addons: apt: sources: -- cgit v1.2.3-60-g2f50 From 373d9e0d6395cd9fff55c55e1cff4ee09e241fa8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Jun 2020 10:57:51 +0300 Subject: Fix script include in scripts_dev.conf --- npc/scripts_dev.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npc/scripts_dev.conf b/npc/scripts_dev.conf index d6d807a74..df644013d 100644 --- a/npc/scripts_dev.conf +++ b/npc/scripts_dev.conf @@ -31,4 +31,4 @@ //========================================================================= //================= Script Engine self-test =============================== -//"npc: npc/dev/test.txt", +//"npc/dev/test.txt", -- cgit v1.2.3-60-g2f50 From e3e1acb092a5ba8ddc4dcb116ec4bcf7686e140d Mon Sep 17 00:00:00 2001 From: Haru Date: Sun, 28 Jun 2020 01:26:45 +0200 Subject: Add detection of ARMv8 and improve detection of ARMv7 Signed-off-by: Haru --- src/common/atomic.h | 3 ++- src/common/cbasetypes.h | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/common/atomic.h b/src/common/atomic.h index 0d15d50d7..b9157373f 100644 --- a/src/common/atomic.h +++ b/src/common/atomic.h @@ -103,8 +103,9 @@ forceinline volatile int64 InterlockedExchange64(volatile int64 *target, int64 v // The __sync functions are available on x86 or ARMv6+ #if !defined(__x86_64__) && !defined(__i386__) \ + && !defined(__ppc64__) && ! defined(__powerpc64__) \ && ( !defined(__ARM_ARCH_VERSION__) || __ARM_ARCH_VERSION__ < 6 ) -//#error Your Target Platfrom is not supported +#error Target platform currently not supported #endif static forceinline int64 InterlockedExchangeAdd64(volatile int64 *addend, int64 increment){ diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 31d89d66b..06333a7b2 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -62,16 +62,24 @@ #endif // Standardize the ARM platform version, if available (the only values we're interested in right now are >= ARMv6) +#ifdef __ARM_ARCH +#define __ARM_ARCH_VERSION__ __ARM_ARCH +#else #if defined(__ARMV6__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) \ || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) // gcc ARMv6 #define __ARM_ARCH_VERSION__ 6 -#elif defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7 +#elif defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7S__) // gcc ARMv7 #define __ARM_ARCH_VERSION__ 7 +#elif defined(__ARM_ARCH_8__) || defined(__ARM_ARCH_8A__) +#define __ARM_ARCH_VERSION__ 8 #elif defined(_M_ARM) // MSVC #define __ARM_ARCH_VERSION__ _M_ARM +#elif defined(__TARGET_ARCH_ARM) // RVCT +#define __ARM_ARCH_VERSION__ __TARGET_ARCH_ARM #else #define __ARM_ARCH_VERSION__ 0 #endif +#endif // Necessary for __NetBSD_Version__ (defined as VVRR00PP00) on NetBSD #ifdef __NETBSD__ -- cgit v1.2.3-60-g2f50