diff options
author | KingPin <none@none> | 2008-10-19 21:08:34 -0500 |
---|---|---|
committer | KingPin <none@none> | 2008-10-19 21:08:34 -0500 |
commit | fcde03a03670caa76b0933dbf3e7a1e95bb2b3be (patch) | |
tree | d71f1892493c6d9b12aca88a1ceca9c0fc9c981b | |
parent | 0cb3a7951811140c2619353c0e3c3b4dd727a63c (diff) |
[svn] * Fixed compile from r78
* Fixed: not apply healling bonus to spell 40972 heal amount. - Source Mangos
* Item 30627 hidden cooldown - Source Mangos
* Fixed Trinityrealm autopatching system - Source Arrai
* Add support for autoconf 2.6.2 and newer - Source Derex
Some decent sized changes, please test before deploying - KP
--HG--
branch : trunk
-rw-r--r-- | dep/ACE_wrappers/configure.ac | 272 | ||||
-rw-r--r-- | dep/ACE_wrappers/m4/ace_defines.m4 | 8 | ||||
-rw-r--r-- | dep/ACE_wrappers/m4/ace_func.m4 | 34 | ||||
-rw-r--r-- | dep/ACE_wrappers/m4/ace_functions.m4 | 8 | ||||
-rw-r--r-- | dep/ACE_wrappers/m4/ace_headers.m4 | 8 | ||||
-rw-r--r-- | dep/ACE_wrappers/m4/acinclude.m4 | 113 | ||||
-rw-r--r-- | dep/ACE_wrappers/m4/config_h.m4 | 78 | ||||
-rw-r--r-- | sql/characters.sql | 2 | ||||
-rw-r--r-- | sql/updates/79_characters.sql | 2 | ||||
-rw-r--r-- | sql/updates/79_world.sql | 6 | ||||
-rw-r--r-- | src/game/CharacterHandler.cpp | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 14 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 4 | ||||
-rw-r--r-- | src/game/WorldSocketMgr.cpp | 1 | ||||
-rw-r--r-- | src/trinityrealm/AuthSocket.cpp | 267 | ||||
-rw-r--r-- | src/trinityrealm/AuthSocket.h | 9 | ||||
-rw-r--r-- | win/VC71/framework.vcproj | 4 | ||||
-rw-r--r-- | win/VC80/framework.vcproj | 8 | ||||
-rw-r--r-- | win/VC90/framework.vcproj | 8 |
20 files changed, 352 insertions, 498 deletions
diff --git a/dep/ACE_wrappers/configure.ac b/dep/ACE_wrappers/configure.ac index 31fa4825f50..67399734ce3 100644 --- a/dep/ACE_wrappers/configure.ac +++ b/dep/ACE_wrappers/configure.ac @@ -1,4 +1,4 @@ -dnl $Id: configure.ac 82573 2008-08-08 18:13:53Z jtc $ +dnl $Id: configure.ac 82832 2008-09-25 17:38:39Z jtc $ dnl An autoconf script to automatically configure ACE. dnl Process this file with autoconf to produce a configure script. @@ -19,7 +19,7 @@ AC_INIT([ACE], [ace-bugs@cs.wustl.edu], [ace]) -AC_REVISION([$Id: configure.ac 82573 2008-08-08 18:13:53Z jtc $]) +AC_REVISION([$Id: configure.ac 82832 2008-09-25 17:38:39Z jtc $]) AC_COPYRIGHT([ACE(TM), TAO(TM), CIAO(TM), and CoSMIC(TM) (henceforth referred to as "DOC software") are copyrighted by Douglas C. @@ -505,8 +505,6 @@ AC_CHECK_HEADER([dlfcn.h], ACE_CHECK_LACKS_HEADERS(inttypes.h malloc.h memory.h stdint.h) -ACE_CHECK_HAS_HEADERS(bytesex.h) - AC_CHECK_HEADER([sys/msg.h], [ ACE_CACHE_CHECK([if _KERNEL is needed for msg prototypes], @@ -592,6 +590,8 @@ AC_CHECK_HEADER([sys/procfs.h], ACE_CHECK_LACKS_HEADERS(arpa/inet.h) +ACE_CHECK_HAS_HEADERS(bytesex.h) + ACE_CHECK_HAS_HEADERS(byteswap.h) ACE_CHECK_LACKS_HEADERS(dirent.h) @@ -686,10 +686,6 @@ ACE_CHECK_LACKS_HEADERS(sys/sysctl.h, [], [], #endif ]) -ACE_CHECK_HAS_HEADERS(sys/sysinfo.h) - -ACE_CHECK_HAS_HEADERS(sys/systeminfo.h) - ACE_CHECK_LACKS_HEADERS(sys/time.h) ACE_CHECK_LACKS_HEADERS(sys/uio.h) @@ -706,8 +702,6 @@ ACE_CHECK_LACKS_HEADERS(termio.h termios.h) ACE_CHECK_LACKS_HEADERS(wctype.h) -AC_CHECK_HEADER([sys/systeminfo.h],[],[]) - AC_CHECK_TYPE([struct termio], [AC_DEFINE([ACE_HAS_TERMIO], 1, [Define to 1 if system supports SysV tty API.])], @@ -1104,7 +1098,10 @@ AC_CHECK_TYPE([key_t], [Define to 1 if the system lacks the type `key_t'.])], [#include <sys/types.h>]) -ACE_CHECK_TYPE([sem_t],[semaphore.h],,) +AC_CHECK_TYPE([sem_t], + [], + [], + [#include <semaphore.h>]) AC_CHECK_TYPE([pri_t], [], @@ -1260,62 +1257,68 @@ dnl SECTION 7: checks for structures dnl TODO: Check whether these structures can be defined somewhere else. -ACE_CHECK_STRUCT([dirent],[dirent.h],,[AC_DEFINE([ACE_LACKS_STRUCT_DIR])]) -ACE_CHECK_STRUCT([flock],[fcntl.h],,[AC_DEFINE([ACE_LACKS_FILELOCKS])]) -ACE_CHECK_STRUCT([rwlock_t],[synch.h],,[AC_DEFINE([ACE_LACKS_RWLOCK_T])]) -ACE_CHECK_STRUCT([strbuf],[stropts.h],[AC_DEFINE([ACE_HAS_STRBUF_T])],) +AC_CHECK_TYPE([struct dirent], + [], + [AC_DEFINE([ACE_LACKS_STRUCT_DIR], 1, + [Define to 1 if the system lacks the type `struct dirent'.])], + [#include <dirent.h>]) +AC_CHECK_TYPE([struct flock], + [], + [AC_DEFINE([ACE_LACKS_FILELOCKS], 1, + [Define to 1 if the system lacks the type `struct flock'.])], + [#include <fcntl.h>]) +AC_CHECK_TYPE([rwlock_t], + [], + [AC_DEFINE([ACE_LACKS_RWLOCK_T], 1, + [Define to 1 if the system lacks the type `rwlock_t'.])], + [#include <synch.h>]) +AC_CHECK_TYPE([struct strbuf], + [AC_DEFINE([ACE_HAS_STRBUF_T], 1, + [Define to 1 if the system has the type `struct strbuf'.])], + [], + [#include <stropts.h>]) case "$host" in *irix*) dnl IRIX prusage fields don't match what ACE currently supports. ;; *) - ACE_CHECK_STRUCT([prusage_t],[sys/procfs.h],[AC_DEFINE([ACE_HAS_PRUSAGE_T])],) + AC_CHECK_TYPE([prusage_t], + [AC_DEFINE([ACE_HAS_PRUSAGE_T], 1, + [Define to 1 if the system has the type `prusage_t'.])], + [], + [#include <sys/procfs.h>]) ;; esac -ACE_CHECK_STRUCT([strrecvfd],[stropts.h],,[AC_DEFINE([ACE_LACKS_STRRECVFD])]) -ACE_CHECK_STRUCT([sigaction],[signal.h],,[AC_DEFINE([ACE_LACKS_SIGACTION])]) -ACE_CHECK_STRUCT([sigset_t],[signal.h],,[AC_DEFINE([ACE_LACKS_SIGSET])]) -ACE_CHECK_STRUCT([utsname],[sys/utsname.h],,[AC_DEFINE([ACE_LACKS_UTSNAME_T])]) - -ACE_CACHE_CHECK([for struct sembuf],[ace_cv_struct_sembuf], - [ - dnl Some platforms may need to include some headers before <sys/sem.h>. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifndef ACE_LACKS_SYS_TYPES_H -# include <sys/types.h> -#endif -#include <sys/ipc.h> -#include <sys/sem.h> - ]],[[ - struct sembuf ace_sembuf; - ]])],[ - ace_cv_struct_sembuf=yes - ],[ -dnl Some compilers don't like the "struct" but we need the struct for -dnl some platforms to resolve ambiguities between functions and -dnl structures with with the same name. So, we try the same test but -dnl without "struct" if the above test with "struct" fails. If both -dnl tests fail, then we can be reasonably sure that we don't have the -dnl structure we are testing for. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[ +AC_CHECK_TYPE([struct strrecvfd], + [], + [AC_DEFINE([ACE_LACKS_STRRECVFD], 1, + [Define to 1 if the system lacks the type `struct strrecvfd'.])], + [#include <stropts.h>]) +AC_CHECK_TYPE([struct sigaction], + [], + [AC_DEFINE([ACE_LACKS_SIGACTION], 1, + [Define to 1 if the system lacks the type `struct sigaction'.])], + [#include <signal.h>]) +AC_CHECK_TYPE([sigset_t], + [], + [AC_DEFINE([ACE_LACKS_SIGSET], 1, + [Define to 1 if the system lacks the type `sigset_t'.])], + [#include <signal.h>]) +AC_CHECK_TYPE([struct utsname], + [], + [AC_DEFINE([ACE_LACKS_UTSNAME_T], 1, + [Define to 1 if the system lacks the type `struct utsname'.])], + [#include <sys/utsname.h>]) +AC_CHECK_TYPE([struct sembuf], + [], + [AC_DEFINE([ACE_LACKS_SEMBUF_T], 1, + [Define to 1 if the system lacks the type `struct sembuf'.])], + [ #ifndef ACE_LACKS_SYS_TYPES_H # include <sys/types.h> #endif #include <sys/ipc.h> -#include <sys/sem.h> - ]], - [[ - sembuf ace_sembuf; - ]])], - [ - ace_cv_struct_sembuf=yes - ], - [ - ace_cv_struct_sembuf=no - ]) - ]) - ],,[AC_DEFINE([ACE_LACKS_SEMBUF_T])]) +#include <sys/sem.h>]) dnl Thanks to Konstantinos Margaritis <kmargar@cc.uoa.gr> for pointing out dnl that struct siginfo_t may also be defined in signal.h @@ -1516,26 +1519,6 @@ ACE_CACHE_CHECK([for limited struct rusage], ]) ],[AC_DEFINE([ACE_HAS_LIMITED_RUSAGE_T])],) -if test "$ace_cv_struct_siginfo_t" = yes; then - dnl Check for si_addr member in struct siginfo_t - ACE_CACHE_CHECK([for si_addr member in struct siginfo_t], - [ace_cv_lib_posix_si_addr],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#ifndef ACE_LACKS_SIGINFO_H -# include <siginfo.h> -#endif -#include <signal.h> - ]],[[ - siginfo_t acesig; - acesig.si_addr = 0; - ]])],[ - ace_cv_lib_posix_si_addr=yes - ],[ - ace_cv_lib_posix_si_addr=no - ]) - ],,[AC_DEFINE([ACE_LACKS_SI_ADDR])]) -fi dnl test "$ace_cv_struct_siginfo_t" = yes - dnl Check for sin_len member in struct sockaddr_in AC_CHECK_MEMBER([struct sockaddr_in.sin_len], [AC_DEFINE([ACE_HAS_SOCKADDR_IN_SIN_LEN], 1, @@ -2253,31 +2236,6 @@ if test "$ace_cv_lib_auto_ptr_class" = yes; then ],,[AC_DEFINE([ACE_AUTO_PTR_LACKS_RESET])]) fi dnl test $ace_cv_lib_auto_ptr_class=yes -dnl Check if platform supports placement new operator -ACE_CACHE_CHECK([for C++ placement new operator], - [ace_cv_feature_placement_new],[ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if defined (ACE_HAS_NEW_NO_H) -# include <new> -#elif defined (ACE_HAS_NEW_H) -# include <new.h> -#endif - -class foo -{ -public: - void *operator new (size_t, void *p) { return p; } -}; - ]],[[ -int *x = 0; -foo *f = new (x) foo; - ]])],[ - ace_cv_feature_placement_new=yes - ],[ - ace_cv_feature_placement_new=no - ]) - ],,[AC_DEFINE([ACE_LACKS_PLACEMENT_OPERATOR_NEW])]) - dnl Check if platform supports placement delete operator ACE_CACHE_CHECK([for C++ placement delete operator], [ace_cv_feature_placement_delete],[ @@ -3076,9 +3034,9 @@ case "$host_os" in esac ACE_CHECK_HAS_FUNCS(_InterlockedIncrement _InterlockedDecrement _InterlockedExchangeAdd) -if test "$ac_cv_func__InterlockedIncrement" == yes && - test "$ac_cv_func__InterlockedDecrement" == yes && - test "$ac_cv_func__InterlockedExchangeAdd" == yes; then +if test "$ac_cv_func__InterlockedIncrement" = yes && + test "$ac_cv_func__InterlockedDecrement" = yes && + test "$ac_cv_func__InterlockedExchangeAdd" = yes; then AC_DEFINE([ACE_HAS_INTRINSIC_INTERLOCKED]) fi @@ -3484,12 +3442,7 @@ ACE_CHECK_LACKS_FUNCS(sysconf) ACE_CHECK_HAS_FUNCS(sysctl) -AC_CHECK_FUNC([sysinfo], - [ - if test "$ac_cv_header_sys_systeminfo_h" = yes; then - AC_DEFINE([ACE_HAS_SYSINFO]) - fi - ],) +ACE_CHECK_FUNC_SYSINFO ACE_CHECK_LACKS_FUNCS(system) @@ -3594,10 +3547,14 @@ main () ;; esac -AC_CHECK_FUNC([gethrtime], - [ - ACE_CHECK_TYPE([hrtime_t],[sys/time.h],[AC_DEFINE([ACE_HAS_HI_RES_TIMER])],) - ],) +AC_CHECK_FUNC([gethrtime]) +if test $ac_cv_func_gethrtime = "yes"; then + AC_CHECK_TYPE([hrtime_t], + [AC_DEFINE([ACE_HAS_HI_RES_TIMER], 1, + [Define to 1 if system has SunOS high resolution timer.])], + [], + [#include <sys/time.h>]) +fi AC_CHECK_FUNC([pread], [AC_CHECK_FUNC([pwrite], @@ -3632,7 +3589,7 @@ ACE_CHECK_HAS_FUNCS(sigsuspend sigtimedwait) ACE_CHECK_LACKS_FUNCS(socketpair) AC_CHECK_FUNC(strptime) -if test "$ac_cv_func_strptime" == yes; then +if test "$ac_cv_func_strptime" = yes; then dnl strptime() is available, but its prototype is not always visible to dnl the compiler. Check if _XOPEN_SOURCE macro is needed to make the dnl strptime() prototype visible. @@ -3886,7 +3843,7 @@ AC_SEARCH_LIBS([sem_destroy],rt,[ace_cv_func_sem_destroy=yes],,) if test "$ace_cv_func_sem_init" = yes && test "$ace_cv_func_sem_destroy" = yes && - test "$ace_cv_type_sem_t" = yes; then + test "$ac_cv_type_sem_t" = yes; then dnl Only enable POSIX semaphore support if process shared semaphores dnl are supported. Presumably process shared semaphores are only @@ -4118,8 +4075,9 @@ dnl name. dnl Can't use ACE_CHECK_LACKS_FUNCS because the macro doesn't match the dnl tested function name. AC_CHECK_FUNC([pthread_condattr_setpshared], - , - [AC_DEFINE([ACE_LACKS_CONDATTR_PSHARED])]) + [], + [AC_DEFINE([ACE_LACKS_CONDATTR_PSHARED], 1, + [Define to 1 if system lacks pthread_condattr_setpshared()])]) dnl ACE_CHECK_LACKS_FUNCS(pthread_attr_setstack) dnl Can't use ACE_CHECK_LACKS_FUNCS because the lower-down AC macros build @@ -4196,12 +4154,13 @@ dnl name. ]) AC_CHECK_FUNC([pthread_attr_setscope], - , + [], [AC_DEFINE([ACE_LACKS_THREAD_PROCESS_SCOPING])]) AC_CHECK_FUNC([pthread_mutexattr_setpshared], - , - [AC_DEFINE([ACE_LACKS_MUTEXATTR_PSHARED])]) + [], + [AC_DEFINE([ACE_LACKS_MUTEXATTR_PSHARED], 1, + [Define to 1 if system lacks pthread_mutexattr_setpshared().])]) dnl Check for POSIX Threads Draft 4 functions AC_CHECK_FUNC([pthread_mutexattr_create],,) @@ -4236,47 +4195,23 @@ dnl AC_CHECK_FUNC(sched_yield,,) dnl We already check for this during the library checks. dnl Check for Unix98 pthreads extensions - ACE_CACHE_CHECK([for struct pthread_rwlock_t], - [ace_cv_struct_pthread_rwlock_t], - [ - dnl Since we are checking for pthread_rwlock_t in more than one header - dnl we can't use the ACE_CHECK_STRUCT macro so we have to do things - dnl manually. - ACE_TRY_COMPILE_STRUCT([pthread_rwlock_t], [pthread.h], - [ - ace_cv_struct_pthread_rwlock_t=yes - ], - [ - ACE_TRY_COMPILE_STRUCT([pthread_rwlock_t], [sys/types.h], - [ - ace_cv_struct_pthread_rwlock_t=yes - ], - [ - ace_cv_struct_pthread_rwlock_t=no - ]) - ]) - ],,) + AC_CHECK_TYPE([pthread_rwlock_t], + [], + [], + [ +#ifndef ACE_LACKS_SYS_TYPES_H +#include <sys/types.h> +#endif +#include <pthread.h>]) - ACE_CACHE_CHECK([for struct pthread_rwlockattr_t], - [ace_cv_struct_pthread_rwlockattr_t], - [ - dnl Since we are checking for pthread_rwlockattr_t in more than one - dnl header, we can't use the ACE_CHECK_STRUCT macro so we have to do - dnl things manually. - ACE_TRY_COMPILE_STRUCT([pthread_rwlockattr_t], [pthread.h], - [ - ace_cv_struct_pthread_rwlockattr_t=yes - ], - [ - ACE_TRY_COMPILE_STRUCT([pthread_rwlockattr_t], [sys/types.h], - [ - ace_cv_struct_pthread_rwlockattr_t=yes - ], - [ - ace_cv_struct_pthread_rwlockattr_t=no - ]) - ]) - ],,) + AC_CHECK_TYPE([pthread_rwlockattr_t], + [], + [], + [ +#ifndef ACE_LACKS_SYS_TYPES_H +#include <sys/types.h> +#endif +#include <pthread.h>]) ACE_CHECK_HAS_FUNCS(pthread_continue pthread_continue_np pthread_resume_np pthread_suspend pthread_suspend_np) ACE_CHECK_HAS_FUNCS(pthread_getconcurrency pthread_setconcurrency) @@ -4395,11 +4330,12 @@ fi dnl test "$ac_cv_type_cpu_set_t" = yes AC_CHECK_FUNC([pthread_rwlockattr_init],,) AC_CHECK_FUNC([pthread_rwlockattr_destroy],,) AC_CHECK_FUNC([pthread_rwlockattr_setpshared], - , - [AC_DEFINE([ACE_LACKS_RWLOCKATTR_PSHARED])]) + [], + [AC_DEFINE([ACE_LACKS_RWLOCKATTR_PSHARED], 1, + [Define to 1 if system lacks pthread_rwlockattr_setpshared().])]) - if test "$ace_cv_struct_pthread_rwlock_t" = yes && - test "$ace_cv_struct_pthread_rwlockattr_t" = yes && + if test "$ac_cv_type_pthread_rwlock_t" = yes && + test "$ac_cv_type_pthread_rwlockattr_t" = yes && test "$ac_cv_func_pthread_rwlock_init" = yes && test "$ac_cv_func_pthread_rwlock_destroy" = yes && test "$ac_cv_func_pthread_rwlock_rdlock" = yes && @@ -5630,7 +5566,7 @@ typedef void (*SA)(...); ]) ]) -if test "$ace_cv_struct_sigaction" = yes; then +if test "$ac_cv_type_struct_sigaction" = yes; then dnl Check if struct sigaction takes a void (*)(int) handler AC_CACHE_CHECK([if struct sigaction takes a void (*)(int) handler], [ace_cv_lib_struct_sigaction_vi1_handler],[ @@ -5706,7 +5642,7 @@ dnl Check if struct sigaction takes a void (*)(...) handler ace_cv_lib_struct_sigaction_va1_handler=no ]) ]) -fi dnl test "$ace_cv_struct_sigaction" = yes +fi dnl test "$ac_cv_type_struct_sigaction" = yes dnl TODO: This doesn't work. dnl The linux compiler issues a warning regarding the invalid void* @@ -7327,7 +7263,7 @@ and the following information: ACE 'configure' Script Information ================================== - [RCS] translit([$Id: configure.ac 82573 2008-08-08 18:13:53Z jtc $], [$"]) + [RCS] translit([$Id: configure.ac 82832 2008-09-25 17:38:39Z jtc $], [$"]) ACE Version: ACE_VERSION diff --git a/dep/ACE_wrappers/m4/ace_defines.m4 b/dep/ACE_wrappers/m4/ace_defines.m4 index bb5ba514afc..08a16407e05 100644 --- a/dep/ACE_wrappers/m4/ace_defines.m4 +++ b/dep/ACE_wrappers/m4/ace_defines.m4 @@ -20,12 +20,12 @@ AS_VAR_POPDEF([ac_var])dnl #----------------------------------------------------------------------------- AC_DEFUN([ACE_CHECK_HAS_DEFINES], [AC_FOREACH([ACE_Def], [$1], - [AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Def), + [AH_TEMPLATE(AS_TR_CPP([ACE_HAS_]ACE_Def), [Define to 1 if platform has ]ACE_Def[().])])dnl for ace_def in $1 do ACE_CHECK_DEFINE($ace_def, - [AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_def])]) $2], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_HAS_$ace_def])) $2], [$3], [$4])dnl done @@ -36,13 +36,13 @@ done #----------------------------------------------------------------------------- AC_DEFUN([ACE_CHECK_LACKS_DEFINES], [AC_FOREACH([ACE_Def], [$1], - [AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Def), + [AH_TEMPLATE(AS_TR_CPP([ACE_LACKS_]ACE_Def), [Define to 1 if platform lacks ]ACE_Def[().])])dnl for ace_def in $1 do ACE_CHECK_DEFINE($ace_def, [$2], - [AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_def])]) $3], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_LACKS_$ace_def])) $3], [$4])dnl done ]) diff --git a/dep/ACE_wrappers/m4/ace_func.m4 b/dep/ACE_wrappers/m4/ace_func.m4 index 52ff1a0b2c1..2019d73a777 100644 --- a/dep/ACE_wrappers/m4/ace_func.m4 +++ b/dep/ACE_wrappers/m4/ace_func.m4 @@ -146,3 +146,37 @@ if test "$ac_cv_func_wcsdup" = no; then fi fi ]) + +# ACE_CHECK_SYSINFO +# +# SVR4 and Linux have completely independent implementations of the +# sysinfo() system / library call. +# +# The SVR4 signature is: +# #include <sys/systeminfo.h> +# long sysinfo (int command, char *buf, long count) +# +# While the Linux signature is: +# #include <sys/sysinfo.h> +# int sysinfo (struct sysinfo* info); +# +# SVR4 (or at least Solaris) also has a sys/sysinfo.h header, so that +# cannot be used to distinguish between the two varients. As far as I +# know, Linux does not have a sys/systeminfo.h header, so that can. +# +# ACE uses the ACE_HAS_SYSV_SYSINFO feature test macro for the first +# and ACE_HAS_LINUX_SYSINFO for the second. +# +AC_DEFUN([ACE_CHECK_FUNC_SYSINFO],[ +ACE_CHECK_HAS_HEADERS(sys/sysinfo.h sys/systeminfo.h) +AC_CHECK_FUNC(sysinfo) +if test "$ac_cv_func_sysinfo" = yes; then + if test "$ac_cv_header_sys_systeminfo_h" = yes; then + AC_DEFINE([ACE_HAS_SYSV_SYSINFO], 1, + [Define to 1 if system has SysV version of sysinfo().]) + elif test "$ac_cv_header_sys_sysinfo_h" = yes; then + AC_DEFINE([ACE_HAS_LINUX_SYSINFO], 1, + [Define to 1 if system has Linux version of sysinfo().]) + fi +fi +])
\ No newline at end of file diff --git a/dep/ACE_wrappers/m4/ace_functions.m4 b/dep/ACE_wrappers/m4/ace_functions.m4 index 97f70eab05c..571b9f1dfdc 100644 --- a/dep/ACE_wrappers/m4/ace_functions.m4 +++ b/dep/ACE_wrappers/m4/ace_functions.m4 @@ -2,12 +2,12 @@ #--------------------------------------------------------------------------- AC_DEFUN([ACE_CHECK_HAS_FUNCS], [AC_FOREACH([ACE_Func], [$1], - [AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Func), + [AH_TEMPLATE(AS_TR_CPP([ACE_HAS_]ACE_Func), [Define to 1 if platform has ]ACE_Func[().])])dnl for ace_func in $1 do AC_CHECK_FUNC($ace_func, - [AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_func])]) $2], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_HAS_$ace_func])) $2], [$3])dnl done ]) @@ -16,12 +16,12 @@ done #----------------------------------------------------------------------------- AC_DEFUN([ACE_CHECK_LACKS_FUNCS], [AC_FOREACH([ACE_Func], [$1], - [AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Func), + [AH_TEMPLATE(AS_TR_CPP([ACE_LACKS_]ACE_Func), [Define to 1 if platform lacks ]ACE_Func[().])])dnl for ace_func in $1 do AC_CHECK_FUNC($ace_func, [$2], - [AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_func])]) $3])dnl + [AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_LACKS_$ace_func])) $3])dnl done ]) diff --git a/dep/ACE_wrappers/m4/ace_headers.m4 b/dep/ACE_wrappers/m4/ace_headers.m4 index e873fc640da..88a0cef94ae 100644 --- a/dep/ACE_wrappers/m4/ace_headers.m4 +++ b/dep/ACE_wrappers/m4/ace_headers.m4 @@ -5,12 +5,12 @@ #----------------------------------------------------------------------------- AC_DEFUN([ACE_CHECK_HAS_HEADERS], [AC_FOREACH([ACE_Header], [$1], - [AH_TEMPLATE(AS_TR_CPP(ACE_HAS_[]ACE_Header), + [AH_TEMPLATE(AS_TR_CPP([ACE_HAS_]ACE_Header), [Define to 1 if platform has the <]ACE_Header[> header file.])])dnl for ace_header in $1 do AC_CHECK_HEADER($ace_header, - [AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_HAS_$ace_header])]) $2], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_HAS_$ace_header])) $2], [$3], [$4])dnl done @@ -23,13 +23,13 @@ done #----------------------------------------------------------------------------- AC_DEFUN([ACE_CHECK_LACKS_HEADERS], [AC_FOREACH([ACE_Header], [$1], - [AH_TEMPLATE(AS_TR_CPP(ACE_LACKS_[]ACE_Header), + [AH_TEMPLATE(AS_TR_CPP([ACE_LACKS_]ACE_Header), [Define to 1 if platform lacks the <]ACE_Header[> header file.])])dnl for ace_header in $1 do AC_CHECK_HEADER($ace_header, [$2], - [AC_DEFINE_UNQUOTED([AS_TR_CPP([ACE_LACKS_$ace_header])]) $3], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([ACE_LACKS_$ace_header])) $3], [$4])dnl done ]) diff --git a/dep/ACE_wrappers/m4/acinclude.m4 b/dep/ACE_wrappers/m4/acinclude.m4 index de18884cee7..d292805e14c 100644 --- a/dep/ACE_wrappers/m4/acinclude.m4 +++ b/dep/ACE_wrappers/m4/acinclude.m4 @@ -1,5 +1,5 @@ dnl ------------------------------------------------------------------------- -dnl $Id: acinclude.m4 80826 2008-03-04 14:51:23Z wotte $ +dnl $Id: acinclude.m4 82832 2008-09-25 17:38:39Z jtc $ dnl dnl ACE M4 include file which contains general M4 macros dnl to be used by the ACE configure script. @@ -201,101 +201,8 @@ dnl checks for header files dnl checks for typedefs -dnl Check for specific typedef in given header file -dnl Usage: ACE_CHECK_TYPE(TYPEDEF, INCLUDE, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl This macro can only check for one typedef in one header file at a time!! -AC_DEFUN([ACE_CHECK_TYPE], -[ -dnl AC_REQUIRE([AC_PROG_CXX]) -dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_LANG([C++]) -dnl AC_REQUIRE([AC_LANG]) - - ACE_CACHE_CHECK([for $1 in $2], [ace_cv_type_$1], - [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <$2> - ]], [[ - $1 ace_$1; - ]])],[ - ace_cv_type_$1=yes - ],[ - ace_cv_type_$1=no - ]) - ],[$3],[$4]) -]) - - dnl checks for structures -dnl Check for specific struct in given header file -dnl Usage: ACE_CHECK_STRUCT(STRUCTURE, INCLUDE, -dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) -dnl This macro can only check for one struct in one header file at a time!! -AC_DEFUN([ACE_CHECK_STRUCT], -[ -dnl AC_REQUIRE([AC_PROG_CXX]) -dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_LANG([C++]) -dnl AC_REQUIRE([AC_LANG]) - -dnl Do the transliteration at runtime so arg 1 can be a shell variable. -dnl ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` - - ACE_CACHE_CHECK([for struct $1 in $2], [ace_cv_struct_$1], - [ - ACE_TRY_COMPILE_STRUCT([$1], [$2], - [ - ace_cv_struct_$1=yes - ], - [ - ace_cv_struct_$1=no - ]) - ], $3, $4) -]) - -dnl Check for specific struct in given header file by compiling a test -dnl program. This macro is used by ACE_CHECK_STRUCT. -dnl Usage: ACE_TRY_COMPILE_STRUCT(STRUCTURE, INCLUDE, -dnl [ACTION-IF-SUCCESSFUL[, ACTION-IF-NOT-SUCCESSFUL]]) -dnl This macro can only check for one struct in one header file at a time!! -AC_DEFUN([ACE_TRY_COMPILE_STRUCT], -[ -dnl AC_REQUIRE([AC_PROG_CXX]) -dnl AC_REQUIRE([AC_PROG_CXXCPP]) -dnl AC_LANG([C++]) -dnl AC_REQUIRE([AC_LANG]) - - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include <$2> - ]], [[ - struct $1 ace_$1; - ]])],[ - $3 - ],[ -dnl Some compilers don't like the "struct" but we need the struct for -dnl some platforms to resolve ambiguities between functions and -dnl structures with with the same name. So, we try the same test but -dnl without "struct" if the above test with "struct" fails. If both -dnl tests fail, then we can be reasonably sure that we don't have the -dnl structure we are testing for. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[ -#include <$2> - ]], - [[ - $1 ace_$1; - ]])], - [ - $3 - ], - [ - $4 - ]) - ]) -]) - dnl checks for variables dnl checks for compiler characteristics @@ -492,6 +399,22 @@ dnl Check for 64 bit llseek() or lseek64() dnl Usage: ACE_CHECK_LSEEK64 AC_DEFUN([ACE_CHECK_LSEEK64], [ + AH_TEMPLATE([ACE_HAS_LSEEK64], + [Platform supports lseek64(). This should not be defined if + ACE_HAS_LLSEEK is defined.]) + + AH_TEMPLATE([ACE_LACKS_LSEEK64_PROTOTYPE], + [Platform/compiler lacks the lseek64() prototype. This should not + be defined if ACE_LACKS_LLSEEK_PROTOTYPE is defined.]) + + AH_TEMPLATE([ACE_HAS_LLSEEK], + [Platform supports llseek(). This should not be defined if + ACE_HAS_LSEEK64 is defined.]) + + AH_TEMPLATE([ACE_LACKS_LLSEEK_PROTOTYPE], + [Platform/compiler lacks the llseek() prototype. This should not + be defined if ACE_LACKS_LSEEK64_PROTOTYPE is defined.]) + AC_CHECK_FUNC([lseek64], [ AC_DEFINE([ACE_HAS_LSEEK64]) @@ -599,4 +522,4 @@ dnl mismatched parentheses. dnl checks for structures -dnl checks for system services +dnl checks for system services
\ No newline at end of file diff --git a/dep/ACE_wrappers/m4/config_h.m4 b/dep/ACE_wrappers/m4/config_h.m4 index 6338b290f49..f99a82874ea 100644 --- a/dep/ACE_wrappers/m4/config_h.m4 +++ b/dep/ACE_wrappers/m4/config_h.m4 @@ -1,5 +1,5 @@ dnl ------------------------------------------------------------------------- -dnl $Id: config_h.m4 82277 2008-07-09 17:45:59Z jtc $ +dnl $Id: config_h.m4 82833 2008-09-25 18:28:53Z jtc $ dnl dnl config_h.m4 dnl @@ -7,6 +7,13 @@ dnl ACE M4 include file which contains preprocessor constants dnl and other items to be place in the generated ace/config.h dnl header. dnl +dnl Please try to avoid adding new autoheader templates to this +dnl file, as they get included in both ACE and TAO config.h.in +dnl files, even though the cooresponding feature tests are only +dnl included in the ACE configure script. Put the autoheader +dnl template in a AC_DEFUN used for the feature test, or use the +dnl AC_DEFINE macro's third argument. +dnl dnl ------------------------------------------------------------------------- dnl Copyright (C) 2002, 2003 Ossama Othman @@ -335,17 +342,6 @@ AH_TEMPLATE([ACE_HAS_GPERF], AH_TEMPLATE([ACE_HAS_HANDLE_SET_OPTIMIZED_FOR_SELECT], [Optimize ACE_Handle_Set::count_bits for select() operations (common case)]) -AH_TEMPLATE([ACE_HAS_LSEEK64], -[Platform supports lseek64(). This should not be defined if - ACE_HAS_LLSEEK is defined.]) - -AH_TEMPLATE([ACE_HAS_LLSEEK], -[Platform supports llseek(). This should not be defined if - ACE_HAS_LSEEK64 is defined.]) - -AH_TEMPLATE([ACE_HAS_HI_RES_TIMER], -[Compiler/platform supports SunOS high resolution timers]) - AH_TEMPLATE([ACE_HAS_INLINED_OSCALLS],[ Inline all the static class OS methods to remove call overhead Note: This gets defined by OS.h if __ACE_INLINE__ is defined]) @@ -473,8 +469,6 @@ AH_TEMPLATE([ACE_HAS_PROC_FS], [Platform supports the /proc file system and defines tid_t in <sys/procfs.h>]) -AH_TEMPLATE([ACE_HAS_PRUSAGE_T],[Platform supports the prusage_t struct]) - AH_TEMPLATE([ACE_HAS_PTHREADS_UNIX98_EXT], [Platform has the UNIX98 extensions to Pthreads (rwlocks)]) @@ -568,8 +562,6 @@ AH_TEMPLATE([ACE_HAS_THR_YIELD],[Platform has thr_yield()]) AH_TEMPLATE([ACE_HAS_STANDARD_CPP_LIBRARY], [Platform/compiler supports Standard C++ Library]) -AH_TEMPLATE([ACE_HAS_STRBUF_T],[Compiler/platform supports struct strbuf]) - AH_TEMPLATE([ACE_HAS_STREAMS],[Platform supports STREAMS]) AH_TEMPLATE([ACE_HAS_STREAM_PIPES],[Platform supports STREAM pipes]) @@ -598,9 +590,6 @@ AH_TEMPLATE([ACE_HAS_SVR4_SIGNAL_T], AH_TEMPLATE([ACE_HAS_SVR4_TLI], [Compiler/platform supports SVR4 TLI (in particular, T_GETNAME stuff).]) -AH_TEMPLATE([ACE_HAS_SYSINFO], -[Platform supports system configuration information.]) - AH_TEMPLATE([ACE_HAS_SYSV_IPC], [Platform supports System V IPC (most versions of UNIX, but not Win32)]) @@ -717,10 +706,6 @@ AH_TEMPLATE([ACE_LACKS_COND_TIMEDWAIT_RESET], [pthread_cond_timedwait does *not* reset the time argument when the lock is acquired.]) -AH_TEMPLATE([ACE_LACKS_CONDATTR_PSHARED], -[Platform has no implementation of pthread_condattr_setpshared(), even - though it supports pthreads!]) - AH_TEMPLATE([ACE_LACKS_CONST_STRBUF_PTR], [Platform uses struct strbuf * rather than const struct strbuf * (e.g., HP/UX 10.x)]) @@ -732,8 +717,6 @@ AH_TEMPLATE([ACE_LACKS_EXEC], [Platform lacks the exec() family of system calls (e.g., Win32, VxWorks, Chorus)]) -AH_TEMPLATE([ACE_LACKS_FILELOCKS],[Platform lacks file locking mechanism]) - AH_TEMPLATE([ACE_LACKS_GETSERVBYNAME], [Platforms lacks getservbyname() (e.g., VxWorks and Chorus).]) @@ -758,9 +741,6 @@ AH_TEMPLATE([ACE_LACKS_MODE_MASKS], AH_TEMPLATE([ACE_LACKS_MSG_ACCRIGHTS], [Platform defines ACE_HAS_MSG, but lacks msg_accrights{len}.]) -AH_TEMPLATE([ACE_LACKS_MUTEXATTR_PSHARED], -[Platform lacks pthread_mutexattr_setpshared().]) - AH_TEMPLATE([ACE_LACKS_NULL_PTHREAD_STATUS], [OS requires non-null status pointer for pthread_join ()]) @@ -770,19 +750,10 @@ AH_TEMPLATE([ACE_HAS_MUTEX_TIMEOUTS], AH_TEMPLATE([ACE_LACKS_NAMED_POSIX_SEM], [Platform lacks named POSIX semaphores (e.g., Chorus)]) -AH_TEMPLATE([ACE_LACKS_STRPTIME], -[Platform lacks native strptime() implementation.]) - AH_TEMPLATE([ACE_LACKS_RLIMIT], [Platform/compiler lacks {get,set}rlimit() function (e.g., VxWorks, Chorus, and SCO UNIX)]) -AH_TEMPLATE([ACE_LACKS_RWLOCKATTR_PSHARED], -[Platform lacks pthread_rwlockattr_setpshared().]) - -AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_NEW], -[Compiler doesn't support placement operator new(size_t, void *).]) - AH_TEMPLATE([ACE_LACKS_PLACEMENT_OPERATOR_DELETE], [Compiler doesn't support placement operator delete(void *, void *).]) @@ -797,39 +768,21 @@ AH_TEMPLATE([ACE_LACKS_PWD_FUNCTIONS], AH_TEMPLATE([ACE_LACKS_PWD_REENTRANT_FUNCTIONS], [Platform lacks getpwnam_r() methods (e.g., SGI 6.2).]) -AH_TEMPLATE([ACE_LACKS_RWLOCK_T],[Platform lacks readers/writer locks.]) - -AH_TEMPLATE([ACE_LACKS_SEMBUF_T], -[Platform lacks struct sembuf (e.g., Win32 and VxWorks)]) - AH_TEMPLATE([ACE_LACKS_SETDETACH], [Platform lacks pthread_attr_setdetachstate() (e.g., HP/UX 10.x)]) AH_TEMPLATE([ACE_LACKS_SETSCHED], [Platform lacks pthread_attr_setsched() (e.g. MVS)]) -AH_TEMPLATE([ACE_LACKS_SIGACTION], -[Platform lacks struct sigaction (e.g., Win32 and Chorus)]) - AH_TEMPLATE([ACE_LACKS_SIGNED_CHAR], [Platform lacks "signed char" type (broken!)]) -AH_TEMPLATE([ACE_LACKS_SIGSET], -[Platform lacks signal sets (e.g., Chorus and Win32)]) - -AH_TEMPLATE([ACE_LACKS_STRUCT_DIR], -[Platform lacks dirent structure.]) - AH_TEMPLATE([ACE_LACKS_SYS_MSG_H], [Platform lacks sys/msg.h (e.g., Chorus and VxWorks)]) AH_TEMPLATE([ACE_LACKS_SYSV_MSQ_PROTOS], [Platform lacks SYSV message queue prototypes]) -AH_TEMPLATE([ACE_LACKS_SI_ADDR], -[Platform lacks the si_addr field of siginfo_t (e.g., VxWorks and - HP/UX 10.x)]) - AH_TEMPLATE([ACE_LACKS_SYSV_SHMEM], [Platform lacks System V shared memory (e.g., Win32 and VxWorks)]) @@ -839,8 +792,6 @@ AH_TEMPLATE([ACE_LACKS_SOCKET_BUFSIZ], AH_TEMPLATE([ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES], [Compiler doesn't support static data member templates]) -AH_TEMPLATE([ACE_LACKS_STRRECVFD],[Platform doesn't define struct strrecvfd.]) - AH_TEMPLATE([ACE_LACKS_T_ERRNO],[Header files lack t_errno for TLI]) AH_TEMPLATE([ACE_LACKS_TCP_NODELAY],[OS does not support TCP_NODELAY]) @@ -854,14 +805,6 @@ AH_TEMPLATE([ACE_LACKS_TIMESPEC_T], AH_TEMPLATE([ACE_LACKS_STRTOK_R_PROTOTYPE], [Platform/compiler lacks the strtok_r() prototype]) -AH_TEMPLATE([ACE_LACKS_LSEEK64_PROTOTYPE], -[Platform/compiler lacks the lseek64() prototype. This should not - be defined if ACE_LACKS_LLSEEK_PROTOTYPE is defined.]) - -AH_TEMPLATE([ACE_LACKS_LLSEEK_PROTOTYPE], -[Platform/compiler lacks the llseek() prototype. This should not - be defined if ACE_LACKS_LSEEK64_PROTOTYPE is defined.]) - AH_TEMPLATE([ACE_LACKS_PREAD_PROTOTYPE], [Platform/compiler lacks the pread() and pwrite() prototypes]) @@ -881,9 +824,6 @@ AH_TEMPLATE([ACE_LACKS_UNIX_DOMAIN_SOCKETS], AH_TEMPLATE([ACE_LACKS_UNIX_SIGNALS], [Platform lacks full signal support (e.g., Win32 and Chorus).]) -AH_TEMPLATE([ACE_LACKS_UTSNAME_T], -[Platform lacks struct utsname (e.g., Win32 and VxWorks)]) - AH_TEMPLATE([ACE_MAIN], [Renames "main (int, char *[])", for platforms such as g++/VxWorks that don't allow main. Requires the use of @@ -973,4 +913,4 @@ dnl ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) dnl ACE_IMPORT_SINGLETON_DECLARATION(T) dnl ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) -]) dnl End ACE_PREP_CONFIG_HEADER +]) dnl End ACE_PREP_CONFIG_HEADER
\ No newline at end of file diff --git a/sql/characters.sql b/sql/characters.sql index d25e000ebdc..429b4c0508a 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -608,7 +608,7 @@ CREATE TABLE `characters` ( `trans_z` float NOT NULL default '0', `trans_o` float NOT NULL default '0', `transguid` bigint(20) unsigned NOT NULL default '0', - `gmstate` tinyint(3) unsigned NOT NULL default '0', + `extra_flags` tinyint(3) unsigned NOT NULL default '0', `stable_slots` tinyint(1) unsigned NOT NULL default '0', `at_login` int(11) unsigned NOT NULL default '0', `zone` int(11) unsigned NOT NULL default '0', diff --git a/sql/updates/79_characters.sql b/sql/updates/79_characters.sql new file mode 100644 index 00000000000..d2f29d734d6 --- /dev/null +++ b/sql/updates/79_characters.sql @@ -0,0 +1,2 @@ +ALTER TABLE characters
+ CHANGE COLUMN gmstate extra_flags int(11) unsigned NOT NULL default '0';
\ No newline at end of file diff --git a/sql/updates/79_world.sql b/sql/updates/79_world.sql new file mode 100644 index 00000000000..2a61c2f6a09 --- /dev/null +++ b/sql/updates/79_world.sql @@ -0,0 +1,6 @@ +DELETE FROM spell_proc_event where entry = 42083;
+INSERT INTO spell_proc_event (entry, SchoolMask, Category, SkillID, SpellFamilyName, SpellFamilyMask, procFlags, ppmRate, cooldown) VALUES
+(42083,0,0,0,0,0x0000000000000000,0x00401000,0,45);
+
+ALTER TABLE characters
+ CHANGE COLUMN gmstate extra_flags int(11) unsigned NOT NULL default '0';
\ No newline at end of file diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index d86bf7734a0..36e0720a08d 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -61,7 +61,7 @@ bool LoginQueryHolder::Initialize() // NOTE: all fields in `characters` must be read to prevent lost character data at next save in case wrong DB structure. // !!! NOTE: including unused `zone`,`online` - res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADFROM, "SELECT guid, account, data, name, race, class, position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, gmstate, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid)); + res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADFROM, "SELECT guid, account, data, name, race, class, position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extra_flags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty FROM characters WHERE guid = '%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGROUP, "SELECT leaderGuid FROM group_member WHERE memberGuid ='%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADBOUNDINSTANCES, "SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", GUID_LOPART(m_guid)); res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADAURAS, "SELECT caster_guid,spell,effect_index,amount,maxduration,remaintime,remaincharges FROM character_aura WHERE guid = '%u'", GUID_LOPART(m_guid)); diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 32413aba503..5aa67b645fd 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -13664,7 +13664,7 @@ float Player::GetFloatValueFromDB(uint16 index, uint64 guid) bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) { //// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 [28] [29] 30 31 32 - //QueryResult *result = CharacterDatabase.PQuery("SELECT guid, account, data, name, race, class, position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, gmstate, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty FROM characters WHERE guid = '%u'", guid); + //QueryResult *result = CharacterDatabase.PQuery("SELECT guid, account, data, name, race, class, position_x, position_y, position_z, map, orientation, taximask, cinematic, totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, trans_x, trans_y, trans_z, trans_o, transguid, extraflags, stable_slots, at_login, zone, online, death_expire_time, taxi_path, dungeon_difficulty FROM characters WHERE guid = '%u'", guid); QueryResult *result = holder->GetResult(PLAYER_LOGIN_QUERY_LOADFROM); if(!result) @@ -13899,7 +13899,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) m_taxi.LoadTaxiMask( fields[11].GetString() ); // must be before InitTaxiNodesForLevel - uint32 gmstate = fields[25].GetUInt32(); + uint32 extraflags = fields[25].GetUInt32(); m_stableSlots = fields[26].GetUInt32(); if(m_stableSlots > 2) @@ -14089,7 +14089,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) case 0: break; // disable case 1: SetGameMaster(true); break; // enable case 2: // save state - if(gmstate & PLAYER_EXTRA_GM_ON) + if(extraflags & PLAYER_EXTRA_GM_ON) SetGameMaster(true); break; } @@ -14100,7 +14100,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) case 0: break; // disable case 1: SetAcceptTicket(true); break; // enable case 2: // save state - if(gmstate & PLAYER_EXTRA_GM_ACCEPT_TICKETS) + if(extraflags & PLAYER_EXTRA_GM_ACCEPT_TICKETS) SetAcceptTicket(true); break; } @@ -14111,7 +14111,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) case 0: break; // disable case 1: SetGMChat(true); break; // enable case 2: // save state - if(gmstate & PLAYER_EXTRA_GM_CHAT) + if(extraflags & PLAYER_EXTRA_GM_CHAT) SetGMChat(true); break; } @@ -14122,7 +14122,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder ) case 0: break; // disable case 1: SetAcceptWhispers(true); break; // enable case 2: // save state - if(gmstate & PLAYER_EXTRA_ACCEPT_WHISPERS) + if(extraflags & PLAYER_EXTRA_ACCEPT_WHISPERS) SetAcceptWhispers(true); break; } @@ -15109,7 +15109,7 @@ void Player::SaveToDB() "map, dungeon_difficulty, position_x, position_y, position_z, orientation, data, " "taximask, online, cinematic, " "totaltime, leveltime, rest_bonus, logout_time, is_logout_resting, resettalents_cost, resettalents_time, " - "trans_x, trans_y, trans_z, trans_o, transguid, gmstate, stable_slots, at_login, zone, " + "trans_x, trans_y, trans_z, trans_o, transguid, extraflags, stable_slots, at_login, zone, " "death_expire_time, taxi_path) VALUES (" << GetGUIDLow() << ", " << GetSession()->GetAccountId() << ", '" diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 600d9a27cf1..f0c67b66918 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -1953,7 +1953,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) case 43873: // Headless Horseman Laugh if(caster->GetTypeId() == TYPEID_PLAYER) { - ((Player*)caster)->PlaySound(11965, false); + ((Player*)caster)->SendPlaySound(11965, false); } return; case 46354: // Blood Elf Illusion diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 51991c01d2d..24acc4c18f8 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7764,7 +7764,9 @@ uint32 Unit::SpellHealingBonus(SpellEntry const *spellProto, uint32 healamount, // Healing Done // These Spells are doing fixed amount of healing (TODO found less hack-like check) - if(spellProto->Id == 15290 || spellProto->Id == 39373 || spellProto->Id == 33778 || spellProto->Id == 379 || spellProto->Id == 38395) + if (spellProto->Id == 15290 || spellProto->Id == 39373 || + spellProto->Id == 33778 || spellProto->Id == 379 || + spellProto->Id == 38395 || spellProto->Id == 40972) return healamount; diff --git a/src/game/WorldSocketMgr.cpp b/src/game/WorldSocketMgr.cpp index c431bf21b73..7d4a7e84078 100644 --- a/src/game/WorldSocketMgr.cpp +++ b/src/game/WorldSocketMgr.cpp @@ -362,7 +362,6 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock) return m_NetThreads[min].AddSocket (sock); - return 0; } WorldSocketMgr* diff --git a/src/trinityrealm/AuthSocket.cpp b/src/trinityrealm/AuthSocket.cpp index b06ac605e4f..4be14a52d30 100644 --- a/src/trinityrealm/AuthSocket.cpp +++ b/src/trinityrealm/AuthSocket.cpp @@ -137,7 +137,7 @@ typedef struct XFER_INIT { uint8 cmd; // XFER_INITIATE uint8 fileNameLen; // strlen(fileName); - uint8 fileName[1]; // fileName[fileNameLen] + uint8 fileName[5]; // fileName[fileNameLen] uint64 file_size; // file size (bytes) uint8 md5[MD5_DIGEST_LENGTH]; // MD5 }XFER_INIT; @@ -217,7 +217,7 @@ AuthSocket::AuthSocket(ISocketHandler &h) : TcpSocket(h) N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7"); g.SetDword(7); _authed = false; - pPatch=NULL; + pPatch = NULL; _accountSecurityLevel = SEC_PLAYER; } @@ -225,6 +225,7 @@ AuthSocket::AuthSocket(ISocketHandler &h) : TcpSocket(h) /// Close patch file descriptor before leaving AuthSocket::~AuthSocket() { + ZThread::Guard<ZThread::Mutex> g(patcherLock); if(pPatch) fclose(pPatch); } @@ -360,6 +361,7 @@ bool AuthSocket::_HandleLogonChallenge() ByteBuffer pkt; _login = (const char*)ch->I; + _build = ch->build; ///- Normalize account name //utf8ToUpperOnlyLatin(_login); -- client already send account in expected form @@ -369,154 +371,169 @@ bool AuthSocket::_HandleLogonChallenge() _safelogin=_login; dbRealmServer.escape_string(_safelogin); - ///- Check if the client has one of the expected version numbers - bool valid_version=false; - int accepted_versions[]=EXPECTED_TRINITY_CLIENT_BUILD; - for(int i=0;accepted_versions[i];i++) - if(ch->build==accepted_versions[i]) + pkt << (uint8) AUTH_LOGON_CHALLENGE; + pkt << (uint8) 0x00; + + ///- Verify that this IP is not in the ip_banned table + // No SQL injection possible (paste the IP address as passed by the socket) + dbRealmServer.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + + std::string address = GetRemoteAddress(); + dbRealmServer.escape_string(address); + QueryResult *result = dbRealmServer.PQuery( "SELECT * FROM ip_banned WHERE ip = '%s'",address.c_str()); + if(result) { - valid_version=true; - break; + pkt << (uint8)REALM_AUTH_ACCOUNT_BANNED; + sLog.outBasic("[AuthChallenge] Banned ip %s tries to login!",GetRemoteAddress().c_str ()); + delete result; } - - /// <ul><li> if this is a valid version - if(valid_version) + else { - pkt << (uint8) AUTH_LOGON_CHALLENGE; - pkt << (uint8) 0x00; + ///- Get the account details from the account table + // No SQL injection (escaped user name) - ///- Verify that this IP is not in the ip_banned table - // No SQL injection possible (paste the IP address as passed by the socket) - dbRealmServer.Execute("DELETE FROM ip_banned WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); - - std::string address = GetRemoteAddress(); - dbRealmServer.escape_string(address); - QueryResult *result = dbRealmServer.PQuery( "SELECT * FROM ip_banned WHERE ip = '%s'",address.c_str()); - if(result) - { - pkt << (uint8)REALM_AUTH_ACCOUNT_BANNED; - sLog.outBasic("[AuthChallenge] Banned ip %s tries to login!",GetRemoteAddress().c_str ()); - delete result; - } - else + result = dbRealmServer.PQuery("SELECT sha_pass_hash,id,locked,last_ip,gmlevel FROM account WHERE username = '%s'",_safelogin.c_str ()); + if( result ) { - ///- Get the account details from the account table - // No SQL injection (escaped user name) - - result = dbRealmServer.PQuery("SELECT sha_pass_hash,id,locked,last_ip,gmlevel FROM account WHERE username = '%s'",_safelogin.c_str ()); - if( result ) + ///- If the IP is 'locked', check that the player comes indeed from the correct IP address + bool locked = false; + if((*result)[2].GetUInt8() == 1) // if ip is locked { - ///- If the IP is 'locked', check that the player comes indeed from the correct IP address - bool locked = false; - if((*result)[2].GetUInt8() == 1) // if ip is locked + DEBUG_LOG("[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), (*result)[3].GetString()); + DEBUG_LOG("[AuthChallenge] Player address is '%s'", GetRemoteAddress().c_str()); + if ( strcmp((*result)[3].GetString(),GetRemoteAddress().c_str()) ) { - DEBUG_LOG("[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), (*result)[3].GetString()); - DEBUG_LOG("[AuthChallenge] Player address is '%s'", GetRemoteAddress().c_str()); - if ( strcmp((*result)[3].GetString(),GetRemoteAddress().c_str()) ) - { - DEBUG_LOG("[AuthChallenge] Account IP differs"); - pkt << (uint8) REALM_AUTH_ACCOUNT_FREEZED; - locked=true; - } - else - { - DEBUG_LOG("[AuthChallenge] Account IP matches"); - } + DEBUG_LOG("[AuthChallenge] Account IP differs"); + pkt << (uint8) REALM_AUTH_ACCOUNT_FREEZED; + locked=true; } else { - DEBUG_LOG("[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); + DEBUG_LOG("[AuthChallenge] Account IP matches"); } + } + else + { + DEBUG_LOG("[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); + } - if (!locked) + if (!locked) + { + //set expired bans to inactive + dbRealmServer.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); + ///- If the account is banned, reject the logon attempt + QueryResult *banresult = dbRealmServer.PQuery("SELECT bandate,unbandate FROM account_banned WHERE id = %u AND active = 1", (*result)[1].GetUInt32()); + if(banresult) { - //set expired bans to inactive - dbRealmServer.Execute("UPDATE account_banned SET active = 0 WHERE unbandate<=UNIX_TIMESTAMP() AND unbandate<>bandate"); - ///- If the account is banned, reject the logon attempt - QueryResult *banresult = dbRealmServer.PQuery("SELECT bandate,unbandate FROM account_banned WHERE id = %u AND active = 1", (*result)[1].GetUInt32()); - if(banresult) + if((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64()) { - if((*banresult)[0].GetUInt64() == (*banresult)[1].GetUInt64()) - { - pkt << (uint8) REALM_AUTH_ACCOUNT_BANNED; - sLog.outBasic("[AuthChallenge] Banned account %s tries to login!",_login.c_str ()); - } - else - { - pkt << (uint8) REALM_AUTH_ACCOUNT_FREEZED; - sLog.outBasic("[AuthChallenge] Temporarily banned account %s tries to login!",_login.c_str ()); - } - - delete banresult; + pkt << (uint8) REALM_AUTH_ACCOUNT_BANNED; + sLog.outBasic("[AuthChallenge] Banned account %s tries to login!",_login.c_str ()); } else { - ///- Get the password from the account table, upper it, and make the SRP6 calculation - std::string rI = (*result)[0].GetCppString(); - _SetVSFields(rI); + pkt << (uint8) REALM_AUTH_ACCOUNT_FREEZED; + sLog.outBasic("[AuthChallenge] Temporarily banned account %s tries to login!",_login.c_str ()); + } - b.SetRand(19 * 8); - BigNumber gmod=g.ModExp(b, N); - B = ((v * 3) + gmod) % N; + delete banresult; + } + else + { + ///- Get the password from the account table, upper it, and make the SRP6 calculation + std::string rI = (*result)[0].GetCppString(); + _SetVSFields(rI); - ASSERT(gmod.GetNumBytes() <= 32); + b.SetRand(19 * 8); + BigNumber gmod=g.ModExp(b, N); + B = ((v * 3) + gmod) % N; - BigNumber unk3; - unk3.SetRand(16*8); + ASSERT(gmod.GetNumBytes() <= 32); - ///- Fill the response packet with the result - pkt << (uint8)REALM_AUTH_SUCCESS; + BigNumber unk3; + unk3.SetRand(16*8); - // B may be calculated < 32B so we force minnimal length to 32B - pkt.append(B.AsByteArray(32), 32); // 32 bytes - pkt << (uint8)1; - pkt.append(g.AsByteArray(), 1); - pkt << (uint8)32; - pkt.append(N.AsByteArray(), 32); - pkt.append(s.AsByteArray(), s.GetNumBytes()); // 32 bytes - pkt.append(unk3.AsByteArray(), 16); - pkt << (uint8)0; // Added in 1.12.x client branch + ///- Fill the response packet with the result + pkt << (uint8)REALM_AUTH_SUCCESS; - uint8 secLevel = (*result)[4].GetUInt8(); - _accountSecurityLevel = secLevel <= SEC_ADMINISTRATOR ? AccountTypes(secLevel) : SEC_ADMINISTRATOR; + // B may be calculated < 32B so we force minnimal length to 32B + pkt.append(B.AsByteArray(32), 32); // 32 bytes + pkt << (uint8)1; + pkt.append(g.AsByteArray(), 1); + pkt << (uint8)32; + pkt.append(N.AsByteArray(), 32); + pkt.append(s.AsByteArray(), s.GetNumBytes()); // 32 bytes + pkt.append(unk3.AsByteArray(), 16); + pkt << (uint8)0; // Added in 1.12.x client branch - std::string localeName; - localeName.resize(4); - for(int i = 0; i <4; ++i) - localeName[i] = ch->country[4-i-1]; + uint8 secLevel = (*result)[4].GetUInt8(); + _accountSecurityLevel = secLevel <= SEC_ADMINISTRATOR ? AccountTypes(secLevel) : SEC_ADMINISTRATOR; - _localization = GetLocaleByName(localeName); + _localizationName.resize(4); + for(int i = 0; i <4; ++i) + _localizationName[i] = ch->country[4-i-1]; - sLog.outBasic("[AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", _login.c_str (), ch->country[3],ch->country[2],ch->country[1],ch->country[0], _localization); - } + sLog.outBasic("[AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", _login.c_str (), ch->country[3],ch->country[2],ch->country[1],ch->country[0], GetLocaleByName(_localizationName)); } - delete result; - } - else //no account - { - pkt<< (uint8) REALM_AUTH_NO_MATCH; } + delete result; } - } //valid version - else - ///<li> else + else //no account + { + pkt<< (uint8) REALM_AUTH_NO_MATCH; + } + } + SendBuf((char const*)pkt.contents(), pkt.size()); + return true; +} + +/// Logon Proof command handler +bool AuthSocket::_HandleLogonProof() +{ + DEBUG_LOG("Entering _HandleLogonProof"); + ///- Read the packet + if (ibuf.GetLength() < sizeof(sAuthLogonProof_C)) + return false; + sAuthLogonProof_C lp; + ibuf.Read((char *)&lp, sizeof(sAuthLogonProof_C)); + + ///- Check if the client has one of the expected version numbers + bool valid_version=false; + int accepted_versions[]=EXPECTED_TRINITY_CLIENT_BUILD; + for(int i=0;accepted_versions[i];i++) + { + if(_build==accepted_versions[i]) + { + valid_version=true; + break; + } + } + + /// <ul><li> If the client has no valid version + if(!valid_version) { ///- Check if we have the apropriate patch on the disk - char tmp[64]; + + // 24 = len("./patches/65535enGB.mpq")+1 + char tmp[24]; // No buffer overflow (fixed length of arguments) - sprintf(tmp,"./patches/%d%c%c%c%c.mpq",ch->build,ch->country[3], - ch->country[2],ch->country[1],ch->country[0]); + sprintf(tmp,"./patches/%d%s.mpq",_build, _localizationName.c_str()); // This will be closed at the destruction of the AuthSocket (client deconnection) FILE *pFile=fopen(tmp,"rb"); + if(!pFile) { + ByteBuffer pkt; pkt << (uint8) AUTH_LOGON_CHALLENGE; pkt << (uint8) 0x00; pkt << (uint8) REALM_AUTH_WRONG_BUILD_NUMBER; - DEBUG_LOG("[AuthChallenge] %u is not a valid client version!", ch->build); + DEBUG_LOG("[AuthChallenge] %u is not a valid client version!", _build); DEBUG_LOG("[AuthChallenge] Patch %s not found",tmp); - }else - { //have patch + SendBuf((char const*)pkt.contents(), pkt.size()); + return true; + } + else // have patch + { pPatch=pFile; XFER_INIT xferh; @@ -546,20 +563,6 @@ bool AuthSocket::_HandleLogonChallenge() } } /// </ul> - SendBuf((char const*)pkt.contents(), pkt.size()); - return true; -} - -/// Logon Proof command handler -bool AuthSocket::_HandleLogonProof() -{ - DEBUG_LOG("Entering _HandleLogonProof"); - ///- Read the packet - if (ibuf.GetLength() < sizeof(sAuthLogonProof_C)) - return false; - - sAuthLogonProof_C lp; - ibuf.Read((char *)&lp, sizeof(sAuthLogonProof_C)); ///- Continue the SRP6 calculation based on data received from the client BigNumber A; @@ -638,7 +641,7 @@ bool AuthSocket::_HandleLogonProof() ///- Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account // No SQL injection (escaped user name) and IP address as received by socket const char* K_hex = K.AsHexStr(); - dbRealmServer.PExecute("UPDATE account SET sessionkey = '%s', last_ip = '%s', last_login = NOW(), locale = '%u', failed_logins = 0 WHERE username = '%s'", K_hex, GetRemoteAddress().c_str(), _localization, _safelogin.c_str() ); + dbRealmServer.PExecute("UPDATE account SET sessionkey = '%s', last_ip = '%s', last_login = NOW(), locale = '%u', failed_logins = 0 WHERE username = '%s'", K_hex, GetRemoteAddress().c_str(), GetLocaleByName(_localizationName), _safelogin.c_str() ); OPENSSL_free((void*)K_hex); ///- Finish SRP6 and send the final result to the client @@ -684,7 +687,7 @@ bool AuthSocket::_HandleLogonProof() if(WrongPassBanType) { uint32 acc_id = fields[0].GetUInt32(); - dbRealmServer.PExecute("INSERT INTO account_banned VALUES ('%u',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','Trinity realm','Failed login autoban',1)", + dbRealmServer.PExecute("INSERT INTO account_banned VALUES ('%u',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','Trinity realmd','Failed login autoban',1)", acc_id, WrongPassBanTime); sLog.outBasic("[AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", _login.c_str(), WrongPassBanTime, failed_logins); @@ -693,7 +696,7 @@ bool AuthSocket::_HandleLogonProof() { std::string current_ip = GetRemoteAddress(); dbRealmServer.escape_string(current_ip); - dbRealmServer.PExecute("INSERT INTO ip_banned VALUES ('%s',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','Trinity realm','Failed login autoban')", + dbRealmServer.PExecute("INSERT INTO ip_banned VALUES ('%s',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','Trinity realmd','Failed login autoban')", current_ip.c_str(), WrongPassBanTime); sLog.outBasic("[AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times", current_ip.c_str(), WrongPassBanTime, _login.c_str(), failed_logins); @@ -850,6 +853,7 @@ PatcherRunnable::PatcherRunnable(class AuthSocket * as) /// Send content of patch file to the client void PatcherRunnable::run() { + ZThread::Guard<ZThread::Mutex> g(mySocket->patcherLock); XFER_DATA_STRUCT xfdata; xfdata.opcode = XFER_DATA; @@ -868,7 +872,7 @@ void PatcherRunnable::run() /// Preload MD5 hashes of existing patch files on server #ifndef _WIN32 -#include <sys/dir.h> +#include <dirent.h> #include <errno.h> void Patcher::LoadPatchesInfo() { @@ -911,10 +915,11 @@ void Patcher::LoadPatchesInfo() if(hFil==INVALID_HANDLE_VALUE) return; //no patches were found - LoadPatchMD5(fil.cFileName); - - while(FindNextFile(hFil,&fil)) + do + { LoadPatchMD5(fil.cFileName); + } + while(FindNextFile(hFil,&fil)); } #endif diff --git a/src/trinityrealm/AuthSocket.h b/src/trinityrealm/AuthSocket.h index b58f1d79eec..ab9c2cf3da9 100644 --- a/src/trinityrealm/AuthSocket.h +++ b/src/trinityrealm/AuthSocket.h @@ -33,6 +33,7 @@ #include "sockets/Utility.h" #include "sockets/Parse.h" #include "sockets/Socket.h" +#include "zthread/Mutex.h" /// Handle login commands class AuthSocket: public TcpSocket @@ -58,6 +59,7 @@ class AuthSocket: public TcpSocket void _SetVSFields(std::string rI); FILE *pPatch; + ZThread::Mutex patcherLock; bool IsLag(); private: @@ -70,7 +72,12 @@ class AuthSocket: public TcpSocket std::string _login; std::string _safelogin; - uint8 _localization; + + + // Since GetLocaleByName() is _NOT_ bijective, we have to store the locale as a string. Otherwise we can't differ + // between enUS and enGB, which is important for the patch system + std::string _localizationName; + uint16 _build; AccountTypes _accountSecurityLevel; }; #endif diff --git a/win/VC71/framework.vcproj b/win/VC71/framework.vcproj index deb0e818a4c..59f4f13ea48 100644 --- a/win/VC71/framework.vcproj +++ b/win/VC71/framework.vcproj @@ -22,7 +22,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl" Optimization="0" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB" MinimalRebuild="FALSE" BasicRuntimeChecks="3" @@ -73,7 +73,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="TRUE" MinimalRebuild="FALSE" diff --git a/win/VC80/framework.vcproj b/win/VC80/framework.vcproj index ee9f7d29748..ded3a7cea6d 100644 --- a/win/VC80/framework.vcproj +++ b/win/VC80/framework.vcproj @@ -46,7 +46,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" Optimization="0" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB" MinimalRebuild="false" BasicRuntimeChecks="3" @@ -121,7 +121,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" Optimization="0" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB" MinimalRebuild="false" BasicRuntimeChecks="3" @@ -195,7 +195,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="true" MinimalRebuild="false" @@ -271,7 +271,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="true" MinimalRebuild="false" diff --git a/win/VC90/framework.vcproj b/win/VC90/framework.vcproj index 0e29784c84d..d97305588a6 100644 --- a/win/VC90/framework.vcproj +++ b/win/VC90/framework.vcproj @@ -47,7 +47,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" Optimization="0" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB" MinimalRebuild="false" BasicRuntimeChecks="3" @@ -123,7 +123,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="true" MinimalRebuild="false" @@ -200,7 +200,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" Optimization="0" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;_DEBUG;MANGOS_DEBUG;_LIB" MinimalRebuild="false" BasicRuntimeChecks="3" @@ -277,7 +277,7 @@ Name="VCCLCompilerTool" AdditionalOptions="/Zl /MP" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="..\..\src\framework" + AdditionalIncludeDirectories="..\..\src\framework;..\..\dep\ACE_wrappers" PreprocessorDefinitions="WIN32;NDEBUG;_LIB" StringPooling="true" MinimalRebuild="false" |