Commit Graph

67 Commits

Author SHA1 Message Date
Spp
380db44583 Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct 2012-10-02 12:17:42 +02:00
thesensei
54fe4489a3 Scripts/Ogri'La: Add support for quest "Bomb Them Again" and all related
* Sniffed spell support for Knockdown Fel Cannon: Choose Loc, Knockdown Fel Cannon: The Aggro Check, Knockdown Fel Cannon: The Aggro Burst, Knockdown Fel Cannon: The Aggro Check Aura, Trhow Bomb and Fel Flak Fire
* Sniffed spawns support, but only for quest related creatures and gos, no area patrols/spawns involved
* Achievement support for Blade's Edge Bomberman and Fa-la-la-la-Ogri'la
* Full DB support based on sniffs, all that can be done in SAI and not in *cpp is converted
Credits: The SAI script is based on Warpen work, thanks to Subv for proposing fix for Fel Flak Fire /and helping/ and DDuarte for helping with conditions

Closes:

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-09-13 14:31:10 +01:00
Shocker
d33259e84e Core/Spells: Remove incorrect usage of SPELL_ATTR0_NEGATIVE_1 in CanDispelAura (which is used in SPELL_AURA_SCHOOL_IMMUNITY handling)
Closes #5940
2012-09-08 20:29:03 +03:00
Shauren
1e9fc84a12 Core: Warning fixes
C4100: 'x' : unreferenced formal parameter
C4310: cast truncates constant value
C4389: '==' : signed/unsigned mismatch
C4668: 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
C4701: potentially uninitialized local variable 'x' used
C4826: Conversion from 'HMODULE' to 'DWORD64' is sign-extended. This may cause unexpected runtime behavior.
C6067: Parameter '3' in call to 'sprintf' must be the address of the string
C6387: 'argument 1' might be '0': this does not adhere to the specification for the function 'CloseHandle'
2012-09-04 14:40:41 +02:00
Faq
2e3e62875b Core/Spells: Generic fix for auras with effect SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
Author Vincent-Michael
2012-08-05 22:06:23 +03:00
Faq
22415bee66 Core/Spells: Wrath of the Plaguebringer should be a debuff. Tibbi 2012-08-04 16:25:36 +03: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
Subv
1292b732f7 Core/Spells: Fixed Evasive Maneuvers and Stop Time, spells from the Oculus drakes.
Closes #6670
Closes #6675
2012-07-02 16:41:25 -05:00
Kandera
b80621838a Core/Spells: Correctly fix basepoint calculation for adding extra attacks. 2012-06-11 13:26:30 -04:00
Nay
23be8c4fd7 Scripts/VH: Add an 1 minute pause after each boss fight (instead of 5 seconds)
Revert one of the warning fixes (non standard C++)
2012-05-20 18:22:34 +01: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
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
Jildor
74565045f2 Core/Spells: Fix Rabbit Costume and Noblegarden Bunny 2012-04-06 11:48:29 +02:00
QAston
a08fe16d69 Core/Spells: Allow spell effects to have multiple destinations. Spells like: 49814, 10869 and similar are now properly selecting destination targets. 2012-03-03 00:19:48 +01:00
Kandera
92af6ec647 Core/Auras: fix stacking for auras that change phase. (thx to manuel) 2012-03-01 13:39:53 -05:00
QAston
a0de042efe Core/Spells: Remove SpellSelectTargetTypes enum - it's not needed anymore. 2012-02-25 14:07:07 +01:00
Spp
1e246cb66c Fix build (gcc) and fix warnings 2012-02-22 09:15:57 +01:00
QAston
f09b5a6bea Core/Db/Conditions:
-Drop condition CONDITION_SPELL_SCRIPT_TARGET, use other condition types instead
-Change CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET to CONDITION_SOURCE_TYPE_SPELL_IMPLICIT_TARGET:
--allow using this condition for more spell implicit target types (not just ENTRY)
--SourceGroup value for this src type is now effMask and it's now required

Core/Spells: Unify the way implicit targets are handled, fully implement some partially implemented target types, fix some minor bugs found on the way, general improvements and cleanup.
2012-02-21 20:17:45 +01:00
QAston
7e99e5f094 Core/Spells:
- rename SpellInfo::IsAOE to SpellInfo::IsTargetingArea due to ambiguity of old name.
- add IsAffectingArea function to check whenever spell or it's effects are affecting objects in area and use new function to fix problems with hunter flares.
Closes #3310. Thanks to Kaelima and Warpten for research.
2012-02-03 22:24:03 +01:00
Shocker
08be716ef8 Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_* 2012-02-03 19:02:17 +02:00
Shocker
08bcbc89b0 Merge pull request #4229 from devilcoredev/fix_002
Core/Spells: Fix the spell immunity system to be effect-dependent
2012-01-04 13:41:51 -08:00
kiper
8299627ed9 Update headers for 2012. HAPPY NEW YEAR!!! 2012-01-01 00:32:13 +01:00
kaelima
d10b0b74bd Fix code style and compile from 7e1c556536 2011-12-16 17:19:05 +01:00
kandera
7e1c556536 Core/Spells: Envenom (Fix buff duration from master poisoner. aura was being considered negative due to the damage effect. aura should be considered positive) 2011-12-16 11:04:52 -05:00
Giuseppe Montesanto
72e48ef8b3 Fix immunity system for many spells. 2011-12-14 16:13:10 +01:00
ille
5514523a7c use effectMask to calculate mechanicMask in ModSpellDuration 2011-10-20 18:28:37 +02:00
Shauren
26c76bf388 Core/Spells: Implemented SPELL_AURA_BLOCK_SPELL_FAMILY 2011-10-02 16:23:52 +02:00
Spp
b16d2245bb Cosmetic: Multiple cosmetic changes
- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
2011-09-29 12:43:05 +02:00
et2012
5bc2b4d8fd Core/Spells: added spell effect validations 2011-09-27 19:51:51 +02:00
QAston
e949ad3adb Core/Spells: spell effect handling improvements
* Call spell effect handlers in 4 modes:
   - SPELL_EFFECT_HANDLE_LAUNCH - called when spell is launched (cast just finished)
   - SPELL_EFFECT_HANDLE_LAUNCH_TARGET - called when spell is launched for each target in spell target map
   - SPELL_EFFECT_HANDLE_HIT - called when spell hits its destination
   - SPELL_EFFECT_HANDLE_HIT_TARGET - called when spell hits it's target from spell target map
*Correctly implement SPELL_EFFECT_TRIGGER_SPELL, SPELL_EFFECT_TRIGGER_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL_WITH_VALUE, SPELL_EFFECT_TRIGGER_MISSILE_SPELL
*Remove spell system hacks which became obsolete with this commit
Core/SpellScripts:
add OnEffectLaunch, OnEffectLaunchTarget, OnEffectHit, OnEffectHitTarget hooks for new effect handle modes and remove OnEffect hook.
A generic rule of thumb how to update your scripts (will work for nearly all cases) for spell system noobs:
if your spell script used GetHitXXXX function, you need to use OnEffectHitTarget, otherwise use
OnEffectHit
2011-09-25 13:29:50 +02:00
QAston
d01a761f53 Core/Spells: Drop EFFECT_IMPLICIT_TARGET_PET and use EFFECT_IMPLICIT_TARGET_EXPLICIT instead. 2011-09-24 02:02:39 +02:00
QAston
413b542cd9 Add a tempfix for trigger missile spell effects after rev 13a1d90130. 2011-09-23 13:09:31 +02:00
QAston
13a1d90130 Core/Spells: Improvements in selecting default targets based on effect type. 2011-09-23 11:58:40 +02:00
QAston
9bbb4ef583 Core/Spells: Use Unit::IsValidAttack/AssistTarget functions to validate spell explicit targets. 2011-09-16 22:17:49 +02:00
Shauren
113080dace Core/Spells: Temporarily commented out SPELL_ATTR6_CAN_TARGET_UNTARGETABLE check, needs more research 2011-09-16 12:27:00 +02:00
Spp
af05915b9e [Cosmetic] Apply codestyle "XXX * " and "XXX *" changed to "XXX* " (with some exceptions) 2011-09-15 14:12:57 +02:00
Spp-
30fb856ea3 Fix typo (Rename SPELL_AURA_PREVENT_RESSURECTION to SPELL_AURA_PREVENT_RESURRECTION) 2011-09-06 14:23:53 +02:00
QAston
ddacd0de94 Core/Spells: Fix pick lock - thanks to cyberbrest for pointing the reason of this issue. 2011-09-03 20:16:15 +02:00
QAston
2f79241237 Core/Spells: check unattackable flag only for negative spells. 2011-08-29 23:26:47 +02:00
QAston
8e392440cf Core/Spells: Fix a regression of 7f30ac5a95 - spells with TARGET_SELECT_CATEGORY_CHANNEL target type (like mind sear) should be triggered by triggering spell caster 2011-08-26 12:39:50 +02:00
QAston
5c48d9ec8a Core/Spells: Store explicit unit, corpse and GO targets in one variable, because both client and server can't handle more than one explicit object target; Add spell explicit target validation. 2011-08-26 12:06:13 +02:00
Spp-
85164d2876 Core: Some cosmetic changes and minor optimizations 2011-08-26 09:41:33 +02:00
QAston
7a3b1f1ed5 Core/Spells: Make GMs and vehicle riders not attackable by AOE again. 2011-08-24 18:22:33 +02:00
QAston
5cd4f9e513 Core/Spells: fix TARGET_DEST_TARGET_* targets after 7f30ac5a95 2011-08-24 10:35:41 +02:00
QAston
1178cee836 Core/Spells: Small correction to: 7f30ac5a95 - TARGET_DEST_TRAJ targets should require both src and dst target provided. 2011-08-24 08:53:26 +02:00
QAston
7f30ac5a95 Core/Spells: Add a generic way of selecting spell explicit targets. Make explicit targets independant of calling convention in core - this makes targets sent to client to be much more blizzlike than before (for example CastSpell(Unit*) won't set TARGET_FLAG_UNIT for spells which are not using explicit unit target) for SMSG_SPELL_START packets. Also remove hacks, which became obsolete with this commit. 2011-08-24 08:08:33 +02:00
QAston
e7468b2e2c Core/Spells: Do not apply spellmods to spells with SPELL_ATTR3_NO_DONE_BONUS attribute. 2011-08-23 14:30:26 +02:00
Shauren
cb9985c054 Core/Spells: Check SPELL_AURA_PREVENT_RESSURECTION on targets for resurrection spells 2011-08-21 19:03:24 +02:00
click
d5fbd223c6 Core: Fix non-PCH build 2011-08-21 17:07:32 +02:00
QAston
b838aad7d0 Core/Spells: check UNIT_FLAG_OOC_NOT_ATTACKABLE only for AOE spells targeting enemies, fixes some interactions with npcs. 2011-08-20 12:08:37 +02:00