Commit Graph

344 Commits

Author SHA1 Message Date
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 5ea49613d2 Core/Spells: Spell casts should be interrupted if the target goes out of LoS.
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-12 15:30:16 -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
Subv 9791bb599a Merge pull request #5160 from TrinityCore/dynamic_vmaps
Added Dynamic Vmaps, RE-EXTRACT YOUR VMAPS
2012-02-09 11:17:05 -08:00
Subv2112 93d199f043 Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and
added lots of improvements
Please re-extract vmaps
2012-02-09 13:58:22 -05:00
Shocker 4623db0abe Merge pull request #5052 from devilcoredev/fix_003
Core/Spells: Check line of sight for AoE targeted spells
2012-02-09 10:29:45 -08:00
QAston b4022acdf3 Core/Spell: move conditions check to Spell::CheckCast. 2012-02-09 18:35:52 +01:00
QAston 22bd06fc57 Typofix. Sorry for that :( 2012-02-04 18:28:56 +01:00
QAston 9d185c5d66 Core/Spells: Fix immunity checks on apply aura - original patch by devilcoredev, changed a bit so immunity checks are grouped together instead of being spread. 2012-02-04 15:27:47 +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
Giuseppe Montesanto 16300d0914 Check line of sight for spell with dest 2012-02-02 19:06:28 +01:00
Subv2112 9b524b43fa Core/Spells: Spells with SPELL_AURA_PERIODIC_MANA_LEECH should skip unit target checking if the Targets are area targets, they are filled/validated later
Signed-off-by: Subv2112 <s.v.h21@hotmail.com>
2012-01-31 20:27:22 -05:00
Chaplain a535e451a8 Core/Spells: Fix issue in CAST_FLAG_ADJUST_MISSILE handling. Thx rsa (R2) for pointing. 2012-01-13 19:18:13 +03:00
Chaplain 67808ba453 Core/Spells: Fix CAST_FLAG_UNKNOWN_18.
*rename CAST_FLAG_UNKNOWN_18 -> CAST_FLAG_ADJUST_MISSILE
*implement handling in Spell::SendSpellGo()
2012-01-08 18:50:25 +03: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
QAston afc18461d7 Core/SpellScripts: Add BeforeCast, OnCast and AfterCast hooks to SpellScripts. 2011-12-31 13:11:12 +01:00
Shocker f283a7b116 Merge pull request #4475 from Svannon/fix-fishingcone
Core/Fishing: Reduce the fishing cast cone to 35 degrees from each side of the facing instead of 70. Make the overall cone 70 degrees instead of 140
2011-12-25 12:16:10 -08:00
Svannon 3405e0811d [Fishing] Reduce the Fishing cast cone to 35 degrees from each side of the facing instead of 70. Make the overall cone 70 degrees instead of 140. 2011-12-24 12:41:22 -07:00
QAston 15bd8f3cd5 Core/Spells: Fix logic in AnyDeadUnitSpellTargetInRangeCheck - spells using this should now correctly check target requirements. This is an alternative fix to #4112. 2011-12-24 08:40:30 +01:00
kaelima 398299084e Corrected some logic in my recent commits.
- ff2dbfc381 thanks LihO
- 6ccf95af4c thanks frostmourne
2011-12-22 18:48:06 +01:00
kaelima ff2dbfc381 Core/Spells: Fix two signed / unsigned warnings from f8a13b401d 2011-12-22 13:22:18 +01:00
kaelima f8a13b401d Core/Spells:
- Fix channeling spells with infinite duration (-1)
- Allowed SPELL_FAILED_EQUIPPED_ITEM_CLASS_MAINHAND and SPELL_FAILED_EQUIPPED_ITEM_CLASS_OFFHAND in SendCastResult (more reasons todo)
2011-12-22 00:38:01 +01:00
Giuseppe Montesanto 72e48ef8b3 Fix immunity system for many spells. 2011-12-14 16:13:10 +01:00
Wilds 471c9dd621 Core/Spells: stop channeling bar when interrupted also for creature 2011-12-10 01:46:06 +01:00
Shauren 358b33239a Core: Fixed remaining C6246: Local declaration of 'x' hides declaration of the same name in outer scope. from previous commit 2011-11-23 19:17:33 +01:00
megamage b3fef1e280 Fix build. 2011-11-23 12:42:11 -05:00
Shauren 638693e78f Core: Fixed more warnings (C6246: Local declaration of 'x' hides declaration of the same name in outer scope.) 2011-11-23 17:55:16 +01:00
Bootz f75ec5ba2b Core: Codestyle clean-up
"plr"->player

Note: codestyle methods needs maintained, Player* player.
2011-11-07 11:06:39 -06:00
tobmaps 68601bb286 Core/Spells: Use correct dbc flag to check if spell can be interrupted 2011-11-03 16:53:29 +07:00
megamage dfeb4a746b Fix a crash caused by spell with CAST_FLAG_RUNE_LIST casted by a creature mover. Thanks to Vasago. 2011-10-31 09:56:04 -04:00
ille 5514523a7c use effectMask to calculate mechanicMask in ModSpellDuration 2011-10-20 18:28:37 +02:00
Liberate a658d0b592 Core/Spells: Define and implement SPELL_ATTR4_PROC_ONLY_ON_DUMMY.
Fixes #2685
Fixes #2573
2011-10-19 22:08:54 +02:00
kaelima be0b2fcf97 Core/Grid:
- Simplified CellArea calculation (Original author: SilverIce)

- Removed unused code in Cell class (Original author: SilverIce)

- Improve some Visit functions.
2011-10-19 17:40:44 +01:00
Liberate 8f8949fcf0 Core/Spells: Spells with the self-cast range should not have a range check. This range used for many triggered spells.
Fixes #3358
2011-10-19 00:24:43 +02:00
megamage c29ff41001 Rename some classes in grid system.
Note: The naming of classes is still confusing. "cell" usually refers to class "Grid", and "grid" usually refers to class "NGrid". But it requires a lot of changes to clean this up.
2011-10-18 10:53:34 -04:00
megamage 00f5366029 Fix the bug that CC AOE spells do not remove stealth aura if the target is behind the caster. 2011-10-10 12:56:14 -04:00
Shocker 9b218315b8 Core/Spells: Chain spells shouldn't hit critters 2011-10-07 23:33:08 +03:00
Bootz 96d7a1e970 REPO: code-style clean-up
* Fixed pGuild->guild
* Fixed pGroup->group
* Fixed pOwner->owner
2011-10-07 10:54:53 -05: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
Spp cc06c41887 Core: Move FormationMgr to namespace
Also...
- Warning fixes
- Make Singleton constructors private
2011-09-28 11:11:38 +02:00
QAston 7fa2a64290 Merge branch 'master' of https://github.com/Chaplain/TrinityCore 2011-09-27 19:19:25 +02:00
Chaplain 224bb96deb Core/Spells: Fix talent Sword Specialization. 2011-09-25 16:42:12 +03: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
Shauren da0229da8f Core/Scripts: Implemented 2 new target selectors, one specialized for spells, checking auras, range and attributes; and the other is a very simple non-tank selection what is sufficient for most cases 2011-09-24 19:40:57 +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 13a1d90130 Core/Spells: Improvements in selecting default targets based on effect type. 2011-09-23 11:58:40 +02:00