Commit Graph

172 Commits

Author SHA1 Message Date
xinef1
cbbb745246 Various quest system fixes (seasonal quests, timed quests and more) (#18940)
- Unify quest status checking function, use dedicated function instead of direct map checks
- Fixed seasonal quest chains and ability to complete the same quests rewarded in past
- Update area dependent auras on quest status change (they often requires specific quest status)
- Send all not stored quest rewards by mail
- When casting quest reward spell, check if it is not self casted, if so - use player to cast this spell
- Perform full db save on quest reward to prevent data desynchronization
- Don't allow to fail completed timed quests, except for quests which are completed right from the start
- Don't allow to share pooled quests, if they are not available in the current pool (eg sharing easy dalaran weeklies, stored at alt character)
- Remove seasonal quest if rewarded quest is removed
- Don't complete whole quest on AreaExplore event, check if there are no more requirements that should be fulfilled
- Quests with flag QUEST_SPECIAL_FLAGS_PLAYER_KILL can be only credited in quest zone

Closes #18913
Closes #11187
Closes #15279
2017-04-24 00:46:06 -03:00
ariel-
3a0cb90ea9 Core/Spell: define channels without movement interrupt flags as allowed move
- Remove script hacks no longer needed
2017-04-23 21:48:06 -03:00
ariel-
25a449a90e Core/Spell: implement pvp trinket immunity against Judgement of Justice
By Riztazz, closes #19484
2017-04-22 06:45:03 -03:00
ariel-
c296d255e2 Revert "Core/Spell: don't set scaleAura for some special spells"
This reverts commit 1ca8434b36.

Closes #19472
2017-04-21 01:37:07 -03:00
ariel-
1ca8434b36 Core/Spell: don't set scaleAura for some special spells
Closes #14541
2017-04-03 04:04:02 -03:00
Chaouki Dhib
a1f2f30c14 Core/Spells: fix wrong distance calculations in AoE spells [Needs testing] (#16290)
Core/Spells: Fix wrong distance calculations in AoE spells.
Pull request #16290 by chaodhib.
God bless, finally.
2017-03-23 00:43:04 +01:00
xinef1
9142c778dd Corrected points per level calculation for some spells (#19105) 2017-02-19 02:30:04 -03:00
xinef1
e261754c9c Fixed setting and unsetting of m_spellModTakingSpell (#19116)
- A problem when a different spell tries to overwrite existing ModTakingSpell should no longer happen
2017-02-19 02:10:50 -03:00
xinef1
e7a9549422 Core/Spells: Fixed some item ranged spells dealing wrong damage (#19104) 2017-02-13 21:52:51 +01:00
xinef1
c6060dd0c5 Core/Spells: Remade trajectory target selection (#19048)
* Remade trajectory target selection
* Added possibility to apply conditions to trajectory spells
* Properly recalculate delay time if CMSG_UPDATE_PROJECTILE_POSITION is received
2017-02-05 21:10:15 -03:00
xinef1
14dfc377b4 Core/Misc: Various crash fixes (#19059)
* Replaced some FindPlayer calls with GetPlayer
Fixed some more crashes

* Correction
2017-02-05 23:42:31 +01:00
xinef1
93746e8c4a Implemented binary resistances and some more (#18933)
- Fixed possible exploit with tamed pets having template immunities
- Implemented binary resistances
- Corrected resistances calculations
- Pets properly inherit players spell penetration
- Fixed doubled block calculation for damaging melee spells
- Auras removing snare effects will only remove the snaring component
- Shapeshifting will properly remove movement impairing auras only and not crowd control (dragon's breath)
- Immunities are properly checked versus all schools appearing in spell, unit is immune only if immune to all schools
- Spells with melee and magic school mask should compare armor reduction with resistances and select smaller reduction
- Demonic Circle: Teleport no longer removes root effects
2017-02-04 19:50:32 -03:00
xinef1
0fa38d0ae0 Core/Pets: Fixed flashing pet attack button (#18906) 2017-02-04 19:38:36 +01:00
ariel-
3544577e48 Core/Spell: unified handling of SPELL_ATTR5_USABLE_WHILE_* attributes
Allowed mechanic mask is calculated on startup and auras checked against those mechanics
Closes #18798
2017-01-23 18:33:34 -03:00
tkrokli
6a51a88767 Update Copyright notice for 2017
Happy new year!
2017-01-02 19:52:45 +01:00
ariel-
14c2b2d6cd Core/Spell: added some helpers to SpellInfo to reduce code duplication 2016-12-30 23:50:28 -03:00
ariel-
8ffcb4ddcb Core/Spell: reverted changes for NO_TARGET handling
Partial revert of 584d347b70

Closes #18666
2016-12-30 14:10:04 -03:00
ariel-
584d347b70 Core/Spell: Prevent NO_TARGET auras from actually selecting target (same as caster)
- Fixes an issue with generic mount scripts where the dummy aura was applied and removed then the real mount was applied
- Pets would be unsummoned, resummoned and unsummoned again in an instant

Closes #16783
2016-12-29 03:34:54 -03:00
ariel-
452ef146f4 Core/Spell: add an exception for Cyclone ignoring it's own immunity using dispel type
- Unsure of what is the correct check, most generic thing I could make

Closes #18479
2016-12-15 10:01:34 -03:00
ariel-
560c882b36 Core/Spell: partial revert of SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE immunity handling
- Bonus: without breaking Banish... yay!

Closes #18370
2016-12-13 15:20:28 -03:00
ariel-
77a08ad73c 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
2016-12-10 00:38:00 -03:00
ariel-
fc1c15781a Core/Spell: do not downscale certain auras 2016-12-09 14:40:13 -03:00
ariel-
343c2fbf52 Revert "Core/Spell: Magic Absorption Calculation"
This reverts commit fb52e69169.
2016-12-09 14:39:17 -03:00
Gustavo
7e0a616657 Core/Misc Remove WhiteSpaces (#18379) 2016-12-02 02:23:02 +01:00
ariel-
7e3a0cba9d Core/Spells: Fixed one issue with auras having SPELL_ATTR4_CAST_ONLY_IN_OUTLAND and aura zone updates
Defined spell attribute SPELL_ATTR7_IGNORE_COLD_WEATHER_FLYING

Closes #18286
2016-12-01 01:16:31 -03:00
ariel-
2c8a6fb771 Core/Spell: Fixed Drain Soul incorrectly downscaling ranks when targetting lower level enemies 2016-11-18 03:11:35 -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-
64304d8b2b Core/Spell: fix a potential null dereference crash 2016-11-15 12:02:31 -03:00
ariel-
f060efbdb4 Core/Spell: fix typos 2016-11-14 04:02:43 -03:00
ariel-
5aa0228df9 Core/Spell: Fix warrior Enrage stacking with Wrecking Crew and Imp. Defensive Stance 2016-11-14 02:12:33 -03:00
ariel-
fc6844173f 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
2016-11-14 02:06:30 -03:00
ariel-
3588ff894b Core/Spell: fix warning 2016-11-12 18:04:45 -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-
5cb8409f1e 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)
2016-11-12 17:12:42 -03:00
ariel-
4f1ef6985e Core/Spell: apply SPELLFAMILY_GENERIC mods to all spells by default
Closes #18160
2016-11-04 14:22:27 -03:00
ariel-
2b9f807fd9 Core/Spells: mark Arcane Missiles aura as negative. Was downranking the spell when targetting low level mobs due to effect 1 flagged as possitive.
Closes #12152
2016-10-17 04:21:32 -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
ariel-
318f21b391 Core/Spells: Make slice and dice positive. Was breaking stealth.
This whole positive check needs some generic solution
2016-10-12 22:59:29 -03:00
ariel-
ce45e1bf95 Core/Globals: cache SpellSpecific and AuraState information instead of computing them each time they're needed 2016-10-07 00:51:52 -03:00
ariel-
e641d0c7d7 Core/Spells: Implementation of QAston proc system
- Move checks from Unit::IsTriggeredAtSpellProcEvent (old system) to Aura::IsProcTriggeredOnEvent (new system)
- Templatize SpellModOp param of Player::ApplySpellMod, also 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
2016-10-04 20:21:55 -03:00
joschiwald
8024ae4d26 Core/Spells: use spellinfo helper methods
(cherry picked from commit 12a52595ed)
2016-10-02 00:25:21 +02:00
ariel-
e0ba5f9ed6 Core/Spell: Updated SpellInfo::GetMaxTicks with all effects capable of periodics 2016-09-12 20:19:06 -03:00
ariel-
bc4b4f656c Core/Scripts: Implement Flag of Ownership. Closes #12265
Core/Spells: Implemented TARGET_CORPSE_SRC_AREA_ENEMY. Closes #12803
2016-09-04 07:09:04 -03:00
Gustavo
6ee35734e4 Whitespace clean-up 2016-08-29 01:11:04 +02:00
Treeston
8deda7ed7f Entities/Unit: Cleanup refactor. Changes: (#17819)
+ Unit::m_movedPlayer -> Unit::m_playerMovingMe
+ Player::m_mover -> Player::m_unitMovedByMe
+ Unit::GetMover() -> Unit::GetUnitBeingMoved()
+ Unit::GetPlayerMover() -> Unit::GetPlayerBeingMoved()
+ NEW: Unit::GetClientControllingPlayer()
2016-08-20 12:43:04 +02:00
robinsch
dd67f4ed96 Core/Spell: Remove all raid auras on party leave (#17663)
Core/Spell: Remove all raid auras on party leave
2016-08-14 17:26:03 +02:00
Shauren
dc1654b6c3 Core/Spells: Fixed flat SPELLMOD_DAMAGE_MULTIPLIER calculation
(cherry picked from commit 35ab476f16)
2016-05-17 17:37:50 +02:00
jackpoz
ebafa2fdea Merge pull request #16494 from Rushor/calc
Core/Spell: Magic Absorption Calculation
2016-04-25 10:32:02 +02:00
Lopfest
5cdc870acc Core/Spells: enabled SPELL_EFFECT_160 (#16987)
(cherry picked from commit ff3e176eb1)
2016-04-19 12:05:19 +01:00
treeston
26bbba4b8d Revert "Merge pull request #16483 from Treeston/3.3.5-debuffimmunity" to fix #16589 while I investigate the retail behavior of SPELL_ATTR_0_UNAFFECTED_BY_INVULERABILITY further.
This reverts commit d67e87733b, reversing
changes made to cfed2d7a3d.
2016-02-13 03:17:01 +01:00