Commit Graph

416 Commits

Author SHA1 Message Date
Vincent-Michael
9afbb75321 Core/Spells: Fix Divine Shield and Ice Block casted in Cyclone 2012-08-05 04:18:22 +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
Spp
5a99dfad14 Warning fixes + compile fix after the merge 2012-07-30 10:07:26 +02:00
Shauren
537caf33e9 Core/SpellScript: Implemented OnObjectTargetSelect hook for use with spell target that selects a single object 2012-07-03 12:35:06 +02:00
Shauren
2bee0e6e37 Core/SpellScript: Corrected when OnObjectAreaTargetSelect hooks are called (must be before splitting unit/go targets) 2012-07-01 21:05:53 +02:00
Shauren
c8d20004a5 Core: Minor code style corrections 2012-06-30 16:07:09 +02:00
Shauren
067c27d299 Core/SpellScript: Corrected error messages and in-source documentation for OnObjectAreaTargetSelect hook and allow using that hook only for area spell targets 2012-06-30 00:06:17 +02:00
Shauren
e0997874f5 Core/SpellScripts: Changed OnUnitTargetSelect hook to OnObjectAreaTargetSelect, it will now work with WorldObject instead of only Units and call it even for empty target lists 2012-06-29 21:53:35 +02:00
QAston
e53b44b6ba Merge pull request #6491
Core/Spells: convert some spell effects to SpellScripts
Closes #6491
2012-06-14 19:12:03 +02:00
Kandera
5daa540d3a Core/Spells: handle SPELL_AURA_MOD_DEBUFF_RESISTANCE only for auras. fixes sacred cleansing causing the whole spell to be resisted. 2012-06-13 12:34:59 -04:00
joschiwald
8ab6d578ce fix typos - i failed so hard :( 2012-06-08 22:25:33 +02:00
joschiwald
7e454b26ac more updates 2012-06-03 02:35:00 +02:00
Nay
e83f913fc5 Core/Spells: Ignore LoS when spells are cast/triggered by gameobjects
... and this is why you shouldn't use the so called hacks. You will just
 keep adding sh*t on top of more sh*t (like this).
Currently, GO spell casts spawn an invisible WORLD_TRIGGER (npc 12999)
 inside of the gameobject (for certain forms of gameobjects) (and
 this is why the LoS check was failing).
It shouldn't be like that. GOs should be able to cast the spells without
 having to spawn an auxiliary creature.

Fixes "Eye of Acherus" and others
2012-05-28 22:17:17 +01:00
joschiwald
cd7ab6f3a5 Merge branch 'master' of github.com:joschiwald/TrinityCore into spellscripts
Conflicts:
	src/server/game/Entities/Unit/Unit.cpp
	src/server/game/Spells/Auras/SpellAuraEffects.cpp
	src/server/game/Spells/Spell.cpp
	src/server/game/Spells/SpellEffects.cpp
	src/server/scripts/Spells/spell_paladin.cpp
2012-05-28 04:27:51 +02:00
joschiwald
ca07f30d03 Core/Spells: convert some spell effects to SpellScripts 2012-05-28 04:07:51 +02:00
Kandera
d1e0dc3fe0 Core/Spells: fix dispel aggro in a less hacky way! 2012-05-18 13:49:59 -04:00
Kandera
1037f96e4f Core/Spells: Damage should be dealt AFTER m_damage has been set. possibly fixes scourge strike damage calculations. 2012-05-18 12:31:13 -04:00
Kandera
01b2bf8057 Core/Spells, DB/Conditions: convert checkcast cpp to conditions for spell 52264 (deliver stolen horse) 2012-05-18 12:09:35 -04:00
Kandera
edf1de6d93 Core/Spells: move rocket boots spell cast check to spell script. add event for checkcast for deathcoil (dk) heh i forgot it >.< 2012-05-18 11:56:23 -04:00
Kandera
7688c7609f Core/Spells: remove holy shock and death coil (dk) from checkcast and add them to the checkcast of the spell script. also check if unit is in front for damage spell of death coil (dk) Closes #6027 2012-05-18 11:44:38 -04:00
Subv
1a06e197fd Core/Spells: Proc the spells that have DEST target when there is no other target info
Closes #6443
Closes #6277
Closes #6331

Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-05-13 19:39:06 -05:00
Vincent-Michael
e8bfcb686f Core/Spell: Fix not using Disengage while rooted 2012-04-28 02:56:29 +02:00
MrSmite
e9fd6d1979 Fix pets attacking on non-harmful spells 2012-04-20 20:22:40 -04:00
Subv
3d8aaabaf3 Core/Spells: Do not proc spells with PROC_FLAG_DONE_SPELL_MAGIC_DMG_CLASS_(NEG|POS) if there is no target, reimplemented Storm, Earth and Fire talent in another way
Closes #3367
Closes #2424

If you find more spells that are broken because of this, please notify us
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-14 20:08:16 -05:00
Subv
397ee8ceb5 Core/Spells: Execute spell procs after the healing effects of a spell
Closes #216

Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-11 17:41:36 -05:00
Subv
38d5fbac0e Core/Spells: You should be able to revive pets from anywhere without summoning them first
Closes #1090
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-08 16:22:19 -05:00
Machiavelli
bc96df1aae Core/Shared: Move container functions to shared project under Trinity::Container namespace. Also implement RandomResizeList which takes a predicate function as parameter.
Core/ScriptedAI: Extend SummonList::DoAction to take a predicate function as parameter and allow specifying a maximum number of units to be selected.
2012-04-08 17:40:05 +02:00
Subv
7ce33ca0a6 Core/Spells: Fixes the rune cooldown when a hit mises the target
Closes #412

Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-04-07 16:36:43 -05:00
MrSmite
cc03f2db36 Fix coding style 2012-04-06 12:33:34 -04:00
MrSmite
b843688fa8 PeAI update
* Better handle target selection for defensive pets. Adds triggers for when owner is damaged or begins attacking something.

* Defensive pets no longer run off as soon as a mob aggros the owner but rather at first damage to owner or owner first attack

* Pets on stay will continue to attack unless target unreachable
2012-04-06 12:26:45 -04:00
Liberate
926f02f792 Core/Spells: Implement SPELL_ATTR4_PROC_ONLY_ON_CASTER properly. Closes #5204 2012-04-05 20:09:20 +02:00
Subv
5468e8eeb5 Core/Spells: The first target of a chained spell should be explicit.
Closes #5643
2012-04-04 17:06:50 -05:00
Gyx
360014856d Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 13:42:04 +08:00
Gyx
1544b208da Core/Game: Code style again.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 20:00:29 +08:00
Gyx
72cdcbfced Core/Game: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 19:11:50 +08:00
kandera
def4643896 Core/Spells: correctly fix the issue with dispel over time auras. thx shauren 2012-03-27 14:46:19 -03:00
Kandera
0550f1dc05 Core/Spells: fix the issue with dispel auras. (thx warpten) closes #5902 2012-03-27 08:42:54 -04:00
kaelima
c38bf4498a Fix compile and fix a possible crash for mob_kiljaeden_controller 2012-03-26 03:12:56 +02:00
Shocker
fab1944ae4 Core/Spells: Don't remove summoned gameobjects for non-channeled spells when spell cast was canceled
Fixes issues like Demonic Circle: Summon removing the last summoned circle when the new cast was canceled
2012-03-26 03:03:32 +03:00
Machiavelli
41cc704bf8 Core/Movement:
- Don't abort relocation if movementflag restrictions were violated. There might be lag between client and server and even different parts of the core that made this approach improper.
- MOVEMENTFLAG_ROOT cannot be used in conjunction with MOVEMENTFLAG_MASK_MOVING, but it's a valid flag to receive from client.
- Fix falling to ground when unapplying fly/waterwalk aura. NOTE: This is a client-side initiated fall, in the future this should be initiated and updated by the server. (Working on it)
- Rename MOVEMENTFLAG_FALLING to MOVEMENTFLAG_FALLING_FAR
- Rename MOVEMENTFLAG_JUMPING to MOVEMENTFLAG_FALLING

Closes #5751
2012-03-17 20:36:12 +01:00
Kandera
aad4e41ca5 Core/Spells: finish fixing dispel functionality. closes #5745 2012-03-16 17:59:10 -04:00
Kandera
bea8fcfbfa Core/Spells: fix shield slam giving nothing to dispel error. 2012-03-16 09:08:46 -04:00
kaelima
ef53bde176 Core/Spell: Add some missing cast results which require additional data when sent. And rename two researched castflags (thanks TOMRUS) 2012-03-16 08:59:18 +01:00
Kandera
b23ff228a4 Core/Spells: Used correct implementation for checking if a spell effect targets an area. 2012-03-15 14:14:42 -04:00
Kandera
5406a0fd93 Core/Spells: Fix bugged mass dispel after previous commits 2012-03-15 14:12:40 -04:00
Kandera
fe46cf9796 Core/Spells: Fix being unable to use spells due hasDispellableAura being false if no spell effects were SPELL_EFFECT_DISPEL 2012-03-15 12:41:16 -04:00
Kandera
5e25791bff whitespace cleanup 2012-03-15 11:08:45 -04:00
Kandera
01bc6c483b Core/Spells: add correct checking for dispeling errors. Fixes spammable cleanse. 2012-03-15 10:56:56 -04:00
Shauren
84891377b5 Core/Spells: Fixed copy paste mistake that caused all area spells to search targets starting from caster's coordinates instead of targeted destination 2012-03-15 13:15:25 +01:00
leak
2a5caef4a6 Revert "Core: more more cleanup" - Build test anyone?
This reverts commit 20cd4c71ee.
2012-03-14 18:51:51 +01:00