Commit Graph
100 Commits
Author SHA1 Message Date
Spp e1bee86ee6 Core/Battlegrounds: Remove no longer needed files BattlegroundAA/BattlegroundRB 2012-10-04 12:58:52 +02:00
Spp 2c961814c1 Core/Battleground: Some minor optimizations here and there. 2012-10-04 12:49:58 +02:00
Spp 2a55f2d9e0 Core/Battlegrounds: Minor optimization when checking if player left start zone 2012-10-04 11:31:00 +02:00
Spp ddf494d78b Core/Battlegrounds: Optimize internal battleground data storage (from Array MAX_BATTLEGROUND_TYPE_ID to std::map) 2012-10-04 10:57:32 +02:00
Spp 58c01c140d Core/Battleground: Make Battleground queues and Free slot queue structures private. 2012-10-04 10:39:37 +02:00
Spp 02d68e4610 Core: Fix build without PCH 2012-10-03 15:40:01 +02:00
Spp 7831ecdb18 Core: "Initial support for C++11 compilers" 2012-10-02 15:06:19 +02:00
Spp 380db44583 Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct 2012-10-02 12:17:42 +02:00
Spp f8846cdeaf Core/Utilities: Do not expose internal store structure in Tokens and rename it to Tokenizer 2012-10-02 11:54:41 +02:00
Spp f0f97ab851 Core/Logging: Fix crash when trying to log a message while config is being reloaded
Closes #7878
2012-09-26 13:42:53 +02:00
Spp 2a89658e96 Battlegrounds: Better log message for unhandled area triggers in battlegrounds 2012-09-19 10:01:30 +02:00
Spp 8c5f011e79 Core/Achievements: Force all calls to AchievementMgr be done through Player functions (Remove GetAchievementMgr)
Note: No real use in 3.3.5 but will be used in 4.3.4
2012-09-18 14:29:53 +02:00
Spp 25d2ab9172 Revert last change. Leaving UpdateField names "as is" 2012-09-17 12:04:35 +02:00
Spp 74aea5e055 Cosmetic: PLAYER__FIELD_KNOWN_TITLES --> PLAYER_FIELD_KNOWN_TITLES 2012-09-17 11:49:25 +02:00
Spp 358c6a26d6 Core: Warning fixes (Also some -pedantic under game folder) 2012-09-10 13:04:31 +02:00
Spp a7dd289b04 Core/Config: Change default log level of "Chat Log" to fit old log system 2012-09-01 22:13:12 +02:00
Spp b127610510 Config: Cosmetic changes to fit config guidelines 2012-09-01 21:24:09 +02:00
Spp 7811e9100c Core/Logging: Delete player filename will now use guid_name format like old log system. (was set to account_name by error) 2012-09-01 21:18:01 +02:00
Spp 5cafe0ca01 Core/Logging: Fix delete player crash having logging player enabled.
closes #7437
2012-09-01 21:15:20 +02:00
Spp 5aee9433e1 Core/Logging: Minor optimization in ShouldLog 2012-08-27 12:56:45 +02:00
Spp 13ba61ab69 Core/Logging: Disable all LOG_FILTER_OPCODES related messages by default 2012-08-21 23:13:05 +02:00
Spp 984493108b Core/Logging: Fix incorrect error level for some warden messages
Core/Logging: Fix incorrect filter type for many network messages
Core/Logging: Use OPCODE filter type for network messages related to wrong packets
2012-08-21 22:12:55 +02:00
Spp 13aa00d5f2 Core/Logging: Restore dumping packets in binary format 2012-08-17 10:36:48 +02:00
Spp 77b7933ed3 Core/Logging: Restore proper Log Filter to some arena messages 2012-08-17 10:31:09 +02:00
Spp a566e3e58b Core/Logging: Move more log messages to LOG_FILTER_SERVER_LOADING 2012-08-16 11:02:46 +02:00
Spp 3c42401d66 Core/Logging: Set config options to behave like old log system. 2012-08-16 00:56:58 +02:00
Spp 8a1e7dd070 Core/Loading: Re-enable Server loading log 2012-08-16 00:23:44 +02:00
Spp 52a5991c12 Core/Logging: Added documentation about this system
- Restored old CharDump (LOG_FILTER_PLAYER_DUMP) but disabled by default.
- "%s" is now used to set dynamic file names, only used by GM commands and Player dump
2012-08-15 19:58:02 +02:00
Spp b77d88ec51 Core/Logging: Fix crash on authserver shutdown
Closes #7365
Closes #7325
2012-08-15 15:59:11 +02:00
Spp 4a5a077b65 Core/Logging: Use prepared statements in AppenderDB 2012-08-06 13:36:34 +02:00
Spp 156d1e7b3c Core/SQL: Kill core if error 1064 is triggered (error code 1064 you have an error in your sql syntax). This means the sql has an build error and core fix is needed 2012-08-06 13:23:09 +02:00
Spp 6d21515939 Core/Logging: Implement logging to database 2012-08-06 13:20:24 +02:00
Spp 97c4b92eb0 Core/Logging: Try to simplify configuration of loggers and appenders
Changed multiple lines to a simple format:
- Logger.name=Type,LogLevel,Flags,AppenderList
- Appender.name=Type,LogLevel,Flags,optional1,optional2
  * Type = File: optional1 = File name, optiona2 = Mode
  * Type = Console: optional1 = Colors

Created a default set of loggers and appenders.
- Root logger defaults to Error, that means you will see nothing on console by default (not even loading)
- You need to add the loggers to Loggers options if you want to enable them, otherwise Root logger will be used for all types

Restored outSQLDriver (LOG_FILTER_SQL_DRIVER), outSQLDev (LOG_FILTER_SQL_DEV), outArena (LOG_FILTER_ARENA) and outChar (LOG_FILTER_CHARACTER) functionality by creating new types (LOG_FILTER_CHARACTER is a rename of LOG_FILTER_DELETE.

Note: You need to update your config file... again (yeah sorry... trying to make it simpler)
2012-08-06 12:10:33 +02:00
Spp 5746b688fa Core/Logging: Reload Logging options when .reload config is used 2012-08-06 09:30:47 +02:00
Spp 483fb42306 Core/Logging: Move player delete logging to new type LOG_FILTER_PLAYER_DELETE (34). Also add missing sql from 55ce180f28 2012-08-06 08:49:31 +02:00
Spp 3f42094b9c Core/Logging: Add option to remove timestamp, Log Level and Log Filter Type from logged msgs
- Appender config option .Timestamp and .Backup became obsolete
- New Appender config option .Flags added

Appender Console prefixes Log Level and Log Filter Type to the logged text as default
Appender File prefixes Timestamp, Log Level and Log Filter Type to the logged text as default
2012-08-05 15:38:25 +02:00
Spp 1089102827 Add missing Copyright headers and some clarification to config files... ¬¬ 2012-08-03 17:29:43 +02:00
Spp 634776e0bc Fix compile under windows 2012-08-03 15:54:54 +02:00
Spp 55ce180f28 Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'

Explanation of use with Sample config:

Appender.Console.Type=1       (1 = Console)
Appender.Console.Level=2      (2 = Debug)

Appender.Server.Type=2        (2 = File)
Appender.Server.Level=3       (3 = Info)
Appender.Server.File=Server.log

Appender.SQL.Type=2           (2 = File)
Appender.SQL.Level=1          (1 = Trace)
Appender.SQL.File=sql.log

Appenders=Console Server      (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)

Logger.root.Type=0            (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5           (5 = Error)
Logger.root.Appenders=Console

Logger.SQL.Type=26            (26 = SQL)
Logger.SQL.Level=3            (2 = Debug)
Logger.SQL.Appenders=Console Server SQL

Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName

* At loading Appender SQL will be ignored, as it's not present on "Appenders"

* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged

* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged

* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
  - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
    - Appender Console has lower Log Level: Msg is logged to Console
    - Appender Server has higher Log Level: Msg is not logged to file
    - Appender SQL has lower Log Level: Msg is logged to file sql.log

* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender

* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
    - Appender Console has lower LogLevel: Msg is logged to Console
2012-08-03 14:20:18 +02:00
Spp 5a99dfad14 Warning fixes + compile fix after the merge 2012-07-30 10:07:26 +02:00
Jorge b460c496e2 Merge pull request #7227 from Vincent-Michael/PCH
Core/Misc: Use proper headers to optimize compile
2012-07-30 00:02:03 -07:00
Spp 0fe4580fe0 Core/Commands: Add support for ip2nation database lookups when using .pinfo command.
This will (when a full database exists) allow for seeing (approximately) which country a player might be from when doing .pinfo <player>
Note: External data required for this patch to work correctly can be found at http://www.ip2nation.com/ip2nation/Download

Signed-off-by: click <[email protected]>
2012-03-23 05:35:32 +01:00
Spp f1949b20a6 Some random cleanup here and there 2012-03-09 13:42:52 +01:00
Spp f495e0efe4 Warning fixes and some random cleanup here and there 2012-03-07 14:09:18 +01:00
Spp d38bc3a178 Core: Rename GetCreatureInfo to GetCreatureTemplate and minor cleanup here and there 2012-02-27 14:58:47 +01:00
Spp 3e622ee7ac Core: Minor cleanup in ObjectMgr and warning fixes 2012-02-27 11:08:34 +01:00
Spp 32eab3dca7 Core/Calendar: WIP Calendar. 2012-02-24 20:11:29 +01:00
Spp 1e246cb66c Fix build (gcc) and fix warnings 2012-02-22 09:15:57 +01:00
Spp 03c34ee507 Fix a lot of warnings 2012-02-16 13:56:28 +01:00
Jorge f2281f43c6 Merge pull request #5061 from Souler/fix_tournament_quests
Argent Tournament Quests: Mastery of...
2012-02-07 01:56:42 -08:00
Jorge 198dafdb1a Merge pull request #5049 from kandera/fix_cmake
fix bad cmake file from move.
2012-02-02 06:40:28 -08:00
Spp c9762b0e38 Core: Change Handlers location 2012-01-26 10:54:53 +01:00
Jorge f4b7414dc0 Merge pull request #4965 from Bootz/master
Script cleanup MoltenCore
2012-01-26 01:10:47 -08:00
Jorge 09bca144af Merge pull request #4963 from Bootz/master
Script clean-ups
2012-01-26 00:51:19 -08:00
Jorge 9089ad2d61 Merge pull request #4952 from Bootz/master
Script fixes defines in enums...BWL
2012-01-25 23:52:33 -08:00
Jorge 528a9a6966 Merge pull request #4742 from Subv/gossips
Gossips
2012-01-10 03:16:06 -08:00
Spp 57490ead83 Core/Commands: Allow to search for other account/characters from a selected player without having to write the ip as argument (By Bizzy) 2011-12-30 08:27:05 +01:00
Spp 48829f8ffb Core/Players: Fix out of bound access (by MoltenDev) 2011-12-28 12:32:48 +01:00
Spp c1513b2c05 Warning fixes 2011-12-28 11:00:27 +01:00
Spp 3792b470e0 Core/Scripts: Replace rand with urand in most cases (using regexp)
Used: perl -pi -e 's/([0-9]+) \+ rand\(\)\%([0-9]+)/"urand(".$1.", ".($1+$2).")"/ge'
2011-12-28 10:51:16 +01:00
Spp 4fb634f9a5 Fix missing changes from previous merge 2011-12-28 09:16:06 +01:00
Jorge 6d327ac126 Merge pull request #4509 from Aokromes/master
Change some rands() to urand
2011-12-27 23:46:30 -08:00
Spp ee8ed0247c Fix typo from previous commit 2011-12-15 16:07:06 +01:00
Spp d59c5e627f Fix warnings 2011-12-15 11:12:15 +01:00
Spp 99ad58233b Core/Opcodes: Change status of CMSG_MOVE_SET_COLLISION_HGT_ACK to Unhandled to kill spam log 2011-11-22 13:26:54 +01:00
Jorge 7c1f1b3898 Merge pull request #3907 from Aokromes/master
Scripts/Utgarde Pinnacle: Remove resize hack for Arthas
2011-11-10 04:23:40 -08:00
Jorge 4749c853cc Merge pull request #3901 from Yelvann/master
Core/Arenas: Members of same arena team were able to fight each othe...
2011-11-09 11:59:13 -08:00
Jorge dc81555740 Merge pull request #3827 from Yelvann/master
Revert commit ab023e8 (Add GM tag to gms in Who)
2011-11-04 01:54:58 -07:00
Spp bb64e64463 Compile Fix 2011-10-18 17:55:21 +02:00
Spp e3f8588a22 Minor changes here and there:
- Cosmetic changes
- 'Engrish fix'
- Initialization of some vars
- Remove some not needed includes
2011-10-18 14:59:23 +02:00
Spp b5e8a192b1 Core/Calendar: Send map raid reset only once
Also some minor changes here and there
2011-10-18 14:23:08 +02:00
Spp bc023c6dfb Core: Fix some warnings 2011-10-18 12:39:01 +02:00
Spp 805e14a463 Core/Grid: Replaced ambiguous operator overloads with functions (Makes it clear to read) 2011-10-18 11:42:40 +02:00
Spp e5fb7f093f Minor cleanups here and there 2011-10-18 11:13:56 +02:00
Spp ee69fc940e Core/Items: Split SetSoulboundTradeable in two functions (Set and Clear)
Note: this is mostly for clarify action being done: ClearSoulboundTradeable better than SetSoulboundTradeable(..., ..., false)
2011-10-18 10:44:45 +02:00
Spp be34ae68bb Core/GameObject: Fixed memory leak in GameObject AI handling 2011-10-18 09:51:55 +02:00
Spp 8a448c5d91 Core/GameObject: Fix compile warning (Note: bg->GetTypeID(true) will always return the Bg type being played, never Random) 2011-10-18 09:48:11 +02:00
Spp 18aad847e1 Fix a typo in 8b820baa73 2011-09-29 13:25:37 +02:00
Spp b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
Spp 8b820baa73 Core/Battleground: Use a general solution for MSG_BATTLEGROUND_PLAYER_POSITIONS 2011-09-29 10:21:33 +02:00
Spp 9e517c963b Cosmetic: Replace "* )" with "*)" and "* /*" with "* /*" 2011-09-29 09:32:55 +02:00
Spp be12603150 Configuration/ConfigMgr: converted from singleton to namespace with free functions. 2011-09-28 13:00:43 +02:00
Spp 71228f90bb Core/Weather: Move static function to WeatherMgr. 2011-09-28 11:55:25 +02:00
Spp b93067350c Core/WeatherMgr: singleton converted to namespace with free functions. Note how RAII saves your life and removes the need in explicit delete :) 2011-09-28 11:38:56 +02:00
Spp cc06c41887 Core: Move FormationMgr to namespace
Also...
- Warning fixes
- Make Singleton constructors private
2011-09-28 11:11:38 +02:00
Spp 852ffcc139 Core/Scripting: Remove unnecesary reference in param function OnMemberRemove 2011-09-28 10:35:59 +02:00
Jorge a7396c3112 Merge pull request #3248 from megamage/master
Unlink Battleground and BattlegroundMap when one of them is deleted. Fix crash #3239.
2011-09-27 23:40:21 -07:00
Spp 7b68a6bf69 Core/Logging: Add new function to include full stacktrace.
Note: It only has use for devs but makes it easier to get the error with a full trace
2011-09-26 14:34:50 +02:00
Spp 8484b004dd Core/Handler: Move couple of msgs to Debug 2011-09-26 09:52:17 +02:00
Spp ab023e847a Core/Misc: Add <GM> tag to GMs in Who list 2011-09-23 11:23:22 +02:00
Spp bf38cd8f3e Tab2spaces previous commit :S 2011-09-16 21:56:29 +02:00
Spp d0f9406a10 Core/Instances: Resurrect a dead player (with corpse) before enter to instance. Original patch by Den 2011-09-16 21:54:45 +02:00
Spp 2f83db28f2 Core/Instances: Fix client freeze when trying to enter an instance which have players inside and you have save but not in same group that people inside and your homebind is in the same continent that the instance 2011-09-16 21:52:49 +02:00
Spp 6c943bfb08 Core: Cleanup in MiscHandler::SendAreaTriggerMessage and warning fixes 2011-09-16 10:53:24 +02:00
Spp af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp 8aadf83e93 Core/Dungeon Finder: Fix entry point not being saved to db. 2011-09-14 11:21:02 +02:00
Spp- 49686075c3 Core/Dungeon Finder: Use areatrigger coords when trying to get out from a lfg dungeon using the portal after player have been disconnected and original coords have not been saved 2011-09-14 10:16:14 +02:00
Spp- 33ce07bdde Core: Minor cleanups (here and there)
- Fix warning
- Fix some typos
- Correct upper 'for' limit in LoadSkillLineAbilityMap
- Remove use of magic number in a query related to security levels
2011-09-13 14:15:35 +02:00
Jorge d99db2ba27 Merge pull request #3007 from Aokromes/master
Better description for Rate.InstanceResetTime setting.
2011-09-12 23:41:29 -07:00
Jorge 1b30f1b641 Merge pull request #3006 from Aokromes/master
fixes 2 typos
2011-09-12 22:52:02 -07:00