Commit Graph

124 Commits

Author SHA1 Message Date
Carl Hjerpe
8737984b71 Implement script hooks: OnDamge, OnHeal 2013-10-01 18:35:09 +02:00
Shauren
cfd1027b88 Build fix 2013-08-26 18:42:35 +02:00
Shauren
4f44cdf2b5 Core/Scripts: Fixed uninitialized variable and memory leaks 2013-08-26 17:38:02 +02: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
Nefarion
49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Shauren
226e0fdd1b Unbreak the build and renamed sql file to proper date 2013-03-04 17:08:07 +01:00
Shauren
ae4d2845c9 Core: Fixed compile warnings and errors 2013-03-04 16:47:39 +01:00
Shauren
d232977ec4 Core/Maps: Prevent creating maps without a valid Map.dbc entry
Closes #9181
2013-02-14 16:54:31 +01:00
Spp
61979f8591 Scripts/Player: Add OnMapChanged to PlayerScripts (after map changed)
Core/Dungeon Finder: Use OnMapChanged script to cast/remove Luck of the draw
- Also move code to force party update to LfgPlayerScript
- Remove some obsolete Lfg code after recent commits
2013-02-04 16:52:43 +01:00
Ellie
c2e610cde7 Core/Scripting: Created a hook for when a player is about to be saved. 2013-01-02 17:03:57 -08:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Shauren
1297a93d90 Core/Scipts: Missed changes from 7be13b6fda 2012-12-17 15:01:20 +01:00
Shauren
7be13b6fda Core/Scripts: Fixed crash on shutdown 2012-12-17 11:44:41 +01:00
Carlos Vargas
6c6586fa43 Core/Scripts: Adding script hooks to allow for third party scripts to modify damage dealt.
Originally from the VAS Autobalance script, slightly modified.

Only addresses Spells, Dots, and Melee Damage. I'll have look at the current modules on ways of doing this but, Environmental Damage(fire/lava/drowning), Fall Damage, and Potentially AoE aren't covered by these.

Closes #7867

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-12-17 01:26:56 +00:00
Gacko
c65ccba1e1 Core/DB: Drop table script_texts 2012-12-13 14:48:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp
7bef4ce401 Core/Misc: Reduce header dependencies - Step III 2012-11-20 15:03:56 +01:00
Spp
b5c9ab8802 Core/Misc: Reduction of header dependencies - Step II 2012-11-20 12:30:30 +01:00
Spp
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
Vincent-Michael
6891fe6248 Core/Battlefield: Add missing stuff for wintergrasp 2012-08-21 23:03:30 +02:00
Kandera
b9f60fe56c Core/Wintergrasp: finish implementation for battlefields. this is highly experimental enable at you're own risk. will almost definatly cause issues with the wintergrasp patch floating around 2012-08-20 16:23:24 -04:00
Kandera
e4bf9d5cd4 cleanup merge and some unneeded selects in functions 2012-08-20 13:58:58 -04:00
Spp
a566e3e58b Core/Logging: Move more log messages to LOG_FILTER_SERVER_LOADING 2012-08-16 11:02:46 +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
Vincent-Michael
634b3645d5 Core/Misc: Use proper headers to optimize compile 2012-07-30 05:38:40 +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
4f14693ef2 Core/Scripts: Corrected previous commit and added a few AI hooks to GameObjectAI 2012-04-14 18:26:16 +02: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
Subv
ba3f25c143 Core/Scripting: Allow the use of WorldMapScript for maps that are not continents (aka, all maps)
Closes #171
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-07 11:59:01 -05:00
Shauren
78e8de5913 Core/Scripts: Fixed script unloading 2012-03-24 17:09:42 +01: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
Shauren
f85fdbebe7 Core/DBC: Remove store getters (useless since we don't have scripts as external dll) 2012-03-10 20:53:26 +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
Subv
8a72aede16 Codestyle: Renamed some variables to fit codestyle, corrected order in structure/class fields to match alignment (they use slightly less memory now)
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-14 12:46:26 -05:00
Subv
d790adefe0 Codestyle: Renamed some variables to fit codestyle
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-12 20:10:09 -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
Nay
c19a6c7e31 Core/Loading: Drop the field script_version from the table version.
It serves no purpose (and one step closer to remove EAI from the core/db)
2011-10-28 23:00:00 +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
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
QAston
a077a26aa5 Core/Spells: update the core to the changes from 1fb1988d46 . To make your custom code work with those changes simply lookup the value of Targets enum value from prev rev, and update the name in your code. 2011-08-16 19:44:18 +02:00
XTZGZoReX
4276c73be8 Core: Cosmetic cleanups and additional comments in ScriptMgr. 2011-08-14 13:45:42 +02:00
Spp
7e53a73059 Core/Vehicles: Remove Vehicle.h dependency from other header files 2011-08-03 12:28: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
b9a6e2333c Core/Spells: Removed implicit casts from SpellImplicitTargetInfo, fixed copypaste mistakes and one crash 2011-07-27 12:35:59 +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