Commit Graph

991 Commits

Author SHA1 Message Date
HelloKitty
46c69df3a7 Core/Vmaps: Stop M2s from occluding for spellcast LoS
Closes #18528

(cherry-picked from 01d715eaef)
2018-12-09 14:18:42 +01:00
ariel-
87ed45d912 Core/Spell: kill old charge restoring system. Mods are fully handled by proc system now.
- Fixes an edge case of spell failing due to out of range and re-adding charges to an existing aura.

(cherry picked from commit ee6d1d02c0)
2018-04-29 18:38:51 +02:00
ariel-
76831d16be Core/Spell: implemented dispel reflection
Closes #18323

(cherry picked from commit f0772eea98)

# Conflicts:
#	src/server/game/Spells/Spell.cpp
#	src/server/game/Spells/Spell.h
#	src/server/game/Spells/SpellEffects.cpp
2018-04-21 13:52:37 +02:00
Ovah
1aa42e97a8 Core/AI: Added CreatureAI hook that is getting triggered when a spell cast has been successfully finished. (#21774) 2018-04-12 21:26:45 +03:00
Shauren
bea7faa8f9 Core/Entities: Take terrain swaps into account when calculating LoS/height/area 2018-03-25 19:28:36 +03:00
Shauren
91be2332e2 Core/Entities: Phasing rewrite
* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
Shauren
2e47bceafd Core/Spells: Fixed crash with m_delayMoment calculation for reflected spells 2018-03-20 23:52:52 +01:00
Shauren
111d205a6a Core/Spells: Check both main and offhand weapons if spell attributes require that (see Stormstrike)
* This restores the check probably unintentionally dropped in 14c2b2d6cd
* Build fix

(cherry picked from commit 3d3d0492ab)
2018-03-18 00:19:48 +01:00
ariel-
c519992c1a Core/Spells: add some missing breaks
(cherry picked from commit f3cbcae102)
2018-03-18 00:19:47 +01:00
ariel-
be4670250d Core/Spell: added some helpers to SpellInfo to reduce code duplication
(cherry picked from commit 14c2b2d6cd)
2018-03-18 00:19:46 +01:00
xinef1
429fac7cb6 Core/Spell: Fixed bug where spell could fail to hit a target properly even if all conditions were met (#18596)
(cherry picked from commit 464d3ad5d0)
2018-03-18 00:19:45 +01:00
ariel-
18b4e5d4bd Core/Spell: reverted stun aura handling
Partial revert of 50a3ce5703

Closes #18487
Closes #18490
Closes #18497

(cherry picked from commit 27fb5fc16d)
2018-03-18 00:19:42 +01:00
Shauren
007b5a68c5 Core/DataStores: Fixed db2 structures after 7.3.5 2018-03-12 23:11:49 +01:00
ariel-
8da5e22e01 Core/Spell: fix for hitmask being ignored in finish phase procs
(cherry picked from commit a7e136f9e3)
2018-03-12 16:39:44 +01:00
ariel-
f20e53c138 Core/Entities: Replace existing GetAuraEffectsByType + iteration uses with proper helper functions
(cherry picked from commit 3a52ad8d38)
2018-03-12 16:39:39 +01:00
ariel-
f07a746321 Core/Spell: improved immunity logic for dispels
(cherry picked from commit 01d272d6cb)
2018-03-12 16:39:37 +01:00
ariel-
8864a03802 Core/Spell: Undefined SPELL_ATTR7_USABLE_IN_STUN_FEAR_CONFUSION attr for now
- Some function renames
- Used in some client checks but not 100% sure of its usage (eg in CGUnit_C::CheckAndReportSpellInhibitFlags but not in  Spell_C::IsUsableAction)
Closes #18366
(cherry picked from commit 77a08ad73c)
2018-03-12 16:39:35 +01:00
ariel-
ec5d778e10 Core/Spells: fix a pretty edge case of creatures being put in combat by evaded spells
(cherry picked from commit 343419ab99)
2018-03-12 10:32:01 +01:00
Shauren
75603fe1a0 Core/DataStores: Updated db2 structures to 7.3.5.25996 2018-02-18 16:33:50 +01:00
ariel-
8cb118009e 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

(cherry picked from commit 5b56c94e6d)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Spells/Auras/SpellAuras.cpp
#	src/server/game/Spells/Spell.cpp
#	src/server/scripts/Northrend/IcecrownCitadel/boss_professor_putricide.cpp
#	src/server/scripts/Pet/pet_hunter.cpp
#	src/server/scripts/Spells/spell_dk.cpp
#	src/server/scripts/Spells/spell_druid.cpp
#	src/server/scripts/Spells/spell_hunter.cpp
#	src/server/scripts/Spells/spell_item.cpp
#	src/server/scripts/Spells/spell_mage.cpp
#	src/server/scripts/Spells/spell_paladin.cpp
#	src/server/scripts/Spells/spell_priest.cpp
#	src/server/scripts/Spells/spell_rogue.cpp
#	src/server/scripts/Spells/spell_shaman.cpp
#	src/server/scripts/Spells/spell_warlock.cpp
#	src/server/scripts/Spells/spell_warrior.cpp
2018-01-13 16:38:07 +01:00
Mihapro
8199eef81c Core/Misc: Added helper function Unit::SetFullPower
* Also renamed Unit::getPowerType and Unit::setPowerType to follow style guidelines

Ref #20981
2018-01-03 16:39:32 +01:00
vincent-michael
7d00ae4045 Update copyright note for 2018
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
ariel-
5bcf14cdb8 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

(cherry picked from commit ca1c4525c7)

Core/Unit: fix build

Ctrl-S failure
(cherry picked from commit f3bdd705c0)
2017-12-30 22:56:48 +01:00
ariel-
6d7abb8181 Core/Spell: do not fail triggered Charge effects in case a root is present.
Fixes Master's call when pet is rooted

(cherry picked from commit 5daabe303e)
2017-12-30 20:47:04 +01:00
Shauren
965f4de083 Core/Units: Encapsulate UNIT_CHANNEL_* fields 2017-12-29 12:57:55 +01:00
joschiwald
071b23d606 Fixed typo (thx @lukaasm) 2017-12-28 17:45:34 +01:00
ariel-
5a91e1e31b 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

(cherry picked from commit 50a3ce5703)

Core/Spell: fix warning

(cherry picked from commit 3588ff894b)

Core/Unit: misc codestyle

use typedef for constant reference

(cherry picked from commit 7943150dcb)

Core/Spell: Fixed immunities for some spells (they were broken before rewrite too)

- Warlord's Presence, Uncontrollable Frenzy, Free Friend
- Overload, Lightning Tendrils
- Fervor, Berserk
- Determination

(cherry picked from commit fc6844173f)

Core/Spell: fix typos

(cherry picked from commit f060efbdb4)

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

(cherry picked from commit 352c84943c)

Core/Spell: fix typo

Closes #18248

(cherry picked from commit 1ad9c7d3fd)

Core/Spell: perform charmer check against player controlling unit. Fixes spellcasts while charmed

(cherry picked from commit 425f6c3c34)

Core/Unit: don't use damage immunity to calculate hit result for the whole spell. Should be used only for damage

(cherry picked from commit 9f5df023b7)

Core/Spell: fix a potential null dereference crash

(cherry picked from commit 64304d8b2b)
2017-12-26 17:11:18 +01:00
joschiwald
03082db810 Core/Spells: Glyph of Desperation/Pain Suppression has been removed 2017-12-26 12:59:36 +01:00
joschiwald
b12878cb5a Fixed build 2017-12-25 11:18:04 +01:00
ariel-
7bb6897a3c Core/Spell: move attribute helpers to spellInfo
- Renamed CheckEffectExecuteData to AssertEffectExecuteData and made const, better reflects its purpose
- Added missing attribute check to IsNextMeleeSwingSpell
- Reworked SPELL_ATTR4_CAST_ONLY_IN_OUTLAND attr check (researched behavior)

(cherry picked from commit 5cb8409f1e)
2017-12-25 10:42:20 +01:00
joschiwald
13726438da Core/Spells: Moved applying exclusive aura spells to scripts 2017-12-24 18:31:29 +01:00
joschiwald
439ac5756c Core/Spells: Implemented spells causing Forbearance
Ref #20937
2017-12-23 13:45:50 +01:00
Shauren
e86a2c439a Core/Auras: Implemented using all aura interrupt flag fields 2017-12-17 16:45:50 +01:00
ariel-
54d0b31c40 Core/Spell: reimplemented TRIGGERED_DISALLOW_PROC_EVENTS trigger flag
Triggered spells shouldn't chain-trigger other spells

Closes #18217

(cherry picked from commit bb8763534e)
2017-12-10 18:42:40 +01:00
joschiwald
b7797607e0 Core/Spells: Spells with TARGET_SELECT_CATEGORY_NEARBY requires a valid target (#20954) 2017-12-10 10:30:21 +01:00
joschiwald
f9067f2aab Core/Auras: don't save auras casted by items
* Core/Auras: don't save auras casted by items

- This type of auras (like Water Bucket, Precious Ribbon, etc) will be recasted on login anyways.

This reverts commit 16cfd59f5b

(partial cherry picked from commit e84dfff4ce)

Core/Auras: fix elixir aura saving

(cherry picked from commit 697147a596)
2017-11-19 16:25:30 +01:00
Shauren
2b184c58b8 Warning fix 2017-11-12 03:13:17 +01:00
Shauren
331c70e695 Core/Players: Fixed DK runes and runic power
Closes #19595
2017-11-12 02:42:06 +01:00
ariel-
52e71c1723 Core/Spells: workaround stealth interaction with Death and Decay and GameObject casts
Closes #10179
Closes #16154

(cherry picked from commit b3a4815067)
2017-11-11 20:59:12 +01:00
ariel-
54c0a01062 Core/Spells: moved handling of SPELL_ATTR0_CU_DONT_BREAK_STEALTH inside proc system.
Fixes additional issues with spells that shouldn't be breaking stealth and had this attribute

(cherry picked from commit bea0c01964)
2017-10-15 16:59:54 +02:00
ariel-
1350989628 Core/Spell: do positivity spell checks only against actually hitted effects instead of the whole spell
Closes #18097

(cherry picked from commit 5c1dfce168)
2017-10-15 16:02:40 +02:00
joschiwald
e6f8821bd0 Dropped obsolete code added in 2d75d8071b 2017-10-03 22:15:41 +02:00
ariel-
93973b87b1 Core/Spell: clear auras of channeled spells if channeling is cancelled due to invalid targets (dead or w/e)
Closes #14859
Closes #15186

(cherry picked from commit 2d0fb356de)
2017-10-03 21:14:28 +02:00
ariel-
2d75d8071b 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

(cherry picked from commit 9b0fa51022)
2017-10-03 20:53:49 +02:00
Shauren
6d2bc7abf4 Warning fix 2017-09-13 22:43:53 +02:00
Warpten
9a461126b7 Core/Spells: Implement SPELL_ATTR0_ON_NEXT_SWING_2. 2017-09-13 11:42:27 +02:00
ariel-
d5c7675bcc Core/Auras: reset periodic aura timers by default. Except when aura comes from triggered spell
Closes #17961

(cherry picked from commit b5e8e0a5db)

# Conflicts:
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Entities/Unit/Unit.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Auras/SpellAuraEffects.h
#	src/server/game/Spells/Auras/SpellAuras.cpp
#	src/server/game/Spells/Auras/SpellAuras.h
#	src/server/game/Spells/Spell.cpp
#	src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp
#	src/server/scripts/Spells/spell_priest.cpp
2017-08-13 15:14:21 +02:00
ariel-
ed6cf717c8 Core/Spells: add Target Processing (SMSG_SPELLLOGEXECUTE) to LAUNCH_TARGET phase.
Move EffectInterruptCast to LAUNCH_TARGET Phase.

Closes #3718
Closes #6042

(cherry picked from commit d9e4c8e04f)

# Conflicts:
#	src/server/game/Spells/Spell.cpp
2017-08-13 12:57:27 +02:00
joschiwald
1f8fc55ac9 Core/Spells: Implementation of QAston proc system (#20131)
* Core/Spells: Implementation of QAston proc system

- Move checks from Unit::IsTriggeredAtSpellProcEvent (old system) to Aura::IsProcTriggeredOnEvent (new system)
- killed charge counter from SpellModifier and Player system for handling charges... no point in having 3 different systems doing the same thing
- Automatically add default entries to spellProcMap, based on spellinfo (else auras won't proc without an entry) Based on old Unit::ProcDamageAndSpellFor
- Old Unit::ProcDamageAndSpellFor renamed to Unit::ProcSkillsAndReactives and made private, will no longer handle auras.
- Start making use of HealInfo::AbsorbHeal in unit calculations, add effective healing info to HealInfo struct
- Changes in spell reflection system, emulates old behaviour, delaying aura drop
- Removed old charge count hacks in SpellMgr::LoadSpellInfoCorrections
- Removed bogus error log when procChance is 0: Some auras have initial 0 procChance but modified by SPELLMOD_CHANCE_OF_SUCCESS
- Fixed TriggerAurasProcOnEvent logic that tried to trigger twice from actor.
- Allow non damaging spells with DamageClass Melee or Ranged to proc character enchants. Ref issue #17034:

  * http://web.archive.org/web/20110309092008/http://elitistjerks.com/f47/t49865-paladin_retribution_pve/
  * When an auto-attack lands (does not dodge/parry/miss) that can proc a seal the of the following things happen independently of each other (see 2 roll system).

  * 1) A "hidden strike" which uses melee combat mechanics occurs. If it lands it refreshes/stacks SoV DoT. Only white swings can trigger a refresh or stack. (This hidden strike mechanic can also proc things like berserking..)
  * 2) A weapon damage based proc will occur if you used a special (CS/DS/judge) or if you have a 5 stack (from auto attacks). This attack can not be avoided.

  * Holy Vengeance is the "hidden strike" it has an apply aura effect and damage class melee.
- Fixed Blood Tap interaction with Death Runes (btw, don't know what was going on with those MiscValueB, spell 45529 doesn't have any MiscValueB in SPELL_EFFECT_ACTIVATE_RUNE)
- Ported some AuraEffect checks from old Unit.cpp function. added new AuraScript hook to check procs of an specific effect
- Allow only AuraEffects that passed the check to proc, this won't block whole aura from proccing (and lose charges) if at least one of the effects procs, though
- Changes in spell mod system (for SPELLMOD_CASTING_TIME). fixes #17558.
- Added an exception for SPELLMOD_CRITICAL_CHANCE too, fixes #15193

(cherry picked from commit e641d0c7d7)

# Conflicts:
#	sql/base/auth_database.sql
#	src/server/game/Entities/Player/Player.cpp
#	src/server/game/Entities/Player/Player.h
#	src/server/game/Entities/Unit/Unit.cpp
#	src/server/game/Entities/Unit/Unit.h
#	src/server/game/Spells/Auras/SpellAuraEffects.cpp
#	src/server/game/Spells/Auras/SpellAuras.cpp
#	src/server/game/Spells/Auras/SpellAuras.h
#	src/server/game/Spells/Spell.cpp
#	src/server/game/Spells/SpellEffects.cpp
#	src/server/game/Spells/SpellInfo.cpp
#	src/server/game/Spells/SpellMgr.cpp
#	src/server/game/Spells/SpellMgr.h
#	src/server/game/Spells/SpellScript.cpp
2017-08-13 12:03:43 +02:00
Seyden
5675902485 Core/Creatures: Implemented Basic Creature Scaling (#20026) 2017-07-29 21:40:28 +02:00