Commit Graph

102 Commits

Author SHA1 Message Date
Subv
554e88dd63 Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps 2012-08-30 19:16:09 -05:00
Nay
5f1977cb1d Core: Fix many "errors"/warnings and coding style (1)
Extractors, worldserver, authserver, shared and collision affected

Errors were found using Cppcheck, open-source static analysis tool
2012-08-30 19:07:59 +01:00
Subv
937518181f Core/Mmaps: Fixed build after last merge 2012-08-24 11:38:39 -05:00
Subv
dc95ce61b4 Merge branch 'master' of github.com:TrinityCore/TrinityCore into mmaps
Conflicts:
	dep/PackageList.txt
	src/server/game/Movement/MotionMaster.cpp
	src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
	src/server/game/Movement/Spline/MoveSplineInit.h
	src/server/game/World/World.h
2012-08-22 17:26:53 -05:00
Chaplain
fb1ac16b0c Core/Misc: Some fixes here and there
Closes #7277
2012-08-20 11:05:50 +02:00
Spp
8a1e7dd070 Core/Loading: Re-enable Server loading log 2012-08-16 00:23:44 +02:00
Nay
d1b10082a2 Whitespace is the root of all evil (version 2) 2012-08-03 22:55:18 +01: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
Shauren
6eadc63ade Core/VMaps: Use fabs instead of abs for float type. On some platforms abs has only int overload exists. 2012-07-01 01:42:58 +02:00
Shauren
c8d20004a5 Core: Minor code style corrections 2012-06-30 16:07:09 +02:00
Chaplain
716e2db0e1 Core/Misc: Code-style + some const methods. 2012-06-21 21:05:45 +03:00
Venugh
8368112f45 Try to check existance of mmaps folder. 2012-04-09 18:05:35 +02:00
Venugh
d6bddc1c94 Core/Mmaps:
* implemented loading part.
2012-04-09 15:11:39 +02:00
Venugh
eae627f752 Core:
+ add mmaps files.
+ add the generator for movement.
2012-04-09 14:51:03 +02:00
Shauren
a1a7a2d7c0 Core/Players
* Add liquid special aura only if player is in it (not when above)
* Use CastSpell instead of AddAura - checks all dbc conditions on spell
2012-03-07 18:57:47 +01:00
Shauren
e5d23103f3 Core/Maps
* Corrected liquid type extraction in maps - MCLQ chunk must be parsed together with MH2O (they stack)
* Fixed liquid detection in WMO objects
* Implemented LiquidType.dbc use, players will now get proper auras in special liquids
* Turned off slime damage by default (Naxxramas uses periodic damage aura for this purpose)
* Implemented liquid type overrides basing on area/zone
* Renamed final temp_gameobject_models to GameObjectModels.dtree (the temporary one produced by vmap extractor remains unaffected)

Note: Map and Vmap re-extraction is required
2012-03-07 13:09:35 +01:00
Subv
4029c23547 Core/Collisions: Reverted a commit about M2 models.
closes #5312 and probably others
2012-03-04 08:23:19 -05:00
Spp
3e622ee7ac Core: Minor cleanup in ObjectMgr and warning fixes 2012-02-27 11:08:34 +01:00
Shauren
8ae3037307 Compile fix for gcc 4.5 and higher 2012-02-23 16:14:50 +01:00
Shauren
adc115dc41 Core/Vmaps: Fixed errors during loading gameobject models and improved error output (will now write to logs) 2012-02-23 15:56:53 +01:00
click
dce3bc01ac Core: Fix non-PCH building 2012-02-19 16:57:07 +01:00
click
5411e1ce52 Core: Clean up whitespace and tabs in the base sourcetree 2012-02-18 16:52:08 +01:00
Spp
03c34ee507 Fix a lot of warnings 2012-02-16 13:56:28 +01:00
leak
bfc657defe Core/VMaps: Logic fail in path cleanup 2012-02-15 16:42:40 +01:00
Subv
c53d722aa2 Core/Collision: Models with flag MOD_M2 (mostly trees, among some other objects) should not be taken into account for LoS checks, this check does not apply to gameobjects (yet)
closes #3495

Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-14 18:19:40 -05:00
Subv
ff9830c18d Core/Spells: Blink wont be able to trespass solid objects anymore (walls/doors)
Refactored some code

Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-11 19:23:18 -05:00
Subv2112
93d199f043 Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and
added lots of improvements
Please re-extract vmaps
2012-02-09 13:58:22 -05:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
mns
8f8d45fdaf Fix vmapassembler
Signed-off-by: mns <pgameserver@gmail.com>
2011-12-01 04:19:38 +03:30
Machiavelli
4c3c418511 Core/Misc: Make VMapManager2::acquireModelInstance and releaseModelInstance thread safe
Closes #4086
2011-11-26 19:11:58 +01:00
Shauren
44693cfa99 Core: Fixed a few warnings and silly typos in scripts 2011-11-23 16:57:08 +01: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
unknown
8acf07dbab Random minor code cleanup 2011-09-29 22:35:00 +04: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
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
45af1238cf Conditions/DisableMgr: converted from singleton to namespace with free functions. 2011-09-09 14:27:23 +02:00
Spp-
e47b96af3e Core: Append single character to stream as character, not as a string 2011-07-29 14:18:28 +02:00
click
7fe3f55b5e Core: Fix non-PCH build + clean up some sporadic warnings 2011-07-18 14:49:08 +02:00
Lopin
e35e4d6e23 Core/Disables: Allow to disable certain vMaps through Disables system. Wiki will be updated soon 2011-07-11 16:14:26 +02:00
Spp-
bb921ae78c Core: Do not use STL container size method to check if container is empty 2011-07-01 14:58:44 +02:00
Shauren
2fd70ed49d Core/Collision: Fixed possible memory leaks 2011-05-11 14:11:20 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
click
9762c17833 Core/Buildsystem: Update copyright-headers for 2011, and adjust with the correct teamname as well. 2011-04-27 18:17:00 +02:00
Lynx3d & Ambal
347098af14 Core/Vmaps: Made code more safe and fixed problems in WmoLiquid::GetLiquidHeight() 2011-04-02 20:36:27 +02:00
Shauren
2f79b0f266 Core: Removed all double (and more) empty lines 2011-03-21 10:52:14 +01:00
Shauren
e5347a3bda Core: Fixed warnings:
C4100: 'variable' : unreferenced formal parameter
C4701: potentially uninitialized local variable
C4389: '!=' : signed/unsigned mismatch
C4245: 'argument' : conversion from 'X' to 'Y', signed/unsigned mismatch
2011-03-08 16:42:00 +01:00
Machiavelli
e07e20ffca Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf. 2011-02-20 20:16:34 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Shauren
928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
Spp
408fce1de6 Core: Some optimizations
- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file

--HG--
branch : trunk
2010-12-06 02:07:53 +01:00