Commit Graph

99 Commits

Author SHA1 Message Date
Spp
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01: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
Kandera
c70792df02 Core/Scripting: add the ability to access loot/go state changed events for gameobjects from cpp scripting. (malcrom's idea) 2012-05-16 08:47:43 -04:00
Shauren
a3bdaf7e6d Core/Scripts: Added support for creating custom GameObjectAI classes, similar to how creature scripts work. 2012-04-14 17:49:51 +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
Kandera
42454640cf Core/Scripting: codestyle and comment for previous commit 2012-03-02 09:49:44 -05:00
Kandera
c1270bd758 Core/Scripting: added OnPlayerUpdateZone for player scripts 2012-03-02 09:42:17 -05:00
QAston
ce4a4ffe50 Core/Db/Conditions: Add ContidionTarget column which allows selection of objects which will be checked by condition, depending on SourceTypeOrReferenceId.
So far usable only with CONDITION_SOURCE_TYPE_SPELL:
ContidionTarget = 0 - check caster
ContidionTarget = 1 - check explicit target
2012-02-10 23:42:08 +01:00
QAston
8713b44ee7 Core/Db/Conditions: Prepare conditions system to work on objects of different type than players.
Warning: API has changed a bit:
ConditionScript::OnConditionCheck(Condition* condition, Player* player, Unit* invoker) is now
ConditionScript::OnConditionCheck(Condition* condition, WorldObject* object, WorldObject* invoker)
2012-02-10 14:18:59 +01:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01: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
Spp
852ffcc139 Core/Scripting: Remove unnecesary reference in param function OnMemberRemove 2011-09-28 10:35:59 +02:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
XTZGZoReX
4276c73be8 Core: Cosmetic cleanups and additional comments in ScriptMgr. 2011-08-14 13:45:42 +02:00
Spp-
0b5c03f66b Core/Scripts: ScriptRegistry is no longer the part of ScriptMgr public interface, it is not required by caller side. Also remove extra function call to GetScriptId in scripts 2011-07-27 14:52:59 +02:00
Shauren
74e2d981ac Core/GameObject: Refactored destructible building handling, properly implemented spell effect repair 2011-07-22 21:22:05 +02:00
click
c77aa6e846 Core: And some more cleanups... 2011-06-12 02:00:43 +02:00
click
158966dc79 Core: Codestyle cleanup 2011-06-11 22:35:29 +02:00
tobmaps
42fc72447b Core/Dungeon Finder: Fix instances unlock after level change 2011-05-29 22:49:05 +07:00
Shauren
7905200eba Core: Warning fixes 2011-05-07 19:08:50 +02:00
leak
a82654debd Core/ObjectMgr: Refactor sItemStorage 2011-04-28 22:42:33 +02:00
zergtmn
1551b8a011 Core/Misc: move scheduled scripts counter to ScriptMgr (which is more logical, isn't it?) 2011-04-13 12:07:20 +06:00
Supabad
a5a545a403 Core/GameObjects: add script hook when destructable building is damaged. 2011-04-09 19:28:36 +02:00
Shauren
7b35d73317 Revert part of "Core: Removed unused functions (leftovers from sd2, was needed when scripts were built as separate dll)", this part wasnt intended
This reverts commit partly e1bacef346.
2011-04-01 23:14:31 +02:00
Shauren
e1bacef346 Core: Removed unused functions (leftovers from sd2, was needed when scripts were built as separate dll) 2011-04-01 20:31:15 +02:00
Shauren
18995661a7 Core/Scripts: Reverted part of 00f343af52, that is not a typo and fixed the hook properly 2011-03-26 09:19:54 +01:00
gwrde & alexbolotsin
00f343af52 Core/Cleanup: More typo fixes.
Closes #730, #667
2011-03-26 05:33:46 +02:00
Machiavelli
31a2c9b82b Core: Fix crash in ~ScriptMgr
Fixes: #854
Fixes: #918
Fixes: #917
2011-03-14 09:44:02 +01:00
Machiavelli
df97ce7625 Core/Vehicles: Remove redundant Vehicle::Die. All vehicle auras are already removed on Unit::RemoveAllAurasOnDeath.
Addresses ticket:869 - please reconfirm
2011-03-06 10:31:25 +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
0c8b07d3e5 Core/ScriptMgr: Add OnBindToInstance Player hook
--HG--
branch : trunk
2010-12-23 06:06:21 +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
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
azazel
3cb4a52d59 Core/Misc: fix some warnings. As a result removed one redundant hook from FormulaScript.
--HG--
branch : trunk
2010-11-29 15:50:38 +06:00
Spp
d3c9478153 Core/Groups: Add kicker and kick reason to RemoveMember
--HG--
branch : trunk
2010-11-23 20:49:36 +01:00
azazel
4fb572015a Core/Scripts: pass message parameter by reference in OnChat methods to make it possible to be modified inside the script.
--HG--
branch : trunk
2010-11-17 18:14:35 +06:00
Shocker
48d90fab32 Misc: Some engrish fixes, thanks to ZxBiohazardZx, closes issue 4740
--HG--
branch : trunk
2010-11-14 23:46:34 +02:00
Shauren
f2fdcdf8f3 Core/Scripts: Added enum for generic script texts, fixed one broken text
Scripts/Icecrown Citadel: Blood-Queen Lana'Thel will no longer spawn for Blood Princes intro if they were already killed

--HG--
branch : trunk
2010-11-03 16:44:34 +01:00
Rat
51f17678de Typo O.o
--HG--
branch : trunk
2010-11-02 17:47:47 +01:00
Rat
f27b6f6097 Core/SmartAI: do not report not used smart scripts as error
--HG--
branch : trunk
2010-11-02 17:29:36 +01:00
azazel
c0faed2251 Core/Guilds: guild code was completely refactored and rewritten.
* OOP desing and implementation;
* all the queries are moved to prepared statements;
* guild loading is optimized;
* all the possible interaction with guild's data is done inside the guild class;
* added more hooks to GuildScript class;

WARNING: Make sure you backup your characters database before applying this change (just in case).

Known problems with guilds:
* when new member is added to the guild, MOTD is not displayed for him in guild tab of social window;
* if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number);
* packets order differs from official: currently guild bank packet traffic is twice as more than on offy.

--HG--
branch : trunk
2010-10-17 19:54:13 +06:00
click
613b81f36f REALLY fix the CRLF-crap...
--HG--
branch : trunk
2010-10-07 15:54:07 +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
click
461590832a Core: Generic cleanup (tab2spaces/whitespace removal)
--HG--
branch : trunk
2010-09-25 22:03:57 +02:00
Rat
d2af10618f Core/ConditionMgr: added placeholder for CONDITION_GUID
renamed targetOverride to invoker
removed targetOverride code (had no use)

--HG--
branch : trunk
2010-09-24 18:16:29 +02:00
Spp
cc3d4cc823 Core/Scripts: Add OnPlayerLogin, OnPlayerLogout, OnPlayerCreate and OnPlayerDelete
--HG--
branch : trunk
2010-09-15 13:23:07 +02:00
Spp
80051c6d3c Core/Scripts: Add GroupScript class
--HG--
branch : trunk
2010-09-14 16:37:54 +02:00