Commit Graph

62 Commits

Author SHA1 Message Date
jackpoz
e6f26cfb1f Core/Misc: Fix static analysis issues
Fix some static analysis issues reported by Coverity.
Rename SpellMgr::EnsureSpellInfo() to SpellMgr::AssertSpellInfo() to be consistent with other similar methods.
2015-02-08 19:40:03 +01:00
Vincent-Michael
ab90f74486 Update copyright note for 2015
Happy new year
2015-01-01 00:28:09 +01:00
Shauren
15fbb6f46f Core/Entites: Updated GUID format 2014-10-29 21:13:21 +01:00
DDuarte
5bc823f5e7 Core: Even more warning fixes 2014-10-27 22:52:19 +00:00
Shauren
7afab9f783 Core/Entities: Updated HighGuid values 2014-10-27 12:03:35 +01:00
Shauren
9e1930959d Core/Entities: Changed object lowguid to uint64 2014-10-26 02:57:28 +02:00
Shauren
a0e50ea35f Core/Entities: Use ObjectGuid class in game project 2014-09-14 16:14:12 +02:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
joschiwald
eddf1b5a64 Scripts: replace some SetOrientation() calls with spline packets and some random changes 2013-12-10 18:46:11 +01:00
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
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
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01: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
a566e3e58b Core/Logging: Move more log messages to LOG_FILTER_SERVER_LOADING 2012-08-16 11:02:46 +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
Machiavelli
bc96df1aae Core/Shared: Move container functions to shared project under Trinity::Container namespace. Also implement RandomResizeList which takes a predicate function as parameter.
Core/ScriptedAI: Extend SummonList::DoAction to take a predicate function as parameter and allow specifying a maximum number of units to be selected.
2012-04-08 17:40:05 +02:00
Nay
ead019b061 Core/DBLayer: Correct few more wrong read types (No. 3)
DB/World: Some consistency in the ints "length" field (not really a length)

From A to G world tables verified; missing all the others
2012-03-27 19:26:58 +01:00
leak
12e55a04bb Core/DBLayer: Convert PQuery() queries to prepared statements 2012-03-24 01:25:08 +01:00
leak
ced346076b Merge pull request #4567 from Kiperr/master
Happy new year!
2011-12-31 16:13:28 -08:00
leak
cdbeb42e0f Core/DBLayer: Refactor prepared statement defines to new format (char db) 2012-01-01 01:09:38 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
leak
73cf793e56 Core/DBLayer: Refactor prepared statement defines Note:
The new format for the middle section is a 3-letter upper case abbreviation of the sql command being executed (select -> SEL, update -> UPD, etc.)
{DB}_{SEL/INS/UPD/DEL/REP}_{Summary of data changed}
2011-12-31 20:14:38 +01:00
megamage
529af3cd09 Delete obj if it is not successfully added to grid. More to fix. 2011-11-28 14:05:25 -05:00
megamage
5a0ffefecc Remove unnecessary const_cast<Map*>. 2011-11-23 12:51:20 -05:00
Elron103
84a6417a4e Core/Quests: Fix pooling system causing wrong questrelations
Closes #3101 (probably few others)
2011-10-23 12:11:38 +01:00
megamage
ffdfd9252b More clean up of grid system. 2011-10-18 11:51:30 -04:00
megamage
3ba22d0d06 Rename Map::Add to Map::AddToMap, Map::Remove to Map::RemoveFromMap for better management. 2011-10-10 17:39:34 -04:00
Bootz
5b4c7783c2 REPO: Code-style clean-ups
* Fixed pMap->map
* Fixed pInstance->instance
* Fixed pInsta->instance
* Fixed pQuest->quest
* Fixed pWho->who
* Fixed pTarget->target
* Fixed pGo->go

~DEVNOTES: Handlers/QuestHandler.cpp still needs to be cleaned...
2011-10-07 19:45:43 -05:00
Bootz
81c0a3a847 REPO: code-style clean-up
* Fixed pPlayer->player
* Fixed pCreature->creature

~DevNote: codestyle for Player should be (*player), not *plr or *p...
same goes for Creatures (*creature)... more cleaning needed.
We've way too many codestyles happening here.
2011-10-07 11:08:09 -05:00
Shocker
7afb179185 Misc/Util: Add a template function for returning a random element from any container 2011-09-15 21:28:40 +03:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
e47b96af3e Core: Append single character to stream as character, not as a string 2011-07-29 14:18:28 +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
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
leak
e2e9431ca3 Core/ObjectMgr: Refactor sGOStorage 2011-04-28 22:54:30 +02:00
Shauren
2f79b0f266 Core: Removed all double (and more) empty lines 2011-03-21 10:52:14 +01:00
leak
b6074f90da Core: Cleaned up leftovers from loading functions streamlining 2011-03-10 22:22:29 +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
leak
137b079eea Core: Generic cleanup (tab2spaces/trailing whitespace removal) 2011-01-26 01:03:35 +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
Shauren
0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
Shauren
7b4e1c6387 Core/ObjectMgr: Static members are no longer accessed through singleton
--HG--
branch : trunk
2010-12-22 20:23:47 +01:00
leak
6115b0bd5f Removing ProgressBars as they are performing badly on startup.
[**************************************************] 100%
R.I.P

--HG--
branch : trunk
2010-12-22 00:12:03 +01:00
leak
fd694cd232 Streamlining loading functions for server startup
- Added a couple of timer outputs
- Improved code consistency between loading functions
- Progess bars should look and behave similar on all OS now (sLog.outString() is not needed anymore to replace the progress bar in log files)

--HG--
branch : trunk
2010-12-19 17:06:33 +01:00
Shauren
8984e9036d Core/Pools: Added missing check in loop
--HG--
branch : trunk
2010-11-12 17:12:38 +01:00
click
dd29d9e422 More copyright header updates (will this ever end?)
--HG--
branch : trunk
2010-10-07 14:50:05 +02:00
click
461590832a Core: Generic cleanup (tab2spaces/whitespace removal)
--HG--
branch : trunk
2010-09-25 22:03:57 +02:00