Commit Graph

49 Commits

Author SHA1 Message Date
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
QAston
919a8ecf0e Core/Spells: Allow to explicitly target crowd controlled targets for spells with SPELL_ATTR6_CANT_TARGET_CROWD_CONTROLLED (Shield of Righteousness for example). 2011-08-20 11:45:23 +02:00
QAston
b0602b3153 Core/Spells: Use spell target flags to determine if spell can target dead targets - fixes skinning. Also, fix build once again 2011-08-20 10:01:57 +02:00
tobmaps
cd03dadb7f Core/Misc: Minor code cleanup and code style fix 2011-08-20 04:43:01 +07:00
QAston
393b436a0c Fix a typo in last commit. 2011-08-19 16:34:00 +02:00
QAston
fc5e924138 Core/Spells: Implement recently discovered target check attributes and move most of target checks to SpellInfo::CheckTarget function. 2011-08-19 14:54:15 +02:00
QAston
1de095f7cf Core/Spells: Add required and implicit target object type data for spell effects - will be used in future patches. 2011-08-18 11:50:31 +02:00
QAston
ec95ead0ac Fix build. 2011-08-17 12:00:20 +02:00
QAston
a44e1c505e Core/Spells: Add new spell implicit target categories data - will be used in future patches. 2011-08-17 11:30:47 +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
QAston
73bbc3aca8 Core/Spells: Update some targeting related attribute definitions to make them more clear and consistent. 2011-08-16 16:06:21 +02:00
QAston
c9291243c1 Core/Spells: Remove some obsolete code (stealth is no longer a ranked spell). 2011-07-29 18:01:33 +02:00
QAston
495ead5f7f Revert "Core/Spells: Fix a crash on checking school immunity added to unit manually (not by aura)"
This reverts commit 07badd7385.
2011-07-28 23:44:39 +02:00
QAston
07badd7385 Core/Spells: Fix a crash on checking school immunity added to unit manually (not by aura) 2011-07-28 23:41:29 +02:00
QAston
f33a0c23ca Core/Spells: Fix passive auras stacking logic after recent changes.
Closes #2417
2011-07-28 03:08:42 +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
Spp-
39be30a39f Fix compile 2011-07-27 11:00:14 +02:00
QAston
29c228a801 Core/Spells: Add SpellInfo class to store static data and methods for spells. This class is going to replace SpellEntry use in core. SpellInfo class includes all spell-related functions which resided in SpellMgr, and makes them much easier to access, reuse or add new stuff. Another advantage is that you no longer have to lookup db/dbc data by entry or index, because such data can now be included in the new class. Thanks to that, TC will have no problems on drastic spell dbc format change in 4.x. 2011-07-26 23:00:23 +02:00