Commit Graph

42 Commits

Author SHA1 Message Date
joschiwald
18bfa14b74 Core/DisableMgr: readd possibility to disable los check for spells 2012-12-31 01:48:51 +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
Spp
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
Spp
013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02: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
8a1e7dd070 Core/Loading: Re-enable Server loading log 2012-08-16 00:23:44 +02:00
Spp
634776e0bc Fix compile under windows 2012-08-03 15:54:54 +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
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
kaelima
a919265623 Core/DB: Fix character creation in Player::SaveToDB.
And some misc comments/whitespaces
2011-11-26 01:53:44 +01:00
Shocker
d2b4f33112 Core/DisableMgr: Fixed spells disables 2011-11-24 19:09:01 +02:00
Shauren
afb2289d02 Core/DisableMgr: Fixed possible crashes at startup 2011-11-23 19:55:05 +01:00
Shauren
638693e78f Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.) 2011-11-23 17:55:16 +01:00
Spp-
45af1238cf Conditions/DisableMgr: converted from singleton to namespace with free functions. 2011-09-09 14:27:23 +02:00
click
d5fbd223c6 Core: Fix non-PCH build 2011-08-21 17:07:32 +02:00
Spp
473f341012 Core/GameEvent: Minor code optimization. (Also cosmetic changes in other unrelated files) 2011-08-04 14:27:10 +02:00
QAston
b0fe236265 Core: Use new SpellInfo class in core. Sadly, this commit is not compatibile with some of the custom code. To make your code work again you may need to change:
*SpellEntry is now SpellInfo
*GetSpellProto is now GetSpellInfo
*SpellEntry::Effect*[effIndex] is now avalible under SpellInfo.Effects[effIndex].*
*sSpellStore.LookupEntry is no longer valid, use sSpellMgr->GetSpellInfo()
*SpellFunctions from SpellMgr.h like DoSpellStuff(spellId) are now: spellInfo->DoStuff()
*SpellMgr::CalculateEffectValue and similar functions are now avalible in SpellEffectInfo class.
*GET_SPELL macro is removed, code which used it is moved to SpellMgr::LoadDbcDataCorrections
*code which affected dbc data in SpellMgr::LoadSpellCustomAttr is now moved to LoadDbcDataCorrections
2011-07-26 23:09:28 +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
leak
a25ceef61b Fix warnings created by space-after-comma mass change 2011-05-02 13:02:59 +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
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
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
Spp
382fef1958 Core: Some warning fixes
--HG--
branch : trunk
2010-12-15 10:44:06 +01: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
b9fb7554c5 Core/Disables: Add flags SPELL_DISABLE_MAP and SPELL_DISABLE_AREA for sourceType DISABLE_TYPE_SPELL.
This will allow you to disable spells on certain maps/areas. Note that you must have at least flag SPELL_DISABLE_PLAYER or SPELL_DISABLE_CREATURE or SPELL_DISABLE_PET set too, as they take preference.
The parameters for mapIds and areaIds are defined in new columns params_0 and params_1 respectively, in a comma-seperated string.

Example:
INSERT INTO disables VALUES(0, 8921, (1+16+32), "571,1", "1519", "Moonfire Example");

This will disable spell moonfire for players in maps 571,1 and area 1519.

--HG--
branch : trunk
2010-12-04 18:29:14 +01: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
Machiavelli
a41e99223e Core/DBLayer:
* Rename QueryResult class to ResultSet
* Rename QueryResult_AutoPtr to QueryResult
* Declare ACE refcounted auto pointer for PreparedResultSet class

--HG--
branch : trunk
2010-09-11 21:10:54 +02:00
Spp
16d95d3115 Core: Fix some warnings
--HG--
branch : trunk
2010-08-23 07:51:19 +02:00
Shauren
36d1405b52 Fixed bug allowing players to enter instance even if selected difficulty was disabled
Added map id to log when player tries to enter disabled map

--HG--
branch : trunk
2010-08-10 19:40:35 +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
b63a31f513 * Added outdoorpvp_template table (currently unused).
* Added DISABLE_TYPE_OUTDOORPVP (5) which can disable outdoorpvp_template entries.

--HG--
branch : trunk
2010-08-06 18:03:09 +02:00
QAston
48b360097c *use ASSERT macro instead of regular assert for better output.
--HG--
branch : trunk
2010-07-30 20:04:28 +02:00
Shauren
4fb256254c Fixed bug in Player::Satisfy that allowed to sometimes bypass instance requirements
Fixed DisableMgr incorrectly blocking entry into maps when only one mode was disabled

--HG--
branch : trunk
2010-07-26 22:25:03 +02:00
Shauren
14b6a68857 Added new spell disable flag - core will not check if that spell exists in dbc, used for blizz deprecated items/quests
Fixed loading of access_requirement

--HG--
branch : trunk
2010-07-21 15:17:29 +02:00
click
19ed86ef30 Fix compile under *nix when not using PCH
--HG--
branch : trunk
2010-07-21 15:06:05 +02:00
Shauren
6a539270ec Added global disable system and moved all disable fields/tables/configs into it
NOTE: instance disables were not converted for new system! if you had some then you need to fix that using new system

--HG--
branch : trunk
2010-07-21 12:14:23 +02:00