Commit Graph
330 Commits
Author SHA1 Message Date
Manuel Carrasco d7a7a9800b Battlefield: Make sBattlefieldMgr a pointer. By Subv. 2012-08-20 13:48:47 -04: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
Kaelima 6ae147aa80 Merge pull request #7065 from Vincent-Michael/PainAndSuffering
Core/Spells: Fix Pain and Suffering reduces damage
2012-08-01 22:56:51 -07:00
kandera 4fb89bde83 Core/Spells: fix bladestorm and possibly other spells from causing dbw to be removed. closes #7121 2012-07-24 09:54:06 -03:00
Faq b57a87cafa Core/Spellaura: Fix Idol of Worship 2012-07-13 18:52:37 +03:00
Vincent-Michael 968a8e8ee8 Core/Spells: Fix Pain and Suffering reduces damage 2012-07-11 17:34:03 +02:00
Shauren c8d20004a5 Core: Minor code style corrections 2012-06-30 16:07:09 +02:00
Shauren d0fa012e1d Core/Auras: Properly initialize mechanic immunity mask for SPELL_AURA_MECHANIC_IMMUNITY_MASK 2012-06-23 12:16:52 +02:00
Chaplain 716e2db0e1 Core/Misc: Code-style + some const methods. 2012-06-21 21:05:45 +03: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 a2848f543e Core/Spells: use calculated basepoints for mechanic_immunity_mask aura effect. 2012-06-12 08:53:21 -04:00
Kandera 643b68926e Core/Spells: codestyle and fix logic for adding unit state casting. (thx Moriquendu) 2012-06-08 08:56:56 -04:00
Kandera 8705030593 Core/Auras: use a case for SPELL_AURA_MECHANIC_IMMUNITY_MASK. distinguish between spells manually. blizzard probably has a seperate database as to which spells have which immunities. 2012-06-07 16:00:16 -04:00
joschiwald 7e454b26ac more updates 2012-06-03 02:35:00 +02: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
Vincent-Michael ab77e597b1 Add function for SetObjectScale
Author: NoFantasy
Source: Mangos
2012-05-26 23:14:57 +02:00
Kandera 51388c4934 Core/Auras: one more for good measure. thanks vincent-michael 2012-05-24 17:10:12 -04:00
Kandera b7573a1bc7 Core/Auras: change from if to switch and fix calculation for inifinite replenishment. 2012-05-24 16:58:09 -04:00
Kandera aa34135395 Core/Spells: fix issue with previous commit. i cant do math. 2012-05-24 15:55:55 -04:00
Kandera 2849f21d20 Core/Spells: correctly calculate Replenishment aura. x * 20 / 10000 != x * .2 2012-05-24 15:33:08 -04:00
kaelima a1ff27a1c6 Core/Threat: Some corrections to 5709929d2b
Fixes HandleChannelDeathItem (spells such as Drain Soul), which got broken by moving m_deathState = s, thanks Shauren
2012-05-13 17:47:27 +02:00
Vincent-Michael 79a735fb01 Core/Spell:
* Fix Spells with DmgClass SPELL_DAMAGE_CLASS_NONE
* Fix SPELL_AURA_PERIODIC_HEAL calculation
* Fix Swiftmend heal calculation
* Fix some codestyle
2012-05-13 16:29:01 +02:00
joschiwald 4e354d6ca9 Core/Spells: fix damage mods from caster on target 2012-05-11 22:43:06 +02:00
Chaplain 469ba0b0e7 Clean up for 58f63509cd
*restore const methods in spellauraeffects
*fix typo in Unit::CalculateMeleeDamage thx bytewarrior
*minor speed up in SpellInfo::GetMaxTicks() thx Warpten
*deleted duble ';;' thx bytewarrior
*speed up in SpellInfo::GetMaxTicks() thx goes to Vincent-Michael
2012-05-10 20:42:07 +03:00
QAston 58f63509cd Merge pull request #6314 from Chaplain/spells
Core/Spells: Separation of caster/target part damage/heal bonus calculation.
2012-05-09 15:10:33 -07:00
Chaplain d94a89c465 Clean misused m_canBeRecalculated.
*When we solve problem with m_amount we could make right solution for caster/victim damage calculation.
2012-05-04 18:35:11 +03:00
Chaplain 879070bc80 Core/Spells: Separation caster/target part damage/heal bonus calculations.
*Implement HoT/DoT save caster side bonuses and apply target mods on each tick
2012-04-28 23:32:25 +03:00
Kandera e6a6f6539d Core/Spells: Correct tick damage for health funnel. (thx alp22) Closes #3465 2012-04-24 13:39:37 -04:00
Subv 8c3d0e2368 Core/Spells: Dont remove auras on stance change if the stance you are moving to is also allowed by the spell.
Closes #2758

Signed-off-by: Subv <[email protected]>
2012-04-14 14:51:59 -05:00
Subv ba957e6a0e Core/Spells: Reapply glyph bonuses that depend on stance when you shapeshift into that instance
Closes #1076 and possibly others

Signed-off-by: Subv <[email protected]>
2012-04-13 18:32:56 -05:00
Subv c04e92564b Core/Spells: Apply Lifebloom's final bloom bonus from Empowered Rejuvenation also on expire. thanks @3kids for noticing 2012-04-12 18:39:40 -05:00
Subv 2e5962725d Core/Spells: Corrected Rupture critical hits, it wont make other dots (incorrectly) crit any longer
Signed-off-by: Subv <[email protected]>
2012-04-11 18:53:24 -05:00
Machiavelli 9d6c8add0e Fix non-PCH build and GitExtensions screwup from last changeset 2012-04-08 18:58:42 +02:00
Machiavelli e636531da3 Core/Movement: Fix pushback issues and client freeze. 2012-04-08 17:03:44 +02:00
Subv f8e9dedbe5 Scripts/Spells: Removed redundant code for spell 54798.
Closes #519

Signed-off-by: Subv <[email protected]>
2012-04-07 21:09:04 -05:00
Subv fd9c4d9c43 Core/Spells: Health leech spells should still do damage even if the caster is dead (Devouring Plague)
Closes #470

Signed-off-by: Subv <[email protected]>
2012-04-07 20:34:21 -05:00
Subv 24b699d904 Core/Spells: Fixed Dancing Rune Weapon double-applying the duration bonus of the glyph
Closes #6032

Signed-off-by: Subv <[email protected]>
2012-04-05 08:32:58 -05:00
Gyx 360014856d Core/Game: Code style.
Signed-off-by: Gyx <[email protected]>
2012-03-29 13:42:04 +08:00
Kandera 7b357a5028 Core/Spells: Fix Misdirection (thx to elron) closes #5869, #4343 2012-03-26 11:37:03 -04:00
Shocker 4c16421cde Core/Spells: Fix periodic aura log for SPELL_AURA_PERIODIC_HEAL and SPELL_AURA_OBS_MOD_HEALTH when there is heal absorption 2012-03-24 20:21:17 +02: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
Shauren 01f3620d45 Core/Movement: Corrected movement info structure written in WriteMovementInfo 2012-03-17 18:01:56 +01:00
Gyx 1e94ab8d51 Core/Game: Code style and remove unused core.
Signed-off-by: Gyx <[email protected]>
2012-03-17 20:13:37 +08:00
Machiavelli cf5ed0a7b6 Core/Movement: Remove MOVEMENTFLAG_FLYING on fly aura unapply as well as _CAN_FLY 2012-03-16 23:41:43 +01:00
Machiavelli f8c04b1bc5 Core/Movement: Fix players still able to fly on SPELL_AURA_FLY and SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED unapply.
Closes #5731
2012-03-16 17:10:01 +01:00
Machiavelli afaed98b7a Core/Movement: Send correct packet to client when unapplying hover, feather fall and water walking auras.
Closes #5704
2012-03-15 10:03: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
thomas33 20cd4c71ee Core: more more cleanup 2012-03-14 17:51:11 +01:00
Machiavelli 03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00