Commit Graph

1330 Commits

Author SHA1 Message Date
ariel-
01d272d6cb Core/Spell: improved immunity logic for dispels
- Fixes dispel magic removing immunity spells (Divine Shield for example). Ref issue #18370
2016-12-11 15:08:00 -03:00
ariel-
bd49d37258 Core/Auras: calculate periodic bonuses before specific mods, fixes Imp. Devouring Plague damage 2016-12-03 19:42:23 -03:00
Chaouki Dhib
eca3645d8b Core/Movement: minor MotionMaster refactor (#18367) 2016-12-01 23:45:32 +01:00
ariel-
0229cb865e Core/Spells: proc spells after damage apply, not before. Fixes #13025 2016-11-29 22:09:42 -03:00
Shauren
90a5811701 Core/Spells: Fixed logic related to movement while channeling
Closes #18289
2016-11-24 20:22:47 +01:00
ariel-
7ce1cb295d Core/Unit: add impurity attack power bonus to healing too (for Death Coil for example) 2016-11-20 04:13:53 -03:00
Shauren
6dc37a9add Core/Auras: Rewritten conditionally applying SPELL_AURA_MOD_WEAPON_CRIT_PERCENT, SPELL_AURA_MOD_DAMAGE_DONE and SPELL_AURA_MOD_DAMAGE_PERCENT_DONE auras
* Now the entire aura is removed when changing equipment
* All aura types can now depend on equipped items

(cherry picked from commit b9f7b500a3)
2016-11-20 01:46:47 -03:00
ariel-
c5d1b46569 Core/Unit: do not allow judgement spells to bypass damage immunity
3f19eea5e4 follow-up. Without the #16658 regression
2016-11-19 20:17:17 -03:00
ariel-
ef227d7e64 Core/Entities: fix interaction of traps with ffa pvp and sanctuary flags
- Traps should select ATTACKABLE not UNFRIENDLY targets (it shouldn't attack unfriendly targets on sanctuary zones for example)
- Made more readable the nasty oneliner in Unit::_IsValidAttackTarget

Closes #6464
Closes #18271
2016-11-19 15:43:22 -03:00
ariel-
5db308b686 Core/Entities: better support of absorb, resist and block procs
2e457b3be4 followup

Closes #18275
2016-11-19 13:56:19 -03:00
ariel-
5b56c94e6d Core/Spell: restore old proc system behaviour on auras self proc.
- Use Spell::m_triggeredByAuraSpell and compare against trigger aura, it requires scripts to set triggeredByAura parameter.
- Fixed existing scripts lacking it

DB/Spell: Anger Capacitor (Tiny Abomination in a Jar) proc

Closes #18269
2016-11-19 03:05:44 -03:00
ariel-
e7ccd8ea3f Core/Spell: Added the possibility to explicitly disable auraEffect procs using attributes
- Renamed IsProcTriggeredOnEvent to GetProcEffectMask, since long ago this function returned bool, new name should better reflect its use
2016-11-18 02:15:45 -03:00
ariel-
3f19eea5e4 Core/Spell: spells with ignore hit result should pierce damage immunities 2016-11-16 23:04:19 -03:00
ariel-
56beec8aaf Core/Spell: Fixed irregular handling of SPELLMOD_DOT
- Applied twice for some dots
- Missing for Health Leech Periodic
- Missing in a few scripts

Closes #17463
2016-11-16 04:06:32 -03:00
ariel-
b6a8045adc Core/Unit: fix some SPELL_AURA_MOD_DAMAGE_PERCENT_DONE effects being applied more than once
No more overpowered dps for you

Closes #16755
2016-11-16 02:26:18 -03:00
ariel-
f3bdd705c0 Core/Unit: fix build
Ctrl-S failure
2016-11-15 22:50:28 -03:00
ariel-
ca1c4525c7 Core/Unit: damage immune improvements (9f5df023b7 follow up)
- Handling checked in sniffs: Spell 63710 Void Barrier vs 49143 Frost Strike
  * Send spell miss immune only if spell consists of damage effects
- Checked with 348 Immolate:
  * No packets sent if damage immune, aura is applied normally

Also... who the fuck uses 0 to compare against pointers
2016-11-15 22:39:15 -03:00
ariel-
9f5df023b7 Core/Unit: don't use damage immunity to calculate hit result for the whole spell. Should be used only for damage 2016-11-14 20:40:17 -03:00
ariel-
352c84943c Core/Unit: improved handling of some spell attributes
- SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE
- SPELL_ATTR2_UNAFFECTED_BY_AURA_SCHOOL_IMMUNE
- SPELL_ATTR3_IGNORE_HIT_RESULT
2016-11-14 04:04:30 -03:00
ariel-
699e22cb4c Core/Unit: consider creatures with same faction to be on the same party/raid for the purposes of spell/aura targets
Ref #18233
2016-11-14 02:06:18 -03:00
Shauren
08057b6d8b Core/Auras: Fixed removing auras triggered by aurastates
Closes #17868

(cherry picked from commit f94e6cee38)
2016-11-13 00:43:13 +01:00
ariel-
7943150dcb Core/Unit: misc codestyle
use typedef for constant reference
2016-11-12 18:12:26 -03:00
ariel-
50a3ce5703 Core/Spell: revamp of immunities system
- Spell attributes research
- Container optimization
- Do not skip damage immunity checks on SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY present
- Added additonal arguments support to SendCastResult / CheckCast, spells can now send proper error messages
- Loads spell immune masks/states/effects at startup.
- This cached info is used whenever a spell cast requires immunities to be known beforehand (to see if an aura could be applied for example)

Closes #16658
Closes #16901
Closes #18114
2016-11-12 17:58:00 -03:00
ariel-
bb8763534e Core/Spell: reimplemented TRIGGERED_DISALLOW_PROC_EVENTS trigger flag
Triggered spells shouldn't chain-trigger other spells

Closes #18217
2016-11-09 00:39:49 -03:00
ariel-
44ea63e34d Core/Entities: add yet another utility overload to CastSpell, fixes AppVeyor build
Ninja NULL->nullptr cleanup
2016-11-08 00:08:11 -03:00
ariel-
2e457b3be4 Core/Spells: do not add PROC_HIT_NORMAL/PROC_HIT_CRITICAL flags if damage is fully nullified
- Aka: full absorbs/full resists/full blocks/immune
2016-11-05 01:52:38 -03:00
ariel-
b3a4815067 Core/Spells: workaround stealth interaction with Death and Decay and GameObject casts
Closes #10179
Closes #16154
2016-10-30 00:16:45 -03:00
ariel-
a9921a5dd7 Core/Unit: send original caster in heal packet log 2016-10-29 19:07:26 -03:00
ariel-
042023877a Core/Unit: consistency fix 2016-10-28 10:56:39 -03:00
ariel-
51e4983422 Core/Unit: allow pets and totems to drop mod charges in owner auras.
Needed for Cobra Strikes (re)implementation
2016-10-28 01:17:59 -03:00
ariel-
05305dc010 Core/Unit: fix error introduced in 8a82a3ba81.
Defense skill wasn't being accounted for crit chance reduction
2016-10-27 22:01:24 -03:00
ariel-
7b1a0c3698 Core/Unit: fix warning reported by VS2015
C4146: unary minus operator applied to unsigned type, result still unsigned
2016-10-27 19:23:06 -03:00
ariel-
7ced76bab2 Core/Unit: fix logic error in DamageInfo::ModifyDamage.
Previous code did not protect against m_damage underflow, rather only allow up to duplicate damage.
It now should work as intended.

Closes #18154
2016-10-27 13:29:56 -03:00
ariel-
8da43fb7c7 Core/Unit: CalculateMeleeDamage should use unmodified damage to compute HitInfo
d3a71a8338 follow-up
2016-10-26 02:26:52 -03:00
ariel-
d3a71a8338 Core/Spells: use DamageInfo struct to calc spell absorbs and resists, and use calculated proc hitMask on aura ticks
Closes #18135
2016-10-26 02:16:11 -03:00
ariel-
2f03d502f3 Core/Unit: fix chain cc's not being diminished properly
Logic fail in 9b0fa51022 (now diminishing info is always initialized)
2016-10-25 22:53:27 -03:00
ariel-
5f580c9d3d Core/Unit: prematurely abort GetFactionTemplateEntry instead of returning a null pointer
Factions should never be invalid for players/spawned creatures anyways

Ref #18113
2016-10-21 12:56:58 -03:00
ariel-
34f734c890 Core/Unit: Change aura proc pair container to vector 2016-10-17 04:55:44 -03:00
ariel-
9b0fa51022 Core/Globals: compute aura diminishing return info at startup and cache it
Core/Entities: Save diminish return on an array instead of a linked list
2016-10-17 01:52:40 -03:00
SnapperRy
84439ff4d7 Remove deprecated procEx usage. 2016-10-15 00:43:07 +02:00
ariel-
303066509d Core/AI: initial support for monster sparring (#17673) 2016-10-15 00:20:37 +02:00
Keader
f0cd28be3d Core/Unit: Remove incorrect check that dont allow units attack your vehicle/passenger (#17932) 2016-10-14 23:41:38 +02:00
ariel-
b1777979c3 Core/Unit: disallow parry for totems 2016-10-14 02:14:19 -03:00
ariel-
4cdbc1a09b Core/Spell: Fix 2 more off by one probability calc and duplicated logic in spell hit roll 2016-10-09 20:18:07 -03:00
ariel-
10437a1e2e Core/Unit: enabled parry for all creatures, not only humanoids
If there's some creature that _shouldn't_ parry, use the `flags_extra` field in `creature_template` table
2016-10-09 01:55:14 -03:00
ariel-
d078029124 Revert "Core/Unit: prevent m_extraAttacks underflow. Fixes a freeze with SPELL_EFFECT_ADD_EXTRA_ATTACKS"
This reverts commit f09e7cbbfe.
2016-10-07 12:50:08 -03:00
SnapperRy
79c1b5942c Revert "Core/Creature: don't give kill and achievement credit if a creature kills itself."
Causes an issue where a creature killed by a reflected spell will not give credits.

Thanks Aokromes for noticing. Reverting this until a better solution is found.

This reverts commit 5417a1a37f.
2016-10-06 11:16:05 +02:00
SnapperRy
5417a1a37f Core/Creature: don't give kill and achievement credit if a creature kills itself.
Prevents Wintergrasp vehicles from giving credit when killed by Wintergrasp Water and other similar exploits.
2016-10-06 10:50:50 +02:00
ariel-
8a82a3ba81 Core/Unit: implemented crit suppression
Thanks Riztazz for the infos :P
2016-10-06 01:06:37 -03:00
ariel-
a0e317b991 Core/Scripts: De-hack glyph of Barkskin with proper spell 2016-10-06 00:59:26 -03:00