diff --git a/THANKS b/THANKS index d85971a2b2..396ebbceb7 100644 --- a/THANKS +++ b/THANKS @@ -10,11 +10,16 @@ similar to this one: Trinity Core is a derivation/rewrite of MaNGOS, which was originally written by Team Python and the WoW Daemon Team. Many people further helped Trinity Core - by submitting bug reports, code patches, and suggestions. + by submitting bug reports, code patches, and suggestions. Thanks to the + community! - Special thanks should also go out to the WowwoW team. We have gained help from + Special thanks should go out to the WowwoW team. We have gained help from them many times in the creation of this project. Keep up the good work guys. + Thanks to the ImpConfig developer (dythzer) for the custom configuration patch. + + Thanks to the ScriptDev2 team (http://www.scriptdev2.com) for scripts. + The easiest policy with this file is to thank everyone who contributes to the project, without judging the value of the contribution. @@ -26,4 +31,4 @@ paper exchanges. You can also decide to send some kind of special greeting when you initially add a name to your `THANKS' file. The mere presense of a name in `THANKS' is -then a flag to you that the initial greeting has been sent. \ No newline at end of file +then a flag to you that the initial greeting has been sent. diff --git a/conf/authz b/conf/authz deleted file mode 100644 index 90d8838884..0000000000 --- a/conf/authz +++ /dev/null @@ -1,32 +0,0 @@ -### This file is an example authorization file for svnserve. -### Its format is identical to that of mod_authz_svn authorization -### files. -### As shown below each section defines authorizations for the path and -### (optional) repository specified by the section name. -### The authorizations follow. An authorization line can refer to: -### - a single user, -### - a group of users defined in a special [groups] section, -### - an alias defined in a special [aliases] section, -### - all authenticated users, using the '$authenticated' token, -### - only anonymous users, using the '$anonymous' token, -### - anyone, using the '*' wildcard. -### -### A match can be inverted by prefixing the rule with '~'. Rules can -### grant read ('r') access, read-write ('rw') access, or no access -### (''). - -[aliases] -# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average - -[groups] -# harry_and_sally = harry,sally -# harry_sally_and_joe = harry,sally,&joe - -# [/foo/bar] -# harry = rw -# &joe = r -# * = - -# [repository:/baz/fuz] -# @harry_and_sally = rw -# * = r diff --git a/conf/passwd b/conf/passwd deleted file mode 100644 index d22bafc5be..0000000000 --- a/conf/passwd +++ /dev/null @@ -1,8 +0,0 @@ -### This file is an example password file for svnserve. -### Its format is similar to that of svnserve.conf. As shown in the -### example below it contains one section labelled [users]. -### The name and password for each user follow, one account per line. - -[users] -# harry = harryssecret -# sally = sallyssecret diff --git a/conf/svnserve.conf b/conf/svnserve.conf deleted file mode 100644 index 97c199e2eb..0000000000 --- a/conf/svnserve.conf +++ /dev/null @@ -1,47 +0,0 @@ -### This file controls the configuration of the svnserve daemon, if you -### use it to allow access to this repository. (If you only allow -### access through http: and/or file: URLs, then this file is -### irrelevant.) - -### Visit http://subversion.tigris.org/ for more information. - -[general] -### These options control access to the repository for unauthenticated -### and authenticated users. Valid values are "write", "read", -### and "none". The sample settings below are the defaults. -# anon-access = read -# auth-access = write -### The password-db option controls the location of the password -### database file. Unless you specify a path starting with a /, -### the file's location is relative to the directory containing -### this configuration file. -### If SASL is enabled (see below), this file will NOT be used. -### Uncomment the line below to use the default password file. -# password-db = passwd -### The authz-db option controls the location of the authorization -### rules for path-based access control. Unless you specify a path -### starting with a /, the file's location is relative to the the -### directory containing this file. If you don't specify an -### authz-db, no path-based access control is done. -### Uncomment the line below to use the default authorization file. -# authz-db = authz -### This option specifies the authentication realm of the repository. -### If two repositories have the same authentication realm, they should -### have the same password database, and vice versa. The default realm -### is repository's uuid. -# realm = My First Repository - -[sasl] -### This option specifies whether you want to use the Cyrus SASL -### library for authentication. Default is false. -### This section will be ignored if svnserve is not built with Cyrus -### SASL support; to check, run 'svnserve --version' and look for a line -### reading 'Cyrus SASL authentication is available.' -# use-sasl = true -### These options specify the desired strength of the security layer -### that you want SASL to provide. 0 means no encryption, 1 means -### integrity-checking only, values larger than 1 are correlated -### to the effective key length for encryption (e.g. 128 means 128-bit -### encryption). The values below are the defaults. -# min-encryption = 0 -# max-encryption = 256 diff --git a/db/current b/db/current deleted file mode 100644 index 573541ac97..0000000000 --- a/db/current +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/db/format b/db/format deleted file mode 100644 index ef83e21c67..0000000000 --- a/db/format +++ /dev/null @@ -1,2 +0,0 @@ -3 -layout sharded 1000 diff --git a/db/fs-type b/db/fs-type deleted file mode 100644 index 4fdd95313f..0000000000 --- a/db/fs-type +++ /dev/null @@ -1 +0,0 @@ -fsfs diff --git a/db/revprops/0/0 b/db/revprops/0/0 deleted file mode 100644 index 9c5595d20c..0000000000 --- a/db/revprops/0/0 +++ /dev/null @@ -1,5 +0,0 @@ -K 8 -svn:date -V 27 -2008-10-10T15:44:11.895625Z -END diff --git a/db/revs/0/0 b/db/revs/0/0 deleted file mode 100644 index 10f5c45f9d..0000000000 --- a/db/revs/0/0 +++ /dev/null @@ -1,11 +0,0 @@ -PLAIN -END -ENDREP -id: 0.0.r0/17 -type: dir -count: 0 -text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e -cpath: / - - -17 107 diff --git a/db/txn-current b/db/txn-current deleted file mode 100644 index 573541ac97..0000000000 --- a/db/txn-current +++ /dev/null @@ -1 +0,0 @@ -0 diff --git a/db/txn-current-lock b/db/txn-current-lock deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/db/uuid b/db/uuid deleted file mode 100644 index 389bb06e5c..0000000000 --- a/db/uuid +++ /dev/null @@ -1 +0,0 @@ -c5170012-bc6e-d645-9e7e-183a30207ab2 diff --git a/db/write-lock b/db/write-lock deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/format b/format deleted file mode 100644 index 7ed6ff82de..0000000000 --- a/format +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/hooks/post-commit.tmpl b/hooks/post-commit.tmpl deleted file mode 100644 index c1bfc3556f..0000000000 --- a/hooks/post-commit.tmpl +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# POST-COMMIT HOOK -# -# The post-commit hook is invoked after a commit. Subversion runs -# this hook by invoking a program (script, executable, binary, etc.) -# named 'post-commit' (for which this file is a template) with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REV (the number of the revision just committed) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# Because the commit has already completed and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# newly-committed tree. -# -# On a Unix system, the normal procedure is to have 'post-commit' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-commit' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-commit.bat' or 'post-commit.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" - -commit-email.pl "$REPOS" "$REV" commit-watchers@example.org -log-commit.py --repository "$REPOS" --revision "$REV" diff --git a/hooks/post-lock.tmpl b/hooks/post-lock.tmpl deleted file mode 100644 index 65a7d40ead..0000000000 --- a/hooks/post-lock.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# POST-LOCK HOOK -# -# The post-lock hook is run after a path is locked. Subversion runs -# this hook by invoking a program (script, executable, binary, etc.) -# named 'post-lock' (for which this file is a template) with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] USER (the user who created the lock) -# -# The paths that were just locked are passed to the hook via STDIN (as -# of Subversion 1.2, only one path is passed per invocation, but the -# plan is to pass all locked paths at once, so the hook program -# should be written accordingly). -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# Because the lock has already been created and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# newly-created lock. -# -# On a Unix system, the normal procedure is to have 'post-lock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-lock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-lock.bat' or 'post-lock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -USER="$2" - -# Send email to interested parties, let them know a lock was created: -mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf diff --git a/hooks/post-revprop-change.tmpl b/hooks/post-revprop-change.tmpl deleted file mode 100644 index 98e3c156df..0000000000 --- a/hooks/post-revprop-change.tmpl +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# POST-REVPROP-CHANGE HOOK -# -# The post-revprop-change hook is invoked after a revision property -# has been added, modified or deleted. Subversion runs this hook by -# invoking a program (script, executable, binary, etc.) named -# 'post-revprop-change' (for which this file is a template), with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REV (the revision that was tweaked) -# [3] USER (the username of the person tweaking the property) -# [4] PROPNAME (the property that was changed) -# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted) -# -# [STDIN] PROPVAL ** the old property value is passed via STDIN. -# -# Because the propchange has already completed and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# new property value. -# -# On a Unix system, the normal procedure is to have 'post-revprop-change' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-revprop-change' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-revprop-change.bat' or 'post-revprop-change.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" -USER="$3" -PROPNAME="$4" -ACTION="$5" - -commit-email.pl --revprop-change "$REPOS" "$REV" "$USER" "$PROPNAME" watchers@example.org diff --git a/hooks/post-unlock.tmpl b/hooks/post-unlock.tmpl deleted file mode 100644 index 5821be83e1..0000000000 --- a/hooks/post-unlock.tmpl +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# POST-UNLOCK HOOK -# -# The post-unlock hook runs after a path is unlocked. Subversion runs -# this hook by invoking a program (script, executable, binary, etc.) -# named 'post-unlock' (for which this file is a template) with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] USER (the user who destroyed the lock) -# -# The paths that were just unlocked are passed to the hook via STDIN -# (as of Subversion 1.2, only one path is passed per invocation, but -# the plan is to pass all unlocked paths at once, so the hook program -# should be written accordingly). -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# Because the lock has already been destroyed and cannot be undone, -# the exit code of the hook program is ignored. -# -# On a Unix system, the normal procedure is to have 'post-unlock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-unlock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-unlock.bat' or 'post-unlock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -USER="$2" - -# Send email to interested parties, let them know a lock was removed: -mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf diff --git a/hooks/pre-commit.tmpl b/hooks/pre-commit.tmpl deleted file mode 100644 index 4ac8669ea7..0000000000 --- a/hooks/pre-commit.tmpl +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -# PRE-COMMIT HOOK -# -# The pre-commit hook is invoked before a Subversion txn is -# committed. Subversion runs this hook by invoking a program -# (script, executable, binary, etc.) named 'pre-commit' (for which -# this file is a template), with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] TXN-NAME (the name of the txn about to be committed) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# If the hook program exits with success, the txn is committed; but -# if it exits with failure (non-zero), the txn is aborted, no commit -# takes place, and STDERR is returned to the client. The hook -# program can use the 'svnlook' utility to help it examine the txn. -# -# On a Unix system, the normal procedure is to have 'pre-commit' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT *** -# *** FOR REVISION PROPERTIES (like svn:log or svn:author). *** -# -# This is why we recommend using the read-only 'svnlook' utility. -# In the future, Subversion may enforce the rule that pre-commit -# hooks should not modify the versioned data in txns, or else come -# up with a mechanism to make it safe to do so (by informing the -# committing client of the changes). However, right now neither -# mechanism is implemented, so hook writers just have to be careful. -# -# Note that 'pre-commit' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-commit.bat' or 'pre-commit.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -TXN="$2" - -# Make sure that the log message contains some text. -SVNLOOK=/usr/local/bin/svnlook -$SVNLOOK log -t "$TXN" "$REPOS" | \ - grep "[a-zA-Z0-9]" > /dev/null || exit 1 - -# Check that the author of this commit has the rights to perform -# the commit on the files and directories being modified. -commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1 - -# All checks passed, so allow the commit. -exit 0 diff --git a/hooks/pre-lock.tmpl b/hooks/pre-lock.tmpl deleted file mode 100644 index f4c43d25d5..0000000000 --- a/hooks/pre-lock.tmpl +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -# PRE-LOCK HOOK -# -# The pre-lock hook is invoked before an exclusive lock is -# created. Subversion runs this hook by invoking a program -# (script, executable, binary, etc.) named 'pre-lock' (for which -# this file is a template), with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] PATH (the path in the repository about to be locked) -# [3] USER (the user creating the lock) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# If the hook program exits with success, the lock is created; but -# if it exits with failure (non-zero), the lock action is aborted -# and STDERR is returned to the client. - -# On a Unix system, the normal procedure is to have 'pre-lock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'pre-lock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-lock.bat' or 'pre-lock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -PATH="$2" -USER="$3" - -# If a lock exists and is owned by a different person, don't allow it -# to be stolen (e.g., with 'svn lock --force ...'). - -# (Maybe this script could send email to the lock owner?) -SVNLOOK=/usr/local/bin/svnlook -GREP=/bin/grep -SED=/bin/sed - -LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ - $GREP '^Owner: ' | $SED 's/Owner: //'` - -# If we get no result from svnlook, there's no lock, allow the lock to -# happen: -if [ "$LOCK_OWNER" = "" ]; then - exit 0 -fi - -# If the person locking matches the lock's owner, allow the lock to -# happen: -if [ "$LOCK_OWNER" = "$USER" ]; then - exit 0 -fi - -# Otherwise, we've got an owner mismatch, so return failure: -echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2 -exit 1 diff --git a/hooks/pre-revprop-change.tmpl b/hooks/pre-revprop-change.tmpl deleted file mode 100644 index 9e284a917d..0000000000 --- a/hooks/pre-revprop-change.tmpl +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - -# PRE-REVPROP-CHANGE HOOK -# -# The pre-revprop-change hook is invoked before a revision property -# is added, modified or deleted. Subversion runs this hook by invoking -# a program (script, executable, binary, etc.) named 'pre-revprop-change' -# (for which this file is a template), with the following ordered -# arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REVISION (the revision being tweaked) -# [3] USER (the username of the person tweaking the property) -# [4] PROPNAME (the property being set on the revision) -# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted) -# -# [STDIN] PROPVAL ** the new property value is passed via STDIN. -# -# If the hook program exits with success, the propchange happens; but -# if it exits with failure (non-zero), the propchange doesn't happen. -# The hook program can use the 'svnlook' utility to examine the -# existing value of the revision property. -# -# WARNING: unlike other hooks, this hook MUST exist for revision -# properties to be changed. If the hook does not exist, Subversion -# will behave as if the hook were present, but failed. The reason -# for this is that revision properties are UNVERSIONED, meaning that -# a successful propchange is destructive; the old value is gone -# forever. We recommend the hook back up the old value somewhere. -# -# On a Unix system, the normal procedure is to have 'pre-revprop-change' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'pre-revprop-change' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-revprop-change.bat' or 'pre-revprop-change.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" -USER="$3" -PROPNAME="$4" -ACTION="$5" - -if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi - -echo "Changing revision properties other than svn:log is prohibited" >&2 -exit 1 diff --git a/hooks/pre-unlock.tmpl b/hooks/pre-unlock.tmpl deleted file mode 100644 index b3f432fa22..0000000000 --- a/hooks/pre-unlock.tmpl +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# PRE-UNLOCK HOOK -# -# The pre-unlock hook is invoked before an exclusive lock is -# destroyed. Subversion runs this hook by invoking a program -# (script, executable, binary, etc.) named 'pre-unlock' (for which -# this file is a template), with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] PATH (the path in the repository about to be unlocked) -# [3] USER (the user destroying the lock) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# If the hook program exits with success, the lock is destroyed; but -# if it exits with failure (non-zero), the unlock action is aborted -# and STDERR is returned to the client. - -# On a Unix system, the normal procedure is to have 'pre-unlock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'pre-unlock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-unlock.bat' or 'pre-unlock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -PATH="$2" -USER="$3" - -# If a lock is owned by a different person, don't allow it be broken. -# (Maybe this script could send email to the lock owner?) - -SVNLOOK=/usr/local/bin/svnlook -GREP=/bin/grep -SED=/bin/sed - -LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ - $GREP '^Owner: ' | $SED 's/Owner: //'` - -# If we get no result from svnlook, there's no lock, return success: -if [ "$LOCK_OWNER" = "" ]; then - exit 0 -fi - -# If the person unlocking matches the lock's owner, return success: -if [ "$LOCK_OWNER" = "$USER" ]; then - exit 0 -fi - -# Otherwise, we've got an owner mismatch, so return failure: -echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2 -exit 1 diff --git a/hooks/start-commit.tmpl b/hooks/start-commit.tmpl deleted file mode 100644 index c06647d488..0000000000 --- a/hooks/start-commit.tmpl +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh - -# START-COMMIT HOOK -# -# The start-commit hook is invoked before a Subversion txn is created -# in the process of doing a commit. Subversion runs this hook -# by invoking a program (script, executable, binary, etc.) named -# 'start-commit' (for which this file is a template) -# with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] USER (the authenticated user attempting to commit) -# [3] CAPABILITIES (a colon-separated list of capabilities reported -# by the client; see note below) -# -# Note: The CAPABILITIES parameter is new in Subversion 1.5, and 1.5 -# clients will typically report at least the "mergeinfo" capability. -# If there are other capabilities, then the list is colon-separated, -# e.g.: "mergeinfo:some-other-capability" (the order is undefined). -# -# The list is self-reported by the client. Therefore, you should not -# make security assumptions based on the capabilities list, nor should -# you assume that clients reliably report every capability they have. -# -# The working directory for this hook program's invocation is undefined, -# so the program should set one explicitly if it cares. -# -# If the hook program exits with success, the commit continues; but -# if it exits with failure (non-zero), the commit is stopped before -# a Subversion txn is created, and STDERR is returned to the client. -# -# On a Unix system, the normal procedure is to have 'start-commit' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'start-commit' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'start-commit.bat' or 'start-commit.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -USER="$2" - -commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1 -special-auth-check.py --user "$USER" --auth-level 3 || exit 1 - -# All checks passed, so allow the commit. -exit 0 diff --git a/locks/db-logs.lock b/locks/db-logs.lock deleted file mode 100644 index 536ac36a73..0000000000 --- a/locks/db-logs.lock +++ /dev/null @@ -1,3 +0,0 @@ -This file is not used by Subversion 1.3.x or later. -However, its existence is required for compatibility with -Subversion 1.2.x or earlier. diff --git a/locks/db.lock b/locks/db.lock deleted file mode 100644 index 536ac36a73..0000000000 --- a/locks/db.lock +++ /dev/null @@ -1,3 +0,0 @@ -This file is not used by Subversion 1.3.x or later. -However, its existence is required for compatibility with -Subversion 1.2.x or earlier. diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 23cfe9721d..0b54a52132 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -31,7 +31,8 @@ enum BattleGroundSounds { SOUND_HORDE_WINS = 8454, SOUND_ALLIANCE_WINS = 8455, - SOUND_BG_START = 3439 + SOUND_BG_START = 3439, + SOUND_BG_START_L70ETC = 11803, }; enum BattleGroundQuests diff --git a/src/game/BattleGroundAB.cpp b/src/game/BattleGroundAB.cpp index b58c850d2c..5c065bc644 100644 --- a/src/game/BattleGroundAB.cpp +++ b/src/game/BattleGroundAB.cpp @@ -25,6 +25,7 @@ #include "ObjectMgr.h" #include "MapManager.h" #include "Language.h" +#include "World.h" #include "Util.h" BattleGroundAB::BattleGroundAB() @@ -107,7 +108,13 @@ void BattleGroundAB::Update(time_t diff) DoorOpen(BG_AB_OBJECT_GATE_A); DoorOpen(BG_AB_OBJECT_GATE_H); - PlaySoundToAll(SOUND_BG_START); + if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) + { + PlaySoundToAll(SOUND_BG_START); + PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC + } + else + PlaySoundToAll(SOUND_BG_START); SetStatus(STATUS_IN_PROGRESS); for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 18b2645d25..ac27df9935 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -25,6 +25,7 @@ #include "ObjectMgr.h" #include "MapManager.h" #include "Language.h" +#include "World.h" #include "Util.h" BattleGroundEY::BattleGroundEY() @@ -99,7 +100,13 @@ void BattleGroundEY::Update(time_t diff) SendMessageToAll(GetMangosString(LANG_BG_EY_BEGIN)); - PlaySoundToAll(SOUND_BG_START); + if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) + { + PlaySoundToAll(SOUND_BG_START); + PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC + } + else + PlaySoundToAll(SOUND_BG_START); SetStatus(STATUS_IN_PROGRESS); for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 76ce4236cc..6a64261b08 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -25,6 +25,7 @@ #include "Chat.h" #include "MapManager.h" #include "Language.h" +#include "World.h" BattleGroundWS::BattleGroundWS() { @@ -97,7 +98,13 @@ void BattleGroundWS::Update(time_t diff) SendMessageToAll(GetMangosString(LANG_BG_WS_BEGIN)); - PlaySoundToAll(SOUND_BG_START); + if(sWorld.getConfig(CONFIG_BG_START_MUSIC)) + { + PlaySoundToAll(SOUND_BG_START); + PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC - Custom config + } + else + PlaySoundToAll(SOUND_BG_START); SetStatus(STATUS_IN_PROGRESS); for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index f6dc47e7b6..036de1e739 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -732,6 +732,64 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) if(sWorld.IsShutdowning()) sWorld.ShutdownMsg(true,pCurrChar); + if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when logging in + pCurrChar->UpdateSkillsToMaxSkillsForLevel(); + + //ImpConfig - Check if player has logged in before + QueryResult *result = CharacterDatabase.PQuery("SELECT guid FROM has_logged_in_before WHERE guid = %u",pCurrChar->GetGUIDLow()); + if(!result) + { + sLog.outBasic("Character '%s' logging in for first time, applying skills and stuff",pCurrChar->GetName()); + CharacterDatabase.PExecute("INSERT INTO has_logged_in_before VALUES (%u)",pCurrChar->GetGUIDLow()); + + //Reputations if "StartAllReputation" is enabled, -- TODO: Fix this in a better way + if(sWorld.getConfig(CONFIG_START_ALL_REP)) + { + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(942),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(935),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(936),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1011),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(970),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(967),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(989),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(932),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(934),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1038),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(1077),42999); + + // Factions depending on team, like cities and some more stuff + switch(pCurrChar->GetTeam()) + { + case ALLIANCE: + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(72),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(47),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(69),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(930),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(730),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(978),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(54),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(946),42999); + break; + case HORDE: + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(76),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(68),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(81),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(911),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(729),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(941),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(530),42999); + pCurrChar->SetFactionReputation(sFactionStore.LookupEntry(947),42999); + break; + } + } + } + else + sLog.outBasic("Character '%s' has logged in before",pCurrChar->GetName()); + + if(sWorld.getConfig(CONFIG_START_ALL_TAXI)) + pCurrChar->SetTaxiCheater(true); + + if(pCurrChar->isGameMaster()) SendNotification(LANG_GM_ON); diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index cb9a7cd673..a618d83c15 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -295,8 +295,8 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ ) return; } - //instant logout in taverns/cities or on taxi - if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight()) + //instant logout in taverns/cities or on taxi or if its enabled in mangosd.conf + if(GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() || sWorld.getConfig(CONFIG_INSTANT_LOGOUT)) { LogoutPlayer(true); return; @@ -575,6 +575,13 @@ void WorldSession::HandleZoneUpdateOpcode( WorldPacket & recv_data ) if(newZone != _player->GetZoneId()) GetPlayer()->SendInitWorldStates(); // only if really enters to new zone, not just area change, works strange... + // AntiCheat.GMIsland + if(sWorld.getConfig(CONFIG_KICK_FROM_GMISLAND)) + { + if(newZone == 876 && GetPlayer()->GetSession()->GetSecurity() == SEC_PLAYER) + _player->TeleportTo(13,0,0,0,0); + } + GetPlayer()->UpdateZone(newZone); } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 74a6a3ef68..b6f3f44834 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -2081,6 +2081,12 @@ void ObjectMgr::LoadPlayerInfo() // 0 1 2 3 QueryResult *result = WorldDatabase.Query("SELECT race, class, Spell, Active FROM playercreateinfo_spell"); + QueryResult *result = NULL; + if(sWorld.getConfig(CONFIG_START_ALL_SPELLS)) + result = WorldDatabase.Query("SELECT race, class, Spell, Active FROM playercreateinfo_spell_custom"); + else + result = WorldDatabase.Query("SELECT race, class, Spell, Active FROM playercreateinfo_spell"); + uint32 count = 0; if (!result) @@ -2089,7 +2095,7 @@ void ObjectMgr::LoadPlayerInfo() sLog.outString(); sLog.outString( ">> Loaded %u player create spells", count ); - sLog.outErrorDb( "Error loading `playercreateinfo_spell` table or empty table."); + sLog.outErrorDb( "Error loading player starting spells or empty table."); } else { diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 56e123f6e6..acbcc9d3ca 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -578,7 +578,25 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_, SetUInt32Value( PLAYER_FIELD_YESTERDAY_CONTRIBUTION, 0 ); // set starting level - SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) ); + if(GetSession()->GetSecurity() >= SEC_MODERATOR) + SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_GM_START_LEVEL) ); //ImpConfig + else + SetUInt32Value( UNIT_FIELD_LEVEL, sWorld.getConfig(CONFIG_START_PLAYER_LEVEL) ); + // set starting gold + SetUInt32Value( PLAYER_FIELD_COINAGE, sWorld.PlayerStartGold()*10000 ); + + // set starting honor + SetUInt32Value( PLAYER_FIELD_HONOR_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_HONOR) ); + + // set starting arena pts + SetUInt32Value( PLAYER_FIELD_ARENA_CURRENCY, sWorld.getConfig(CONFIG_PLAYER_START_ARENAPTS) ); + + // start with every map explored + if(sWorld.getConfig(CONFIG_START_ALL_EXPLORED)) + { + for (uint8 i=0; i<64; i++) + SetFlag(PLAYER_EXPLORED_ZONES_1+i,0xFFFFFFFF); + } // Played time m_Last_tick = time(NULL); @@ -754,8 +772,8 @@ void Player::HandleDrowning() if(!m_isunderwater) return; - //if have water breath , then remove bar - if(waterbreath || isGameMaster() || !isAlive()) + //if players is GM, have waterbreath, dead or breathing is disabled + if(sWorld.getConfig(CONFIG_DISABLE_BREATHING) || waterbreath || isGameMaster() || !isAlive()) { StopMirrorTimer(BREATH_TIMER); m_isunderwater = 0; @@ -2128,6 +2146,9 @@ void Player::GiveLevel(uint32 level) UpdateAllStats(); + if(sWorld.getConfig(CONFIG_ALWAYS_MAXSKILL)) // Max weapon skill when leveling up + UpdateSkillsToMaxSkillsForLevel(); + // set current level health and mana/energy to maximum after applying all mods. SetHealth(GetMaxHealth()); SetPower(POWER_MANA, GetMaxPower(POWER_MANA)); @@ -3601,6 +3622,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC CharacterDatabase.PExecute("DELETE FROM mail_items WHERE receiver = '%u'",guid); CharacterDatabase.PExecute("DELETE FROM character_pet WHERE owner = '%u'",guid); CharacterDatabase.PExecute("DELETE FROM character_pet_declinedname WHERE owner = '%u'",guid); + CharacterDatabase.PExecute("DELETE FROM has_logged_in_before WHERE guid = %u",guid); CharacterDatabase.CommitTransaction(); //loginDatabase.PExecute("UPDATE realmcharacters SET numchars = numchars - 1 WHERE acctid = %d AND realmid = %d", accountId, realmID); @@ -3725,7 +3747,7 @@ void Player::ResurrectPlayer(float restore_percent, bool updateToWorld, bool app // some items limited to specific map DestroyZoneLimitedItem( true, GetZoneId()); - if(!applySickness || getLevel() <= 10) + if(sWorld.getConfig(CONFIG_DISABLE_RES_SICKNESS) || !applySickness || getLevel() <= 10) return; //Characters from level 1-10 are not affected by resurrection sickness. @@ -5897,7 +5919,7 @@ void Player::UpdateHonorFields() ///Calculate the amount of honor gained based on the victim ///and the size of the group for which the honor is divided ///An exact honor value can also be given (overriding the calcs) -bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor) +bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvptoken) { // 'Inactive' this aura prevents the player from gaining honor points and battleground tokens if(GetDummyAura(SPELL_AURA_PLAYER_INACTIVE)) @@ -6016,6 +6038,42 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor) ModifyHonorPoints(int32(honor)); ApplyModUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION, uint32(honor), true); + + if( sWorld.getConfig(CONFIG_PVP_TOKEN_ENABLE) && pvptoken ) + { + if(!uVictim || uVictim == this || uVictim->HasAuraType(SPELL_AURA_NO_PVP_CREDIT)) + return true; + + if(uVictim->GetTypeId() == TYPEID_PLAYER) + { + // Check if allowed to receive it in current map + uint8 MapType = sWorld.getConfig(CONFIG_PVP_TOKEN_MAP_TYPE); + if(MapType == 1 && !InBattleGround() && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP) || MapType == 2 && !HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_FFA_PVP) || MapType == 3 && !InBattleGround()) + return true; + + uint32 noSpaceForCount = 0; + uint32 itemId = sWorld.getConfig(CONFIG_PVP_TOKEN_ID); + int32 count = sWorld.getConfig(CONFIG_PVP_TOKEN_COUNT); + + // check space and find places + ItemPosCountVec dest; + uint8 msg = CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, itemId, count, &noSpaceForCount ); + if( msg != EQUIP_ERR_OK ) // convert to possible store amount + count = noSpaceForCount; + + if( count == 0 || dest.empty()) // can't add any + { + // -- TODO: Send to mailbox if no space + ChatHandler(this).PSendSysMessage("You don't have any space in your bags for a token."); + return true; + } + + Item* item = StoreNewItem( dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId)); + SendNewItem(item,count,true,false); + ChatHandler(this).PSendSysMessage("You have been awarded a token for slaying another player."); + } + } + return true; } @@ -6384,6 +6442,13 @@ void Player::DuelComplete(DuelCompleteType type) else if(duel->opponent->GetComboTarget()==GetPetGUID()) duel->opponent->ClearComboPoints(); + // Honor points after duel (the winner) - ImpConfig + if(sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL > 0)) + { + uint32 amount = sWorld.getConfig(CONFIG_HONOR_AFTER_DUEL); + duel->opponent->RewardHonor(NULL,1,amount); + } + //cleanups SetUInt64Value(PLAYER_DUEL_ARBITER, 0); SetUInt32Value(PLAYER_DUEL_TEAM, 0); @@ -7806,6 +7871,10 @@ void Player::SendTalentWipeConfirm(uint64 guid) WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4)); data << uint64(guid); data << uint32(resetTalentsCost()); + if(sWorld.getConfig(CONFIG_NO_RESET_TALENT_COST)) + data << uint32(0); + else + data << uint32(resetTalentsCost()); GetSession()->SendPacket( &data ); } @@ -17895,7 +17964,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) continue; // member (alive or dead) or his corpse at req. distance // honor can be in PvP and !PvP (racial leader) cases (for alive) - if(pGroupGuy->isAlive() && pGroupGuy->RewardHonor(pVictim,count) && pGroupGuy==this) + if(pGroupGuy->isAlive() && pGroupGuy->RewardHonor(pVictim,count, -1, true) && pGroupGuy==this) honored_kill = true; // xp and reputation only in !PvP case @@ -17933,7 +18002,7 @@ bool Player::RewardPlayerAndGroupAtKill(Unit* pVictim) xp = PvP ? 0 : MaNGOS::XP::Gain(this, pVictim); // honor can be in PvP and !PvP (racial leader) cases - if(RewardHonor(pVictim,1)) + if(RewardHonor(pVictim,1, -1, true)) honored_kill = true; // xp and reputation only in !PvP case diff --git a/src/game/Player.h b/src/game/Player.h index b8c35e941f..ea5f5e00d6 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1722,7 +1722,7 @@ class MANGOS_DLL_SPEC Player : public Unit /*********************************************************/ void UpdateArenaFields(); void UpdateHonorFields(); - bool RewardHonor(Unit *pVictim, uint32 groupsize, float honor = -1); + bool RewardHonor(Unit *pVictim, uint32 groupsize, float honor = -1, bool pvptoken = false); uint32 GetHonorPoints() { return GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY); } uint32 GetArenaPoints() { return GetUInt32Value(PLAYER_FIELD_ARENA_CURRENCY); } void ModifyHonorPoints( int32 value ); diff --git a/src/game/World.cpp b/src/game/World.cpp index b195e394f3..90036e46cd 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -62,6 +62,7 @@ INSTANTIATE_SINGLETON_1( World ); volatile bool World::m_stopEvent = false; volatile uint32 World::m_worldLoopCounter = 0; +float World::m_PlayerStartGold = 0; // starting gold float World::m_MaxVisibleDistanceForCreature = DEFAULT_VISIBILITY_DISTANCE; float World::m_MaxVisibleDistanceForPlayer = DEFAULT_VISIBILITY_DISTANCE; float World::m_MaxVisibleDistanceForObject = DEFAULT_VISIBILITY_DISTANCE; @@ -768,6 +769,47 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_LISTEN_RANGE_TEXTEMOTE] = sConfig.GetIntDefault("ListenRange.TextEmote", 25); m_configs[CONFIG_LISTEN_RANGE_YELL] = sConfig.GetIntDefault("ListenRange.Yell", 300); + m_PlayerStartGold = sConfig.GetFloatDefault("PlayerStart.Gold", 0); + if(m_PlayerStartGold < 0) + m_PlayerStartGold = 0; + + if(m_PlayerStartGold > MAX_MONEY_AMOUNT) + m_PlayerStartGold = MAX_MONEY_AMOUNT; + + m_configs[CONFIG_PLAYER_START_HONOR] = sConfig.GetIntDefault("PlayerStart.HonorPoints", 0); + if(m_configs[CONFIG_PLAYER_START_HONOR] < 0) + m_configs[CONFIG_PLAYER_START_HONOR] = 0; + + m_configs[CONFIG_PLAYER_START_ARENAPTS] = sConfig.GetIntDefault("PlayerStart.ArenaPoints", 0); + if(m_configs[CONFIG_PLAYER_START_ARENAPTS] < 0) + m_configs[CONFIG_PLAYER_START_ARENAPTS] = 0; + + m_configs[CONFIG_GM_START_LEVEL] = sConfig.GetIntDefault("GamemasterStartLevel", 70); + if(m_configs[CONFIG_GM_START_LEVEL] < 1) + m_configs[CONFIG_GM_START_LEVEL] = 1; + + m_configs[CONFIG_INSTANT_LOGOUT] = sConfig.GetBoolDefault("PlayerInstantLogout", false); + m_configs[CONFIG_BG_START_MUSIC] = sConfig.GetBoolDefault("MusicInBattleground", false); + m_configs[CONFIG_START_ALL_SPELLS] = sConfig.GetBoolDefault("PlayerStart.AllSpells", false); + // Leaving GM queue option out for now, it's not 100% functional with the ACE patch + //m_configs[CONFIG_QUEUE_FOR_GM] = sConfig.GetBoolDefault("EnableQueueForGMs", false); + m_configs[CONFIG_HONOR_AFTER_DUEL] = sConfig.GetIntDefault("HonorPointsAfterDuel", 0); + if(m_configs[CONFIG_HONOR_AFTER_DUEL] < 0) + m_configs[CONFIG_HONOR_AFTER_DUEL]= 0; + m_configs[CONFIG_KICK_FROM_GMISLAND] = sConfig.GetBoolDefault("AntiCheat.GMIsland", false); + m_configs[CONFIG_START_ALL_EXPLORED] = sConfig.GetBoolDefault("PlayerStart.MapsExplored", false); + m_configs[CONFIG_DISABLE_BREATHING] = sConfig.GetBoolDefault("DisableWaterBreath", false); + m_configs[CONFIG_DISABLE_RES_SICKNESS] = sConfig.GetBoolDefault("DisableResurrectSickness", false); + m_configs[CONFIG_START_ALL_REP] = sConfig.GetBoolDefault("PlayerStart.AllReputation", false); + m_configs[CONFIG_ALWAYS_MAXSKILL] = sConfig.GetBoolDefault("AlwaysMaxWeaponSkill", false); + m_configs[CONFIG_START_ALL_TAXI] = sConfig.GetBoolDefault("PlayerStart.AllFlightPaths", false); + m_configs[CONFIG_PVP_TOKEN_ENABLE] = sConfig.GetBoolDefault("PvPToken.Enable", false); + m_configs[CONFIG_PVP_TOKEN_MAP_TYPE] = sConfig.GetIntDefault("PvPToken.MapAllowType", 4); + m_configs[CONFIG_PVP_TOKEN_ID] = sConfig.GetIntDefault("PvPToken.ItemID", 29434); + m_configs[CONFIG_PVP_TOKEN_COUNT] = sConfig.GetIntDefault("PvPToken.ItemCount", 1); + if(m_configs[CONFIG_PVP_TOKEN_COUNT] < 1) + m_configs[CONFIG_PVP_TOKEN_COUNT] = 1; + m_configs[CONFIG_NO_RESET_TALENT_COST] = sConfig.GetBoolDefault("NoResetTalentsCost", false); m_configs[CONFIG_ARENA_MAX_RATING_DIFFERENCE] = sConfig.GetIntDefault("Arena.MaxRatingDifference", 0); m_configs[CONFIG_ARENA_RATING_DISCARD_TIMER] = sConfig.GetIntDefault("Arena.RatingDiscardTimer",300000); diff --git a/src/game/World.h b/src/game/World.h index 8543c94648..7c383f8baf 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -153,6 +153,28 @@ enum WorldConfigs CONFIG_DEATH_SICKNESS_LEVEL, CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP, CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE, + + CONFIG_PLAYER_START_HONOR, + CONFIG_PLAYER_START_ARENAPTS, + CONFIG_GM_START_LEVEL, + CONFIG_INSTANT_LOGOUT, + CONFIG_BG_START_MUSIC, + CONFIG_START_ALL_SPELLS, + CONFIG_QUEUE_FOR_GM, + CONFIG_HONOR_AFTER_DUEL, + CONFIG_KICK_FROM_GMISLAND, + CONFIG_START_ALL_EXPLORED, + CONFIG_DISABLE_BREATHING, + CONFIG_DISABLE_RES_SICKNESS, + CONFIG_START_ALL_REP, + CONFIG_ALWAYS_MAXSKILL, + CONFIG_START_ALL_TAXI, + CONFIG_PVP_TOKEN_ENABLE, + CONFIG_PVP_TOKEN_MAP_TYPE, + CONFIG_PVP_TOKEN_ID, + CONFIG_PVP_TOKEN_COUNT, + CONFIG_NO_RESET_TALENT_COST, + CONFIG_THREAT_RADIUS, CONFIG_DECLINED_NAMES_USED, CONFIG_LISTEN_RANGE_SAY, @@ -457,6 +479,8 @@ class World void ScriptCommandStart(ScriptInfo const& script, uint32 delay, Object* source, Object* target); bool IsScriptScheduled() const { return !m_scriptSchedule.empty(); } + static float PlayerStartGold() { return m_PlayerStartGold; } + // for max speed access static float GetMaxVisibleDistanceForCreature() { return m_MaxVisibleDistanceForCreature; } static float GetMaxVisibleDistanceForPlayer() { return m_MaxVisibleDistanceForPlayer; } @@ -512,6 +536,8 @@ class World uint32 m_ShutdownTimer; uint32 m_ShutdownMask; + static float m_PlayerStartGold; + // for max speed access static float m_MaxVisibleDistanceForCreature; static float m_MaxVisibleDistanceForPlayer; diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index b6585185ee..9a0265b823 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -279,7 +279,7 @@ void WorldSession::LogoutPlayer(bool Save) // give honor to all attackers from set like group case for(std::set::const_iterator itr = aset.begin(); itr != aset.end(); ++itr) - (*itr)->RewardHonor(_player,aset.size()); + (*itr)->RewardHonor(_player, aset.size(), -1, true); // give bg rewards and update counters like kill by first from attackers // this can't be called for all attackers. diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index de4b2c3e14..ee42f16b87 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -239,6 +239,11 @@ int Master::Run() // set server online loginDatabase.PExecute("UPDATE realmlist SET color = 0, population = 0 WHERE id = '%d'",realmID); + // Create table: has_logged_in_before - used for certain custom options + sLog.outBasic("ImpConfig: Creating/Checking table 'has_logged_in_before'..."); + CharacterDatabase.PExecute("CREATE TABLE IF NOT EXISTS `has_logged_in_before` (`guid` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`guid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='ImpConfig check';"); + sLog.outBasic("ImpConfig: Done..."); + #ifdef WIN32 if (sConfig.GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/) #else diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index 918f850372..5eeacc5356 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -1074,4 +1074,113 @@ Network.OutKBuff = -1 Network.OutUBuff = 65536 Network.TcpNodelay = 1 +################################################################################################################### +# CUSTOM SERVER OPTIONS +# +# PlayerStart.Gold +# Amount of gold that new players will start with. +# If you want to start with silver, use for example 0.1 (for 10s) +# Default: 0 +# +# PlayerStart.HonorPoints +# Amount of honor that new players will start with +# Default: 0 +# +# PlayerStart.ArenaPoints +# Amount of arena points that new players will start with +# Default: 0 +# +# PlayerStart.AllReputation +# Players will start with most of the high level reputations that are needed for items, mounts etc. +# If there are any reputation faction you want to be added, just tell me. +# +# PlayerStart.AllSpells +# If enabled, players will start with all their class spells (not talents). Useful for instant 70 servers. +# You must import playercreateinfo_spell_custom.sql, it's included in the SQL folder. +# Default: 0 - off +# 1 - on +# +# PlayerStart.MapsExplored +# Players will start with all maps explored if enabled +# +# PlayerStart.AllFlightPaths +# Players will start with all flight paths (Note: ALL flight paths, not only player's team) +# +# AntiCheat.GMIsland +# If a player enters GM island, he will get teleported away. This will prevent cheaters from buying GM stuff +# on servers with a GM mall. GM's will not get teleported away. +# +# GamemasterStartLevel +# GM starting level +# Default: 70 Min,max: 1 - 255 +# +# PlayerInstantLogout +# Enable or disable instant logout for all players (NOT in combat/while dueling/while falling) +# Default: 0 - off +# 1 - on +# +# MusicInBattleground +# If enabled, "L70ETC - Power of the horde" will be played when BG starts ;) +# +# EnableQueueForGMs +# NOTE: This option currently does not work due to ACE patch +# GMs will also be added to the login queue (not gmlvl 3+) if enabled. Useful for GM servers. +# Default: 0 - off +# 1 - on +# +# HonorPointsAfterDuel +# The amount of honor points the duel winner will get after a duel. +# Default: 0 - disable +# +# DisableWaterBreath +# Disable/enable waterbreathing for players +# +# DisableResurrectSickness +# Players wont get any resurrect sickness when speaking with a spirit healer if this is enabled+ +# +# AlwaysMaxWeaponSkill +# Players will automatically gain max weapon/defense skill when logging in, leveling up etc. +# +# PvPToken.Enable +# Enable/disable PvP Token System. Players will get a token after slaying another player that gives honor. +# +# PvPToken.MapAllowType +# Where players can receive the pvp token +# 4 - In all maps +# 3 - In battlegrounds only +# 2 - In FFA areas only (gurubashi arena etc) +# 1 - In battlegrounds AND FFA areas only +# +# PvPToken.ItemID +# The item players will get after killing someone if PvP Token system is enabled. +# Default: 29434 - Badge of justice +# +# PvPToken.ItemCount +# Modify the item ID count - Default: 1 +# +# NoResetTalentsCost +# Enable or disable no cost when reseting talents +# +################################################################################################################### +PlayerStart.Gold = 0 +PlayerStart.HonorPoints = 0 +PlayerStart.ArenaPoints = 0 +PlayerStart.AllReputation = 0 +PlayerStart.AllSpells = 0 +PlayerStart.MapsExplored = 0 +PlayerStart.AllFlightPaths = 0 +AntiCheat.GMIsland = 0 +GamemasterStartLevel = 70 +PlayerInstantLogout = 0 +MusicInBattleground = 0 +EnableQueueForGMs = 0 +HonorPointsAfterDuel = 0 +DisableWaterBreath = 0 +DisableResurrectSickness = 0 +AlwaysMaxWeaponSkill = 0 +PvPToken.Enable = 0 +PvPToken.MapAllowType = 4 +PvPToken.ItemID = 29434 +PvPToken.ItemCount = 1 +NoResetTalentsCost = 0 diff --git a/src/trinityrealm/AuthCodes.h b/src/trinityrealm/AuthCodes.h index 56a3077aae..c33acc51c4 100644 --- a/src/trinityrealm/AuthCodes.h +++ b/src/trinityrealm/AuthCodes.h @@ -68,6 +68,6 @@ enum LoginResult // others will not and opposite // will only support WoW and WoW:TBC 2.4.3 client build 8606... -#define EXPECTED_MANGOS_CLIENT_BUILD {8606, 0} +//#define EXPECTED_MANGOS_CLIENT_BUILD {8606, 0} // - commented as builds are set in config #endif diff --git a/src/trinityrealm/AuthSocket.cpp b/src/trinityrealm/AuthSocket.cpp index 816a1d3253..0fd2726470 100644 --- a/src/trinityrealm/AuthSocket.cpp +++ b/src/trinityrealm/AuthSocket.cpp @@ -369,13 +369,15 @@ bool AuthSocket::_HandleLogonChallenge() ///- Check if the client has one of the expected version numbers bool valid_version=false; - int accepted_versions[]=EXPECTED_MANGOS_CLIENT_BUILD; - for(int i=0;accepted_versions[i];i++) - if(ch->build==accepted_versions[i]) - { + int MinBuild = sConfig.GetIntDefault("MinBuild", 8606); + int MaxBuild = sConfig.GetIntDefault("MaxBuild", 8606); + + if(ch->build >= MinBuild && ch->build <= MaxBuild) valid_version=true; break; } + else + valid_version=false; ///