Commit Graph

35 Commits

Author SHA1 Message Date
DDuarte cefcde9ba9 Core/Misc: Multiple static analysis issues fixed (small optimizations and clear code) 2014-09-19 03:30:02 +01:00
Shauren a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
MrSmite 31c00b0ce4 Allow players to track both herbs and minerals at the same time
Note: The following are client limitations and cannot be coded for:
      * The minimap tracking icon will display whichever skill is activated second
      * The minimap tracking list will only show a check mark next to the last skill activated (sometimes this
        bugs out and doesn't switch the check mark. It has no effect on the actual tracking though).
      * The minimap dots are yellow for both resources
2014-09-05 15:06:05 -04:00
DDuarte df3b08d140 Core/Server: Use nullptr instead of 0 where pointers are expected 2014-08-09 21:32:26 +01:00
Discover- 6b25c2b414 Core/Gameobjects: Fix an exploit where it was possible to use gameobjects from any distance. Fixes for example picking up the WSG flag from any distance using hacking tools. 2014-01-25 16:59:01 +01:00
Vincent_Michael 20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Malcrom fe95371d9a Core/Scripting: Replace casted with cast as casted is not a word. 2013-12-25 14:16:55 -03:30
Spp 94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
leguybrush 0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Malcrom 66978cfc3b Core: Some function renaming. 2013-06-11 19:54:27 -02:30
Spp d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
Vincent_Michael 56daf736e4 Core/Spells: Fix logic in 20eeeaf597 2013-03-09 21:33:28 +01:00
Vincent_Michael 20eeeaf597 Core: Fix warnings 2013-03-09 20:15:11 +01:00
Trista ed378ad63c Core/GameObjects: Implement support for HandleGameObjectUse from vehicle or mount 2013-03-09 05:24:33 +02:00
Nefarion 49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Shauren 9301e31a4e Core/Spells: Allow free casting of player's own spells on vehicle seats with flag VEHICLE_SEAT_FLAG_CAN_ATTACK 2013-02-27 13:17:20 +01:00
Vincent_Michael cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp e954498560 Core/Misc: Random changes here and there to minimize differences with 4.3.4 branch 2012-11-27 13:03:12 +01:00
Spp 2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Shauren 00044b5d32 Core/PacketIO: Parse the MGS_MOVE_STOP packet embedded into spell cast packets with flag 0x2 2012-11-25 11:12:53 +01:00
Spp b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
Spp 58ec4e5319 Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete)
- Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly.
- Reset daily slots/money withdraw for all members at same time, configurable
- Better debug messages
2012-11-02 22:26:10 +01:00
Spp 013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Warpten a2c9c4098a Core/Spells: Fixed Soulwell getting two charges removed (or more) per click. 2012-09-22 21:28:37 +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
dr.skull 58c9d7188f Sentry Totem can be unsummoned by totem timers opcode
Signed-off-by: dr.skull <dr.skull@centrum.sk>
2012-08-23 18:01:24 +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
kaelima a32f4f439b Core/Protocol: Move some debug messages to their appropriate debug output mask. 2012-06-03 05:41:30 +02:00
kaelima c40d86f05f Core/Protocol: Fix struct and make use of CMSG_UPDATE_PROJECTILE_POSITION. 2012-05-25 16:44:34 +02:00
Gyx 5b7493fc66 Core/Misc: Code style and remove unused define.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 14:43:34 +08:00
leak 12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
leak 2a5caef4a6 Revert "Core: more more cleanup" - Build test anyone?
This reverts commit 20cd4c71ee.
2012-03-14 18:51:51 +01:00
thomas33 20cd4c71ee Core: more more cleanup 2012-03-14 17:51:11 +01:00
QAston ad6613261c Core/Db/Conditions: Drop usage of CONDITION_ITEM_TARGET and CONDITION_SOURCE_TYPE_ITEM_REQUIRED_TARGET and use CONDITION_SOURCE_TYPE_SPELL instead. 2012-02-16 12:09:09 +01:00
Spp c9762b0e38 Core: Change Handlers location 2012-01-26 10:54:53 +01:00