Commit Graph

43 Commits

Author SHA1 Message Date
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +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
Malcrom
ec474a62e5 Core: More Function Renaming. 2013-06-11 21:25:12 -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
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
horn
771aafc499 Core/Calendar: Completely rewrite and fix most of the calendar system
There are still some issues that need to be fixed, for more info see CalendarHandler.cpp TODO part.
Some unblizzlike behaviour possible, we don't have a lot of sniffs.
Big thanks to @Warpten, he joined my project and helped a lot.

IMPORTANT NOTE: Read / append packed time functions in ByteBuffer.h are not correct, they need to be fixed in order to have event times accurate

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-11-18 22:42:28 +00: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
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
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
Shocker
a045015bf2 Core/Mail: Mails sent by game masters should last 90 days 2011-12-13 00:05:48 +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
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
b2a84d9f1e Core/ObjectMgr: Remove GetPlayer function (Remove double use of singletons) 2011-07-27 12:14:27 +02:00
click
f16df538ee Core: More codestyle cleanups 2011-06-12 01:47:45 +02:00
Machiavelli
59c0670f44 Core/DBLayer: Fix possible transaction deadlock in HandleMailReturnToSender opcode 2011-05-21 14:24:46 +02:00
leak
1003f30448 Add spaces after commas 2011-04-29 20:47:02 +02:00
Shauren
2f79b0f266 Core: Removed all double (and more) empty lines 2011-03-21 10:52:14 +01:00
Machiavelli
957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
leak
73fe85e6fd Core/Handlers: Allow gamemasters to send mails with customer support badge depending on gm mode (.gm off/on) 2010-12-31 04:47:57 +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
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
f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click
8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
Shauren
d8ddf38453 Core/Items: Implemented trading soulbound loot items
Core/DBLayer: Converted more more player-related queries into prepared statements
Core/Items: Fixed loading of enchantments

Closes issue #4130.

--HG--
branch : trunk
2010-09-21 21:55:16 +02:00
silinoron
2dae023649 Core/[Mail, WorldPacket]: Pull mail packet handlers out of Mail.cpp into MailHandler.cpp
Core/ScriptSystem: Remove unneeded TODO.

--HG--
branch : trunk
2010-09-04 13:46:01 -07:00
silinoron
8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00
azazel
caa3a58213 Core:
* add Player::HasEnoughMoney methods to check, whether player has specified amount of money and use new methods where applicable
* fix some signed/unsigned warnings and some typos

--HG--
branch : trunk
2010-08-23 22:58:32 +06:00
click
ace057f1d7 Core/Build: Finalize the non-PCH building - now compiles on all platforms in nonPCH-mode, and in PCH (unless we've fucked up somewhere)
--HG--
branch : trunk
2010-08-21 11:36:52 +02:00
click
f7ad5b2624 Core/Build: Clean up more nonPCH-issues + fix a warning in Timer.h (unsigned/signed cast)
--HG--
branch : trunk
2010-08-21 09:53:04 +02:00
Machiavelli
8cfc3782e3 Fix linux build (with PCH enabled, mind you)
--HG--
branch : trunk
2010-08-21 03:44:02 +02:00
Machiavelli
994186f267 DB Layer:
- Make SQL Transactions actual objects used in code. (Thanks to Derex for the idea)
* Uncommitted transactions will be automatically rolled back and cleaned up using ACE_Refcounted_Auto_Ptr, so no need to call Rollback() in the code.
* Prevents recursive transactions and makes developers aware of transactions going on.
* Gets rid of unneccesary overhead iterating over a concurrent map.
- Some cleanups in affected code, including better usage of transaction control in AH / mail related code to prevent data loss.

*** Experimental, use at own risk, recommended to backup your DBs. ***

--HG--
branch : trunk
2010-08-21 03:19:25 +02:00
XTZGZoReX
9083271a2f * Some singleton renames for consistency:
accmgr -> AccountMgr
objmgr -> ObjectMgr
auctionmgr -> sAuctionMgr
spellmgr -> sSpellMgr
CreatureEAI_Mgr -> sEventAIMgr
achievementmgr -> sAchievementMgr
gameeventmgr -> sGameEventMgr
sInstanceSaveManager -> sInstanceSaveMgr
poolhandler -> sPoolMgr

--HG--
branch : trunk
2010-08-08 05:25:45 +02:00
XTZGZoReX
909e332579 * Rename: BattleGround -> Battleground.
--HG--
branch : trunk
2010-08-08 04:37:24 +02:00
click
f5d57f05f7 Remove AuctionHouseBot-functionality from core (some cleanups may be required)
--HG--
branch : trunk
2010-08-06 04:22:07 +02:00
Shauren
b7d34dcb53 Cleaned up item flags: separated item proto flags and item field flags
Implemented use of:
ITEM_PROTO_FLAG_PROSPECTABLE and ITEM_PROTO_FLAG_MILLABLE now checked instead of bag family mask
ITEM_PROTO_FLAG_SMART_LOOT for profession recipes, player has to have skillline and not know the recipe
ITEM_PROTO_FLAG_OPENABLE item has to have it set to use item_loot_template
ITEM_PROTO_FLAG_NOT_USEABLE_IN_ARENA if this is set item can never be used in arena
ITEM_FLAG_UNLOCKED marks unlocked items

Simplified BoA check for mail sending
Stackable items are no longer refundable
Removed useless code that always set ITEM_FIELD_FLAGS equal to proto flags
Unlocking items (lockpicking) is now blizzlike

--HG--
branch : trunk
2010-08-04 10:34:30 +02:00
click
2b29d4e65d Don't return mails to non-existing characters (thanks to laviniu for finding the bug)
--HG--
branch : trunk
2010-06-25 21:49:27 +02:00
Rat
75b80d9f5b rearranged core files
--HG--
branch : trunk
2010-06-05 23:40:08 +02:00