diff options
61 files changed, 4208 insertions, 209 deletions
diff --git a/.gitignore b/.gitignore index 8957156d3..1587868fe 100644 --- a/.gitignore +++ b/.gitignore @@ -104,6 +104,8 @@ Thumbs.db /tools/*.pdb /tools/HPMHookGen/Makefile /tools/HPMHookGen/doxyoutput +/tools/doxygen/Makefile +/tools/doxygen/docs # /vcproj-* /vcproj-*/*.user diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 000000000..bbdc2caae --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,727 @@ +stages: + - primary + - secondary + - platforms + - extras + +variables: &base_vars + # Configure mysql service (https://hub.docker.com/_/mysql/) + MYSQL_DATABASE: 'ragnarok' + MYSQL_USER: 'ragnarok' + MYSQL_PASSWORD: 'ragnarok' + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + GIT_DEPTH: '3' + DEBIAN_COMMON_PACKAGES: make zlib1g-dev libpcre3-dev git python + +.prerequisites: &prerequisites + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mysql + - ./tools/ci/travis.sh getplugins || true + services: + - mysql:latest + +.branch_exceptions: &branch_exceptions + only: + - branches + except: + - rathena + - coverity_scan + +# Compilers + +pre_re:clang-3.9: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: clang-3.9 mysql-client + script: + - ./tools/ci/travis.sh build CC=clang-3.9 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:clang-3.9: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: clang-3.9 mysql-client + script: + - ./tools/ci/travis.sh build CC=clang-3.9 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-4.6: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:oldstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-4.6: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:oldstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.6 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-4.7: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:oldstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.7 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.7 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-4.7: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:oldstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.7 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.7 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-4.8: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.8 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.8 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-4.8: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.8 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.8 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-4.9: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.9 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.9 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-4.9: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-4.9 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-4.9 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-5: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-5 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-5 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-5: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-5 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-5 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-6: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-6: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-6_i386: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: vicamo/debian:sid-i386 + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-6_i386: + <<: *branch_exceptions + <<: *prerequisites + stage: primary + image: vicamo/debian:sid-i386 + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-6_sanitize: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal --disable-manager --enable-sanitize=full + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-6_sanitize: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-manager --enable-sanitize=full + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-6_i386_sanitize: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: vicamo/debian:sid-i386 + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal --disable-manager --enable-sanitize=full + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:gcc-6_i386_sanitize: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: vicamo/debian:sid-i386 + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-manager --enable-sanitize=full + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:gcc-6_cov: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 gcovr mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot --disable-renewal CFLAGS="-coverage" LDFLAGS="-coverage" + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + - gcovr -r . --gcov-executable=gcov-6 -o gcov_pre.txt + - gcovr -r . --gcov-executable=gcov-6 --html -o gcov_pre.html + - cat gcov_pre.txt + artifacts: + paths: + - gcov_pre.* + when: on_success + +re:gcc-6_cov: + <<: *branch_exceptions + <<: *prerequisites + stage: secondary + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc-6 gcovr mysql-client + script: + - ./tools/ci/travis.sh build CC=gcc-6 --enable-debug --enable-Werror --enable-buildbot CFLAGS="-coverage" LDFLAGS="-coverage" + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + - gcovr -r . --gcov-executable=gcov-6 -o gcov_re.txt + - gcovr -r . --gcov-executable=gcov-6 --html -o gcov_re.html + - cat gcov_re.txt + artifacts: + paths: + - gcov_re.* + when: on_success + +# Distributions + +pre_re:debian-oldstable: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:wheezy + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:debian-oldstable: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:wheezy + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:debian-stable: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:jessie + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:debian-stable: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:jessie + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:debian-testing: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:stretch + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:debian-testing: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:stretch + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:centos-previous: + <<: *branch_exceptions + stage: platforms + image: centos:6 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - yum -y update + - yum install -y make mysql-devel pcre-devel git zlib-devel mysql + - yum install -y centos-release-scl + - yum install -y yum install devtoolset-3-toolchain + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mysql + - ./tools/ci/travis.sh getplugins || true + services: + - mysql:latest + variables: + <<: *base_vars + script: + - scl enable devtoolset-3 './tools/ci/travis.sh build CFLAGS="-Wno-cast-qual" --enable-debug --enable-Werror --enable-buildbot --disable-renewal' + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:centos-previous: + <<: *branch_exceptions + stage: platforms + image: centos:6 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - yum -y update + - yum install -y make mysql-devel pcre-devel git zlib-devel mysql + - yum install -y centos-release-scl + - yum install -y yum install devtoolset-3-toolchain + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mysql + - ./tools/ci/travis.sh getplugins || true + services: + - mysql:latest + variables: + <<: *base_vars + script: + - scl enable devtoolset-3 './tools/ci/travis.sh build CFLAGS="-Wno-cast-qual" --enable-debug --enable-Werror --enable-buildbot' + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:centos-current: + <<: *branch_exceptions + stage: platforms + image: centos:7 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - yum -y update + - yum install -y gcc make mysql-devel pcre-devel git zlib-devel mysql + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mysql + - ./tools/ci/travis.sh getplugins || true + services: + - mysql:latest + variables: + <<: *base_vars + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:centos-current: + <<: *branch_exceptions + stage: platforms + image: centos:7 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - yum -y update + - yum install -y gcc make mysql-devel pcre-devel git zlib-devel mysql + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mysql + - ./tools/ci/travis.sh getplugins || true + services: + - mysql:latest + variables: + <<: *base_vars + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:ubuntu-xenial: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: ubuntu:16.04 + services: + - mysql:latest + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:ubuntu-xenial: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: ubuntu:16.04 + services: + - mysql:latest + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +# SQL servers + +pre_re:mysql-5.5: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client-5.5 + services: + - mysql:5.5 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:mysql-5.5: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client-5.5 + services: + - mysql:5.5 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:mysql-5.6: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client-5.6 + services: + - mysql:5.6 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:mysql-5.6: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:unstable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client-5.6 + services: + - mysql:5.6 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:mysql-5.7: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:unstable + variables: + <<: *base_vars + # mysql-client-5.7 is not available + INSTALL_PACKAGES: gcc mysql-client + services: + - mysql:5.7 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +re:mysql-5.7: + <<: *branch_exceptions + <<: *prerequisites + stage: platforms + image: debian:unstable + variables: + <<: *base_vars + # mysql-client-5.7 is not available + INSTALL_PACKAGES: gcc mysql-client + services: + - mysql:5.7 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mysql + +pre_re:mariadb-10: + <<: *branch_exceptions + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mariadb-client-10.0 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mariadb + - ./tools/ci/travis.sh getplugins || true + services: + - mariadb:10.0 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mariadb + +re:mariadb-10: + <<: *branch_exceptions + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mariadb-client-10.0 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mariadb + - ./tools/ci/travis.sh getplugins || true + services: + - mariadb:10.0 + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mariadb + +pre_re:mariadb-latest: + <<: *branch_exceptions + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mariadb-client-10.0 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mariadb + - ./tools/ci/travis.sh getplugins || true + services: + - mariadb:latest + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mariadb + +re:mariadb-latest: + <<: *branch_exceptions + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mariadb-client-10.0 + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok mariadb + - ./tools/ci/travis.sh getplugins || true + services: + - mariadb:latest + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok mariadb + +pre_re:percona: + <<: *branch_exceptions + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok percona + - ./tools/ci/travis.sh getplugins || true + services: + - percona:latest + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot --disable-renewal + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok percona + +re:percona: + <<: *branch_exceptions + stage: platforms + image: debian:stable + variables: + <<: *base_vars + INSTALL_PACKAGES: gcc mysql-client + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq $INSTALL_PACKAGES $DEBIAN_COMMON_PACKAGES libmysqlclient-dev + - ./tools/ci/travis.sh importdb ragnarok ragnarok ragnarok percona + - ./tools/ci/travis.sh getplugins || true + services: + - percona:latest + script: + - ./tools/ci/travis.sh build --enable-debug --enable-Werror --enable-buildbot + - ./tools/ci/travis.sh test ragnarok ragnarok ragnarok percona + +# Documentation +pages: + only: + - master + stage: extras + image: debian:unstable + before_script: + - echo "Building $CI_BUILD_NAME" + - uname -a + - ./tools/ci/retry.sh apt-get update + - ./tools/ci/retry.sh apt-get install -y -qq gcc $DEBIAN_COMMON_PACKAGES libmysqlclient-dev doxygen graphviz + script: + - ./configure + - make docs + - mkdir public + - mv tools/doxygen/docs/html public/docs + - mv gcov_*.* public/ + - cp tools/doxygen/pages_index.html public/index.html + dependencies: + - re:gcc-6_cov + - pre_re:gcc-6_cov + artifacts: + paths: + - public diff --git a/.travis.yml b/.travis.yml index 62f2f7cbc..28f4387a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,17 +9,17 @@ addons: - gcc-6 install: - - ./travis.sh getplugins || true + - ./tools/ci/travis.sh getplugins || true before_script: - uname -a - - ./travis.sh createdb ragnarok root - - ./travis.sh importdb ragnarok travis + - ./tools/ci/travis.sh createdb ragnarok root + - ./tools/ci/travis.sh importdb ragnarok travis - mysql -u root -e "SET PASSWORD FOR 'travis'@'localhost' = PASSWORD('travis');" script: - - ./travis.sh build $CONFIGURE_FLAGS - - ./travis.sh test ragnarok travis travis + - ./tools/ci/travis.sh build $CONFIGURE_FLAGS + - ./tools/ci/travis.sh test ragnarok travis travis # We can't use this, unfortunately # http://github.com/travis-ci/travis-ci/issues/979 diff --git a/Makefile.in b/Makefile.in index 46dd17b26..be7ae674f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,7 +53,7 @@ HAVE_DOXYGEN=@HAVE_DOXYGEN@ MF_TARGETS = Makefile $(addsuffix /Makefile, src/common 3rdparty/mt19937ar \ 3rdparty/libconfig src/char src/login src/map src/plugins \ - src/tool src/test tools/HPMHookGen) + src/tool src/test tools/HPMHookGen tools/doxygen) CC = @CC@ export CC @@ -140,6 +140,10 @@ hooks: tools/HPMHookGen/Makefile @echo " MAKE $@" @$(MAKE) -C tools/HPMHookGen +docs: tools/doxygen/Makefile + @echo " MAKE $@" + @$(MAKE) -C tools/doxygen + import: Makefile @# 1) create conf/import folder @# 2) add missing files @@ -158,6 +162,7 @@ clean buildclean: $(MF_TARGETS) @$(MAKE) -C src/tool $@ @$(MAKE) -C src/test $@ @$(MAKE) -C tools/HPMHookGen $@ + @$(MAKE) -C tools/doxygen $@ distclean: clean @-rm -f $(MF_TARGETS) config.status config.log @@ -196,9 +201,12 @@ help: Makefile @echo " executables" @echo "'distclean' - cleans files generated by ./configure" @echo "'sysinfo' - re-generates the System Info include" -ifeq ($(HAVE_PERL)$(HAVE_DOXYGEN),yesyes) +ifeq ($(HAVE_DOXYGEN),yes) + @echo "'docs' - Generate the Doxygen source code documentation" +ifeq ($(HAVE_PERL),yes) @echo "'hooks' - re-generates the definitions for the HPM" endif +endif @echo "'help' - outputs this message" ##################################################################### @@ -4,7 +4,9 @@ Hercules Build Status: [![Build Status](https://travis-ci.org/HerculesWS/Hercules.svg?branch=master)](https://travis-ci.org/HerculesWS/Hercules) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/cm9xbwurpbltqjop?svg=true)](https://ci.appveyor.com/project/Haru/hercules) -[![Coverity Scan Build Status](https://scan.coverity.com/projects/3892/badge.svg)](https://scan.coverity.com/projects/herculesws-hercules) +[![Coverity Scan Build Status](https://scan.coverity.com/projects/3892/badge.svg)](https://scan.coverity.com/projects/herculesws-hercules) +[![GitLabl Build Status](https://gitlab.com/HerculesWS/Hercules/badges/master/build.svg)](https://gitlab.com/HerculesWS/Hercules/commits/master) +[![Coverage Report](https://gitlab.com/HerculesWS/Hercules/badges/master/coverage.svg)](https://gitlab.com/HerculesWS/Hercules/commits/master) Issues and pull requests: [![Open Issues](https://img.shields.io/github/issues-raw/HerculesWS/Hercules.svg?label=Open%20Issues)](https://github.com/HerculesWS/Hercules/issues) @@ -2196,6 +2196,8 @@ ac_config_files="$ac_config_files src/test/Makefile" ac_config_files="$ac_config_files tools/HPMHookGen/Makefile" +ac_config_files="$ac_config_files tools/doxygen/Makefile" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -10220,6 +10222,7 @@ do "src/tool/Makefile") CONFIG_FILES="$CONFIG_FILES src/tool/Makefile" ;; "src/test/Makefile") CONFIG_FILES="$CONFIG_FILES src/test/Makefile" ;; "tools/HPMHookGen/Makefile") CONFIG_FILES="$CONFIG_FILES tools/HPMHookGen/Makefile" ;; + "tools/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES tools/doxygen/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git a/configure.ac b/configure.ac index e88834722..6cad8146c 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,7 @@ AC_CONFIG_FILES([src/char/Makefile src/login/Makefile]) AC_CONFIG_FILES([src/map/Makefile src/plugins/Makefile src/tool/Makefile]) AC_CONFIG_FILES([src/test/Makefile]) AC_CONFIG_FILES([tools/HPMHookGen/Makefile]) +AC_CONFIG_FILES([tools/doxygen/Makefile]) dnl AC_USE_SYSTEM_EXTENSIONS requires autoconf 2.60 or newer. Fall back to AC_GNU_SOURCE otherwise. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], diff --git a/db/re/item_db.conf b/db/re/item_db.conf index 9e393d80e..dce46cb70 100644 --- a/db/re/item_db.conf +++ b/db/re/item_db.conf @@ -22064,19 +22064,22 @@ item_db: ( EquipLv: 130 View: 13 Script: <" - bonus bInt,getrefine(); - bonus bDex,getrefine(); - if(getrefine()>4) { - bonus2 bSkillAtk,WM_REVERBERATION,10; - bonus2 bVariableCastrate,WM_REVERBERATION,-10; + bonus bInt, getrefine(); + bonus bDex, getrefine(); + if(getrefine() > 4) { + bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 10; + bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 10; + bonus2 bVariableCastrate, WM_REVERBERATION, -10; } - if(getrefine()>6) { - bonus2 bSkillAtk,WM_REVERBERATION,10; - bonus2 bVariableCastrate,WM_REVERBERATION,-10; + if(getrefine() > 6) { + bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 10; + bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 10; + bonus2 bVariableCastrate, WM_REVERBERATION, -10; } - if(getrefine()>8) { - bonus2 bSkillAtk,WM_REVERBERATION,20; - bonus2 bVariableCastrate,WM_REVERBERATION,-20; + if(getrefine() > 8) { + bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 20; + bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 20; + bonus2 bVariableCastrate, WM_REVERBERATION, -20; } "> }, @@ -49442,9 +49445,16 @@ item_db: ( Weight: 10 Loc: 2 Script: <" - bonus2 bSkillAtk,WM_REVERBERATION,50; - if (getequipweaponlv(EQI_HAND_R) == 4) bonus2 bSkillAtk,WM_REVERBERATION,50; - if (getrefine() >= 10) bonus2 bSkillAtk,WM_REVERBERATION,50; + bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 50; + bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 50; + if (getequipweaponlv(EQI_HAND_R) == 4) { + bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 50; + bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 50; + } + if (getrefine() >= 10) { + bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 50; + bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 50; + } "> }, @@ -67521,7 +67531,7 @@ item_db: ( EquipLv: 100 View: 1126 Script: <" - bonus2 bSkillAtk,WM_SEVERE_RAINSTORM,15; + bonus2 bSkillAtk,WM_SEVERE_RAINSTORM_MELEE,15; if(getrefine()>6) { bonus bFixedCastrate,-(getskilllv(BA_MUSICALLESSON)*4); } if(getrefine()>8) { bonus2 bSkillUseSP,WM_SEVERE_RAINSTORM,10; } "> @@ -135195,7 +135205,7 @@ item_db: ( View: 913 Script: <" bonus bFixedCastrate,-(getskilllv(BA_MUSICALLESSON)*5); - if(getrefine()>6) { bonus2 bSkillAtk,WM_SEVERE_RAINSTORM,25; } + if(getrefine()>6) { bonus2 bSkillAtk,WM_SEVERE_RAINSTORM_MELEE,25; } if(getrefine()>8) { bonus bMaxSP,200; } "> }, @@ -146127,6 +146137,24 @@ item_db: ( //== New Etc Items ========================================= { + Id: 22508 + AegisName: "Para_Team_Mark_" + Name: "Eden Group Mark" + Type: 11 + Delay: 1200000 + Trade: { + nodrop: true + notrade: true + noselltonpc: true + nocart: true + nostorage: true + nogstorage: true + nomail: true + noauction: true + } + Script: <" unitskilluseid getcharid(3), "AL_TELEPORT", 3; "> +}, +{ Id: 22514 AegisName: "Candy_Holder" Name: "Candy Holder" diff --git a/db/re/map_cache.dat b/db/re/map_cache.dat Binary files differindex e0ffc6218..c678535eb 100644 --- a/db/re/map_cache.dat +++ b/db/re/map_cache.dat diff --git a/doc/constants.md b/doc/constants.md index c85e328d0..b6c6d44f5 100644 --- a/doc/constants.md +++ b/doc/constants.md @@ -16328,6 +16328,7 @@ - `Tarlock's_Boots`: 22047 - `Egir_Shoes_K`: 22059 - `Witch_Shoes`: 22067 +- `Para_Team_Mark_`: 22508 - `Candy_Holder`: 22514 - `Twisted_Key_of_Time`: 22515 - `Runstone_Lux`: 22540 diff --git a/npc/mapflag/nomemo.txt b/npc/mapflag/nomemo.txt index d93552429..a0dd66e9d 100644 --- a/npc/mapflag/nomemo.txt +++ b/npc/mapflag/nomemo.txt @@ -17,6 +17,7 @@ //= Copyright (C) L0ne_W0lf //= Copyright (C) Samuray22 //= Copyright (C) Lupus +//= Copyright (C) Nova //= //= Hercules is free software: you can redistribute it and/or modify //= it under the terms of the GNU General Public License as published by @@ -33,7 +34,7 @@ //========================================================================= //= Mapflag: Disable Warp Portal memory. //================= Current Version ======================================= -//= 1.8.2 +//= 1.8.3 //================= Description =========================================== //= Prevents players from using /memo on a map. //= Also disables marriage warp skills. @@ -783,6 +784,8 @@ ecl_tdun04 mapflag nomemo ecl_hub01 mapflag nomemo moc_prydn1 mapflag nomemo moc_prydn2 mapflag nomemo +dali mapflag nomemo +dali02 mapflag nomemo c_tower2_ mapflag nomemo c_tower3_ mapflag nomemo gl_chyard_ mapflag nomemo diff --git a/npc/mapflag/noteleport.txt b/npc/mapflag/noteleport.txt index 1e1ffb739..8b1109ef1 100644 --- a/npc/mapflag/noteleport.txt +++ b/npc/mapflag/noteleport.txt @@ -13,6 +13,7 @@ //= Copyright (C) rAthena Dev Team //= Copyright (C) eAthena Dev Team //= Copyright (C) Lupus +//= Copyright (C) Nova //= //= Hercules is free software: you can redistribute it and/or modify //= it under the terms of the GNU General Public License as published by @@ -29,7 +30,7 @@ //========================================================================= //= Mapflag: Disable teleportation. //================= Current Version ======================================= -//= 1.6a +//= 1.6.2 //================= Description =========================================== //= Disables all means of teleportation within a map. //= Script commands 'warp', 'areawarp', 'warpchar', @@ -451,6 +452,8 @@ ecl_in04 mapflag noteleport 1@ecl mapflag noteleport 1@ecl mapflag monster_noteleport ecl_hub01 mapflag noteleport +dali mapflag noteleport +dali02 mapflag noteleport //Orc's Memory =================== 1@orcs mapflag noteleport diff --git a/npc/re/other/dimensional_gap.txt b/npc/re/other/dimensional_gap.txt new file mode 100644 index 000000000..b303f14b7 --- /dev/null +++ b/npc/re/other/dimensional_gap.txt @@ -0,0 +1,550 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2016 Hercules Dev Team +//= Copyright (C) 2016 Ridley +//= Copyright (C) 2016 Nova +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see <http://www.gnu.org/licenses/>. +//========================================================================= +//= Dimensional Gap NPCs +//================= Description =========================================== +//= The Dimensional Gap, or Dimensional Crack, is an opening into the +//= vacuum of time and space that separates dimensions. +//================= Current Version ======================================= +//= 1.0 +//========================================================================= + +mid_camp,207,290,6 script Expedition Guide#01 4_M_EIN_SOLDIER,{ + mes("[Expedition Guide]"); + mes("Are you going to enter the ^0000FFDimensional Gap^000000? Please use this Transport Device you see here."); + next(); + if (select("What is the Dimensional Gap?", "End Conversation.") == 2) { + mes("[Expedition Guide]"); + mes("Take care."); + close(); + } + mes("[Expedition Guide]"); + mes("As you know we've already entered through the Dimensional Rift to get to Ash Vacuum right? The Dimensional Gap is an expansion of that initial discovery."); + next(); + mes("[Expedition Guide]"); + mes("A member of the Expedition team found these backdoor passages to get through the Dimensional Rifts."); + next(); + mes("[Expedition Guide]"); + mes("This is like a Rune Midgard Alliance version of the Bifrost bridge so it can connect us to different parts of the New World."); + next(); + mes("[Expedition Guide]"); + mes("Time and space is distorted in the Dimensional Gap. Not all passageways have been discovered so please be sure to use caution when entering an unverified area."); + next(); + mes("[Expedition Guide]"); + mes("Anyone who has become lost here has yet to return."); + close(); +} + +mid_camp,212,290,4 script Expedition Guide#02 4_M_EIN_SOLDIER,{ + mes("[Expedition Guide]"); + mes("Please use a ^0000FFTransport Device^000000 if you wish to travel through the dimensional rift. The insides have not been fully explored yet so please be careful in there."); + close(); +} + +moc_fild22b,225,198,6 duplicate(Expedition Guide#01) Expedition Guide#03 4_M_MOC_SOLDIER +moc_fild22b,223,203,4 duplicate(Expedition Guide#02) Expedition Guide#04 4_M_MOC_SOLDIER +bif_fild01,314,155,6 duplicate(Expedition Guide#01) Expedition Guide#05 4_M_EIN_SOLDIER +bif_fild01,320,154,4 duplicate(Expedition Guide#02) Expedition Guide#06 4_M_EIN_SOLDIER +dic_fild02,236,33,6 duplicate(Expedition Guide#01) Expedition Guide#07 4_M_EIN_SOLDIER +dic_fild02,239,36,4 duplicate(Expedition Guide#02) Expedition Guide#08 4_M_EIN_SOLDIER + +dali,137,87,4 script Allied Forces Soldier 4_M_MOCASS1,{ + mes("[Allied Forces Soldier]"); + mes("This dimensional rift is connected to the Allied Forces ^0000FFExpedition Camp^000000 in Jotunheim."); + next(); + mes("[Allied Forces Soldier]"); + mes("Do not worry, it has been set up after testing hundreds of experiments for safe teleportation."); + close(); +} + +dali,122,60,4 script Morroc Soldier 4_M_MOC_SOLDIER,{ + mes("[Morroc Soldier]"); + mes("This dimensional rift is connected to ^0000FFMorroc^000000 back in Rune Midgard."); + next(); + mes("[Morroc Soldier]"); + mes("This is the fastest gateway back to our world. The area is still destroyed but restoration efforts will soon be on the way."); + close(); +} + +dali,51,104,6 script Spledide Soldier 4_M_FAIRYSOLDIER2,{ + mes("[Spledide Soldier]"); + mes("This dimensional rift is connected to the south of ^0000FFBifrost^000000. It enables quick travel to the Splendide frontline."); + next(); + mes("[Spledide Soldier]"); + mes("If we use it properly, it enables us to advance more easily to the capital of the Sapha."); + next(); + mes("[Spledide Soldier]"); + mes("The Mayor has asked us to cooperate as best we can instead of fighting, so I'm under orders not to do anything. Since we have a common enemy we won't fight the Sapha... for now..."); + close(); +} + +dali,56,126,4 script Dispatched Sapha 4_MAN_BENKUNI,{ + mes("[Dispatched Sapha]"); + mes("This dimensional rift is connected to the southern area of the ^0000FFKamidal Mountains^000000 in El Dicastes. I just dropped by for my research, but it is incredible."); + next(); + mes("[Dispatched Sapha]"); + mes("Moreover it is next to the Laphine capital..... Hmm... Do not worry, I do not want to fight in such a place."); + close(); +} + +dali,109,94,4 trader Sundries Merchant 4_M_MERCAT2,{ +OnInit: + sellitem Spectacles; + sellitem Arrow; + sellitem Booby_Trap; + end; +} + +dali,112,95,4 script Logistics Manager 4_M_MERCAT2,{ + mes("[Logistics Manager]"); + mes("Welcome. I am in charge of logistics to take care of your items in this weird place. Do you need to access your storage?"); + next(); + if (select("Open Storage 200 Zeny.", "No Thanks.") == 2) { + mes("[Logistics Manager]"); + mes("Let me know if you change your mind."); + close(); + } + if (basicskillcheck() && getskilllv(NV_BASIC) < 6) { + mes("[Logistics Manager]"); + mes("You are not yet qualified to use the Storage."); + } else if (Zeny < 200) { + mes("[Logistics Manager]"); + mes("You need at least 200 zeny to use the Storage."); + } else { + Zeny -= 200; + openstorage(); + } + close(); +} + +dali,115,85,5 script Party Leader#dali 2_M_SWORDMASTER,{ + if (.dalichatactive) + end; + initnpctimer(); + .dalichatactive = 1; + end; +OnTimer10: + npctalk(_("Attention!!!"), "Party Leader#dali"); + end; +OnTimer2000: + npctalk(_("Here, here. Everybody be quiet and line up!"), "Party Leader#dali"); + end; +OnTimer3000: + npctalk(_("We have now entered the inside of the Dimensional Crack. Where should be go first?"), "Party Leader#dali"); + end; +OnTimer4000: + npctalk(_("Anyone has an opinion?"), "Party Leader#dali"); + end; +OnTimer6000: + npctalk(_("I heard rumors about some magic swordman. Let's go find him."), "Party Member#MONK"); + end; +OnTimer7500: + npctalk(_("We heard about a magic competition being held here!"), "Party Member#WANDERER"); + end; +OnTimer9000: + npctalk(_("Where is it?!"), "Party Member#MONK"); + end; +OnTimer10500: + npctalk(_("Uh, I'm a little bit hungry... I wonder if anybody is selling some warm sweet potatoes or even dumplings..."), "Party Member#CRU"); + end; +OnTimer12000: + npctalk(_("You want to eat again?"), "Party Member#GUILL"); + end; +OnTimer13500: + npctalk(_("I am just wondering about the tournament.."), "Party Member#WANDERER"); + end; +OnTimer15000: + npctalk(_("I need to eat something before doing anything."), "Party Member#CRU"); + end; +OnTimer16500: + npctalk(_("By the way, I also heard about something called the Devil's Tower."), "Party Member#MONK"); + end; +OnTimer18000: + npctalk(_("I just saw a street trader passing by... Where is he?"), "Party Member#GUILL"); + end; +OnTimer19500: + emotion(e_yawn, 0, "Party Member#SURA"); + npctalk(_("Huh? What is this? You still haven't entered?"), "Party Member#SURA"); + end; +OnTimer20000: + npctalk(_("I am curious about the Faceworms I heard about from a Laphine."), "Party Member#MONK"); + end; +OnTimer21000: + npctalk(_("Can I come back after having a meal?"), "Party Member#CRU"); + end; +OnTimer22500: + npctalk(_("Can you even catch that?"), "Party Member#WANDERER"); + npctalk(_("Are you awake?"), "Party Member#SHADOW"); + end; +OnTimer24000: + emotion(e_an, 0, "Party Member#SURA"); + npctalk(_("Why are you still here?"), "Party Member#SURA"); + end; +OnTimer24500: + npctalk(_("Hang on a bit. The merchant is going to pass by soon."), "Party Member#GUILL"); + end; +OnTimer25500: + npctalk(_("That is your wish...."), "Party Member#MONK"); + end; +OnTimer27000: + npctalk(_("I want to buy cold grape juice~"), "Party Member#CRU"); + end; +OnTimer28500: + npctalk(_("I have no idea. There might be an accident up front."), "Party Member#SHADOW"); + end; +OnTimer30000: + npctalk(_("What? How dare you?!"), "Party Member#WANDERER"); + end; +OnTimer31500: + npctalk(_("Give me a sip of juice."), "Party Member#GUILL"); + end; +OnTimer32000: + npctalk(_("Cough~ Cough~"), "Party Member#EINOLD"); + end; +OnTimer33000: + emotion(e_an, 0, "Party Member#SURA"); + end; +OnTimer34000: + npctalk(_("Damn! I am pissed off! I came here because I heard only a party is allowed to get in!"), "Party Member#SURA"); + end; +OnTimer36000: + npctalk(_("Are you going to hit me? Do it!"), "Party Member#MONK"); + emotion(e_ag, 0, "Party Member#MONK"); + npctalk(_("You pay for your food."), "Party Member#CRU"); + end; +OnTimer37500: + emotion(e_an, 0, "Party Member#SURA"); + end; +OnTimer39000: + npctalk(_("Whatever, I'm not eating."), "Party Member#WANDERER"); + npctalk(_("So mean.. I won't eat then."), "Party Member#GUILL"); + npctalk(_("Right.. I should have entered with another group!"), "Party Member#SHADOW"); + end; +OnTimer40500: + emotion(e_gg, 0, "Party Member#CRU"); + npctalk(_("Hey. Are you pissed off?"), "Party Member#CRU"); + end; +OnTimer42000: + npctalk(_("Not at all."), "Party Member#GUILL"); + end; +OnTimer43500: + emotion(e_gg, 0, "Party Member#MONK"); + npctalk(_("Look at him snoozing. Hehe."), "Party Member#MONK"); + end; +OnTimer45000: + emotion(e_yawn, 0, "Party Member#SURA"); + npctalk(_("Bah, I don't care. I'm gonna take a nap, so wake me up when we're ready."), "Party Member#SURA"); + end; +OnTimer46500: + emotion(e_gg, 0, "Party Member#CRU"); + npctalk(_("You are upset!!"), "Party Member#CRU"); + npctalk(_("Can I get back before I die..."), "Party Member#WANDERER"); + npctalk(_("What? You, we gotta talk! I've been too nice to you!"), "Party Member#EINOLD"); + end; +OnTimer48000: + npctalk(_("Excuse me..... everyone.............?"), "Party Leader#dali"); + end; +OnTimer49500: + emotion(e_ag, 0, "Party Member#GUILL"); + npctalk(_("No!!!!!!!!!"), "Party Member#GUILL"); + npctalk(_("Whatever~"), "Party Member#MONK"); + end; +OnTimer51000: + emotion(e_sob, 0, "Party Leader#dali"); + npctalk(_("Please listen to me...."), "Party Leader#dali"); + npctalk(_("He's angry all right...."), "Party Member#WANDERER"); + npctalk(_("Take a nap. I am sleepy too, so we'll take shifts."), "Party Member#SHADOW"); + end; +OnTimer52500: + .dalichatactive = 0; + stopnpctimer(); + end; +} + +dali,117,81,7 script Party Member#WANDERER 4_F_WANDERER,{ + end; +} + +dali,117,79,5 script Party Member#CRU 4_F_CRU,{ + end; +} + +dali,118,83,3 script Party Member#MONK 4_F_MONK,{ + end; +} + +dali,119,76,7 script Party Member#SHADOW 4_F_SHADOWCHASER,{ + end; +} + +dali,119,78,2 script Party Member#GUILL 4_M_JPNOJI,{ + end; +} + +dali,120,77,4 script Party Member#SURA 4_F_SURA,{ + end; +} + +dali,120,81,3 script Party Member#EINOLD 4_M_EINOLD,{ + end; +} + +dali,102,83,5 script Merchant Prince#HUMERC 4_M_HUMERCHANT,2,2,{ + mes("[Prince Canet]"); + mes("Who're you?"); + next(); + mes("[Prince Canet]"); + mes("What do you want? You looking something in particular?"); + next(); + mes("[Prince Canet]"); + mes("So some enforcers have been cracking down on merchants lately. I can not sell anything."); + next(); + mes("[Prince Canet]"); + mes("Come here..."); + next(); + mes("[Jumpy Knight]"); + mes("I knew you would be here!! No illegal trading is allowed here! Don't you know?"); + hideoffnpc("Jumpy Knight#JP_RUN"); + next(); + mes("[Prince Canet]"); + mes("Says who?"); + next(); + mes("[Jumpy Knight]"); + mes("Ok, then show me your permit."); + next(); + mes("[Prince Canet]"); + mes("Permit\r" + "No one's in charge here!"); + next(); + mes("[Prince Canet]"); + mes("You! If you need anything come to me ok?"); + next(); + mes("[Jumpy Knight]"); + mes("I will catch you!"); + hideonnpc("Merchant Prince#HUMERC"); + close2(); + hideonnpc("Jumpy Knight#JP_RUN"); + enablenpc("Merchant Prince#HUMERC2"); + hideoffnpc("Merchant Prince#HUMERC2"); + disablenpc("Merchant Prince#HUMERC"); + end; + +OnTouch: + mes("[Prince Canet]"); + mes("Cold juice!\r" + "Apple, grape, orange~\r" + "Anything you want!"); + next(); + mes("[Prince Canet]"); + mes("Sweet potato, dumpling~\r" + "Here we have delicious desserts~"); + close(); +} + +dali,105,82,1 script Jumpy Knight#JP_RUN 4_M_JP_RUN,{ + end; + +OnInit: + hideonnpc("Jumpy Knight#JP_RUN"); + end; +} + +dali,63,112,7 script Merchant Prince#HUMERC2 4_M_HUMERCHANT,2,2,{ + mes("[Prince Canet]"); + mes("You need to pay a toll to get past here."); + next(); + select("What toll?"); + mes("[Prince Canet]"); + mes("You did not know?\r" + "500 zeny"); + next(); + mes("[Jumpy Knight]"); + mes("You there! Stop right there!"); + hideoffnpc("Jumpy Knight#JP_RUN2"); + next(); + mes("[Prince Canet]"); + mes("Ugh! How are you always following me? Got some kind of crush on me or something? I don't think you and I make a good match..."); + next(); + mes("[Jumpy Knight]"); + mes("Why don't we find out then?"); + next(); + mes("[Prince Canet]"); + mes("That's it no more talking.\r" + "I'm outta here~"); + next(); + mes("[Jumpy Knight]"); + mes("Keep running you sneaky coward!"); + hideonnpc("Merchant Prince#HUMERC2"); + close2(); + hideonnpc("Jumpy Knight#JP_RUN2"); + hideoffnpc("Merchant Prince#HUMERC3"); + disablenpc("Merchant Prince#HUMERC2"); + end; + +OnInit: + disablenpc("Merchant Prince#HUMERC2"); + end; +OnTouch: + mes("[Prince Canet]"); + mes("500 zeny"); + close(); +} + +dali,67,113,3 script Jumpy Knight#JP_RUN2 4_M_JP_RUN,{ + end; + +OnInit: + hideonnpc("Jumpy Knight#JP_RUN2"); + end; +} + +dali,89,97,3 script Merchant Prince#HUMERC3 4_M_HUMERCHANT,{ + mes("[Prince Canet]"); + mes("You are lucky that you have met up with me.\r" + "Who am I?\r" + "I'm here to become a merchant King."); + next(); + mes("[Prince Canet]"); + mes("I might be working a street stall now but I'll have an actual shop some day."); + next(); + mes("[Prince Canet]"); + mes("It's my first day so I'm having a major sale."); + next(); + mes("[Prince Canet]"); + mes("Let's see I've got a... Ring of something! Sword of stuff! A backpack of some sort!"); + next(); + mes("[Prince Canet]"); + mes("Tell me if you need anything,"); + hideoffnpc("Jumpy Knight#JP_RUN3"); + next(); + mes("[Prince Canet]"); + mes("What are you doing here? This is my spot for a shop Get outta my turf!"); + next(); + mes("[Jumpy Knight]"); + mes("Bah!!\r" + "You're gonna regret those words!"); + next(); + mes("[Prince Canet]"); + mes("I'm shaking..."); + hideonnpc("Merchant Prince#HUMERC3"); + close2(); + hideonnpc("Jumpy Knight#JP_RUN3"); + enablenpc("Merchant Prince#HUMERC"); + hideoffnpc("Merchant Prince#HUMERC"); + end; + +OnInit: + hideonnpc("Merchant Prince#HUMERC3"); + end; +} + +dali,89,94,7 script Jumpy Knight#JP_RUN3 4_M_JP_RUN,{ + end; + +OnInit: + hideonnpc("Jumpy Knight#JP_RUN3"); + end; +} + +dali02,58,123,3 script Curious Knight#KY_KNT 4_M_KY_KNT,{ + mes("[Curious Knight]"); + mes("The Royal Guard in here was desperate for help. We entered through a secret place in the palace."); + next(); + mes("[Curious Knight]"); + mes("We were whisked away here... No idea where I am but I have to establish a base here for the Knighthood."); + close(); +} + +dali02,51,112,5 script Confused Thief#DST_SOL 4_DST_SOLDIER,{ + mes("[Confused Thief]"); + mes("One minute I'm in a bar... The next minute I'm here... What is this place?"); + next(); + mes("[Confused Thief]"); + mes("There's no night or day in here. Hmm, something has to be valuable in this place..."); + close(); +} + +dali02,65,115,5 script Adventurous Rafflesia#ra 4_M_RAFLE_GR,{ + mes("[Adventurous Rafflesia]"); + mes("No no this has to be Thanatos Tower... I sense dark magic here."); + next(); + mes("[Guide]"); + mes("Oh, we're back here again. I cannot find a way out! We are trapped in this maze!"); + next(); + mes("[Tourist]"); + mes("Is this place the famous Prontera? It is dark just like a big city!"); + next(); + mes("[Traveller]"); + mes("I hear a ticking clock. This place must be Geffen!"); + close(); +} + +dali02,68,117,5 script Guide#ra 4_M_RAFLE_GR,{ + mes("[Guide]"); + mes("Oh, we're back here again. I cannot find a way out! We are trapped in this maze!"); + next(); + mes("[Tourist]"); + mes("Is this place the famous Prontera It is dark just like a big city!"); + next(); + mes("[Traveller]"); + mes("I hear a ticking clock. This place must be Geffen!"); + next(); + mes("[Adventurous Rafflesia]"); + mes("No no this has to be Thanatos Tower... I sense dark magic here."); + close(); +} + +dali02,65,119,5 script Tourist#ra 4_M_RAFLE_GR,{ + mes("[Tourist]"); + mes("Is this place the famous Prontera? It is dark just like a big city!"); + next(); + mes("[Adventurous Rafflesia]"); + mes("No no this has to be Thanatos Tower... I sense dark magic here."); + next(); + mes("[Guide]"); + mes("Oh, we're back here again. I cannot find a way out! We are trapped in this maze!"); + next(); + mes("[Traveller]"); + mes("I hear a ticking clock. This place must be Geffen!"); + close(); +} + +dali02,69,122,5 script Traveller#ra 4_M_RAFLE_GR,{ + mes("[Traveller]"); + mes("I hear a ticking clock. This place must be Geffen!"); + next(); + mes("[Guide]"); + mes("Oh, we're back here again. I cannot find a way out! We are trapped in this maze!"); + next(); + mes("[Tourist]"); + mes("Is this place the famous Prontera? It is dark just like a big city!"); + next(); + mes("[Adventurous Rafflesia]"); + mes("No no this has to be Thanatos Tower... I sense dark magic here."); + close(); +} diff --git a/npc/re/quests/eden/100-110.txt b/npc/re/quests/eden/100-110.txt index 2ea72a2d1..3cc47f6ef 100644 --- a/npc/re/quests/eden/100-110.txt +++ b/npc/re/quests/eden/100-110.txt @@ -52,7 +52,7 @@ moc_para01,37,95,5 script Gelkah#1 4_F_GELKA,{ end; } mes "[Gelkah]"; - if (!countitem(Para_Team_Mark)) { + if (!countitem(Para_Team_Mark) && !countitem(Para_Team_Mark_)) { mes "- You need to have an -"; mes "- ^4d4dff'Eden Group Mark'^000000 -"; mes "- to receive these missions. -"; @@ -1047,7 +1047,7 @@ S_Hunting: moc_para01,41,95,5 script Rohtert#12 4_M_ROTERT,{ mes "[Rohtert]"; - if (!countitem(Para_Team_Mark)) {// Para_Team_Mark + if (!countitem(Para_Team_Mark) && !countitem(Para_Team_Mark_)) { cutin "rote01",2; mes "You are not even a member of Eden Group. What are you doing here?"; mes "I'm only dealing with base level ^FF0000100 - 110^000000 adventurers."; diff --git a/npc/re/quests/eden/11-25.txt b/npc/re/quests/eden/11-25.txt index 361d6a2e3..f65ad9090 100644 --- a/npc/re/quests/eden/11-25.txt +++ b/npc/re/quests/eden/11-25.txt @@ -35,7 +35,7 @@ //========================================================================= moc_para01,36,38,3 script Mission [11 - 25]#Tuto 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "- You need to have an -"; mes "- ^4d4dff'Eden Group Mark'^000000 -"; mes "- to receive these missions. -"; diff --git a/npc/re/quests/eden/111-120.txt b/npc/re/quests/eden/111-120.txt index f133ca85f..4422c92c7 100644 --- a/npc/re/quests/eden/111-120.txt +++ b/npc/re/quests/eden/111-120.txt @@ -41,7 +41,7 @@ moc_para01,17,95,5 script Mingmin#1 4_F_GENETIC,{ mes "[Mingmin]"; - if (!countitem(Para_Team_Mark)) {// Para_Team_Mark + if (!countitem(Para_Team_Mark) && !countitem(Para_Team_Mark_)) { cutin "min02",0; mes "A stranger. This place is supposed to be for Eden Group Members only."; mes "I'm in need base level ^FF0000111 - 120^000000 adventurers to help my research."; diff --git a/npc/re/quests/eden/121-130.txt b/npc/re/quests/eden/121-130.txt index 32fbdeb26..d48c71702 100644 --- a/npc/re/quests/eden/121-130.txt +++ b/npc/re/quests/eden/121-130.txt @@ -41,7 +41,7 @@ moc_para01,44,81,3 script Melody-Jack#1 4_M_MELODY,8,8,{ mes "[Melody-Jack]"; - if (!countitem(Para_Team_Mark)) {// Para_Team_Mark + if (!countitem(Para_Team_Mark) && !countitem(Para_Team_Mark_)) { mes "Who the hell are you? Get out of here!"; mes "I'm only talking to base level ^FF0000121-130^000000 adventurers."; } @@ -582,7 +582,7 @@ OnTouch: moc_para01,17,77,5 script Aigu#1 4_F_IU,{ mes "[Aigu]"; - if (!countitem(Para_Team_Mark)) {// Para_Team_Mark + if (!countitem(Para_Team_Mark) && !countitem(Para_Team_Mark_)) { mes "Oh, why aren't you a part of Eden Group?"; mes "I'm only talking to base level ^FF0000121-130^000000 adventurers."; } diff --git a/npc/re/quests/eden/131-140.txt b/npc/re/quests/eden/131-140.txt index 806466624..fa6061b42 100644 --- a/npc/re/quests/eden/131-140.txt +++ b/npc/re/quests/eden/131-140.txt @@ -42,7 +42,7 @@ moc_para01,41,76,3 script Ragi#1 4_M_RAGI,{ cutin "ragi01",0; mes "[Ragi]"; - if (!countitem(Para_Team_Mark)) {// Para_Team_Mark + if (!countitem(Para_Team_Mark) && !countitem(Para_Team_Mark_)) { mes "Only adventurers from Eden Group are welcome here."; mes "I'm giving requests to base level ^FF0000130-140^000000 adventurers only."; } diff --git a/npc/re/quests/eden/26-40.txt b/npc/re/quests/eden/26-40.txt index c80f1c2c8..3a3068a5c 100644 --- a/npc/re/quests/eden/26-40.txt +++ b/npc/re/quests/eden/26-40.txt @@ -35,7 +35,7 @@ //========================================================================= moc_para01,38,38,3 script Mission [26 - 40] 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "You are not a qualified member. You can not use the bulletin board."; close; } diff --git a/npc/re/quests/eden/41-55.txt b/npc/re/quests/eden/41-55.txt index a13db78f8..b7d95aa71 100644 --- a/npc/re/quests/eden/41-55.txt +++ b/npc/re/quests/eden/41-55.txt @@ -35,7 +35,7 @@ //========================================================================= moc_para01,40,38,3 script Mission [41 - 55] 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "You are not an Eden group member. You are not qualified to access the bulletin board."; close; } diff --git a/npc/re/quests/eden/56-70.txt b/npc/re/quests/eden/56-70.txt index 741e6af89..c6aeb8c15 100644 --- a/npc/re/quests/eden/56-70.txt +++ b/npc/re/quests/eden/56-70.txt @@ -36,7 +36,7 @@ //========================================================================= moc_para01,42,38,3 script Mission [56 - 70] 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "To get these missions, I need to Join the Eden Group first. I must find Secretary Lime Evenor and become a member."; close; } diff --git a/npc/re/quests/eden/71-85.txt b/npc/re/quests/eden/71-85.txt index f2bd68b6f..31f51871d 100644 --- a/npc/re/quests/eden/71-85.txt +++ b/npc/re/quests/eden/71-85.txt @@ -35,7 +35,7 @@ //========================================================================= moc_para01,44,38,3 script Mission [71 - 85] 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "- Only members of the -"; mes "- Eden Group can read -"; mes "- this bulletin board. -"; diff --git a/npc/re/quests/eden/86-90.txt b/npc/re/quests/eden/86-90.txt index 029a482ad..394970944 100644 --- a/npc/re/quests/eden/86-90.txt +++ b/npc/re/quests/eden/86-90.txt @@ -41,7 +41,7 @@ //========================================================================= moc_para01,48,175,3 script 86-90 Mission Board 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "Wait a minute!"; mes "-You need to have an-"; mes "-^4d4dff'Eden Group Mark'^000000-"; diff --git a/npc/re/quests/eden/91-99.txt b/npc/re/quests/eden/91-99.txt index 2c86f6091..328cc4474 100644 --- a/npc/re/quests/eden/91-99.txt +++ b/npc/re/quests/eden/91-99.txt @@ -41,7 +41,7 @@ //========================================================================= moc_para01,48,177,3 script 91-99 Mission Board 4_BOARD3,{ - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "Wait a minute!"; mes "-You need to have an-"; mes "-^4d4dff'Eden Group Mark'^000000-"; diff --git a/npc/re/quests/eden/eden_common.txt b/npc/re/quests/eden/eden_common.txt index f07ebb2ad..9085cad91 100644 --- a/npc/re/quests/eden/eden_common.txt +++ b/npc/re/quests/eden/eden_common.txt @@ -44,6 +44,26 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{ mes "- after you loose some weight. -"; close; } + if (countitem(Para_Team_Mark) > 0) { + mes "[Lime Evenor]"; + mes "Thanks to many adventurers visiting our Eden Group, we've recently prepared a new version of Eden Group Mark for our visitors."; + mes "And it is also possible to exchange old version of Eden Group Mark into a new one."; + next; + mes "[Lime Evenor]"; + mes "Though it has a slight time delay, this new version of Eden Group Mark will send you back to current saved location."; + mes "Would you like to exchange yours?"; + next; + if (select("Sure", "I'm good.") == 2){ + mes "[Lime Evenor]"; + mes "What possible reason would you have... to not exchange?"; + close; + } + delitem Para_Team_Mark,1; + getitem Para_Team_Mark_,1; + mes "[Lime Evenor]"; + mes "There you go. Come back again~"; + close; + } mes "[Lime Evenor]"; mes "People who follow their dreams and romances listen to me. We are representatives of the paradise called 'The garden of Eden' called the Eden group . There is no place like this anywhere."; mes "Hello. Can I help you?"; @@ -67,7 +87,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{ next; break; case 2: - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "[Lime Evenor]"; mes "You can be a Eden's member by simply registering with me."; mes "Would you like to join Eden Group?"; @@ -106,7 +126,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{ next; mes "[Lime Evenor]"; mes "Hopefully you can do great work as an Eden's member."; - getitem Para_Team_Mark,1; + getitem Para_Team_Mark_,1; next; break; case 2: @@ -179,7 +199,7 @@ moc_para01,27,35,5 script Secretary Lime Evenor 4_F_EDEN_OFFICER,{ } break; case 4: - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Lime Evenor]"; mes "Would like to try some missions as an Eden member?"; next; @@ -306,7 +326,7 @@ OnTouch: } moc_para01,47,39,3 script #warp_2_pass HIDDEN_NPC,{ - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Lime Evenor]"; mes "Oh, it is an exclusive place only for Eden's members."; mes "If you are a member, you can come whenever you want!"; diff --git a/npc/re/quests/eden/eden_quests.txt b/npc/re/quests/eden/eden_quests.txt index 4e472d1af..f58c3ed5a 100644 --- a/npc/re/quests/eden/eden_quests.txt +++ b/npc/re/quests/eden/eden_quests.txt @@ -37,7 +37,7 @@ moc_para01,25,35,4 script Instructor Boya#para01 4_M_KNIGHT_GOLD,{ mes "[Boya]"; - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "You are not in my group are you?"; mes "I don't have anything to say to outsiders."; mes "If you want something register with my group."; @@ -839,7 +839,7 @@ moc_fild11,180,253,5 script Talking Dog#para03 4_RUS_DWOLF,{ mes "Not a wolf."; mes "I wasn't a dog originally..."; next; - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Talking Dog]"; mes "Anyway are you a Eden Group member?"; mes "Oh good to see you."; @@ -1047,7 +1047,7 @@ prt_sewb1,131,262,3 script Timid Cat#para04 4_M_BABYCAT,{ pay_arche,41,136,3 script Eden Member Karl#para05 4_M_KHMAN,{ if (para_suv01 < 13) { - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Karl]"; mes "Hey, how are you?"; mes "Good to see you~"; @@ -1190,7 +1190,7 @@ pay_arche,41,136,3 script Eden Member Karl#para05 4_M_KHMAN,{ anthell01,29,264,5 script Eden Member Cloud#para06 4_M_HUMAN_02,{ if (para_suv01 < 17) { - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Cloud]"; mes "Oops."; mes "You are a member of my group."; @@ -1380,7 +1380,7 @@ anthell01,29,264,5 script Eden Member Cloud#para06 4_M_HUMAN_02,{ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{ if (para_suv01 < 24) { - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Hooksha]"; mes "Unbelievable why did you come here?"; mes "Um... You are not on the third step of the training?"; @@ -1649,7 +1649,7 @@ in_orcs01,38,175,3 script Eden Member Hooksha 1_F_SIGNZISK,{ iz_dun04,43,46,3 script Eden Member Callandiva 4_F_CRU,{ if (para_suv01 < 33) { - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Callandiva]"; mes "How did you get so deep in this ocean city?"; mes "Ah, that symbol is of our group."; @@ -2243,7 +2243,7 @@ moc_para01,179,44,3 script Chef 4_M_CHNCOOK,{ mes "Ah, Kim-dduck-soon."; mes "It's the representative meal for normal citizens."; next; - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { if (Zeny > 2699) { mes "[Chef]"; mes "Hey, here you are."; @@ -2282,7 +2282,7 @@ moc_para01,179,44,3 script Chef 4_M_CHNCOOK,{ mes "Course meal B?"; mes "This food with meat and vegetables in hot soup has it's origins from nomadic life under the cold and dry nature."; next; - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { if (Zeny > 3599) { mes "[Chef]"; mes "Hey, here you are."; @@ -2317,7 +2317,7 @@ moc_para01,179,44,3 script Chef 4_M_CHNCOOK,{ mes "How many times do I have to tell you?"; close; case 4: - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { if (Zeny > 4499) { mes "[Chef]"; mes "Hey, here you are."; @@ -2360,7 +2360,7 @@ moc_para01,179,44,3 script Chef 4_M_CHNCOOK,{ close; } case 2: - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "[Chef]"; mes "Most jobs should be managed by yourself. So it might be difficult, right?"; mes "Actually it's harmful so they have requested continuously."; @@ -2469,7 +2469,7 @@ moc_para01,179,44,3 script Chef 4_M_CHNCOOK,{ moc_para01,23,35,5 script Instructor Ur#2nd01 4_M_KNIGHT_BLACK,{ mes "[Instructor Ur]"; - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "Hey there!"; mes "I see you're not one of our agents?"; mes "Are you interested in joining us?"; @@ -3740,7 +3740,7 @@ moc_para01,111,83,3 script Blacksmith Thorn#2nd10 2_M_OLDBLSMITH,{ close; } mes "[Thorn]"; - if (countitem(Para_Team_Mark) < 1) { + if (countitem(Para_Team_Mark) < 1 && countitem(Para_Team_Mark_) < 1) { mes "Hmm, are you a member of Eden Group?"; mes "You need to be one of our members to use my services."; close; diff --git a/npc/re/quests/eden/eden_service.txt b/npc/re/quests/eden/eden_service.txt index 387141623..ce6efaa67 100644 --- a/npc/re/quests/eden/eden_service.txt +++ b/npc/re/quests/eden/eden_service.txt @@ -50,7 +50,7 @@ mes "3.Cabinet fee is"; mes " ^4d4dff500 zeny^000000!"; next; - if (countitem(Para_Team_Mark) > 0) { + if (countitem(Para_Team_Mark) > 0 || countitem(Para_Team_Mark_) > 0) { mes "You need to insert zeny to use the cabinet."; mes "Cost : 500 Zeny "; mes "Would you like to use it?"; diff --git a/npc/re/scripts.conf b/npc/re/scripts.conf index 1504e0416..e64052f33 100644 --- a/npc/re/scripts.conf +++ b/npc/re/scripts.conf @@ -127,6 +127,7 @@ //================= Others ================================================ "npc/re/other/bulletin_boards.txt", +"npc/re/other/dimensional_gap.txt", "npc/re/other/mail.txt", "npc/re/other/mercenary_rent.txt", "npc/re/other/pvp.txt", diff --git a/npc/re/scripts_warps.conf b/npc/re/scripts_warps.conf index a5ead53e2..683746d79 100644 --- a/npc/re/scripts_warps.conf +++ b/npc/re/scripts_warps.conf @@ -62,6 +62,7 @@ //================= Others ================================================ "npc/re/warps/other/arena.txt", +"npc/re/warps/other/dimensional_gap.txt", "npc/re/warps/other/jobquests.txt", "npc/re/warps/other/paradise.txt", "npc/re/warps/other/s_workshop.txt", diff --git a/npc/re/warps/cities/izlude.txt b/npc/re/warps/cities/izlude.txt index 0fb3b1f86..7f2be3865 100644 --- a/npc/re/warps/cities/izlude.txt +++ b/npc/re/warps/cities/izlude.txt @@ -83,6 +83,7 @@ OnTouch: OnInit: questinfo(21001, QTYPE_QUEST, 1, Job_Novice); + end; } iz_int,47,30,3 script noviship#room1-2 WARPNPC,2,2,{ @@ -100,30 +101,31 @@ iz_int,56,15,0 script noviship WARPNPC,2,2,{ OnTouch: savepoint("int_land"+strnpcinfo(NPC_NAME_HIDDEN), 77, 101); warp("int_land"+strnpcinfo(NPC_NAME_HIDDEN), 85, 107); + end; } int_land,49,57,0 script noviship#izlude WARPNPC,2,2,{ end; OnTouch: - mes "^4d4dffOnce you left this island there is no way back."; - mes "Are you sure you want to go directly to Izlude?^000000"; - next; - mes "^4d4dffIf you do, the quest got deleted from your Quest Log.^000000"; - next; + mes("^4d4dffOnce you left this island there is no way back."); + mes("Are you sure you want to go directly to Izlude?^000000"); + next(); + mes("^4d4dffIf you do, the quest got deleted from your Quest Log.^000000"); + next(); if (select("Do not go to Izlude yet", "Sail to Izlude!") == 1) { - mes "[Sailor]"; - mes "You want to stay here longer?"; - mes "Good, then I wait until you're ready~"; + mes("[Sailor]"); + mes("You want to stay here longer?"); + mes("Good, then I wait until you're ready~"); close(); } - mes "[Sailor]"; - mes "Lets head toward Izlude!"; - close2; + mes("[Sailor]"); + mes("Lets head toward Izlude!"); + close2(); if (questprogress(21001)) - erasequest 21001; + erasequest(21001); if (questprogress(21002)) - erasequest 21002; + erasequest(21002); warp("izlude"+strnpcinfo(NPC_NAME_HIDDEN), 196, 209); end; } diff --git a/npc/re/warps/other/dimensional_gap.txt b/npc/re/warps/other/dimensional_gap.txt new file mode 100644 index 000000000..890dc76f5 --- /dev/null +++ b/npc/re/warps/other/dimensional_gap.txt @@ -0,0 +1,79 @@ +//================= Hercules Script ======================================= +//= _ _ _ +//= | | | | | | +//= | |_| | ___ _ __ ___ _ _| | ___ ___ +//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| +//= | | | | __/ | | (__| |_| | | __/\__ \ +//= \_| |_/\___|_| \___|\__,_|_|\___||___/ +//================= License =============================================== +//= This file is part of Hercules. +//= http://herc.ws - http://github.com/HerculesWS/Hercules +//= +//= Copyright (C) 2016 Hercules Dev Team +//= Copyright (C) Ridley +//= Copyright (C) Nova +//= +//= Hercules is free software: you can redistribute it and/or modify +//= it under the terms of the GNU General Public License as published by +//= the Free Software Foundation, either version 3 of the License, or +//= (at your option) any later version. +//= +//= This program is distributed in the hope that it will be useful, +//= but WITHOUT ANY WARRANTY; without even the implied warranty of +//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//= GNU General Public License for more details. +//= +//= You should have received a copy of the GNU General Public License +//= along with this program. If not, see <http://www.gnu.org/licenses/>. +//========================================================================= +//= Dimensonal Gap warp script (Renewal) +//================= Description =========================================== +//= Warps for Dimensional Gap +//================= Current Version ======================================= +//= 1.0 +//========================================================================= + +mid_camp,210,292,4 script Transport Device#01 PORTAL,{ + mes("Do you wish to enter the Dimensional Gap?"); + next(); + if (select("Yes", "No") == 1) { + warp("dali", 141, 82); + end; + } + close(); +} + +moc_fild22b,222,200,4 script Transport Device#02 PORTAL,{ + mes("Do you wish to enter the Dimensional Gap?"); + next(); + if (select("Yes", "No") == 1) { + warp("dali", 119, 56); + end; + } + close(); +} + +bif_fild01,318,159,4 script Transport Device#03 PORTAL,{ + mes("Do you wish to enter the Dimensional Gap?"); + next(); + if (select("Yes", "No") == 1) { + warp("dali", 43, 92); + end; + } + close(); +} + +dic_fild02,241,31,4 script Transport Device#04 PORTAL,{ + mes("Do you wish to enter the Dimensional Gap?"); + next(); + if (select("Yes", "No") == 1) { + warp("dali", 41, 134); + end; + } + close(); +} + +dali,149,82,0 warp dg001 2,2,mid_camp,210,289 +dali,122,48,0 warp dg002 2,2,moc_fild22b,227,200 +dali,38,87,0 warp dg003 2,2,bif_fild01,318,155 +dali,34,139,0 warp dg004 2,2,dic_fild02,237,32 diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql index fcd9d8478..5b8b9fc54 100644 --- a/sql-files/item_db.sql +++ b/sql-files/item_db.sql @@ -44,7 +44,7 @@ CREATE TABLE `item_db` ( `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL, `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL, `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL, - `equip_locations` smallint(4) UNSIGNED DEFAULT NULL, + `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL, `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL, `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL, `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL, diff --git a/sql-files/item_db2.sql b/sql-files/item_db2.sql index 1e2798494..5edbc7dbd 100644 --- a/sql-files/item_db2.sql +++ b/sql-files/item_db2.sql @@ -44,7 +44,7 @@ CREATE TABLE `item_db2` ( `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL, `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL, `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL, - `equip_locations` smallint(4) UNSIGNED DEFAULT NULL, + `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL, `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL, `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL, `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL, diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index f56ed7e68..d1983bdec 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -44,7 +44,7 @@ CREATE TABLE `item_db` ( `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL, `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL, `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL, - `equip_locations` smallint(4) UNSIGNED DEFAULT NULL, + `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL, `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL, `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL, `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL, @@ -1180,7 +1180,7 @@ REPLACE INTO `item_db` VALUES ('1936','Blue_Violin','Blue Violin','5','20','10', REPLACE INTO `item_db` VALUES ('1937','Ru_Gold_Violin','Ru Gold Violin','4','20','10','1500','180','0','0','1','2','524288','56','1','2','3','120',NULL,'1','13','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bDex,8; bonus bVit,8;','',''); REPLACE INTO `item_db` VALUES ('1938','Infinity_Violin','Infinity Violin','4','20','10','500','150','0','0','1','1','524288','56','1','2','4','100',NULL,'1','13','0','0','0','0','467',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('1939','Crimson_Violin','Crimson Violin','4','20','10','800','80','0','0','1','2','524288','63','1','2','3','70',NULL,'1','13','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAtk,pow(min(getrefine(),15),2); if(BaseLevel>70) { bonus bAtk,(((BaseLevel-70)/10)*5); }','',''); -REPLACE INTO `item_db` VALUES ('1940','Conch_','Conch','4','0','0','600','120','0','0','1','1','524288','63','1','2','4','130',NULL,'1','13','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bInt,getrefine(); bonus bDex,getrefine(); if(getrefine()>4) { bonus2 bSkillAtk,WM_REVERBERATION,10; bonus2 bVariableCastrate,WM_REVERBERATION,-10; } if(getrefine()>6) { bonus2 bSkillAtk,WM_REVERBERATION,10; bonus2 bVariableCastrate,WM_REVERBERATION,-10; } if(getrefine()>8) { bonus2 bSkillAtk,WM_REVERBERATION,20; bonus2 bVariableCastrate,WM_REVERBERATION,-20; }','',''); +REPLACE INTO `item_db` VALUES ('1940','Conch_','Conch','4','0','0','600','120','0','0','1','1','524288','63','1','2','4','130',NULL,'1','13','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bInt, getrefine(); bonus bDex, getrefine(); if(getrefine() > 4) { bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 10; bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 10; bonus2 bVariableCastrate, WM_REVERBERATION, -10; } if(getrefine() > 6) { bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 10; bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 10; bonus2 bVariableCastrate, WM_REVERBERATION, -10; } if(getrefine() > 8) { bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 20; bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 20; bonus2 bVariableCastrate, WM_REVERBERATION, -20; }','',''); REPLACE INTO `item_db` VALUES ('1950','Rope','Rope','4','2500','1250','400','45','0','0','2','3','524288','63','0','2','1','3',NULL,'1','14','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('1951','Rope_','Rope','4','2500','1250','400','45','0','0','2','4','524288','63','0','2','1','3',NULL,'1','14','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('1952','Line','Whip','4','12000','6000','300','80','0','0','2','2','524288','63','0','2','2','16',NULL,'1','14','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); @@ -2775,7 +2775,7 @@ REPLACE INTO `item_db` VALUES ('4692','True_Celia_Alde_Card','True Celia Alde Ca REPLACE INTO `item_db` VALUES ('4693','True_Chen_Liu_Card','True Chen Liu Card','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','2','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,SR_DRAGONCOMBO,50; if (getequipweaponlv(EQI_HAND_R) == 4) bonus2 bSkillAtk,SR_DRAGONCOMBO,50; if (getrefine() >= 10) bonus2 bSkillAtk,SR_DRAGONCOMBO,50;','',''); REPLACE INTO `item_db` VALUES ('4694','True_Gertie_Card','True Gertie Card','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','2','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,SC_FEINTBOMB,50; if (getequipweaponlv(EQI_HAND_R) == 4) bonus2 bSkillAtk,SC_FEINTBOMB,50; if (getrefine() >= 10) bonus2 bSkillAtk,SC_FEINTBOMB,50;','',''); REPLACE INTO `item_db` VALUES ('4695','True_Trentini_Card','True Trentini Card','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','2','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,WM_METALICSOUND,50; if (getequipweaponlv(EQI_HAND_R) == 4) bonus2 bSkillAtk,WM_METALICSOUND,50; if (getrefine() >= 10) bonus2 bSkillAtk,WM_METALICSOUND,50;','',''); -REPLACE INTO `item_db` VALUES ('4696','True_Alphoccio_Card','True Alphoccio Card','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','2','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,WM_REVERBERATION,50; if (getequipweaponlv(EQI_HAND_R) == 4) bonus2 bSkillAtk,WM_REVERBERATION,50; if (getrefine() >= 10) bonus2 bSkillAtk,WM_REVERBERATION,50;','',''); +REPLACE INTO `item_db` VALUES ('4696','True_Alphoccio_Card','True Alphoccio Card','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','2','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 50; bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 50; if (getequipweaponlv(EQI_HAND_R) == 4) { bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 50; bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 50; } if (getrefine() >= 10) { bonus2 bSkillAtk, WM_REVERBERATION_MELEE, 50; bonus2 bSkillAtk, WM_REVERBERATION_MAGIC, 50; }','',''); REPLACE INTO `item_db` VALUES ('4700','Strength1','STR+1','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','1023','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bStr,1;','',''); REPLACE INTO `item_db` VALUES ('4701','Strength2','STR+2','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','1023','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bStr,2;','',''); REPLACE INTO `item_db` VALUES ('4702','Strength3','STR+3','6','20','10','10','0','0','0','0','0','18446744073709551615','63','2','1023','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bStr,3;','',''); @@ -3947,7 +3947,7 @@ REPLACE INTO `item_db` VALUES ('5898','Autumn_Headband','Autumn Headband','5','0 REPLACE INTO `item_db` VALUES ('5899','Black_Ribbon_','Black Ribbon','5','0','0','200','0','0','10','0','1','128','56','2','256','0','100',NULL,'1','1120','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,RK_WINDCUTTER,50; bonus2 bSkillAtk,RK_SONICWAVE,50; if(getrefine()>=7) { bonus bAtk,2*(readparam(bAgi)/5); } if(getrefine()>=9) { bonus2 bSkillAtk,RK_IGNITIONBREAK,30; }','',''); REPLACE INTO `item_db` VALUES ('5900','Divine_Guard_Hat_','Divine Guard Hat','5','20','10','200','0','0','10','0','1','16384','56','2','256','0','100',NULL,'1','1121','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSubSize,Size_Medium,5; bonus2 bSubSize,Size_Large,5; bonus2 bSubSize,Size_Small,5; if(getrefine()>6) { bonus5 bAutoSpellWhenHit,AL_HEAL,max(getskilllv(AL_HEAL),5),100,BF_WEAPON,0; } if(getrefine()>8) { bonus2 bSkillAtk,LG_RAYOFGENESIS,20; }','',''); REPLACE INTO `item_db` VALUES ('5904','Inconspicuous_Hat_','Inconspicuous Hat','5','20','10','200','0','0','10','0','1','131072','56','2','256','0','100',NULL,'1','1125','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bMatkRate,7; if(getrefine()>6) { bonus bMatk,(readparam(bInt)/5)*2; } if(getrefine()>8) { bonus bMatkRate,5; }','',''); -REPLACE INTO `item_db` VALUES ('5905','Lyrica_Hat_','Lyrica Hat','5','20','10','200','0','0','10','0','1','524288','56','1','256','0','100',NULL,'1','1126','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,WM_SEVERE_RAINSTORM,15; if(getrefine()>6) { bonus bFixedCastrate,-(getskilllv(BA_MUSICALLESSON)*4); } if(getrefine()>8) { bonus2 bSkillUseSP,WM_SEVERE_RAINSTORM,10; }','',''); +REPLACE INTO `item_db` VALUES ('5905','Lyrica_Hat_','Lyrica Hat','5','20','10','200','0','0','10','0','1','524288','56','1','256','0','100',NULL,'1','1126','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,WM_SEVERE_RAINSTORM_MELEE,15; if(getrefine()>6) { bonus bFixedCastrate,-(getskilllv(BA_MUSICALLESSON)*4); } if(getrefine()>8) { bonus2 bSkillUseSP,WM_SEVERE_RAINSTORM,10; }','',''); REPLACE INTO `item_db` VALUES ('5906','Oni_Horns_','Oni Horns','5','20','10','200','0','0','10','0','1','4096','56','2','256','0','100',NULL,'1','1127','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,GC_COUNTERSLASH,getskilllv(GC_WEAPONBLOCKING)*10; if(getrefine()>6) { bonus bAtk,10; bonus bHit,5; } if(getrefine()>8) { bonus3 bAutoSpell,GC_CROSSIMPACT,1,100; }','',''); REPLACE INTO `item_db` VALUES ('5907','Sea_Captain_Hat','Sea Captain Hat','5','20','10','200','0','0','20','0','1','1024','56','2','256','0','100',NULL,'1','1128','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,NC_AXETORNADO,20; bonus2 bSkillAtk,NC_AXEBOOMERANG,20; if(getrefine()>6) { bonus2 bSkillAtk,NC_AXETORNADO,getskilllv(BS_WEAPONRESEARCH); } if(getrefine()>8) { bonus2 bSkillAtk,NC_AXETORNADO,getskilllv(NC_TRAININGAXE); }','',''); REPLACE INTO `item_db` VALUES ('5918','Gambler_Seal','Gambler Seal','5','20','10','500','0','0','0','0','0','18446744073709551615','63','2','512','0','70',NULL,'0','1202','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bCritical,3; bonus bCritAtkRate,3;','',''); @@ -8742,7 +8742,7 @@ REPLACE INTO `item_db` VALUES ('18791','Shrine_Maiden_Hat','Shrine Maiden Hat',' REPLACE INTO `item_db` VALUES ('18792','Indonesian_Id_Sakkat','Indonesian Id Sakkat','5','0','0','400','0','0','1','0','0','18446744073709551614','63','2','256','0','45',NULL,'1','901','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bVit,10; bonus2 bAddRaceTolerance,RC_DemiPlayer,10; bonus bMatkRate,5; bonus bAtkRate,5;','',''); REPLACE INTO `item_db` VALUES ('18793','Sorc_Night_Cap','Sorc Night Cap','5','0','0','200','0','0','25','0','1','65536','56','2','256','0','100',NULL,'1','911','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bMdef,10; bonus2 bSkillAtk,MG_FIREBOLT,50; bonus2 bSkillAtk,MG_LIGHTNINGBOLT,50; bonus2 bSkillAtk,MG_COLDBOLT,50; if(getrefine()>6) { bonus2 bSkillAtk,SO_SPELLFIST,25; } if(getrefine()>8) { bonus bAspd,5; }','',''); REPLACE INTO `item_db` VALUES ('18794','Plain_Black_Mage_Hat','Plain Black Mage Hat','5','0','0','200','0','0','15','0','1','512','56','2','256','0','100',NULL,'1','912','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus2 bSkillAtk,WL_CRIMSONROCK,5; bonus2 bSkillAtk,WL_JACKFROST,5; bonus2 bSkillAtk,WL_EARTHSTRAIN,5; bonus2 bSkillAtk,WL_CHAINLIGHTNING,5; bonus2 bIgnoreMdefRate,RC_NonBoss,10; bonus2 bIgnoreMdefRate,RC_NonBoss,getrefine()*2; if(getrefine()>6) { bonus2 bSkillAtk,WL_CRIMSONROCK,5; bonus2 bSkillAtk,WL_JACKFROST,5; bonus2 bSkillAtk,WL_EARTHSTRAIN,5; bonus2 bSkillAtk,WL_CHAINLIGHTNING,5; } if(getrefine()>8) { bonus bMatkRate,5; }','',''); -REPLACE INTO `item_db` VALUES ('18795','Night_Sparrow_Hat','Night Sparrow Hat','5','0','0','200','0','0','15','0','0','524288','56','2','256','0','100',NULL,'1','913','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bFixedCastrate,-(getskilllv(BA_MUSICALLESSON)*5); if(getrefine()>6) { bonus2 bSkillAtk,WM_SEVERE_RAINSTORM,25; } if(getrefine()>8) { bonus bMaxSP,200; }','',''); +REPLACE INTO `item_db` VALUES ('18795','Night_Sparrow_Hat','Night Sparrow Hat','5','0','0','200','0','0','15','0','0','524288','56','2','256','0','100',NULL,'1','913','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bFixedCastrate,-(getskilllv(BA_MUSICALLESSON)*5); if(getrefine()>6) { bonus2 bSkillAtk,WM_SEVERE_RAINSTORM_MELEE,25; } if(getrefine()>8) { bonus bMaxSP,200; }','',''); REPLACE INTO `item_db` VALUES ('18796','RWC_Crown_Of_Victory(8th)','RWC Crown Of Victory(8th)','5','0','0','500','0','0','12','0','1','18446744073709551615','63','2','256','0','0',NULL,'1','914','0','0','0','0','475',NULL,'0',NULL,'0',NULL,'0','bonus bAllStats,2; bonus2 bResEff,Eff_Curse,10000; bonus bUnbreakableHelm,0;','',''); REPLACE INTO `item_db` VALUES ('18797','Deep_Angel_Hairband','Deep Angel Hairband','5','0','0','100','0','0','4','0','1','18446744073709551614','63','2','256','0','0',NULL,'1','915','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3; bonus2 bAddRaceTolerance,RC_Demon,3;','',''); REPLACE INTO `item_db` VALUES ('18798','Pink_Angel_Hairband','Pink Angel Hairband','5','0','0','100','0','0','4','0','1','18446744073709551614','63','2','256','0','0',NULL,'1','916','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAgi,1; bonus bLuk,1; bonus bMdef,3; bonus2 bAddRaceTolerance,RC_Demon,3;','',''); @@ -9739,6 +9739,7 @@ REPLACE INTO `item_db` VALUES ('22046','Boots_of_Airship','Boots of Airship','5' REPLACE INTO `item_db` VALUES ('22047','Tarlock\'s_Boots','Tarlock\'s Boots','5','20','10','250','0','0','13','0','0','18446744073709551615','63','2','64','0','125',NULL,'1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bAgi,1; bonus bAspdRate,5; if(getrefine()>6) { bonus bAgi,1; bonus bAspdRate,5; } if(getrefine()>8) { bonus bAgi,1; bonus bAspdRate,5; } if(getrefine()>11) { bonus bAspd,1; }','',''); REPLACE INTO `item_db` VALUES ('22059','Egir_Shoes_K','Egir Shoes','5','200000','100000','300','0','0','13','0','1','18446744073709551615','63','2','64','0','40',NULL,'1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','bonus bMaxHP, 500; bonus bMaxSP, 50; bonus bUnbreakableShoes, 0;','',''); REPLACE INTO `item_db` VALUES ('22067','Witch_Shoes','Witch Shoes','5','3500','1750','400','0','0','10','0','0','18446744073709551614','63','2','64','0','0',NULL,'1','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','skill ALL_CATCRY, 1; bonus bUnbreakableShoes, 1; autobonus3 \"{ }\", 1000, 7000, ALL_CATCRY, \"{ montransform LOLI_RURI, 420000; }\";','',''); +REPLACE INTO `item_db` VALUES ('22508','Para_Team_Mark_','Eden Group Mark','11','0','0','0','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','1200000','507',NULL,'0',NULL,'0',NULL,'0','unitskilluseid getcharid(3), \"AL_TELEPORT\", 3;','',''); REPLACE INTO `item_db` VALUES ('22514','Candy_Holder','Candy Holder','11','20','10','10','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22515','Twisted_Key_of_Time','Twisted Key of Time','3','10','5','300','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','0','0',NULL,'0',NULL,'0',NULL,'0','','',''); REPLACE INTO `item_db` VALUES ('22540','Runstone_Lux','Lux Anima Rune','11','2','1','100','0','0','0','0','0','18446744073709551615','63','2','0','0','0',NULL,'0','0','0','0','0','60000','475',NULL,'0',NULL,'20','1','0','itemskill RK_LUXANIMA,1;','',''); diff --git a/src/common/HPM.c b/src/common/HPM.c index dbe121940..c34828010 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -103,6 +103,7 @@ void hplugin_export_symbol(void *value, const char *name) void *hplugin_import_symbol(char *name, unsigned int pID) { int i; + nullpo_retr(NULL, name); ARR_FIND(0, VECTOR_LENGTH(HPM->symbols), i, strcmp(VECTOR_INDEX(HPM->symbols, i)->name, name) == 0); if (i != VECTOR_LENGTH(HPM->symbols)) @@ -133,6 +134,7 @@ bool hplugin_iscompatible(char* version) { bool hplugin_exists(const char *filename) { int i; + nullpo_retr(false, filename); for (i = 0; i < VECTOR_LENGTH(HPM->plugins); i++) { if (strcmpi(VECTOR_INDEX(HPM->plugins, i)->filename,filename) == 0) return true; @@ -259,6 +261,7 @@ void hplugins_addToHPData(enum HPluginDataTypes type, uint32 pluginID, struct hp return; } store = *storeptr; + nullpo_retv(store); /* duplicate check */ ARR_FIND(0, VECTOR_LENGTH(store->entries), i, VECTOR_INDEX(store->entries, i)->pluginID == pluginID && VECTOR_INDEX(store->entries, i)->classid == classid); @@ -447,7 +450,8 @@ bool hplugins_addconf(unsigned int pluginID, enum HPluginConfType type, char *na return true; } -struct hplugin *hplugin_load(const char* filename) { +struct hplugin *hplugin_load(const char* filename) +{ struct hplugin *plugin; struct hplugin_info *info; struct HPMi_interface **HPMi; @@ -596,6 +600,7 @@ struct hplugin *hplugin_load(const char* filename) { void hplugin_unload(struct hplugin* plugin) { int i; + nullpo_retv(plugin); if (plugin->filename) aFree(plugin->filename); if (plugin->dll) @@ -622,7 +627,8 @@ CMDLINEARG(loadplugin) /** * Reads the plugin configuration and loads the plugins as necessary. */ -void hplugins_config_read(void) { +void hplugins_config_read(void) +{ struct config_t plugins_conf; struct config_setting_t *plist = NULL; const char *config_filename = "conf/plugins.conf"; // FIXME hardcoded name @@ -788,6 +794,7 @@ const char *HPM_file2ptr(const char *file) { int i; + nullpo_retr(NULL, file); ARR_FIND(0, HPM->filenames.count, i, HPM->filenames.data[i].addr == file); if (i != HPM->filenames.count) { return HPM->filenames.data[i].name; @@ -801,19 +808,29 @@ const char *HPM_file2ptr(const char *file) return HPM->filenames.data[i].name; } -void* HPM_mmalloc(size_t size, const char *file, int line, const char *func) { + +void* HPM_mmalloc(size_t size, const char *file, int line, const char *func) +{ return iMalloc->malloc(size,HPM_file2ptr(file),line,func); } -void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char *func) { + +void* HPM_calloc(size_t num, size_t size, const char *file, int line, const char *func) +{ return iMalloc->calloc(num,size,HPM_file2ptr(file),line,func); } -void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) { + +void* HPM_realloc(void *p, size_t size, const char *file, int line, const char *func) +{ return iMalloc->realloc(p,size,HPM_file2ptr(file),line,func); } -void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char *func) { + +void* HPM_reallocz(void *p, size_t size, const char *file, int line, const char *func) +{ return iMalloc->reallocz(p,size,HPM_file2ptr(file),line,func); } -char* HPM_astrdup(const char *p, const char *file, int line, const char *func) { + +char* HPM_astrdup(const char *p, const char *file, int line, const char *func) +{ return iMalloc->astrdup(p,HPM_file2ptr(file),line,func); } @@ -849,6 +866,7 @@ bool hplugins_get_battle_conf(const char *w1, int *value) { int i; + nullpo_retr(w1, value); nullpo_retr(false, value); ARR_FIND(0, VECTOR_LENGTH(HPM->config_listeners[HPCT_BATTLE]), i, strcmpi(w1, VECTOR_INDEX(HPM->config_listeners[HPCT_BATTLE], i).key) == 0); @@ -1012,9 +1030,11 @@ void hplugin_data_store_create(struct hplugin_data_store **storeptr, enum HPlugi /** * Called by HPM->DataCheck on a plugins incoming data, ensures data structs in use are matching! **/ -bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, char *name) { +bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, char *name) +{ unsigned int i, j; + nullpo_retr(false, src); if (version != datacheck_version) { ShowError("HPMDataCheck:%s: DataCheck API version mismatch %d != %d\n", name, datacheck_version, version); return false; @@ -1039,7 +1059,8 @@ bool HPM_DataCheck(struct s_HPMDataCheck *src, unsigned int size, int version, c return true; } -void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, int version) { +void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, int version) +{ unsigned int i; datacheck_version = version; @@ -1055,11 +1076,13 @@ void HPM_datacheck_init(const struct s_HPMDataCheck *src, unsigned int length, i } } -void HPM_datacheck_final(void) { +void HPM_datacheck_final(void) +{ db_destroy(datacheck_db); } -void hpm_init(void) { +void hpm_init(void) +{ int i; datacheck_db = NULL; datacheck_data = NULL; @@ -1151,6 +1174,7 @@ void hpm_final(void) return; } + void hpm_defaults(void) { HPM = &HPM_s; diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 33d617b13..98c3552c4 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -291,12 +291,12 @@ typedef uintptr_t uintptr; #define GCC_VERSION 0 #endif -// Pragma macro only enabled on gcc >= 4.5 or clang - borrowed from Mana Plus -#if defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) -#define PRAGMA_GCC45(str) _Pragma(#str) -#else // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) -#define PRAGMA_GCC45(str) -#endif // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40500) +// Pragma macro only enabled on gcc >= 4.6 or clang - borrowed from Mana Plus +#if defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40600) +#define PRAGMA_GCC46(str) _Pragma(#str) +#else // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40600) +#define PRAGMA_GCC46(str) +#endif // ! defined(__GNUC__) && (defined(__clang__) || GCC_VERSION >= 40600) // fallthrough attribute only enabled on gcc >= 7.0 #if defined(__GNUC__) && (GCC_VERSION >= 70000) diff --git a/src/common/console.c b/src/common/console.c index f1b4523e2..654f26cb3 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -68,7 +68,8 @@ struct { /*====================================== * CORE : Display title *--------------------------------------*/ -void display_title(void) { +void display_title(void) +{ const char *vcstype = sysinfo->vcstype(); ShowMessage("\n"); @@ -130,21 +131,24 @@ int console_parse_key_pressed(void) /** * Stops server **/ -CPCMD_C(exit,server) { +CPCMD_C(exit, server) +{ core->runflag = 0; } /** * Displays ERS-related statistics (Entry Reusage System) **/ -CPCMD_C(ers_report,server) { +CPCMD_C(ers_report, server) +{ ers_report(); } /** * Displays memory usage **/ -CPCMD_C(mem_report,server) { +CPCMD_C(mem_report, server) +{ #ifdef USE_MEMMGR memmgr_report(line?atoi(line):0); #endif @@ -171,7 +175,8 @@ CPCMD(help) * [Ind/Hercules] * Displays current malloc usage */ -CPCMD_C(malloc_usage,server) { +CPCMD_C(malloc_usage, server) +{ unsigned int val = (unsigned int)iMalloc->usage(); ShowInfo("malloc_usage: %.2f MB\n",(double)(val)/1024); } @@ -180,7 +185,8 @@ CPCMD_C(malloc_usage,server) { * Skips an sql update * Usage: sql update skip UPDATE-FILE.sql **/ -CPCMD_C(skip,update) { +CPCMD_C(skip, update) +{ if( !line ) { ShowDebug("usage example: sql update skip 2013-02-14--16-15.sql\n"); return; @@ -311,6 +317,7 @@ void console_parse_create(char *name, CParseFunc func) char sublist[CP_CMD_LENGTH * 5]; struct CParseEntry *cmd; + nullpo_retv(name); safestrncpy(sublist, name, CP_CMD_LENGTH * 5); tok = strtok(sublist,":"); @@ -364,6 +371,7 @@ void console_parse_list_subs(struct CParseEntry *cmd, unsigned char depth) { int i; char msg[CP_CMD_LENGTH * 2]; + nullpo_retv(cmd); Assert_retv(cmd->type == CPET_CATEGORY); for (i = 0; i < VECTOR_LENGTH(cmd->u.children); i++) { struct CParseEntry *child = VECTOR_INDEX(cmd->u.children, i); @@ -391,6 +399,7 @@ void console_parse_sub(char *line) char sublist[CP_CMD_LENGTH * 5]; int i; + nullpo_retv(line); memcpy(bline, line, 200); tok = strtok(line, " "); @@ -444,9 +453,12 @@ void console_parse_sub(char *line) } ShowError("Is only a category, type '"CL_WHITE"%s help"CL_RESET"' to list its subcommands\n",sublist); } -void console_parse(char* line) { + +void console_parse(char *line) +{ int c, i = 0, len = MAX_CONSOLE_INPUT - 1;/* we leave room for the \0 :P */ + nullpo_retv(line); while( (c = fgetc(stdin)) != EOF ) { if( --len == 0 ) break; @@ -458,7 +470,9 @@ void console_parse(char* line) { line[i++] = '\0'; } -void *cThread_main(void *x) { + +void *cThread_main(void *x) +{ while( console->input->ptstate ) {/* loopx */ if( console->input->key_pressed() ) { char input[MAX_CONSOLE_INPUT]; @@ -483,7 +497,9 @@ void *cThread_main(void *x) { return NULL; } -int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { + +int console_parse_timer(int tid, int64 tick, int id, intptr_t data) +{ int i; EnterSpinLock(console->input->ptlock); for(i = 0; i < cinput.count; i++) { @@ -494,7 +510,9 @@ int console_parse_timer(int tid, int64 tick, int id, intptr_t data) { mutex->cond_signal(console->input->ptcond); return 0; } -void console_parse_final(void) { + +void console_parse_final(void) +{ if( console->input->ptstate ) { InterlockedDecrement(&console->input->ptstate); mutex->cond_signal(console->input->ptcond); @@ -506,7 +524,9 @@ void console_parse_final(void) { mutex->destroy(console->input->ptmutex); } } -void console_parse_init(void) { + +void console_parse_init(void) +{ cinput.count = 0; console->input->ptstate = 1; @@ -524,6 +544,7 @@ void console_parse_init(void) { timer->add_func_list(console->input->parse_timer, "console_parse_timer"); timer->add_interval(timer->gettick() + 1000, console->input->parse_timer, 0, 0, 500);/* start listening in 1s; re-try every 0.5s */ } + void console_setSQL(struct Sql *SQL_handle) { console->input->SQL = SQL_handle; diff --git a/src/common/core.c b/src/common/core.c index 63123dfea..74c63a6d6 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -100,7 +100,8 @@ struct core_interface *core = &core_s; #ifndef POSIX #define compat_signal(signo, func) signal((signo), (func)) #else -sigfunc *compat_signal(int signo, sigfunc *func) { +sigfunc *compat_signal(int signo, sigfunc *func) +{ struct sigaction sact, oact; sact.sa_handler = func; @@ -121,7 +122,8 @@ sigfunc *compat_signal(int signo, sigfunc *func) { * CORE : Console events for Windows *--------------------------------------*/ #ifdef _WIN32 -static BOOL WINAPI console_handler(DWORD c_event) { +static BOOL WINAPI console_handler(DWORD c_event) +{ switch(c_event) { case CTRL_CLOSE_EVENT: case CTRL_LOGOFF_EVENT: @@ -137,7 +139,8 @@ static BOOL WINAPI console_handler(DWORD c_event) { return TRUE; } -static void cevents_init(void) { +static void cevents_init(void) +{ if (SetConsoleCtrlHandler(console_handler,TRUE)==FALSE) ShowWarning ("Unable to install the console handler!\n"); } @@ -146,7 +149,8 @@ static void cevents_init(void) { /*====================================== * CORE : Signal Sub Function *--------------------------------------*/ -static void sig_proc(int sn) { +static void sig_proc(int sn) +{ static int is_called = 0; switch (sn) { @@ -179,7 +183,8 @@ static void sig_proc(int sn) { } } -void signals_init (void) { +void signals_init (void) +{ compat_signal(SIGTERM, sig_proc); compat_signal(SIGINT, sig_proc); #ifndef _DEBUG // need unhandled exceptions to debug on Windows @@ -245,7 +250,8 @@ bool usercheck(void) return true; } -void core_defaults(void) { +void core_defaults(void) +{ nullpo_defaults(); #ifndef MINICORE hpm_defaults(); @@ -271,16 +277,20 @@ void core_defaults(void) { thread_defaults(); #endif } + /** * Returns the source (core or plugin name) for the given command-line argument */ -const char *cmdline_arg_source(struct CmdlineArgData *arg) { +const char *cmdline_arg_source(struct CmdlineArgData *arg) +{ #ifdef MINICORE return "core"; #else // !MINICORE + nullpo_retr(NULL, arg); return HPM->pid2name(arg->pluginID); #endif // MINICORE } + /** * Defines a command line argument. * @@ -292,9 +302,11 @@ const char *cmdline_arg_source(struct CmdlineArgData *arg) { * @param options options associated to the command-line argument. @see enum cmdline_options. * @return the success status. */ -bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) { +bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, CmdlineExecFunc func, const char *help, unsigned int options) +{ struct CmdlineArgData *data = NULL; + nullpo_retr(false, name); VECTOR_ENSURE(cmdline->args_data, 1, 1); VECTOR_PUSHZEROED(cmdline->args_data); data = &VECTOR_LAST(cmdline->args_data); @@ -310,6 +322,7 @@ bool cmdline_arg_add(unsigned int pluginID, const char *name, char shortname, Cm return true; } + /** * Help screen to be displayed by '--help'. */ @@ -333,6 +346,7 @@ static CMDLINEARG(help) } return false; } + /** * Info screen to be displayed by '--version'. */ @@ -343,6 +357,7 @@ static CMDLINEARG(version) ShowInfo("Open "CL_WHITE"readme.txt"CL_RESET" for more information.\n"); return false; } + /** * Checks if there is a value available for the current argument * @@ -360,6 +375,7 @@ bool cmdline_arg_next_value(const char *name, int current_arg, int argc) return true; } + /** * Executes the command line arguments handlers. * @@ -381,6 +397,8 @@ bool cmdline_arg_next_value(const char *name, int current_arg, int argc) int cmdline_exec(int argc, char **argv, unsigned int options) { int count = 0, i; + + nullpo_ret(argv); for (i = 1; i < argc; i++) { int j; struct CmdlineArgData *data = NULL; @@ -423,6 +441,7 @@ int cmdline_exec(int argc, char **argv, unsigned int options) } return count; } + /** * Defines the global command-line arguments. */ @@ -466,10 +485,12 @@ void cmdline_defaults(void) cmdline->arg_next_value = cmdline_arg_next_value; cmdline->arg_source = cmdline_arg_source; } + /*====================================== * CORE : MAINROUTINE *--------------------------------------*/ -int main (int argc, char **argv) { +int main (int argc, char **argv) +{ int retval = EXIT_SUCCESS; {// initialize program arguments char *p1 = SERVER_NAME = argv[0]; diff --git a/src/common/db.c b/src/common/db.c index 0c7bc2ae0..5f69e2f70 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -93,6 +93,7 @@ #include "common/ers.h" #include "common/memmgr.h" #include "common/mmo.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/strlib.h" @@ -2795,7 +2796,8 @@ void *db_data2ptr(struct DBData *data) * @public * @see #db_final(void) */ -void db_init(void) { +void db_init(void) +{ db_iterator_ers = ers_new(sizeof(struct DBIterator_impl),"db.c::db_iterator_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK); db_alloc_ers = ers_new(sizeof(struct DBMap_impl),"db.c::db_alloc_ers",ERS_OPT_CLEAN|ERS_OPT_FLEX_CHUNK); ers_chunk_size(db_alloc_ers, 50); @@ -2907,7 +2909,7 @@ void db_final(void) } // Link DB System - jAthena -void linkdb_insert( struct linkdb_node** head, void *key, void* data) +void linkdb_insert(struct linkdb_node **head, void *key, void *data) { struct linkdb_node *node; if( head == NULL ) return ; @@ -2928,7 +2930,8 @@ void linkdb_insert( struct linkdb_node** head, void *key, void* data) node->data = data; } -void linkdb_vforeach( struct linkdb_node** head, LinkDBFunc func, va_list ap) { +void linkdb_vforeach(struct linkdb_node **head, LinkDBFunc func, va_list ap) +{ struct linkdb_node *node; if( head == NULL ) return; node = *head; @@ -2941,14 +2944,15 @@ void linkdb_vforeach( struct linkdb_node** head, LinkDBFunc func, va_list ap) { } } -void linkdb_foreach( struct linkdb_node** head, LinkDBFunc func, ...) { +void linkdb_foreach(struct linkdb_node **head, LinkDBFunc func, ...) +{ va_list ap; va_start(ap, func); linkdb_vforeach(head, func, ap); va_end(ap); } -void* linkdb_search( struct linkdb_node** head, void *key) +void* linkdb_search(struct linkdb_node **head, void *key) { int n = 0; struct linkdb_node *node; @@ -2973,7 +2977,7 @@ void* linkdb_search( struct linkdb_node** head, void *key) return NULL; } -void* linkdb_erase( struct linkdb_node** head, void *key) +void* linkdb_erase(struct linkdb_node **head, void *key) { struct linkdb_node *node; if( head == NULL ) return NULL; @@ -2995,7 +2999,7 @@ void* linkdb_erase( struct linkdb_node** head, void *key) return NULL; } -void linkdb_replace( struct linkdb_node** head, void *key, void *data ) +void linkdb_replace(struct linkdb_node **head, void *key, void *data) { int n = 0; struct linkdb_node *node; @@ -3022,7 +3026,7 @@ void linkdb_replace( struct linkdb_node** head, void *key, void *data ) linkdb_insert( head, key, data ); } -void linkdb_final( struct linkdb_node** head ) +void linkdb_final(struct linkdb_node **head) { struct linkdb_node *node, *node2; if( head == NULL ) return ; @@ -3034,7 +3038,9 @@ void linkdb_final( struct linkdb_node** head ) } *head = NULL; } -void db_defaults(void) { + +void db_defaults(void) +{ DB = &DB_s; DB->alloc = db_alloc; DB->custom_release = db_custom_release; @@ -3055,5 +3061,4 @@ void db_defaults(void) { DB->ui2key = db_ui2key; DB->i642key = db_i642key; DB->ui642key = db_ui642key; - } diff --git a/src/common/des.c b/src/common/des.c index c680610e9..73297ab70 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -23,6 +23,7 @@ #include "des.h" #include "common/cbasetypes.h" +#include "common/nullpo.h" /** @file * Implementation of the des interface. @@ -54,6 +55,7 @@ static void des_IP(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for(i = 0; i < ARRAYLENGTH(ip_table); ++i) { uint8_t j = ip_table[i] - 1; if (src->b[(j >> 3) & 7] & mask[j & 7]) @@ -81,6 +83,7 @@ static void des_FP(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for (i = 0; i < ARRAYLENGTH(fp_table); ++i) { uint8_t j = fp_table[i] - 1; if (src->b[(j >> 3) & 7] & mask[j & 7]) @@ -119,6 +122,7 @@ static void des_E(struct des_bit64 *src) tmp.b[i / 6 + 0] |= mask[i % 6]; } #endif + nullpo_retv(src); // optimized tmp.b[0] = ((src->b[7]<<5) | (src->b[4]>>3)) & 0x3f; // ..0 vutsr tmp.b[1] = ((src->b[4]<<1) | (src->b[5]>>7)) & 0x3f; // ..srqpo n @@ -150,6 +154,7 @@ static void des_TP(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for (i = 0; i < ARRAYLENGTH(tp_table); ++i) { uint8_t j = tp_table[i] - 1; if (src->b[(j >> 3) + 0] & mask[j & 7]) @@ -194,6 +199,7 @@ static void des_SBOX(struct des_bit64 *src) struct des_bit64 tmp = {{0}}; int i; + nullpo_retv(src); for (i = 0; i < ARRAYLENGTH(s_table); ++i) { tmp.b[i] = (s_table[i][src->b[i*2+0]] & 0xf0) | (s_table[i][src->b[i*2+1]] & 0x0f); @@ -214,6 +220,7 @@ static void des_RoundFunction(struct des_bit64 *src) des_SBOX(&tmp); des_TP(&tmp); + nullpo_retv(src); src->b[0] ^= tmp.b[4]; src->b[1] ^= tmp.b[5]; src->b[2] ^= tmp.b[6]; diff --git a/src/common/ers.c b/src/common/ers.c index 8970fefc2..3e1cdc25b 100644 --- a/src/common/ers.c +++ b/src/common/ers.c @@ -149,7 +149,8 @@ static struct ers_instance_t *InstanceList = NULL; /** * @param Options the options from the instance seeking a cache, we use it to give it a cache with matching configuration **/ -static ers_cache_t *ers_find_cache(unsigned int size, enum ERSOptions Options) { +static ers_cache_t *ers_find_cache(unsigned int size, enum ERSOptions Options) +{ ers_cache_t *cache; for (cache = CacheList; cache; cache = cache->Next) @@ -187,6 +188,7 @@ static void ers_free_cache(ers_cache_t *cache, bool remove) { unsigned int i; + nullpo_retv(cache); for (i = 0; i < cache->Used; i++) aFree(cache->Blocks[i]); @@ -307,7 +309,8 @@ static void ers_obj_destroy(ERS *self) aFree(instance); } -void ers_cache_size(ERS *self, unsigned int new_size) { +void ers_cache_size(ERS *self, unsigned int new_size) +{ struct ers_instance_t *instance = (struct ers_instance_t *)self; nullpo_retv(instance); @@ -319,10 +322,11 @@ void ers_cache_size(ERS *self, unsigned int new_size) { instance->Cache->ChunkSize = new_size; } - ERS *ers_new(uint32 size, char *name, enum ERSOptions options) { struct ers_instance_t *instance; + + nullpo_retr(NULL, name); CREATE(instance,struct ers_instance_t, 1); size += sizeof(struct ers_list); @@ -359,7 +363,8 @@ ERS *ers_new(uint32 size, char *name, enum ERSOptions options) return &instance->VTable; } -void ers_report(void) { +void ers_report(void) +{ ers_cache_t *cache; unsigned int cache_c = 0, blocks_u = 0, blocks_a = 0, memory_b = 0, memory_t = 0; #ifdef DEBUG @@ -403,7 +408,8 @@ void ers_report(void) { /** * Call on shutdown to clear remaining entries **/ -void ers_final(void) { +void ers_final(void) +{ struct ers_instance_t *instance = InstanceList, *next; while( instance ) { diff --git a/src/common/grfio.c b/src/common/grfio.c index 0a9708f17..fba3dda86 100644 --- a/src/common/grfio.c +++ b/src/common/grfio.c @@ -86,11 +86,13 @@ struct grfio_interface *grfio; // little endian char array to uint conversion static unsigned int getlong(unsigned char *p) { + nullpo_ret(p); return (p[0] << 0 | p[1] << 8 | p[2] << 16 | p[3] << 24); } static void NibbleSwap(unsigned char *src, int len) { + nullpo_retv(src); while (len > 0) { *src = (*src >> 4) | (*src << 4); ++src; @@ -135,6 +137,7 @@ static void grf_shuffle_enc(struct des_bit64 *src) { struct des_bit64 out; + nullpo_retv(src); out.b[0] = src->b[3]; out.b[1] = src->b[4]; out.b[2] = src->b[5]; @@ -152,6 +155,7 @@ static void grf_shuffle_dec(struct des_bit64 *src) { struct des_bit64 out; + nullpo_retv(src); out.b[0] = src->b[3]; out.b[1] = src->b[4]; out.b[2] = src->b[6]; @@ -175,6 +179,7 @@ static void grf_decode_header(unsigned char *buf, size_t len) struct des_bit64 *p = (struct des_bit64 *)buf; size_t nblocks = len / sizeof(struct des_bit64); size_t i; + nullpo_retv(buf); // first 20 blocks are all des-encrypted for (i = 0; i < 20 && i < nblocks; ++i) @@ -197,6 +202,7 @@ static void grf_decode_full(unsigned char *buf, size_t len, int cycle) int dcycle, scycle; size_t i, j; + nullpo_retv(buf); // first 20 blocks are all des-encrypted for (i = 0; i < 20 && i < nblocks; ++i) des->decrypt_block(&p[i]); @@ -314,6 +320,7 @@ static void hashinit(void) static int grf_filehash(const char *fname) { uint32 hash = 0; + nullpo_ret(fname); while (*fname != '\0') { hash = (hash<<1) + (hash>>7)*9 + TOLOWER(*fname); fname++; @@ -396,7 +403,9 @@ static struct grf_filelist *grfio_filelist_add(struct grf_filelist *entry) */ static struct grf_filelist *grfio_filelist_modify(struct grf_filelist *entry) { - struct grf_filelist *fentry = grfio_filelist_find(entry->fn); + struct grf_filelist *fentry; + nullpo_retr(NULL, entry); + fentry = grfio_filelist_find(entry->fn); if (fentry != NULL) { int tmp = fentry->next; memcpy(fentry, entry, sizeof(struct grf_filelist)); @@ -434,6 +443,7 @@ static void grfio_localpath_create(char *buffer, size_t size, const char *filena int i; size_t len; + nullpo_retv(buffer); len = strlen(data_dir); if (data_dir[0] == '\0' || data_dir[len-1] == '/' || data_dir[len-1] == '\\') @@ -553,6 +563,7 @@ void *grfio_reads(const char *fname, int *size) static char *grfio_decode_filename(unsigned char *buf, int len) { int i; + nullpo_retr(NULL, buf); for (i = 0; i < len; i += 8) { NibbleSwap(&buf[i],8); des->decrypt(&buf[i],8); @@ -568,7 +579,9 @@ static char *grfio_decode_filename(unsigned char *buf, int len) */ static bool grfio_is_full_encrypt(const char *fname) { - const char *ext = strrchr(fname, '.'); + const char *ext; + nullpo_retr(false, fname); + ext = strrchr(fname, '.'); if (ext != NULL) { static const char *extensions[] = { ".gnd", ".gat", ".act", ".str" }; int i; @@ -594,8 +607,10 @@ static int grfio_entryread(const char *grfname, int gentry) unsigned char grf_header[0x2e] = { 0 }; int entry,entrys,ofs,grf_version; unsigned char *grf_filelist; + FILE *fp; - FILE *fp = fopen(grfname, "rb"); + nullpo_retr(1, grfname); + fp = fopen(grfname, "rb"); if (fp == NULL) { ShowWarning("GRF data file not found: '%s'\n", grfname); return 1; // 1:not found error @@ -764,6 +779,7 @@ static bool grfio_parse_restable_row(const char *row) char local[256]; struct grf_filelist *entry = NULL; + nullpo_retr(false, row); if (sscanf(row, "%255[^#\r\n]#%255[^#\r\n]#", w1, w2) != 2) return false; @@ -854,6 +870,7 @@ static void grfio_resourcecheck(void) */ static int grfio_add(const char *fname) { + nullpo_retr(1, fname); if (gentry_entrys >= gentry_maxentry) { #define GENTRY_ADDS 4 // The number increment of gentry_table entries gentry_maxentry += GENTRY_ADDS; @@ -899,6 +916,7 @@ void grfio_init(const char *fname) FILE *data_conf; int grf_num = 0; + nullpo_retv(fname); hashinit(); // hash table initialization data_conf = fopen(fname, "r"); diff --git a/src/common/mapindex.c b/src/common/mapindex.c index 5b0f6169b..c09e6260d 100644 --- a/src/common/mapindex.c +++ b/src/common/mapindex.c @@ -25,6 +25,7 @@ #include "common/cbasetypes.h" #include "common/db.h" #include "common/mmo.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/strlib.h" @@ -37,11 +38,14 @@ struct mapindex_interface *mapindex; /// Retrieves the map name from 'string' (removing .gat extension if present). /// Result gets placed either into 'buf' or in a static local buffer. -const char* mapindex_getmapname(const char* string, char* output) { +const char* mapindex_getmapname(const char* string, char* output) +{ static char buf[MAP_NAME_LENGTH]; char* dest = (output != NULL) ? output : buf; - size_t len = strnlen(string, MAP_NAME_LENGTH_EXT); + size_t len; + nullpo_retr(buf, string); + len = strnlen(string, MAP_NAME_LENGTH_EXT); if (len == MAP_NAME_LENGTH_EXT) { ShowWarning("(mapindex_normalize_name) Map name '%*s' is too long!\n", 2*MAP_NAME_LENGTH_EXT, string); len--; @@ -58,12 +62,15 @@ const char* mapindex_getmapname(const char* string, char* output) { /// Retrieves the map name from 'string' (adding .gat extension if not already present). /// Result gets placed either into 'buf' or in a static local buffer. -const char* mapindex_getmapname_ext(const char* string, char* output) { +const char* mapindex_getmapname_ext(const char* string, char* output) +{ static char buf[MAP_NAME_LENGTH_EXT]; char* dest = (output != NULL) ? output : buf; size_t len; + nullpo_retr(buf, string); + safestrncpy(buf,string, sizeof(buf)); sscanf(string, "%*[^#]%*[#]%15s", buf); @@ -87,7 +94,8 @@ const char* mapindex_getmapname_ext(const char* string, char* output) { /// Adds a map to the specified index /// Returns 1 if successful, 0 otherwise -int mapindex_addmap(int index, const char* name) { +int mapindex_addmap(int index, const char* name) +{ char map_name[MAP_NAME_LENGTH]; if (index == -1){ @@ -128,7 +136,8 @@ int mapindex_addmap(int index, const char* name) { return index; } -unsigned short mapindex_name2id(const char* name) { +unsigned short mapindex_name2id(const char* name) +{ int i; char map_name[MAP_NAME_LENGTH]; @@ -141,7 +150,8 @@ unsigned short mapindex_name2id(const char* name) { return 0; } -const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const char *func) { +const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const char *func) +{ if (id >= MAX_MAPINDEX || !mapindex_exists(id)) { ShowDebug("mapindex_id2name: Requested name for non-existant map index [%d] in cache. %s:%s:%d\n", id,file,func,line); return mapindex->list[0].name; // dummy empty string so that the callee doesn't crash @@ -149,7 +159,8 @@ const char *mapindex_id2name_sub(uint16 id, const char *file, int line, const ch return mapindex->list[id].name; } -int mapindex_init(void) { +int mapindex_init(void) +{ FILE *fp; char line[1024]; int last_index = -1; @@ -196,16 +207,20 @@ bool mapindex_check_default(void) return true; } -void mapindex_removemap(int index){ +void mapindex_removemap(int index) +{ + Assert_retv(index < MAX_MAPINDEX); strdb_remove(mapindex->db, mapindex->list[index].name); mapindex->list[index].name[0] = '\0'; } -void mapindex_final(void) { +void mapindex_final(void) +{ db_destroy(mapindex->db); } -void mapindex_defaults(void) { +void mapindex_defaults(void) +{ mapindex = &mapindex_s; /* TODO: place it in inter-server.conf? */ diff --git a/src/common/mutex.c b/src/common/mutex.c index bdc2fb4dc..464a54161 100644 --- a/src/common/mutex.c +++ b/src/common/mutex.c @@ -24,6 +24,7 @@ #include "common/cbasetypes.h" // for WIN32 #include "common/memmgr.h" +#include "common/nullpo.h" #include "common/showmsg.h" #include "common/timer.h" @@ -84,6 +85,7 @@ struct mutex_data *mutex_create(void) /// @copydoc mutex_interface::destroy() void mutex_destroy(struct mutex_data *m) { + nullpo_retv(m); #ifdef WIN32 DeleteCriticalSection(&m->hMutex); #else @@ -96,6 +98,7 @@ void mutex_destroy(struct mutex_data *m) /// @copydoc mutex_interface::lock() void mutex_lock(struct mutex_data *m) { + nullpo_retv(m); #ifdef WIN32 EnterCriticalSection(&m->hMutex); #else @@ -106,6 +109,7 @@ void mutex_lock(struct mutex_data *m) /// @copydoc mutex_interface::trylock() bool mutex_trylock(struct mutex_data *m) { + nullpo_retr(false, m); #ifdef WIN32 if (TryEnterCriticalSection(&m->hMutex) != FALSE) return true; @@ -119,6 +123,7 @@ bool mutex_trylock(struct mutex_data *m) /// @copydoc mutex_interface::unlock() void mutex_unlock(struct mutex_data *m) { + nullpo_retv(m); #ifdef WIN32 LeaveCriticalSection(&m->hMutex); #else @@ -152,6 +157,7 @@ struct cond_data *cond_create(void) /// @copydoc mutex_interface::cond_destroy() void cond_destroy(struct cond_data *c) { + nullpo_retv(c); #ifdef WIN32 CloseHandle(c->events[EVENT_COND_SIGNAL]); CloseHandle(c->events[EVENT_COND_BROADCAST]); @@ -171,6 +177,7 @@ void cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) int result; bool is_last = false; + nullpo_retv(c); EnterCriticalSection(&c->waiters_lock); c->nWaiters++; LeaveCriticalSection(&c->waiters_lock); @@ -201,6 +208,7 @@ void cond_wait(struct cond_data *c, struct mutex_data *m, sysint timeout_ticks) mutex->lock(m); #else + nullpo_retv(m); if (timeout_ticks < 0) { pthread_cond_wait(&c->hCond, &m->hMutex); } else { @@ -221,6 +229,7 @@ void cond_signal(struct cond_data *c) #ifdef WIN32 # if 0 bool has_waiters = false; + nullpo_retv(c); EnterCriticalSection(&c->waiters_lock); if(c->nWaiters > 0) has_waiters = true; @@ -230,6 +239,7 @@ void cond_signal(struct cond_data *c) # endif // 0 SetEvent(c->events[EVENT_COND_SIGNAL]); #else + nullpo_retv(c); pthread_cond_signal(&c->hCond); #endif } @@ -240,6 +250,7 @@ void cond_broadcast(struct cond_data *c) #ifdef WIN32 # if 0 bool has_waiters = false; + nullpo_retv(c); EnterCriticalSection(&c->waiters_lock); if(c->nWaiters > 0) has_waiters = true; @@ -249,6 +260,7 @@ void cond_broadcast(struct cond_data *c) # endif // 0 SetEvent(c->events[EVENT_COND_BROADCAST]); #else + nullpo_retv(c); pthread_cond_broadcast(&c->hCond); #endif } diff --git a/src/common/socket.c b/src/common/socket.c index ea7bfab40..5f284587a 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -520,7 +520,8 @@ void flush_fifos(void) /*====================================== * CORE : Connection functions *--------------------------------------*/ -int connect_client(int listen_fd) { +int connect_client(int listen_fd) +{ int fd; struct sockaddr_in client_address; socklen_t len; @@ -647,7 +648,8 @@ int make_listen_bind(uint32 ip, uint16 port) return fd; } -int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) { +int make_connection(uint32 ip, uint16 port, struct hSockOpt *opt) +{ struct sockaddr_in remote_address = { 0 }; int fd; int result; @@ -817,9 +819,12 @@ int rfifoskip(int fd, size_t len) int wfifoset(int fd, size_t len) { size_t newreserve; - struct socket_data* s = sockt->session[fd]; + struct socket_data* s; - if (!sockt->session_is_valid(fd) || s->wdata == NULL) + if (!sockt->session_is_valid(fd)) + return 0; + s = sockt->session[fd]; + if (s == NULL || s->wdata == NULL) return 0; // we have written len bytes to the buffer already before calling WFIFOSET @@ -1199,7 +1204,8 @@ static int connect_check_(uint32 ip) /// Timer function. /// Deletes old connection history records. -static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) { +static int connect_check_clear(int tid, int64 tick, int id, intptr_t data) +{ int clear = 0; int list = 0; struct connect_history *hist = NULL; @@ -1235,6 +1241,9 @@ int access_ipmask(const char *str, struct access_control *acc) uint32 ip; uint32 mask; + nullpo_ret(str); + nullpo_ret(acc); + if( strcmp(str,"all") == 0 ) { ip = 0; mask = 0; @@ -1736,9 +1745,11 @@ bool session_is_active(int fd) } // Resolves hostname into a numeric ip. -uint32 host2ip(const char* hostname) +uint32 host2ip(const char *hostname) { - struct hostent* h = gethostbyname(hostname); + struct hostent* h; + nullpo_ret(hostname); + h = gethostbyname(hostname); return (h != NULL) ? ntohl(*(uint32*)h->h_addr) : 0; } @@ -1771,7 +1782,8 @@ uint16 ntows(uint16 netshort) } /* [Ind/Hercules] - socket_datasync */ -void socket_datasync(int fd, bool send) { +void socket_datasync(int fd, bool send) +{ struct { unsigned int length;/* short is not enough for some */ } data_list[] = { @@ -2055,7 +2067,8 @@ void socket_net_config_read(const char *filename) return; } -void socket_defaults(void) { +void socket_defaults(void) +{ sockt = &sockt_s; sockt->fd_max = 0; diff --git a/src/common/sql.c b/src/common/sql.c index 7e3e2e46f..c80edbce4 100644 --- a/src/common/sql.c +++ b/src/common/sql.c @@ -144,6 +144,7 @@ int Sql_GetColumnNames(struct Sql *self, const char *table, char *out_buf, size_ size_t len; size_t off = 0; + nullpo_retr(SQL_ERROR, out_buf); if( self == NULL || SQL_ERROR == SQL->Query(self, "EXPLAIN `%s`", table) ) return SQL_ERROR; @@ -377,7 +378,8 @@ void Sql_ShowDebug_(struct Sql *self, const char *debug_file, const unsigned lon } /// Frees a Sql handle returned by Sql_Malloc. -void Sql_Free(struct Sql *self) { +void Sql_Free(struct Sql *self) +{ if( self ) { SQL->FreeResult(self); @@ -414,6 +416,7 @@ static enum enum_field_types Sql_P_SizeToMysqlIntType(int sz) /// @private static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type, void* buffer, size_t buffer_len, unsigned long* out_length, int8* out_is_null) { + nullpo_retr(SQL_ERROR, bind); memset(bind, 0, sizeof(MYSQL_BIND)); switch( buffer_type ) { @@ -494,7 +497,8 @@ static int Sql_P_BindSqlDataType(MYSQL_BIND* bind, enum SqlDataType buffer_type, /// Prints debug information about a field (type and length). /// /// @private -static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_types type, int is_unsigned, unsigned long length, const char* length_postfix) { +static void Sql_P_ShowDebugMysqlFieldInfo(const char* prefix, enum enum_field_types type, int is_unsigned, unsigned long length, const char* length_postfix) +{ const char *sign = (is_unsigned ? "UNSIGNED " : ""); const char *type_string = NULL; switch (type) { @@ -535,6 +539,7 @@ static void SqlStmt_P_ShowDebugTruncatedColumn(struct SqlStmt *self, size_t i) MYSQL_FIELD* field; MYSQL_BIND* column; + nullpo_retv(self); meta = mysql_stmt_result_metadata(self->stmt); field = mysql_fetch_field_direct(meta, (unsigned int)i); ShowSQL("DB error - data of field '%s' was truncated.\n", field->name); @@ -664,8 +669,8 @@ int SqlStmt_BindParam(struct SqlStmt *self, size_t idx, enum SqlDataType buffer_ if (idx >= self->max_params) return SQL_SUCCESS; // out of range - ignore -PRAGMA_GCC45(GCC diagnostic push) -PRAGMA_GCC45(GCC diagnostic ignored "-Wcast-qual") +PRAGMA_GCC46(GCC diagnostic push) +PRAGMA_GCC46(GCC diagnostic ignored "-Wcast-qual") /* * MySQL uses the same struct with a non-const buffer for both * parameters (input) and columns (output). @@ -673,7 +678,7 @@ PRAGMA_GCC45(GCC diagnostic ignored "-Wcast-qual") * dropping a const qualifier here. */ return Sql_P_BindSqlDataType(self->params+idx, buffer_type, (void *)buffer, buffer_len, NULL, NULL); -PRAGMA_GCC45(GCC diagnostic pop) +PRAGMA_GCC46(GCC diagnostic pop) } /// Executes the prepared statement. @@ -874,8 +879,10 @@ void SqlStmt_Free(struct SqlStmt *self) aFree(self); } } + /* receives mysql error codes during runtime (not on first-time-connects) */ -void hercules_mysql_error_handler(unsigned int ecode) { +void hercules_mysql_error_handler(unsigned int ecode) +{ switch( ecode ) { case 2003:/* Can't connect to MySQL (this error only happens here when failing to reconnect) */ if( mysql_reconnect_type == 1 ) { @@ -1041,10 +1048,13 @@ void Sql_HerculesUpdateSkip(struct Sql *self, const char *filename) return; } -void Sql_Init(void) { +void Sql_Init(void) +{ Sql_inter_server_read("conf/common/inter-server.conf", false); // FIXME: Hardcoded path } -void sql_defaults(void) { + +void sql_defaults(void) +{ SQL = &sql_s; SQL->Connect = Sql_Connect; diff --git a/src/common/strlib.c b/src/common/strlib.c index b67adb63c..75ce2a272 100644 --- a/src/common/strlib.c +++ b/src/common/strlib.c @@ -629,6 +629,7 @@ int sv_parse(const char* str, int len, int startoff, char delim, int* out_pos, i svstate.delim = delim; svstate.done = false; svstate.start = 0; + svstate.end = 0; // parse count = 0; diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c index aeb8d8e71..3c7e25a0c 100644 --- a/src/common/sysinfo.c +++ b/src/common/sysinfo.c @@ -31,6 +31,7 @@ #include "common/cbasetypes.h" #include "common/core.h" #include "common/memmgr.h" +#include "common/nullpo.h" #include "common/strlib.h" #include <stdio.h> // fopen @@ -237,11 +238,13 @@ enum windows_ver_suite { * @retval true if a revision was correctly detected. * @retval false if no revision was detected. out is set to NULL in this case. */ -bool sysinfo_svn_get_revision(char **out) { +bool sysinfo_svn_get_revision(char **out) +{ // Only include SVN support if detected it, or we're on MSVC #if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_SVN || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN FILE *fp; + nullpo_ret(out); // subversion 1.7 uses a sqlite3 database // FIXME this is hackish at best... // - ignores database file structure @@ -291,6 +294,8 @@ bool sysinfo_svn_get_revision(char **out) { if (*out != NULL) return true; } +#else + nullpo_ret(out); #endif if (*out != NULL) aFree(*out); @@ -305,11 +310,13 @@ bool sysinfo_svn_get_revision(char **out) { * @retval true if a revision was correctly detected. * @retval false if no revision was detected. out is set to NULL in this case. */ -bool sysinfo_git_get_revision(char **out) { +bool sysinfo_git_get_revision(char **out) +{ // Only include Git support if we detected it, or we're on MSVC #if !defined(SYSINFO_VCSTYPE) || SYSINFO_VCSTYPE == VCSTYPE_GIT || SYSINFO_VCSTYPE == VCSTYPE_UNKNOWN char ref[128], filepath[128], line[128]; + nullpo_ret(out); strcpy(ref, "HEAD"); while (*ref) { @@ -334,6 +341,7 @@ bool sysinfo_git_get_revision(char **out) { if (*out != NULL) return true; #else + nullpo_ret(out); if (*out != NULL) aFree(*out); *out = NULL; @@ -351,7 +359,8 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD); * * Once retrieved, the version string is stored into sysinfo->p->osversion. */ -void sysinfo_osversion_retrieve(void) { +void sysinfo_osversion_retrieve(void) +{ OSVERSIONINFOEX osvi; StringBuf buf; ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX)); @@ -602,7 +611,8 @@ typedef void (WINAPI *PGNSI)(LPSYSTEM_INFO); * System info is not stored anywhere after retrieval * @see http://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx **/ -void sysinfo_systeminfo_retrieve( LPSYSTEM_INFO info ) { +void sysinfo_systeminfo_retrieve(LPSYSTEM_INFO info) +{ PGNSI pGNSI; // Call GetNativeSystemInfo if supported or GetSystemInfo otherwise. @@ -619,7 +629,8 @@ void sysinfo_systeminfo_retrieve( LPSYSTEM_INFO info ) { * Returns number of bytes in a memory page * Only needed when compiling with MSVC **/ -long sysinfo_getpagesize( void ) { +long sysinfo_getpagesize(void) +{ SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); @@ -633,7 +644,8 @@ long sysinfo_getpagesize( void ) { * Once retrieved, the name is stored into sysinfo->p->cpu and the * number of cores in sysinfo->p->cpucores. */ -void sysinfo_cpu_retrieve(void) { +void sysinfo_cpu_retrieve(void) +{ StringBuf buf; SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); @@ -669,7 +681,8 @@ void sysinfo_cpu_retrieve(void) { * * Once retrieved, the name is stored into sysinfo->p->arch. */ -void sysinfo_arch_retrieve(void) { +void sysinfo_arch_retrieve(void) +{ SYSTEM_INFO si; ZeroMemory(&si, sizeof(SYSTEM_INFO)); @@ -697,7 +710,8 @@ void sysinfo_arch_retrieve(void) { * * Once retrieved, the value is stored in sysinfo->p->vcsrevision_src. */ -void sysinfo_vcsrevision_src_retrieve(void) { +void sysinfo_vcsrevision_src_retrieve(void) +{ if (sysinfo->p->vcsrevision_src != NULL) { aFree(sysinfo->p->vcsrevision_src); sysinfo->p->vcsrevision_src = NULL; @@ -721,7 +735,8 @@ void sysinfo_vcsrevision_src_retrieve(void) { * * Once retrieved, the value is stored in sysinfo->p->vcstype_name. */ -void sysinfo_vcstype_name_retrieve(void) { +void sysinfo_vcstype_name_retrieve(void) +{ if (sysinfo->p->vcstype_name != NULL) { aFree(sysinfo->p->vcstype_name); sysinfo->p->vcstype_name = NULL; @@ -750,7 +765,8 @@ void sysinfo_vcstype_name_retrieve(void) { * * Output example: "Linux", "Darwin", "Windows", etc. */ -const char *sysinfo_platform(void) { +const char *sysinfo_platform(void) +{ return sysinfo->p->platform; } @@ -768,7 +784,8 @@ const char *sysinfo_platform(void) { * Output example: "Windows 2008 Small Business Server", "OS X 10.8 Mountain Lion", * "Gentoo Base System Release 2.2", "Debian GNU/Linux 6.0.6 (squeeze)", etc. */ -const char *sysinfo_osversion(void) { +const char *sysinfo_osversion(void) +{ return sysinfo->p->osversion; } @@ -787,7 +804,8 @@ const char *sysinfo_osversion(void) { * "Intel(R) Xeon(R) CPU E5-1650 0 @ 3.20GHz", "Intel Core i7", * "x86 CPU, Family 6, Model 54, Stepping 1", etc. */ -const char *sysinfo_cpu(void) { +const char *sysinfo_cpu(void) +{ return sysinfo->p->cpu; } @@ -800,7 +818,8 @@ const char *sysinfo_cpu(void) { * * @return the number of CPU cores. */ -int sysinfo_cpucores(void) { +int sysinfo_cpucores(void) +{ return sysinfo->p->cpucores; } @@ -817,7 +836,8 @@ int sysinfo_cpucores(void) { * * Output example: "x86", "x86_64", "IA-64", "ARM", etc. */ -const char *sysinfo_arch(void) { +const char *sysinfo_arch(void) +{ return sysinfo->p->arch; } @@ -827,7 +847,8 @@ const char *sysinfo_arch(void) { * @retval true if this is a 64 bit build. * @retval false if this isn't a 64 bit build (i.e. it is a 32 bit build). */ -bool sysinfo_is64bit(void) { +bool sysinfo_is64bit(void) +{ #ifdef _LP64 return true; #else @@ -845,7 +866,8 @@ bool sysinfo_is64bit(void) { * Output example: "Microsoft Visual C++ 2012 (v170050727)", * "Clang v5.0.0", "MinGW32 v3.20", "GCC v4.7.3", etc. */ -const char *sysinfo_compiler(void) { +const char *sysinfo_compiler(void) +{ return sysinfo->p->compiler; } @@ -860,7 +882,8 @@ const char *sysinfo_compiler(void) { * * Output example: "-ggdb -O2 -flto -pipe -ffast-math ..." */ -const char *sysinfo_cflags(void) { +const char *sysinfo_cflags(void) +{ return sysinfo->p->cflags; } @@ -875,7 +898,8 @@ const char *sysinfo_cflags(void) { * * @see VCSTYPE_NONE, VCSTYPE_GIT, VCSTYPE_SVN, VCSTYPE_UNKNOWN */ -int sysinfo_vcstypeid(void) { +int sysinfo_vcstypeid(void) +{ return sysinfo->p->vcstype; } @@ -892,7 +916,8 @@ int sysinfo_vcstypeid(void) { * * Output example: "Git", "SVN", "Exported" */ -const char *sysinfo_vcstype(void) { +const char *sysinfo_vcstype(void) +{ return sysinfo->p->vcstype_name; } @@ -910,7 +935,8 @@ const char *sysinfo_vcstype(void) { * * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546" */ -const char *sysinfo_vcsrevision_src(void) { +const char *sysinfo_vcsrevision_src(void) +{ return sysinfo->p->vcsrevision_src; } @@ -926,7 +952,8 @@ const char *sysinfo_vcsrevision_src(void) { * * Output example: Git: "9128feccf3bddda94a7f8a170305565416815b40", SVN: "17546" */ -const char *sysinfo_vcsrevision_scripts(void) { +const char *sysinfo_vcsrevision_scripts(void) +{ return sysinfo->p->vcsrevision_scripts; } @@ -934,7 +961,8 @@ const char *sysinfo_vcsrevision_scripts(void) { * Reloads the run-time (scripts) VCS revision information. To be used during * script reloads to refresh the cached version. */ -void sysinfo_vcsrevision_reload(void) { +void sysinfo_vcsrevision_reload(void) +{ if (sysinfo->p->vcsrevision_scripts != NULL) { aFree(sysinfo->p->vcsrevision_scripts); sysinfo->p->vcsrevision_scripts = NULL; @@ -956,7 +984,8 @@ void sysinfo_vcsrevision_reload(void) { * @retval false if the current process is running as regular user, or * in any case under Windows. */ -bool sysinfo_is_superuser(void) { +bool sysinfo_is_superuser(void) +{ #ifndef _WIN32 if (geteuid() == 0) return true; @@ -967,7 +996,8 @@ bool sysinfo_is_superuser(void) { /** * Interface runtime initialization. */ -void sysinfo_init(void) { +void sysinfo_init(void) +{ sysinfo->p->compiler = SYSINFO_COMPILER; #ifdef WIN32 sysinfo->p->platform = "Windows"; @@ -993,7 +1023,8 @@ void sysinfo_init(void) { /** * Interface shutdown cleanup. */ -void sysinfo_final(void) { +void sysinfo_final(void) +{ #ifdef WIN32 // Only need to be free'd in win32, they're #defined elsewhere if (sysinfo->p->osversion) @@ -1035,7 +1066,8 @@ static const char *sysinfo_time(void) /** * Interface default values initialization. */ -void sysinfo_defaults(void) { +void sysinfo_defaults(void) +{ sysinfo = &sysinfo_s; memset(&sysinfo_p, '\0', sizeof(sysinfo_p)); sysinfo->p = &sysinfo_p; diff --git a/src/common/utils.c b/src/common/utils.c index 73df3aae1..d393a6c23 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -54,6 +54,9 @@ void WriteDump(FILE* fp, const void* buffer, size_t length) size_t i; char hex[48+1], ascii[16+1]; + nullpo_retv(fp); + nullpo_retv(buffer); + fprintf(fp, "--- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F 0123456789ABCDEF\n"); ascii[16] = 0; @@ -78,10 +81,12 @@ void WriteDump(FILE* fp, const void* buffer, size_t length) } /// Dumps given buffer on the console. -void ShowDump(const void *buffer, size_t length) { +void ShowDump(const void *buffer, size_t length) +{ size_t i; char hex[48+1], ascii[16+1]; + nullpo_retv(buffer); ShowDebug("--- 00-01-02-03-04-05-06-07-08-09-0A-0B-0C-0D-0E-0F 0123456789ABCDEF\n"); ascii[16] = 0; @@ -108,6 +113,7 @@ static char* checkpath(char *path, const char *srcpath) { // just make sure the char*path is not const char *p = path; + if (NULL == path || NULL == srcpath) return path; while(*srcpath) { @@ -400,7 +406,9 @@ int apply_percentrate(int value, int rate, int maxrate) //----------------------------------------------------- const char* timestamp2string(char* str, size_t size, time_t timestamp, const char* format) { - size_t len = strftime(str, size, format, localtime(×tamp)); + size_t len; + nullpo_retr(NULL, str); + len = strftime(str, size, format, localtime(×tamp)); memset(str + len, '\0', size - len); return str; } @@ -413,6 +421,7 @@ bool HCache_check(const char *file) char s_path[255], dT[1]; time_t rtime; + nullpo_retr(false, file); if (!(first = fopen(file,"rb"))) return false; @@ -456,10 +465,14 @@ bool HCache_check(const char *file) return true; } -FILE *HCache_open(const char *file, const char *opt) { +FILE *HCache_open(const char *file, const char *opt) +{ FILE *first; char s_path[255]; + nullpo_retr(NULL, file); + nullpo_retr(NULL, opt); + if( file[0] == '.' && file[1] == '/' ) file += 2; else if( file[0] == '.' ) @@ -498,15 +511,19 @@ void HCache_init(void) } /* transit to fread, shields vs warn_unused_result */ -size_t hread(void * ptr, size_t size, size_t count, FILE * stream) { +size_t hread(void *ptr, size_t size, size_t count, FILE *stream) +{ return fread(ptr, size, count, stream); } + /* transit to fwrite, shields vs warn_unused_result */ -size_t hwrite(const void * ptr, size_t size, size_t count, FILE * stream) { +size_t hwrite(const void *ptr, size_t size, size_t count, FILE *stream) +{ return fwrite(ptr, size, count, stream); } -void HCache_defaults(void) { +void HCache_defaults(void) +{ HCache = &HCache_s; HCache->init = HCache_init; diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c index af5ab99af..f801e4147 100644 --- a/src/plugins/db2sql.c +++ b/src/plugins/db2sql.c @@ -457,7 +457,7 @@ void itemdb2sql_tableheader(void) " `equip_jobs` bigint(20) UNSIGNED DEFAULT NULL,\n" " `equip_upper` tinyint(8) UNSIGNED DEFAULT NULL,\n" " `equip_genders` tinyint(2) UNSIGNED DEFAULT NULL,\n" - " `equip_locations` smallint(4) UNSIGNED DEFAULT NULL,\n" + " `equip_locations` mediumint(8) UNSIGNED DEFAULT NULL,\n" " `weapon_level` tinyint(2) UNSIGNED DEFAULT NULL,\n" " `equip_level_min` smallint(5) UNSIGNED DEFAULT NULL,\n" " `equip_level_max` smallint(5) UNSIGNED DEFAULT NULL,\n" diff --git a/tools/ci/retry.sh b/tools/ci/retry.sh new file mode 100755 index 000000000..6e79af1d5 --- /dev/null +++ b/tools/ci/retry.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# This file is part of Hercules. +# http://herc.ws - http://github.com/HerculesWS/Hercules +# +# Copyright (C) 2016 Hercules Dev Team +# Copyright (C) 2016 Haru <haru@herc.ws> +# +# Hercules is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +n=0 + +while true; do + $@ && break + if [[ $n -ge 5 ]]; then + exit -1 + fi + WAITTIME=$((2**n)) + echo "Execution of $@ failed. Retrying in $WAITTIME seconds..." + sleep $WAITTIME + n=$((n+1)) +done diff --git a/travis.sh b/tools/ci/travis.sh index 10d263e49..db1ea5315 100755 --- a/travis.sh +++ b/tools/ci/travis.sh @@ -31,10 +31,10 @@ function foo { function usage { echo "usage:" - echo " $0 createdb <dbname> [dbuser] [dbpassword]" - echo " $0 importdb <dbname> [dbuser] [dbpassword]" + echo " $0 createdb <dbname> [dbuser] [dbpassword] [dbhost]" + echo " $0 importdb <dbname> [dbuser] [dbpassword] [dbhost]" echo " $0 build [configure args]" - echo " $0 test <dbname> [dbuser] [dbpassword]" + echo " $0 test <dbname> [dbuser] [dbpassword] [dbhost]" echo " $0 getplugins" exit 1 } @@ -62,21 +62,29 @@ function run_server { fi } +# Defaults +DBNAME=ragnarok +DBUSER=ragnarok +DBPASS=ragnarok +DBHOST=localhost + case "$MODE" in createdb|importdb|test) - DBNAME="$1" - DBUSER="$2" - DBPASS="$3" - if [ -z "$DBNAME" ]; then + if [ -z "$1" ]; then usage fi - if [ "$MODE" != "test" ]; then - if [ -n "$DBUSER" ]; then - DBUSER="-u $DBUSER" - fi - if [ -n "$DBPASS" ]; then - DBPASS="-p$DBPASS" - fi + DBNAME="$1" + if [ -n "$2" ]; then + DBUSER_ARG="-u $2" + DBUSER="$2" + fi + if [ -n "$3" ]; then + DBPASS_ARG="-p$3" + DBPASS="$3" + fi + if [ -n "$4" ]; then + DBHOST_ARG="-h $4" + DBHOST="$4" fi ;; esac @@ -84,12 +92,12 @@ esac case "$MODE" in createdb) echo "Creating database $DBNAME..." - mysql $DBUSER $DBPASS -e "create database $DBNAME;" || aborterror "Unable to create database." + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG -e "create database $DBNAME;" || aborterror "Unable to create database." ;; importdb) echo "Importing tables into $DBNAME..." - mysql $DBUSER $DBPASS $DBNAME < sql-files/main.sql || aborterror "Unable to import main database." - mysql $DBUSER $DBPASS $DBNAME < sql-files/logs.sql || aborterror "Unable to import logs database." + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG $DBNAME < sql-files/main.sql || aborterror "Unable to import main database." + mysql $DBUSER_ARG $DBPASS_ARG $DBHOST_ARG $DBNAME < sql-files/logs.sql || aborterror "Unable to import logs database." ;; build) (cd tools && ./validateinterfaces.py silent) || aborterror "Interface validation error." @@ -103,7 +111,7 @@ case "$MODE" in sql_connection: { //default_codepage: "" //case_sensitive: false - db_hostname: "localhost" + db_hostname: "$DBHOST" db_username: "$DBUSER" db_password: "$DBPASS" db_database: "$DBNAME" diff --git a/tools/doxygen/Hercules128.png b/tools/doxygen/Hercules128.png Binary files differnew file mode 100644 index 000000000..79919da9b --- /dev/null +++ b/tools/doxygen/Hercules128.png diff --git a/tools/doxygen/Hercules48.png b/tools/doxygen/Hercules48.png Binary files differnew file mode 100644 index 000000000..022893953 --- /dev/null +++ b/tools/doxygen/Hercules48.png diff --git a/tools/doxygen/Makefile.in b/tools/doxygen/Makefile.in new file mode 100644 index 000000000..233779f05 --- /dev/null +++ b/tools/doxygen/Makefile.in @@ -0,0 +1,70 @@ +# This file is part of Hercules. +# http://herc.ws - http://github.com/HerculesWS/Hercules +# +# Copyright (C) 2016 Hercules Dev Team +# +# Hercules is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# @configure_input@ + +@SET_MAKE@ + +COMMON_D = ../../src/common +MAP_D = ../../src/map +CHAR_D = ../../src/char +LOGIN_D = ../../src/login +PLUGIN_D = ../../src/plugins +COMMON_C = $(wildcard $(COMMON_D)/*.c) +COMMON_H = $(wildcard $(COMMON_D)/*.h) +MAP_C = $(wildcard $(MAP_D)/*.c) +MAP_H = $(wildcard $(MAP_D)/*.h) +CHAR_C = $(wildcard $(CHAR_D)/*.c) +CHAR_H = $(wildcard $(CHAR_D)/*.h) +LOGIN_C = $(wildcard $(LOGIN_D)/*.c) +LOGIN_H = $(wildcard $(LOGIN_D)/*.h) +ALL_C = $(COMMON_C) $(MAP_C) $(CHAR_C) $(LOGIN_C) +ALL_H = $(COMMON_H) $(MAP_H) $(CHAR_H) $(LOGIN_H) + +HAVE_DOXYGEN=@HAVE_DOXYGEN@ +ifeq ($(HAVE_DOXYGEN),yes) + ALL_DEPENDS = docs +else + ALL_DEPENDS = needs_doxygen +endif + +##################################################################### +.PHONY: clean buildclean + +all: $(ALL_DEPENDS) + +buildclean: + +clean: buildclean + @echo " CLEAN docs" + @rm -rf docs + +Makefile: Makefile.in + @$(MAKE) -C ../.. tools/doxygen/Makefile + +##################################################################### + +docs: $(ALL_C) $(ALL_H) doxygen.conf + @echo " Generating Doxygen documentation..." + @doxygen doxygen.conf + +##################################################################### + +needs_doxygen: + @echo "doxygen not found or disabled by the configure script" + @exit 1 diff --git a/tools/doxygen/doxygen.conf b/tools/doxygen/doxygen.conf new file mode 100644 index 000000000..043b36dc8 --- /dev/null +++ b/tools/doxygen/doxygen.conf @@ -0,0 +1,505 @@ +# Doxyfile 1.8.8 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "Hercules" +PROJECT_NUMBER = +PROJECT_BRIEF = +PROJECT_LOGO = Hercules48.png +OUTPUT_DIRECTORY = docs +CREATE_SUBDIRS = NO +ALLOW_UNICODE_NAMES = NO +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = ../../ +STRIP_FROM_INC_PATH = ../../ +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. +ALIASES = +TCL_SUBST = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = h=C +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. +AUTOLINK_SUPPORT = YES +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NNO +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YENO +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NNO +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NNO +INLINE_SIMPLE_STRUCTS = NO +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. +LOOKUP_CACHE_SIZE = 0 +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. +EXTRACT_ALL = NO +EXTRACT_PRIVATE = YES + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. +EXTRACT_PACKAGE = NO +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. +SHOW_GROUPED_MEMB_INC = NO +FORCE_LOCAL_INCLUDES = NO +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +STRICT_PROTO_MATCHING = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = "git log -n 1 --pretty=format:%h -- " +LAYOUT_FILE = layoutFile.xml +CITE_BIB_FILES = +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = ../../src/map \ + ../../src/common \ + ../../src/char \ + ../../src/login \ + ../../src/config +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.h +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. +USE_MDFILE_AS_MAINPAGE = +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. +REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +SOURCE_TOOLTIPS = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. +CLANG_OPTIONS = +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_EXTRA_STYLESHEET = +HTML_EXTRA_FILES = +HTML_COLORSTYLE_HUE = 30 +HTML_COLORSTYLE_SAT = 100 +HTML_COLORSTYLE_GAMMA = 80 +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. +HTML_INDEX_NUM_ENTRIES = 100 +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_NAME = Publisher +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = NO +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = org.doxygen.Project +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +GENERATE_ECLIPSEHELP = NO +ECLIPSE_DOC_ID = org.doxygen.Project +DISABLE_INDEX = NO +GENERATE_TREEVIEW = NO +ENUM_VALUES_PER_LINE = 4 +TREEVIEW_WIDTH = 250 +EXT_LINKS_IN_WINDOW = NO +FORMULA_FONTSIZE = 10 +FORMULA_TRANSPARENT = YES +USE_MATHJAX = NO +MATHJAX_FORMAT = HTML-CSS +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest +MATHJAX_EXTENSIONS = +MATHJAX_CODEFILE = +SEARCHENGINE = YES +SERVER_BASED_SEARCH = NO +EXTERNAL_SEARCH = NO +SEARCHENGINE_URL = +SEARCHDATA_FILE = searchdata.xml +EXTERNAL_SEARCH_ID = +EXTRA_SEARCH_MAPPINGS = +#--------------------------------------------------------------------------- +# Configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4 +EXTRA_PACKAGES = +LATEX_HEADER = +LATEX_FOOTER = +LATEX_EXTRA_FILES = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +LATEX_BIB_STYLE = plain +#--------------------------------------------------------------------------- +# Configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# Configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_SUBDIR = +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# Configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# Configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- +GENERATE_DOCBOOK = NO +DOCBOOK_OUTPUT = docbook +DOCBOOK_PROGRAMLISTING = NO +#--------------------------------------------------------------------------- +# Configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# Configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = ../../src \ + ../../3rdparty +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that are +# defined before the preprocessor is started (similar to the -D option of e.g. +# gcc). The argument of the tag is a list of macros of the form: name or +# name=definition (no spaces). If the definition and the "=" are omitted, "=1" +# is assumed. To prevent a macro definition from being undefined via #undef or +# recursively expanded use the := operator instead of the = operator. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this +# tag can be used to specify a list of macro names that should be expanded. The +# macro definition that is found in the sources will be used. Use the PREDEFINED +# tag if you want to use a different macro definition that overrules the +# definition found in the source code. +# This tag requires that the tag ENABLE_PREPROCESSING is set to YES. +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO +#--------------------------------------------------------------------------- +# Configuration options related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external class will be listed in the +# class index. If set to NO only the inherited external classes will be listed. +# The default value is: NO. +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in +# the modules index. If set to NO, only the current project's groups will be +# listed. +# The default value is: YES. +EXTERNAL_GROUPS = YES +EXTERNAL_PAGES = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +DIA_PATH = +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +DOT_NUM_THREADS = 0 + +# When you want a differently looking font in the dot files that doxygen +# generates you can specify the font name using DOT_FONTNAME. You need to make +# sure dot is able to find the font, which can be done by putting it in a +# standard location or by setting the DOTFONTPATH environment variable or by +# setting DOT_FONTPATH to the directory containing the font. +# The default value is: Helvetica. +# This tag requires that the tag HAVE_DOT is set to YES. +DOT_FONTNAME = Helvetica +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. +UML_LOOK = NO +UML_LIMIT_NUM_FIELDS = 10 + +# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and +# collaboration graphs will show the relations between templates and their +# instances. +# The default value is: NO. +# This tag requires that the tag HAVE_DOT is set to YES. +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +INTERACTIVE_SVG = NO +DOT_PATH = +DOTFILE_DIRS = +MSCFILE_DIRS = +DIAFILE_DIRS = +PLANTUML_JAR_PATH = +DOT_GRAPH_MAX_NODES = 100 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = YES +DOT_MULTI_TARGETS = YES +GENERATE_LEGEND = YES +DOT_CLEANUP = YES diff --git a/tools/doxygen/footer.html b/tools/doxygen/footer.html new file mode 100644 index 000000000..aecaafcc4 --- /dev/null +++ b/tools/doxygen/footer.html @@ -0,0 +1,21 @@ +<!-- HTML footer for doxygen 1.8.8--> +<!-- start footer part --> +<!--BEGIN GENERATE_TREEVIEW--> +<div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> + <ul> + $navpath + <li class="footer">$generatedby + <a href="http://www.doxygen.org/index.html"> + <img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li> + </ul> +</div> +<!--END GENERATE_TREEVIEW--> +<!--BEGIN !GENERATE_TREEVIEW--> +<hr class="footer"/><address class="footer"><small> +$generatedby  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/> +</a> $doxygenversion +</small></address> +<!--END !GENERATE_TREEVIEW--> +</body> +</html> diff --git a/tools/doxygen/header.html b/tools/doxygen/header.html new file mode 100644 index 000000000..31aae0ea2 --- /dev/null +++ b/tools/doxygen/header.html @@ -0,0 +1,55 @@ +<!-- HTML header for doxygen 1.8.8--> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> +<meta http-equiv="X-UA-Compatible" content="IE=9"/> +<meta name="generator" content="Doxygen $doxygenversion"/> +<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME--> +<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME--> +<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/> +<script type="text/javascript" src="$relpath^jquery.js"></script> +<script type="text/javascript" src="$relpath^dynsections.js"></script> +$treeview +$search +$mathjax +<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" /> +$extrastylesheet +</head> +<body> +<div id="top"><!-- do not remove this div, it is closed by doxygen! --> + +<!--BEGIN TITLEAREA--> +<div id="titlearea"> +<table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <!--BEGIN PROJECT_LOGO--> + <td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td> + <!--END PROJECT_LOGO--> + <!--BEGIN PROJECT_NAME--> + <td style="padding-left: 0.5em;"> + <div id="projectname">$projectname + <!--BEGIN PROJECT_NUMBER--> <span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER--> + </div> + <!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF--> + </td> + <!--END PROJECT_NAME--> + <!--BEGIN !PROJECT_NAME--> + <!--BEGIN PROJECT_BRIEF--> + <td style="padding-left: 0.5em;"> + <div id="projectbrief">$projectbrief</div> + </td> + <!--END PROJECT_BRIEF--> + <!--END !PROJECT_NAME--> + <!--BEGIN DISABLE_INDEX--> + <!--BEGIN SEARCHENGINE--> + <td>$searchbox</td> + <!--END SEARCHENGINE--> + <!--END DISABLE_INDEX--> + </tr> + </tbody> +</table> +</div> +<!--END TITLEAREA--> +<!-- end header part --> diff --git a/tools/doxygen/layoutFile.xml b/tools/doxygen/layoutFile.xml new file mode 100644 index 000000000..740548619 --- /dev/null +++ b/tools/doxygen/layoutFile.xml @@ -0,0 +1,194 @@ +<doxygenlayout version="1.0"> + <!-- Generated by doxygen 1.8.8 --> + <!-- Navigation index tabs for HTML output --> + <navindex> + <tab type="mainpage" visible="yes" title=""/> + <tab type="pages" visible="yes" title="" intro=""/> + <tab type="modules" visible="yes" title="" intro=""/> + <tab type="namespaces" visible="yes" title=""> + <tab type="namespacelist" visible="yes" title="" intro=""/> + <tab type="namespacemembers" visible="yes" title="" intro=""/> + </tab> + <tab type="classes" visible="yes" title=""> + <tab type="classlist" visible="yes" title="" intro=""/> + <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> + <tab type="hierarchy" visible="yes" title="" intro=""/> + <tab type="classmembers" visible="yes" title="" intro=""/> + </tab> + <tab type="files" visible="yes" title=""> + <tab type="filelist" visible="yes" title="" intro=""/> + <tab type="globals" visible="yes" title="" intro=""/> + </tab> + <tab type="examples" visible="yes" title="" intro=""/> + </navindex> + + <!-- Layout definition for a class page --> + <class> + <briefdescription visible="yes"/> + <includes visible="$SHOW_INCLUDE_FILES"/> + <inheritancegraph visible="$CLASS_GRAPH"/> + <collaborationgraph visible="$COLLABORATION_GRAPH"/> + <memberdecl> + <nestedclasses visible="yes" title=""/> + <publictypes title=""/> + <services title=""/> + <interfaces title=""/> + <publicslots title=""/> + <signals title=""/> + <publicmethods title=""/> + <publicstaticmethods title=""/> + <publicattributes title=""/> + <publicstaticattributes title=""/> + <protectedtypes title=""/> + <protectedslots title=""/> + <protectedmethods title=""/> + <protectedstaticmethods title=""/> + <protectedattributes title=""/> + <protectedstaticattributes title=""/> + <packagetypes title=""/> + <packagemethods title=""/> + <packagestaticmethods title=""/> + <packageattributes title=""/> + <packagestaticattributes title=""/> + <properties title=""/> + <events title=""/> + <privatetypes title=""/> + <privateslots title=""/> + <privatemethods title=""/> + <privatestaticmethods title=""/> + <privateattributes title=""/> + <privatestaticattributes title=""/> + <friends title=""/> + <related title="" subtitle=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <inlineclasses title=""/> + <typedefs title=""/> + <enums title=""/> + <services title=""/> + <interfaces title=""/> + <constructors title=""/> + <functions title=""/> + <related title=""/> + <variables title=""/> + <properties title=""/> + <events title=""/> + </memberdef> + <allmemberslink visible="yes"/> + <usedfiles visible="$SHOW_USED_FILES"/> + <authorsection visible="yes"/> + </class> + + <!-- Layout definition for a namespace page --> + <namespace> + <briefdescription visible="yes"/> + <memberdecl> + <nestednamespaces visible="yes" title=""/> + <constantgroups visible="yes" title=""/> + <classes visible="yes" title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <inlineclasses title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + </memberdef> + <authorsection visible="yes"/> + </namespace> + + <!-- Layout definition for a file page --> + <file> + <briefdescription visible="yes"/> + <includes visible="$SHOW_INCLUDE_FILES"/> + <includegraph visible="$INCLUDE_GRAPH"/> + <includedbygraph visible="$INCLUDED_BY_GRAPH"/> + <sourcelink visible="yes"/> + <memberdecl> + <classes visible="yes" title=""/> + <namespaces visible="yes" title=""/> + <constantgroups visible="yes" title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <inlineclasses title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <functions title=""/> + <variables title=""/> + </memberdef> + <authorsection/> + </file> + + <!-- Layout definition for a group page --> + <group> + <briefdescription visible="yes"/> + <groupgraph visible="$GROUP_GRAPHS"/> + <memberdecl> + <nestedgroups visible="yes" title=""/> + <dirs visible="yes" title=""/> + <files visible="yes" title=""/> + <namespaces visible="yes" title=""/> + <classes visible="yes" title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <enumvalues title=""/> + <functions title=""/> + <variables title=""/> + <signals title=""/> + <publicslots title=""/> + <protectedslots title=""/> + <privateslots title=""/> + <events title=""/> + <properties title=""/> + <friends title=""/> + <membergroups visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + <memberdef> + <pagedocs/> + <inlineclasses title=""/> + <defines title=""/> + <typedefs title=""/> + <enums title=""/> + <enumvalues title=""/> + <functions title=""/> + <variables title=""/> + <signals title=""/> + <publicslots title=""/> + <protectedslots title=""/> + <privateslots title=""/> + <events title=""/> + <properties title=""/> + <friends title=""/> + </memberdef> + <authorsection visible="yes"/> + </group> + + <!-- Layout definition for a directory page --> + <directory> + <briefdescription visible="yes"/> + <directorygraph visible="yes"/> + <memberdecl> + <dirs visible="yes"/> + <files visible="yes"/> + </memberdecl> + <detaileddescription title=""/> + </directory> +</doxygenlayout> diff --git a/tools/doxygen/pages_index.html b/tools/doxygen/pages_index.html new file mode 100644 index 000000000..c9ca5b58c --- /dev/null +++ b/tools/doxygen/pages_index.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> + <meta http-equiv="X-UA-Compatible" content="IE=9"/> + <title>Hercules documentation</title> + <link href="docs/doxygen.css" rel="stylesheet" type="text/css" /> +</head> +<body> + <div id="top"> + <div id="titlearea"> + <table cellspacing="0" cellpadding="0"> + <tbody> + <tr style="height: 56px;"> + <td id="projectlogo"><img alt="Logo" src="docs/Hercules48.png"/></td> + <td id="projectalign" style="padding-left: 0.5em;"> + <div id="projectname">Hercules</div> + </td> + </tr> + </tbody> + </table> + </div> + </div> + <div class="header"> + <div class="headertitle"> + <div class="title">Hercules Documentation</div> + </div> + </div><!--header--> + <div class="contents"> + <ul> + <li><a href="docs/">Doxygen</a></li> + <li><a href="gcov_pre.html">Coverage Report: pre-renewal build</a> <a href="gcov_pre.txt">(raw data)</a></li> + <li><a href="gcov_re.html">Coverage Report: renewal build</a> <a href="gcov_re.txt">(raw data)</a></li> + <li><a href="https://github.com/HerculesWS/Hercules">GitHub</a></li> + <li><a href="https://gitlab.com/HerculesWS/Hercules">GitLab</a></li> + </ul> + </div><!-- contents --> + <hr class="footer"> +</body></html> diff --git a/tools/doxygen/style.css b/tools/doxygen/style.css new file mode 100644 index 000000000..02e8b0152 --- /dev/null +++ b/tools/doxygen/style.css @@ -0,0 +1,1440 @@ +/* The standard CSS for doxygen 1.8.8 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 4px 6px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: bold; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + border-top-left-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('ftv2doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 20px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + |