diff options
Diffstat (limited to 'src/trinitycore')
-rw-r--r-- | src/trinitycore/CMakeLists.txt | 16 | ||||
-rw-r--r-- | src/trinitycore/CliRunnable.cpp | 49 | ||||
-rw-r--r-- | src/trinitycore/CliRunnable.h | 5 | ||||
-rw-r--r-- | src/trinitycore/Main.cpp | 20 | ||||
-rw-r--r-- | src/trinitycore/Makefile.am | 62 | ||||
-rw-r--r-- | src/trinitycore/Master.cpp | 194 | ||||
-rw-r--r-- | src/trinitycore/Master.h | 5 | ||||
-rw-r--r-- | src/trinitycore/RASocket.cpp | 21 | ||||
-rw-r--r-- | src/trinitycore/RASocket.h | 5 | ||||
-rw-r--r-- | src/trinitycore/TrinityCore.rc | 2 | ||||
-rw-r--r-- | src/trinitycore/WorldRunnable.cpp | 27 | ||||
-rw-r--r-- | src/trinitycore/WorldRunnable.h | 5 | ||||
-rw-r--r-- | src/trinitycore/resource.h | 1 | ||||
-rw-r--r-- | src/trinitycore/run-mangosd | 2 | ||||
-rw-r--r-- | src/trinitycore/trinitycore.conf.dist | 421 |
15 files changed, 570 insertions, 265 deletions
diff --git a/src/trinitycore/CMakeLists.txt b/src/trinitycore/CMakeLists.txt index 2c7c4544577..7cd012d9f45 100644 --- a/src/trinitycore/CMakeLists.txt +++ b/src/trinitycore/CMakeLists.txt @@ -2,14 +2,14 @@ ########### next target ############### SET(trinity-core_SRCS -CliRunnable.cpp -CliRunnable.h -Main.cpp -Master.cpp -Master.h -RASocket.cpp -RASocket.h -WorldRunnable.cpp +CliRunnable.cpp +CliRunnable.h +Main.cpp +Master.cpp +Master.h +RASocket.cpp +RASocket.h +WorldRunnable.cpp WorldRunnable.h ) diff --git a/src/trinitycore/CliRunnable.cpp b/src/trinitycore/CliRunnable.cpp index 839358e7034..91f37cd1b48 100644 --- a/src/trinitycore/CliRunnable.cpp +++ b/src/trinitycore/CliRunnable.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -82,19 +82,10 @@ bool ChatHandler::HandleAccountDeleteCommand(const char* args) } /// Commands not recommended call from chat, but support anyway - if(m_session) - { - uint32 targetSecurity = accmgr.GetSecurity(account_id); - - /// can delete only for account with less security - /// This is also reject self apply in fact - if (targetSecurity >= m_session->GetSecurity()) - { - SendSysMessage (LANG_YOURS_SECURITY_IS_LOW); - SetSentErrorMessage (true); - return false; - } - } + /// can delete only for account with less security + /// This is also reject self apply in fact + if(HasLowerSecurityAccount (NULL,account_id,true)) + return false; AccountOpResult result = accmgr.DeleteAccount(account_id); switch(result) @@ -177,12 +168,15 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args) ///- Get the list of accounts ID logged to the realm QueryResult *resultDB = CharacterDatabase.Query("SELECT name,account FROM characters WHERE online > 0"); if (!resultDB) + { + SendSysMessage(LANG_ACCOUNT_LIST_EMPTY); return true; + } ///- Display the list of account/characters online - SendSysMessage("====================================================================="); + SendSysMessage(LANG_ACCOUNT_LIST_BAR); SendSysMessage(LANG_ACCOUNT_LIST_HEADER); - SendSysMessage("====================================================================="); + SendSysMessage(LANG_ACCOUNT_LIST_BAR); ///- Circle through accounts do @@ -199,7 +193,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args) if(resultLogin) { Field *fieldsLogin = resultLogin->Fetch(); - PSendSysMessage("|%15s| %20s | %15s |%4d|%5d|", + PSendSysMessage(LANG_ACCOUNT_LIST_LINE, fieldsLogin[0].GetString(),name.c_str(),fieldsLogin[1].GetString(),fieldsLogin[2].GetUInt32(),fieldsLogin[3].GetUInt32()); delete resultLogin; @@ -211,7 +205,7 @@ bool ChatHandler::HandleAccountOnlineListCommand(const char* args) delete resultDB; - SendSysMessage("====================================================================="); + SendSysMessage(LANG_ACCOUNT_LIST_BAR); return true; } @@ -259,6 +253,20 @@ bool ChatHandler::HandleAccountCreateCommand(const char* args) } /// Set the level of logging +bool ChatHandler::HandleServerSetLogFileLevelCommand(const char *args) +{ + if(!*args) + return false; + + char *NewLevel = strtok((char*)args, " "); + if (!NewLevel) + return false; + + sLog.SetLogFileLevel(NewLevel); + return true; +} + +/// Set the level of logging bool ChatHandler::HandleServerSetLogLevelCommand(const char *args) { if(!*args) @@ -318,7 +326,7 @@ void CliRunnable::run() char commandbuf[256]; ///- Display the list of available CLI functions then beep - sLog.outString(); + sLog.outString(""); if(sConfig.GetBoolDefault("BeepAtStart", true)) printf("\a"); // \a = Alert @@ -373,4 +381,3 @@ void CliRunnable::run() ///- End the database thread WorldDatabase.ThreadEnd(); // free mySQL thread resources } - diff --git a/src/trinitycore/CliRunnable.h b/src/trinitycore/CliRunnable.h index ea60ef695bc..20ff58f27ba 100644 --- a/src/trinitycore/CliRunnable.h +++ b/src/trinitycore/CliRunnable.h @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,4 +33,3 @@ class CliRunnable : public ZThread::Runnable }; #endif /// @} - diff --git a/src/trinitycore/Main.cpp b/src/trinitycore/Main.cpp index 4be314d75f3..7b00073026d 100644 --- a/src/trinitycore/Main.cpp +++ b/src/trinitycore/Main.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -21,8 +21,6 @@ /// \addtogroup Trinityd Trinity Daemon /// @{ /// \file -#include "SystemConfig.h" -#include "revision.h" #include "Common.h" #include "Database/DatabaseEnv.h" @@ -31,18 +29,18 @@ #include "Master.h" #ifndef _TRINITY_CORE_CONFIG -# define _TRINITY_CORE_CONFIG "trinitycore.conf" +# define _TRINITY_CORE_CONFIG "TrinityCore.conf" #endif //_TRINITY_CORE_CONFIG // Format is YYYYMMDDRR where RR is the change in the conf file // for that day. #ifndef _TRINITY_CORE_CONFVER -# define _TRINITY_CORE_CONFVER 2008022901 +# define _TRINITY_CORE_CONFVER 2009032201 #endif //_TRINITY_CORE_CONFVER #ifdef WIN32 #include "ServiceWin32.h" -char serviceName[] = "Trinityd"; +char serviceName[] = "TrinityCore"; char serviceLongName[] = "Trinity core service"; char serviceDescription[] = "Massive Network Game Object Server"; /* @@ -64,7 +62,6 @@ uint32 realmID; ///< Id of the realm void usage(const char *prog) { sLog.outString("Usage: \n %s [<options>]\n" - " --version print version and exit\n\r" " -c config_file use config_file as configuration file\n\r" #ifdef WIN32 " Running as service functions:\n\r" @@ -95,12 +92,6 @@ extern int main(int argc, char **argv) cfg_file = argv[c]; } - if( strcmp(argv[c],"--version") == 0) - { - printf("%s\n", _FULLVERSION); - return 0; - } - #ifdef WIN32 //////////// //Services// @@ -172,4 +163,3 @@ extern int main(int argc, char **argv) } /// @} - diff --git a/src/trinitycore/Makefile.am b/src/trinitycore/Makefile.am new file mode 100644 index 00000000000..7e1cd086d3c --- /dev/null +++ b/src/trinitycore/Makefile.am @@ -0,0 +1,62 @@ +# Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> +# +# Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +## Process this file with automake to produce Makefile.in + +## CPP flags for includes, defines, etc. +AM_CPPFLAGS = $(TRINI_INCLUDES) -I$(top_builddir)/src/shared -I$(srcdir)/../../dep/include -I$(srcdir)/../framework -I$(srcdir)/../shared -I$(srcdir)/../game -I$(srcdir) -DSYSCONFDIR=\"$(sysconfdir)/\" + +## Build world list daemon as standalone program +bin_PROGRAMS = trinity-worldd +trinity_worldd_SOURCES = \ + CliRunnable.cpp \ + CliRunnable.h \ + Main.cpp \ + Master.cpp \ + Master.h \ + RASocket.cpp \ + RASocket.h \ + WorldRunnable.cpp \ + WorldRunnable.h + +## Link world daemon against the shared library +trinity_worldd_LDADD = ../bindings/scripts/libtrinityscript.la ../game/libmangosgame.a ../shared/Database/libmangosdatabase.a ../shared/Config/libmangosconfig.a ../shared/Auth/libmangosauth.a ../shared/libmangosshared.a ../shared/vmap/libmangosvmaps.a ../framework/libmangosframework.a ../../dep/src/sockets/libmangossockets.a ../../dep/src/zthread/libZThread.la ../../dep/src/g3dlite/libg3dlite.a +trinity_worldd_LDFLAGS = -L../../dep/src/sockets -L../../dep/src/zthread -L../../dep/src/g3dlite -L../bindings/scripts/ -L$(libdir) $(TRINI_LIBS) -export-dynamic + +## Additional files to include when running 'make dist' +# Include world daemon configuration +EXTRA_DIST = \ + mangosd.conf.dist + +## Additional files to install +sysconf_DATA = \ + mangosd.conf.dist + +install-data-hook: + @list='$(sysconf_DATA)'; for p in $$list; do \ + dest=`echo $$p | sed -e s/.dist//`; \ + if test -f $(DESTDIR)$(sysconfdir)/$$dest; then \ + echo "$@ will not overwrite existing $(DESTDIR)$(sysconfdir)/$$dest"; \ + else \ + echo " $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$dest"; \ + $(INSTALL_DATA) $$p $(DESTDIR)$(sysconfdir)/$$dest; \ + fi; \ + done + +clean-local: + rm -f $(sysconf_DATA) diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index 8fd5af08800..a478f18daa9 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -118,72 +118,74 @@ public: class RARunnable : public ZThread::Runnable { public: - uint32 numLoops, loopCounter; - - RARunnable () - { - uint32 socketSelecttime = sWorld.getConfig (CONFIG_SOCKET_SELECTTIME); - numLoops = (sConfig.GetIntDefault ("MaxPingTime", 30) * (MINUTE * 1000000 / socketSelecttime)); - loopCounter = 0; - } - - void - checkping () - { - // ping if need - if ((++loopCounter) == numLoops) - { + uint32 numLoops, loopCounter; + + RARunnable () + { + uint32 socketSelecttime = sWorld.getConfig (CONFIG_SOCKET_SELECTTIME); + numLoops = (sConfig.GetIntDefault ("MaxPingTime", 30) * (MINUTE * 1000000 / socketSelecttime)); loopCounter = 0; - sLog.outDetail ("Ping MySQL to keep connection alive"); - delete WorldDatabase.Query ("SELECT 1 FROM command LIMIT 1"); - delete LoginDatabase.Query ("SELECT 1 FROM realmlist LIMIT 1"); - delete CharacterDatabase.Query ("SELECT 1 FROM bugreport LIMIT 1"); - } - } - - void - run (void) - { - SocketHandler h; - - // Launch the RA listener socket - ListenSocket<RASocket> RAListenSocket (h); - bool usera = sConfig.GetBoolDefault ("Ra.Enable", false); - - if (usera) - { - port_t raport = sConfig.GetIntDefault ("Ra.Port", 3443); - std::string stringip = sConfig.GetStringDefault ("Ra.IP", "0.0.0.0"); - ipaddr_t raip; - if (!Utility::u2ip (stringip, raip)) - sLog.outError ("Trinity RA can not bind to ip %s", stringip.c_str ()); - else if (RAListenSocket.Bind (raip, raport)) - sLog.outError ("Trinity RA can not bind to port %d on %s", raport, stringip.c_str ()); - else - { - h.Add (&RAListenSocket); + } + + void checkping () + { + // ping if need + if ((++loopCounter) == numLoops) + { + loopCounter = 0; + sLog.outDetail ("Ping MySQL to keep connection alive"); + delete WorldDatabase.Query ("SELECT 1 FROM command LIMIT 1"); + delete LoginDatabase.Query ("SELECT 1 FROM realmlist LIMIT 1"); + delete CharacterDatabase.Query ("SELECT 1 FROM bugreport LIMIT 1"); + } + } - sLog.outString ("Starting Remote access listner on port %d on %s", raport, stringip.c_str ()); - } - } + void run () + { + SocketHandler h; - // Socket Selet time is in microseconds , not miliseconds!! - uint32 socketSelecttime = sWorld.getConfig (CONFIG_SOCKET_SELECTTIME); + // Launch the RA listener socket + ListenSocket<RASocket> RAListenSocket (h); + bool usera = sConfig.GetBoolDefault ("Ra.Enable", false); - // if use ra spend time waiting for io, if not use ra ,just sleep - if (usera) - while (!World::IsStopped()) + if (usera) { - h.Select (0, socketSelecttime); - checkping (); + port_t raport = sConfig.GetIntDefault ("Ra.Port", 3443); + std::string stringip = sConfig.GetStringDefault ("Ra.IP", "0.0.0.0"); + ipaddr_t raip; + if (!Utility::u2ip (stringip, raip)) + sLog.outError ("MaNGOS RA can not bind to ip %s", stringip.c_str ()); + else if (RAListenSocket.Bind (raip, raport)) + sLog.outError ("MaNGOS RA can not bind to port %d on %s", raport, stringip.c_str ()); + else + { + h.Add (&RAListenSocket); + + sLog.outString ("Starting Remote access listner on port %d on %s", raport, stringip.c_str ()); + } } - else - while (!World::IsStopped()) + + // Socket Selet time is in microseconds , not miliseconds!! + uint32 socketSelecttime = sWorld.getConfig (CONFIG_SOCKET_SELECTTIME); + + // if use ra spend time waiting for io, if not use ra ,just sleep + if (usera) { - ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000)); - checkping (); + while (!World::IsStopped()) + { + h.Select (0, socketSelecttime); + checkping (); + } } - } + else + { + while (!World::IsStopped()) + { + ZThread::Thread::sleep (static_cast<unsigned long> (socketSelecttime / 1000)); + checkping (); + } + } + } }; Master::Master() @@ -200,15 +202,15 @@ int Master::Run() sLog.outString( "%s (core-daemon)", _FULLVERSION ); sLog.outString( "<Ctrl-C> to stop.\n" ); - sLog.outTitle( " ______ __"); - sLog.outTitle( "/\\__ _\\ __ __/\\ \\__"); - sLog.outTitle( "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\ ,_\\ __ __"); - sLog.outTitle( " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\"); - sLog.outTitle( " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\"); - sLog.outTitle( " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\"); - sLog.outTitle( " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\"); - sLog.outTitle( " C O R E /\\___/"); - sLog.outTitle( "http://TrinityCore.org \\/__/\n"); + sLog.outString( " ______ __"); + sLog.outString( "/\\__ _\\ __ __/\\ \\__"); + sLog.outString( "\\/_/\\ \\/ _ __ /\\_\\ ___ /\\_\\ \\ ,_\\ __ __"); + sLog.outString( " \\ \\ \\/\\`'__\\/\\ \\ /' _ `\\/\\ \\ \\ \\/ /\\ \\/\\ \\"); + sLog.outString( " \\ \\ \\ \\ \\/ \\ \\ \\/\\ \\/\\ \\ \\ \\ \\ \\_\\ \\ \\_\\ \\"); + sLog.outString( " \\ \\_\\ \\_\\ \\ \\_\\ \\_\\ \\_\\ \\_\\ \\__\\\\/`____ \\"); + sLog.outString( " \\/_/\\/_/ \\/_/\\/_/\\/_/\\/_/\\/__/ `/___/> \\"); + sLog.outString( " C O R E /\\___/"); + sLog.outString( "http://TrinityCore.org \\/__/\n"); /// worldd PID file creation std::string pidfile = sConfig.GetStringDefault("PidFile", ""); @@ -280,7 +282,7 @@ int Master::Run() sLog.outError("Can't set used processors (hex): %x",curAff); } } - sLog.outString(); + sLog.outString(""); } bool Prio = sConfig.GetBoolDefault("ProcessPriority", false); @@ -292,7 +294,7 @@ int Master::Run() sLog.outString("TrinityCore process priority class set to HIGH"); else sLog.outError("ERROR: Can't set Trinityd process priority class."); - sLog.outString(); + sLog.outString(""); } } #endif @@ -317,14 +319,14 @@ int Master::Run() } ///- Launch the world listener socket - port_t wsport = sWorld.getConfig (CONFIG_PORT_WORLD); - std::string bind_ip = sConfig.GetStringDefault ("BindIP", "0.0.0.0"); + port_t wsport = sWorld.getConfig (CONFIG_PORT_WORLD); + std::string bind_ip = sConfig.GetStringDefault ("BindIP", "0.0.0.0"); - if (sWorldSocketMgr->StartNetwork (wsport, bind_ip.c_str ()) == -1) + if (sWorldSocketMgr->StartNetwork (wsport, bind_ip.c_str ()) == -1) { - sLog.outError ("Failed to start network"); - World::StopNow(ERROR_EXIT_CODE); - // go down and shutdown the server + sLog.outError ("Failed to start network"); + World::StopNow(ERROR_EXIT_CODE); + // go down and shutdown the server } sWorldSocketMgr->Wait (); @@ -401,14 +403,15 @@ int Master::Run() /// Initialize connection to the databases bool Master::_StartDB() { - ///- Get world database info from configuration file std::string dbstring; - if(!sConfig.GetString("WorldDatabaseInfo", &dbstring)) + + ///- Get world database info from configuration file + dbstring = sConfig.GetStringDefault("WorldDatabaseInfo", ""); + if(dbstring.empty()) { sLog.outError("Database not specified in configuration file"); return false; } - sLog.outDetail("World Database: %s", dbstring.c_str()); ///- Initialise the world database if(!WorldDatabase.Initialize(dbstring.c_str())) @@ -417,12 +420,13 @@ bool Master::_StartDB() return false; } - if(!sConfig.GetString("CharacterDatabaseInfo", &dbstring)) + ///- Get character database info from configuration file + dbstring = sConfig.GetStringDefault("CharacterDatabaseInfo", ""); + if(dbstring.empty()) { sLog.outError("Character Database not specified in configuration file"); return false; } - sLog.outDetail("Character Database: %s", dbstring.c_str()); ///- Initialise the Character database if(!CharacterDatabase.Initialize(dbstring.c_str())) @@ -432,14 +436,14 @@ bool Master::_StartDB() } ///- Get login database info from configuration file - if(!sConfig.GetString("LoginDatabaseInfo", &dbstring)) + dbstring = sConfig.GetStringDefault("LoginDatabaseInfo", ""); + if(dbstring.empty()) { sLog.outError("Login database not specified in configuration file"); return false; } ///- Initialise the login database - sLog.outDetail("Login Database: %s", dbstring.c_str() ); if(!LoginDatabase.Initialize(dbstring.c_str())) { sLog.outError("Cannot connect to login database %s",dbstring.c_str()); @@ -455,6 +459,20 @@ bool Master::_StartDB() } sLog.outString("Realm running as realm ID %d", realmID); + ///- Initialize the DB logging system + if(sConfig.GetBoolDefault("EnableLogDB", false)) + { + // everything successful - set var to enable DB logging once startup finished. + sLog.SetLogDBLater(true); + sLog.SetLogDB(false); + sLog.SetRealmID(realmID); + } + else + { + sLog.SetLogDBLater(false); + sLog.SetLogDB(false); + } + ///- Clean the database before starting clearOnlineAccounts(); @@ -463,7 +481,8 @@ bool Master::_StartDB() sWorld.LoadDBVersion(); - sLog.outString("Using %s", sWorld.GetDBVersion()); + sLog.outString("Using World DB: %s", sWorld.GetDBVersion()); + sLog.outString("Using creature EventAI: %s", sWorld.GetCreatureEventAIVersion()); return true; } @@ -476,8 +495,10 @@ void Master::clearOnlineAccounts() "UPDATE account SET online = 0 WHERE online > 0 " "AND id IN (SELECT acctid FROM realmcharacters WHERE realmid = '%d')",realmID); - CharacterDatabase.Execute("UPDATE characters SET online = 0 WHERE online<>0"); + + // Battleground instance ids reset at server restart + CharacterDatabase.Execute("UPDATE characters SET bgid = 0 WHERE bgid<>0"); } /// Handle termination signals @@ -518,4 +539,3 @@ void Master::_UnhookSignals() signal(SIGBREAK, 0); #endif } - diff --git a/src/trinitycore/Master.h b/src/trinitycore/Master.h index 456202594f6..967f497051a 100644 --- a/src/trinitycore/Master.h +++ b/src/trinitycore/Master.h @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,4 +50,3 @@ class Master #define sMaster Trinity::Singleton<Master>::Instance() #endif /// @} - diff --git a/src/trinitycore/RASocket.cpp b/src/trinitycore/RASocket.cpp index 62a5dbc39c9..370340859d3 100644 --- a/src/trinitycore/RASocket.cpp +++ b/src/trinitycore/RASocket.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,7 +69,7 @@ RASocket::~RASocket() ///- Delete buffer and decrease active admins count delete [] buff; - sLog.outRALog("Connection was closed.\n"); + sLog.outRemote("Connection was closed.\n"); if(stage==OK) iUsers--; @@ -79,7 +79,7 @@ RASocket::~RASocket() void RASocket::OnAccept() { std::string ss=GetRemoteAddress(); - sLog.outRALog("Incoming connection from %s.\n",ss.c_str()); + sLog.outRemote("Incoming connection from %s.\n",ss.c_str()); ///- If there is already an active admin, drop the connection if(iUsers) dropclient @@ -97,7 +97,7 @@ void RASocket::OnRead() unsigned int sz=ibuf.GetLength(); if(iInputLength+sz>=RA_BUFF_SIZE) { - sLog.outRALog("Input buffer overflow, possible DOS attack.\n"); + sLog.outRemote("Input buffer overflow, possible DOS attack.\n"); SetCloseAndDelete(); return; } @@ -160,7 +160,7 @@ void RASocket::OnRead() if(!result) { Sendf("-No such user.\r\n"); - sLog.outRALog("User %s does not exist.\n",szLogin.c_str()); + sLog.outRemote("User %s does not exist.\n",szLogin.c_str()); if(bSecure)SetCloseAndDelete(); } else @@ -173,7 +173,7 @@ void RASocket::OnRead() if(fields[0].GetUInt32()<iMinLevel) { Sendf("-Not enough privileges.\r\n"); - sLog.outRALog("User %s has no privilege.\n",szLogin.c_str()); + sLog.outRemote("User %s has no privilege.\n",szLogin.c_str()); if(bSecure)SetCloseAndDelete(); } else { @@ -208,14 +208,14 @@ void RASocket::OnRead() ++iUsers; Sendf("+Logged in.\r\n"); - sLog.outRALog("User %s has logged in.\n",szLogin.c_str()); + sLog.outRemote("User %s has logged in.\n",szLogin.c_str()); Sendf("TC>"); } else { ///- Else deny access Sendf("-Wrong pass.\r\n"); - sLog.outRALog("User %s has failed to log in.\n",szLogin.c_str()); + sLog.outRemote("User %s has failed to log in.\n",szLogin.c_str()); if(bSecure)SetCloseAndDelete(); } } @@ -224,7 +224,7 @@ void RASocket::OnRead() case OK: if(strlen(buff)) { - sLog.outRALog("Got '%s' cmd.\n",buff); + sLog.outRemote("Got '%s' cmd.\n",buff); sWorld.QueueCliCommand(&RASocket::zprint , buff); } else @@ -257,4 +257,3 @@ void RASocket::zprint( const char * szText ) #endif } - diff --git a/src/trinitycore/RASocket.h b/src/trinitycore/RASocket.h index 145afd52c60..8900e689b2c 100644 --- a/src/trinitycore/RASocket.h +++ b/src/trinitycore/RASocket.h @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -65,4 +65,3 @@ class RASocket: public TcpSocket }; #endif /// @} - diff --git a/src/trinitycore/TrinityCore.rc b/src/trinitycore/TrinityCore.rc index 4e6510c0407..0acad1e4ba2 100644 --- a/src/trinitycore/TrinityCore.rc +++ b/src/trinitycore/TrinityCore.rc @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/src/trinitycore/WorldRunnable.cpp b/src/trinitycore/WorldRunnable.cpp index 73d99e66061..e49e4ad74b8 100644 --- a/src/trinitycore/WorldRunnable.cpp +++ b/src/trinitycore/WorldRunnable.cpp @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,13 +29,19 @@ #include "Timer.h" #include "ObjectAccessor.h" #include "MapManager.h" +#include "BattleGroundMgr.h" #include "Database/DatabaseEnv.h" -#if (defined(SHORT_SLEEP) || defined(WIN32)) +#if (defined(WIN32) || defined(SHORT_SLEEP)) #define WORLD_SLEEP_CONST 50 #else -#define WORLD_SLEEP_CONST 100 //Is this still needed?? [On linux some time ago not working 50ms] +#define WORLD_SLEEP_CONST 100 //Is this still needed?? [On linux some time ago not working 50ms] +#endif + +#ifdef WIN32 +#include "ServiceWin32.h" +extern int m_ServiceStatus; #endif /// Heartbeat for the World @@ -43,6 +49,8 @@ void WorldRunnable::run() { ///- Init new SQL thread for the world database WorldDatabase.ThreadStart(); // let thread do safe mySQL requests (one connection call enough) + CharacterDatabase.ThreadStart(); + LoginDatabase.ThreadStart(); sWorld.InitResultQueue(); uint32 realCurrTime = 0; @@ -72,16 +80,25 @@ void WorldRunnable::run() } else prevSleepTime = 0; + + #ifdef WIN32 + if (m_ServiceStatus == 0) World::StopNow(SHUTDOWN_EXIT_CODE); + while (m_ServiceStatus == 2) Sleep(1000); + #endif } sWorld.KickAll(); // save and kick all players sWorld.UpdateSessions( 1 ); // real players unload required UpdateSessions call + // unload battleground templates before different singletons destroyed + sBattleGroundMgr.DeleteAllBattleGrounds(); + sWorldSocketMgr->StopNetwork(); MapManager::Instance().UnloadAll(); // unload all grids (including locked in memory) ///- End the database thread WorldDatabase.ThreadEnd(); // free mySQL thread resources + CharacterDatabase.ThreadStart(); + LoginDatabase.ThreadEnd(); } - diff --git a/src/trinitycore/WorldRunnable.h b/src/trinitycore/WorldRunnable.h index b84e5b6a04c..8df3a6a0c89 100644 --- a/src/trinitycore/WorldRunnable.h +++ b/src/trinitycore/WorldRunnable.h @@ -1,7 +1,7 @@ /* - * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> + * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * - * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> + * Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,4 +33,3 @@ class WorldRunnable : public ZThread::Runnable }; #endif /// @} - diff --git a/src/trinitycore/resource.h b/src/trinitycore/resource.h index fbc730320b4..7dc5cb9ef7b 100644 --- a/src/trinitycore/resource.h +++ b/src/trinitycore/resource.h @@ -13,4 +13,3 @@ #define _APS_NEXT_SYMED_VALUE 101 #endif #endif - diff --git a/src/trinitycore/run-mangosd b/src/trinitycore/run-mangosd index f307bd9e1ad..4a146804e81 100644 --- a/src/trinitycore/run-mangosd +++ b/src/trinitycore/run-mangosd @@ -6,7 +6,7 @@ while : do echo "TrinityCore daemon restarted" echo `date` >> crash.log & - ./mangosd | tail -n 20 >> crash.log + ./mangosd | tail -n 20 >> crash.log echo " " >> crash.log & pid=`ps ax | awk '($5 ~ /trinitycore/) { print $1 }'` wait $pid diff --git a/src/trinitycore/trinitycore.conf.dist b/src/trinitycore/trinitycore.conf.dist index fcc093e811a..018ddf378b5 100644 --- a/src/trinitycore/trinitycore.conf.dist +++ b/src/trinitycore/trinitycore.conf.dist @@ -1,7 +1,7 @@ ########################################## # Trinity Core worldd configuration file # ########################################## -ConfVersion=2009010301 +ConfVersion=2009032201 ################################################################################################################### # CONNECTIONS AND DIRECTORIES @@ -25,11 +25,15 @@ ConfVersion=2009010301 # WorldDatabaseInfo # CharacterDatabaseInfo # Database connection settings for the world server. -# Default: hostname;port;username;password;database -# .;somenumber;username;password;database - use named pipes at Windows -# Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini -# .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux -# Unix sockets: experimental, not tested +# Default: +# ---MYSQL--- +# hostname;port;username;password;database +# .;somenumber;username;password;database - use named pipes at Windows +# Named pipes: mySQL required adding "enable-named-pipe" to [mysqld] section my.ini +# .;/path/to/unix_socket;username;password;database - use Unix sockets at Unix/Linux +# ---PGSQL--- +# hostname;port;username;password;database +# .;/path/to/unix_socket/DIRECTORY or . for default path;username;password;database - use Unix sockets at Unix/Linux # # MaxPingTime # Settings for maximum database-ping interval (minutes between pings) @@ -109,7 +113,7 @@ EAIErrorLevel = 2 # # SocketSelectTime # Socket select time (in milliseconds) -# Default: 10000 +# Default: 10000 (10 secs) # # GridCleanUpDelay # Grid clean up delay (in milliseconds) @@ -127,15 +131,11 @@ EAIErrorLevel = 2 # Player save interval (in milliseconds) # Default: 900000 (15 min) # -# DisconnectToleranceInterval -# Tolerance for disconnected players before putting in the queue. (in seconds) -# Default: 0 (disabled) -# # vmap.enableLOS # vmap.enableHeight # Enable/Disable VMmap support for line of sight and height calculation -# Default: 1 (true) -# 0 (false) +# Default: 0 (disable) +# 1 (enable) # # vmap.ignoreMapIds # Map id that will be ignored by VMaps @@ -163,6 +163,15 @@ EAIErrorLevel = 2 # Update realm uptime period in minutes (for save data in 'uptime' table). Must be > 0 # Default: 10 (minutes) # +# LogDB.Opt.ClearInterval +# Time for the WUPDATE_CLEANDB timer that clears the `logs` table of old entries. Must be > 0. +# Default: 10 (minutes) +# +# LogDB.Opt.ClearTime +# The maximum time in seconds of old `logs` table entries to keep. +# Default: 1209600 (14 days) +# 0 - don't clear +# # MaxCoreStuckTime # Periodically check if the process got freezed, if this is the case force crash after the specified # amount of seconds. Must be > 0. Recommended > 10 secs if you use this. @@ -188,7 +197,6 @@ GridCleanUpDelay = 300000 MapUpdateInterval = 100 ChangeWeatherInterval = 600000 PlayerSaveInterval = 900000 -DisconnectToleranceInterval = 0 vmap.enableLOS = 0 vmap.enableHeight = 0 vmap.ignoreMapIds = "369" @@ -196,6 +204,8 @@ vmap.ignoreSpellIds = "7720" DetectPosCollision = 1 TargetPosRecalculateRange = 1.5 UpdateUptimeInterval = 10 +LogDB.Opt.ClearInterval = 10 +LogDB.Opt.ClearTime = 1209600 MaxCoreStuckTime = 0 AddonChannel = 1 @@ -216,19 +226,19 @@ AddonChannel = 1 # # LogLevel # Server console level of logging -# 0 = Minimum; 1 = Basic&Error; 2 = Detail; 3 = Full/Debug +# 0 = Minimum; 1 = Basic; 2 = Detail; 3 = Full/Debug # Default: 3 # -# LogTime -# Include time in server console output [hh:mm:ss] -# Default: 0 (no time) -# 1 (print time) -# # LogFile # Logfile name # Default: "Server.log" # "" - Empty name disable creating log file # +# ChatLogFile +# Log file for chat logs +# Default: "chat.log" +# "" - Empty name for disable +# # LogTimestamp # Logfile with timestamp of server start in name # Default: 0 - no timestamp in name @@ -236,11 +246,12 @@ AddonChannel = 1 # # LogFileLevel # Server file level of logging -# 0 = Minimum; 1 = Error; 2 = Detail; 3 = Full/Debug +# 0 = Minimum; 1 = Basic; 2 = Detail; 3 = Full/Debug # Default: 0 # -# LogFilter_TransportMoves +# LogFilter_AchievementUpdates # LogFilter_CreatureMoves +# LogFilter_TransportMoves # LogFilter_VisibilityChanges # Log filters # Default: 1 - not include with any log level @@ -294,23 +305,104 @@ AddonChannel = 1 # "" - Empty name for disable # # LogColors -# Color for messages (format "normal_color details_color debug_color error_color") +# Color for messages (format "normal basic detail debug") # Colors: 0 - BLACK, 1 - RED, 2 - GREEN, 3 - BROWN, 4 - BLUE, 5 - MAGENTA, 6 - CYAN, 7 - GREY, # 8 - YELLOW, 9 - LRED, 10 - LGREEN, 11 - LBLUE, 12 - LMAGENTA, 13 - LCYAN, 14 - WHITE # Default: "" - none colors -# Example: "13 7 11 9" +# Example: "13 11 9 5" +# +# EnableLogDB +# Enable/disable logging to database (LogDatabaseInfo). +# Default: 0 - disabled +# 1 - enabled +# +# DBLogLevel +# Log level of DB logging. +# 0 = Minimum; 1 = Basic; 2 = Detail; 3 = Full/Debug +# Default: 3 +# +# LogDB.Char +# Enable/disable logging character outputs to DB. +# Default: 0 - off +# 1 - on +# +# LogDB.GM +# Enable/disable logging GM commands to DB. +# Default: 0 - off +# 1 - on +# +# LogDB.RA +# Enable/disable logging remote access events to DB. +# Default: 0 - off +# 1 - on +# +# LogDB.World +# Enable/disable logging world packets to DB. +# Default: 0 - off +# 1 - on (very heavy) +# +# LogDB.Chat +# Enable/disable logging chat messages to the database. +# Default: 0 - off +# 1 - on +# +# ChatLogs.Channel +# Enable logging chatting in custom channels. +# Default: 0 - off +# 1 - on +# +# ChatLogs.Whisper +# Enable logging whispers between players. +# Default: 0 - off +# 1 - on +# +# ChatLogs.Party +# Enable logging party messages. +# Default: 0 - off +# 1 - on +# +# ChatLogs.Raid +# Enable logging raid messages. +# Default: 0 - off +# 1 - on +# +# ChatLogs.Guild +# Enable logging guild messages. +# Default: 0 - off +# 1 - on +# +# ChatLogs.Public +# Enable logging public chat events (say/yell/emote). +# Default: 0 - off +# 1 - on +# +# ChatLogs.Addon +# Enable logging addon messages. +# Default: 0 - off +# 1 - on +# +# ChatLogs.BattleGround +# Enable logging battleground chats. +# Default: 0 - off +# 1 - on +# +# ChatLogTimestamp +# Chat Logfile with timestamp of server start in name +# Default: 0 - no timestamp in name +# 1 - add timestamp in name in form Logname_YYYY-MM-DD_HH-MM-SS.Ext for Logname.Ext # ################################################################################################################### LogSQL = 1 PidFile = "" LogLevel = 1 -LogTime = 0 LogFile = "Server.log" +ChatLogFile = "chat.log" LogTimestamp = 0 LogFileLevel = 0 -LogFilter_TransportMoves = 1 +LogFilter_AchievementUpdates = 1 LogFilter_CreatureMoves = 1 +LogFilter_TransportMoves = 1 LogFilter_VisibilityChanges = 1 WorldLogFile = "" DBErrorLogFile = "db_errors.log" @@ -322,6 +414,23 @@ GmLogTimestamp = 0 GmLogPerAccount = 0 RaLogFile = "ra_commands.log" LogColors = "" +EnableLogDB = 0 +DBLogLevel = 1 +LogDB.Char = 0 +LogDB.GM = 0 +LogDB.RA = 0 +LogDB.World = 0 +LogDB.Chat = 0 +ChatLogs.Channel = 0 +ChatLogs.SysChan = 0 +ChatLogs.Whisper = 0 +ChatLogs.Party = 0 +ChatLogs.Raid = 0 +ChatLogs.Guild = 0 +ChatLogs.Public = 0 +ChatLogs.Addon = 0 +ChatLogs.BattleGround = 0 +ChatLogTimestamp = 0 ################################################################################################################### # SERVER SETTINGS @@ -367,9 +476,9 @@ LogColors = "" # # Expansion # Allow server use content from expansion -# 2 - check expansion 2 maps existence, and if client support expansion 2 and account have +# Default: 2 - check expansion 2 maps existence, and if client support expansion 2 and account have # expansion 2 setting then allow visit expansion 2 maps, allow create new class character) -# Default: 1 - check expansion 1 maps existence, and if client support expansion 1 and account have +# 1 - check expansion 1 maps existence, and if client support expansion 1 and account have # expansion 1 setting then allow visit expansion 1 maps, allow create new races character) # 0 - not check expansion maps existence, not allow wisit its, not allow create new race or new class # characters, ignore account expansion setting) @@ -433,6 +542,18 @@ LogColors = "" # Default: 10 (client limitation) # The number must be between 1 and 10 # +# HeroicCharactersPerRealm +# Limit numbers of heroic class characters for account at realm +# Default: 1 +# The number must be between 0 (not allowed) and 10 +# +# MinLevelForHeroicCharacterCreating +# Limit creating heroic characters only for account with another character of specific level (ignored for GM accounts) +# 0 - not require any existed chaarcter +# 1 - require at least any character existed +# Default: 55 - default requirement +# +# # SkipCinematics # Disable in-game script movie at first character's login(allows to prevent buggy intro in case of custom start location coordinates) # Default: 0 - show intro for each new characrer @@ -440,14 +561,18 @@ LogColors = "" # 2 - disable intro show in all cases # # MaxPlayerLevel -# Max level that can be reached by player for experience (in range from 1 to 255). +# Max level that can be reached by player for experience (in range from 1 to 100). # Change not recommended -# Default: 70 +# Default: 80 # # StartPlayerLevel # Staring level that have character at creating (in range 1 to MaxPlayerLevel) # Default: 1 # +# StartHeroicPlayerLevel +# Staring level that have character of heroic class at creating (in range 1 to MaxPlayerLevel) +# Default: 55 +# # StartPlayerMoney # Amount of money that new players will start with. # If you want to start with silver, use for example 100 (100 copper = 1 silver) @@ -484,34 +609,14 @@ LogColors = "" # # AlwaysMaxSkillForLevel # Players will automatically gain max level dependent (weapon/defense) skill when logging in, leveling up etc. -# Default: 0 (true) -# 1 (false) +# Default: 0 (false) +# 1 (true) # # ActivateWeather # Activate weather system # Default: 1 (true) # 0 (false) # -# Battleground.CastDeserter -# Cast or not Deserter spell at player who leave battleground in progress -# Default: 1 (true) -# 0 (false) -# -# Battleground.QueueAnnouncer.Enable -# Enable queue announcer posting to chat -# Default: 1 (true) -# 0 (false) -# -# Battleground.QueueAnnouncer.PlayerOnly -# Enable queue announcer posting to chat -# Default: 0 (false) -# 1 (true) -# -# Battleground.PrematureReward -# Reward players in case of prematurely finished BG -# Default: 1 (true) -# 0 (false) -# # CastUnstuck # Allow cast or not Unstuck spell at .start or client Help option use # Default: 1 (true) @@ -533,7 +638,7 @@ LogColors = "" # # Instance.UnloadDelay # Unload the instance map from memory after some time if no players are inside. -# Default: 1800000 (miliseconds, i.e 30 minutes) +# Default: 1800000 (miliseconds 30 minutes) # 0 (instance maps are kept in memory until they are reset) # # Quests.LowLevelHideDiff @@ -566,10 +671,20 @@ LogColors = "" # Default: 3600 sec (1 hour) # # SkillChance.Prospecting -# For prospecting skillup not possible by default, but can be allowed as custom setting +# For prospecting skillup impossible by default, but can be allowed as custom setting +# Default: 0 - no skilups +# 1 - skilups possible +# +# SkillChance.Milling +# For milling skillup impossible by default, but can be allowed as custom setting # Default: 0 - no skilups # 1 - skilups possible # +# OffhandCheckAtTalentsReset +# Talent reset can change offhand weapon restrictions for equip slots. +# Default: 0 - recheck offhand slot weapon only at zone update +# 1 - recheck offhand slot weapon at talent reset also +# # Event.Announce # Default: 0 (false) # 1 (true) @@ -591,7 +706,7 @@ LogColors = "" GameType = 1 RealmZone = 1 -Expansion = 1 +Expansion = 2 DBC.Locale = 255 DeclinedNames = 0 StrictPlayerNames = 0 @@ -601,9 +716,12 @@ MaxWhoListReturns = 49 CharactersCreatingDisabled = 0 CharactersPerAccount = 50 CharactersPerRealm = 10 +HeroicCharactersPerRealm = 1 +MinLevelForHeroicCharacterCreating = 55 SkipCinematics = 0 -MaxPlayerLevel = 70 +MaxPlayerLevel = 80 StartPlayerLevel = 1 +StartHeroicPlayerLevel = 55 StartPlayerMoney = 0 MaxHonorPoints = 75000 StartHonorPoints = 0 @@ -614,10 +732,6 @@ DisableWaterBreath = 4 AllFlightPaths = 0 AlwaysMaxSkillForLevel = 0 ActivateWeather = 1 -Battleground.CastDeserter = 1 -Battleground.QueueAnnouncer.Enable = 1 -Battleground.QueueAnnouncer.PlayerOnly = 0 -Battleground.PrematureReward = 1 CastUnstuck = 1 Instance.IgnoreLevel = 0 Instance.IgnoreRaid = 0 @@ -630,6 +744,8 @@ MinPetitionSigns = 9 MaxGroupXPDistance = 74 MailDeliveryDelay = 3600 SkillChance.Prospecting = 0 +SkillChance.Milling = 0 +OffhandCheckAtTalentsReset = 0 Event.Announce = 0 BeepAtStart = 1 Motd = "Welcome to a Trinity Core server." @@ -847,6 +963,18 @@ Channel.SilentlyGMJoin = 0 # 0 (disable) # 1 (enable) # +# GM.Visible +# GM visibility at login +# Default: 2 (last save state) +# 0 (invisible) +# 1 (visible) +# +# GM.AcceptTickets +# Is GM accepting tickets from player by default or not. +# Default: 2 (last save state) +# 0 (disable) +# 1 (enable) +# # GM.Chat # GM chat mode at login # Default: 2 (last save state) @@ -860,7 +988,7 @@ Channel.SilentlyGMJoin = 0 # 1 (enable) # # GM.InGMList -# Is GM showed in GM list (if visible) in non-GM state (.gmoff) +# Is GM showed in GM list (if visible) in non-GM state (.gm off) # Default: 0 (false) # 1 (true) # @@ -875,18 +1003,32 @@ Channel.SilentlyGMJoin = 0 # 0 (not include) # # GM.StartLevel -# GM starting level (1-255) +# GM starting level (1-100) # Default: 1 # +# GM.LowerSecurity +# Disallow a lower security member to interact with a higher one using commands +# Default: 0 (disable) +# 1 (enable) +# +# GM.AllowAchievementGain +# If enabled it allows gaining achievements for GM characters +# Default: 1 (enable) +# 0 (disable) +# ################################################################################################################### -GM.LoginState = 2 -GM.Chat = 2 -GM.WhisperingTo = 2 -GM.InGMList = 0 -GM.InWhoList = 0 -GM.LogTrade = 1 -GM.StartLevel = 70 +GM.LoginState = 2 +GM.Visible = 2 +GM.AcceptTickets = 2 +GM.Chat = 2 +GM.WhisperingTo = 2 +GM.InGMList = 0 +GM.InWhoList = 0 +GM.LogTrade = 1 +GM.StartLevel = 80 +GM.LowerSecurity = 0 +GM.AllowAchievementGain = 1 ################################################################################################################### # VISIBILITY AND RADIUSES @@ -900,9 +1042,9 @@ GM.StartLevel = 70 # Visibility.Distance.Creature # Visibility.Distance.Player # Visibility distance for different in game object -# Max limited by active player zone: ~ 333 +# Max limited by active player zone: ~ 166 # Min limit dependent from objects -# Default: 132 (cell size) +# Default: 66 (cell size) # Min limit is max aggro radius (45) * Rate.Creature.Aggro # # Visibility.Distance.Object @@ -928,10 +1070,10 @@ GM.StartLevel = 70 ################################################################################################################### Visibility.GroupMode = 0 -Visibility.Distance.Creature = 132 -Visibility.Distance.Player = 132 -Visibility.Distance.Object = 132 -Visibility.Distance.InFlight = 132 +Visibility.Distance.Creature = 66 +Visibility.Distance.Player = 66 +Visibility.Distance.Object = 66 +Visibility.Distance.InFlight = 66 Visibility.Distance.Grey.Unit = 1 Visibility.Distance.Grey.Object = 10 @@ -942,6 +1084,8 @@ Visibility.Distance.Grey.Object = 10 # Rate.Mana # Rate.Rage.Income # Rate.Rage.Loss +# Rate.RunicPower.Income +# Rate.RunicPower.Loss # Rate.Focus # Rate.Loyalty # Health and power regeneration and rage income from damage. @@ -1006,6 +1150,14 @@ Visibility.Distance.Grey.Object = 10 # Reputation Gain rate # Default: 1 # +# Rate.Reputation.LowLevel.Kill +# Reputation Gain form low level kill (grey creture) +# Default: 1 +# +# Rate.Reputation.LowLevel.Quest +# Reputation Gain rate +# Default: 1 +# # Rate.InstanceResetTime # Multiplier for the number of days in between global raid/heroic instance resets. # Default: 1 @@ -1058,12 +1210,20 @@ Visibility.Distance.Grey.Object = 10 # Default: 1 (enabled) # 0 (disabled) # +# Death.Bones.World +# Death.Bones.BattlegroundOrArena +# Enable/disable creating bones instead corpse at resurrection (in normal zones/instacnes, or battleground/arenas) +# Default: 1 (enabled) +# 0 (disabled) +# ################################################################################################################### Rate.Health = 1 Rate.Mana = 1 Rate.Rage.Income = 1 Rate.Rage.Loss = 1 +Rate.RunicPower.Income = 1 +Rate.RunicPower.Loss = 1 Rate.Focus = 1 Rate.Loyalty = 1 Rate.Skill.Discovery = 1 @@ -1092,6 +1252,8 @@ Rate.Mining.Amount = 1 Rate.Mining.Next = 1 Rate.Talent = 1 Rate.Reputation.Gain = 1 +Rate.Reputation.LowLevel.Kill = 1 +Rate.Reputation.LowLevel.Quest = 1 Rate.InstanceResetTime = 1 SkillGain.Crafting = 1 SkillGain.Defense = 1 @@ -1110,51 +1272,104 @@ DurabilityLossChance.Block = 0.05 Death.SicknessLevel = 11 Death.CorpseReclaimDelay.PvP = 1 Death.CorpseReclaimDelay.PvE = 0 +Death.Bones.World = 1 +Death.Bones.BattlegroundOrArena = 1 + ################################################################################################################### +# BATTLEGROUND CONFIG # -# Rated arena matches config +# Battleground.CastDeserter +# Cast Deserter spell at player who leave battleground in progress +# Default: 1 (enable) +# 0 (disable) # -# MaxRatingDifference: the maximum rating difference between two groups in rated matches -# Default: 0 (disable, rating difference is discarded) +# Battleground.QueueAnnouncer.Enable +# Enable queue announcer posting to chat +# Default: 0 (disable) +# 1 (enable) +# +# Battleground.QueueAnnouncer.PlayerOnly +# Enable queue announcer posting to chat +# Default: 0 (disable) +# 1 (enable) # -# RatingDiscardTimer: after the specified milliseconds has passed, -# rating information will be discarded when selecting teams for matches -# also initiates an update by this timer -# Default: 60000 +# Battleground.InvitationType +# Set Battleground invitation type +# Default: 0 (normal - invite as much players to bg as possible, don't bother with ballance) +# 1 (Experimental - don't allow to invite much more players of one faction) # -# AutoDistributePoints: set if arena points should be distributed automatically, or by GM command -# Default: 0 (disable) (recommended): use gm command or sql query to distribute the points -# 1 (enable): arena points are distributed automatically +# Battleground.PrematureFinishTimer +# The time to end the bg if there are less than MinPlayersPerTeam on one side in milliseconds +# Default: 300000 (5 minutes) +# 0 - disable (not recommended) # -# AutoDistributeInterval: how often should the distribution take place -# if automatic distribution is enabled -# in days -# Default: 7 (weekly) +# BattleGround.PremadeGroupWaitForMatch +# The time in which premade group of 1 faction waits in BG Queue for premade group of other faction +# Default: 1800000 (30 minutes) +# 0 - disable (not recommended) # ################################################################################################################### -Arena.MaxRatingDifference = 0 -Arena.RatingDiscardTimer = 60000 -Arena.AutoDistributePoints = 0 -Arena.AutoDistributeInterval = 7 +Battleground.CastDeserter = 1 +Battleground.QueueAnnouncer.Enable = 0 +Battleground.QueueAnnouncer.PlayerOnly = 0 +Battleground.InvitationType = 0 +BattleGround.PrematureFinishTimer = 300000 +BattleGround.PremadeGroupWaitForMatch = 1800000 + ################################################################################################################### +# ARENA CONFIG +# +# Arena.MaxRatingDifference +# The maximum rating difference between two groups in rated matches +# Default: 150 (enable, recommended) +# 0 (disable, rating difference is discarded) +# +# Arena.RatingDiscardTimer +# After the specified milliseconds has passed, +# rating information will be discarded when selecting teams for matches +# also initiates an update by this timer +# Default: 600000 (10 minutes, recommended) +# 0 (disable) +# +# Arena.AutoDistributePoints +# Set if arena points should be distributed automatically, or by GM command +# Default: 0 (disable) (recommended): use gm command or sql query to distribute the points +# 1 (enable) arena points are distributed automatically +# +# Arena.AutoDistributeInterval +# How often should the distribution take place +# If automatic distribution is enabled in days +# Default: 7 (weekly) +# +# Arena.QueueAnnouncer.Enable +# Enable bg queue announcer posting to chat +# Default: 0 (disable) +# 1 (enable) # -# Battleground config +# Arena.ArenaSeason.ID +# Current area season id show in client +# Default: 1 # -# PrematureFinishTimer: the time to end the bg if there are less than minplayersperteam on one side -# in milliseconds -# Default: 300000 -# 0 - disable +# Arena.ArenaSeason.InProgress +# Current area season state +# Default: 1 (active) +# 0 (finished) # ################################################################################################################### -BattleGround.PrematureFinishTimer = 300000 +Arena.MaxRatingDifference = 150 +Arena.RatingDiscardTimer = 600000 +Arena.AutoDistributePoints = 0 +Arena.AutoDistributeInterval = 7 +Arena.QueueAnnouncer.Enable = 0 +Arena.ArenaSeason.ID = 1 +Arena.ArenaSeason.InProgress = 1 ################################################################################################################### -# # NETWORK CONFIG # # Network.Threads @@ -1183,7 +1398,7 @@ Network.TcpNodelay = 1 ################################################################################################################### # AUCTION HOUSE BOT SETTINGS -# +# # AuctionHouseBot.EnableSeller # Enable/Disable the part of AHBot that puts items up for auction # Default 0 (disabled) @@ -1194,7 +1409,7 @@ Network.TcpNodelay = 1 # # Auction House Bot character data # AuctionHouseBot.Account is the account number (in realmd->account table) of the player you want to run as the auction bot. -# AuctionHouseBot.GUID is the GUID (in characters->characters table) of the player you want to run as the auction bot. +# AuctionHouseBot.GUID is the GUID (in characters->characters table) of the player you want to run as the auction bot. # Default: 0 (Auction House Bot disabled) # # AuctionHouseBot.VendorItems @@ -1221,7 +1436,7 @@ Network.TcpNodelay = 1 # Default 1 # Bind_Quest_Item # Default 0 -# +# # AuctionHouseBot.ItemsPerCycle # Number of Items to Add/Remove from the AH during mass operations # Default 200 |