Commit Graph

77 Commits

Author SHA1 Message Date
Spp
013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Shauren
f03e650474 Core/Calendar: Fixed breaking calendar event UI after relogging 2012-09-13 16:38:18 +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
e72f01650c Core/Misc: Minor update to SMSG_GUILD_QUERY_RESPONSE, added a value to enum MailStationery, some comments to a few dbcs.
DB: Renamed merged sql files
2012-08-02 08:04:12 +02:00
click
766475ea4f Core/Guild: Fix guildbank tab loading after recent changes (returned value of a COUNT() is always BIGINT) 2012-03-29 14:41:55 +02:00
click
b5fb1b5b64 Core: Fix a minor mistake from previous mistake and adjust some more field-types 2012-03-29 07:10:21 +02:00
click
be947eed76 Core: Fix fieldtype-errors in Guild-code - should now allow loading guildtabs etc correctly 2012-03-29 04:45:10 +02:00
Gyx
72cdcbfced Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 19:11:50 +08:00
MrSmite
887470ebdb Guild bank - Allow deposit / withdraw money without tabs
closes 5637
2012-03-16 16:10:39 -04:00
Spp
f495e0efe4 Warning fixes and some random cleanup here and there 2012-03-07 14:09:18 +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
kaelima
11fb0beaf0 Core/Misc: Fixed some duplicate checks for player typeid in Unit::Kill and Spell::EffectSummonDeadPet. Also some random cleanup 2011-12-10 13:48:41 +01:00
megamage
c8251bc619 Remove some "_" from private methods as required by TC standards. Thanks to Shauren for pointing out. 2011-10-13 17:01:55 -04:00
Bootz
96d7a1e970 REPO: code-style clean-up
* Fixed pGuild->guild
* Fixed pGroup->group
* Fixed pOwner->owner
2011-10-07 10:54:53 -05:00
Spp
be12603150 Configuration/ConfigMgr: converted from singleton to namespace with free functions. 2011-09-28 13:00:43 +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-
327fe7c247 Core: Define helper functions to know if an account is Player, Moderator, GM, Admin or Console 2011-09-08 15:11:55 +02:00
Spp-
aa85553bfd Core: Crash fix (TemporarySummon), remove some warnings and some other minor changes
- "const uint64" and "uint64 const" --> uint64
 - Add some info in LFGDungeonEntry
 - Move some definitions from ".h" files and move to ".cpp"
2011-08-30 13:46:36 +02:00
Spp-
acd0fc79f6 Core: Pass by const reference for simple objects replaced with pass by value 2011-08-01 14:23:27 +02:00
Spp-
b2a84d9f1e Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons) 2011-07-27 12:14:27 +02:00
click
da03bbbdab Core: Yet more cleanups in codestyle... 2011-06-12 02:06:07 +02:00
click
f16df538ee Core: More codestyle cleanups 2011-06-12 01:47:45 +02:00
leak
ea06dcf418 Core/ObjectMgr: Refactor guild related functions into dedicated class 2011-05-04 10:08:09 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
leak
01a79947d5 More cleanup after last commit spree 2011-04-29 19:59:40 +02:00
Azazel
6fb2bf4224 Core: use enum InventoryResult as return type for functions working with player items.
Original patch by TOM_RUS.
2011-04-29 16:48:15 +06:00
leak
a82654debd Core/ObjectMgr: Refactor sItemStorage 2011-04-28 22:42:33 +02:00
Azazel
e49b5b44d6 Core/Cleanup: remove C-style cast to (Bag*):
* add ToBag() methods for Item class;
* add GetBagByPos() method for Player class.
2011-03-18 15:58:08 +06:00
leak
b6074f90da Core: Cleaned up leftovers from loading functions streamlining 2011-03-10 22:22:29 +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
leak
dd751242fc Core/Spells: Better solution for exploit check (Thanks to manuel)
Readd lost changes from char db type cleanup
2011-01-20 03:06:51 +01:00
leak
c59ea4726e SQL: Characters db storage type cleanup No. 6 2011-01-20 01:02:24 +01:00
leak
a486eb0c2f SQL: Characters db storage type cleanup No. 5 2011-01-20 00:08:45 +01:00
leak
a7df9ddff1 SQL: Characters db storage type cleanup No. 4 2011-01-19 22:46:21 +01:00
Machiavelli
deed0d0781 Core/General: Fix some comment style. //* to // *. Fixes certain code display errors on nano. Thanks to Aokromes for pointing out. 2011-01-16 12:23:17 +01:00
Machiavelli
fa8e5047a6 Core/Guilds: Fix a possible client crash in MSG_GUILD_BANK_LOG_QUERY 2011-01-10 20:57:58 +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
azazel
b39b8fdd0d DB Schema/Characters: removed columns auctionhouse.item_template, character_inventory.item_template, guild_bank_item.item_entry and mail_items.item_template and created item_instance.itemEntry column instead of them.
As a side effect moved related queries to prepared statements.
As one more side effect fixed not shown and lost mail items in returned expired mail (patch by Quriq14).

--HG--
branch : trunk
2010-12-15 14:08:12 +06:00
click
2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
Machiavelli
d75eaf8e83 Core/Guild: More signed/unsigned comparison fixes. Should fix guild log loading.
--HG--
branch : trunk
2010-12-13 16:58:59 +01:00
Machiavelli
1a4fe4baca Core/Guilds: Fix logic in bank withdrawal method (unsigned comparison with signed value). Should fix certain guild bank related bugs.
--HG--
branch : trunk
2010-12-13 16:42:09 +01:00
Machiavelli
976225a9dd Core/DBLayer: Implement global ExecuteOrAppend methods to DatabaseWorkerPool for executing queries in a diverse context (transaction or non transaction) - instead of local to Guild.cpp
--HG--
branch : trunk
2010-12-13 16:27:14 +01:00
click
5f4b97fcf7 Core/Guild: Fix guildbank withdrawal limit (non-guildmaster character will not be able to withdraw more than withdraw-limit) - thanks to Azz
Fixes issue 4720

--HG--
branch : trunk
2010-11-11 22:59:06 +01:00
Spp
739f336618 Core: Fix warnings
--HG--
branch : trunk
2010-10-25 11:25:42 +02:00