Commit Graph

191 Commits

Author SHA1 Message Date
ariel-
efeae33495 Core/Spells: rework part 1: Improved positive detection logic 2018-03-09 14:41:28 -03:00
ariel-
e73bfe8df8 Core/Spells: implemented SpellPriority field from SpellEntry to cleanup charged mod proc behaviour
- Only one charged mod will be consumed per SpellMod apply, and it'll be compared against other mod priority
- This is proper way of handling Backdraft/Backlash and Deathchill/Killing Machine

Thanks to killerwife for info
2018-02-12 03:09:22 -03:00
Treeston
532ab1c7f8 Core: Combat/threat system rewrite (PR #19930)
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
  - They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
  - ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
  - ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes #16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.

Closes #7951 and #19998.
2018-01-03 20:04:19 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
ariel-
e6d529a75a Core/Auras: implemented SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR delay mechanic 2017-12-15 13:26:34 -03:00
ariel-
7dff0e3246 Core/Auras: fixed off by one error in counting SPELL_ATTR5_START_PERIODIC_AT_APPLY ticks
- Made SpellInfo::GetMaxTicks and AuraEffect::GetTotalTicks return the same number without mods (dumped arbitrary default return value of 6 and arbitrary 30 sec limit)
- They should be streamlined whenever SPELL_AURA_48 is implemented
2017-12-15 03:40:36 -03:00
Keader
04271388f8 Typo 2017-10-27 08:28:48 -03:00
Keader
90f07bd948 Scripts/BlackTemple: Updates on Illidan encounter
- Fixed issues related with Parasitic Shadowfiend
- Updated script to new model
- Fixed loop of Parasitic Shadowfiend Summon
- Added a new spell (SPELL_REMOVE_PARASITIC_SHADOWFIEND)
- Fixed illidari elite attacking players
- SPELL_PARASITIC_SHADOWFIEND now is a negative aura
2017-10-26 23:10:00 -03:00
Keader
b507acf1c0 Core/Spells: Spells with Attribute SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY should dispel snare auras. (#20621) 2017-10-20 10:57:47 -02:00
Keader
98c363154a Core/Spells: Fixed issues with School Immune vs SPELL_ATTR1_UNAFFECTED_BY_SCHOOL_IMMUNE (#20546) 2017-10-07 18:38:11 -03:00
Aokromes
edb82fcfbf Core/Spells: Renamed TARGET_DEST_UNK_110 to TARGET_UNIT_CONE_ENTRY_110
cherry pick from be7486f
2017-07-18 17:04:39 +02:00
jackpoz
348b02155b Core/Misc: Build fix
Fix build broken in 9cf4dd7345
2017-07-16 18:26:05 +02:00
jackpoz
9cf4dd7345 Core/Misc: Fix static analysis issues 2017-07-16 18:20:29 +02:00
Treeston
489478b74d Core/Entities: Extend combo point system to all Units and fix numerous quirks with rogue CP and vehicles (Malygos P3) (#19914)
- Implement Wolverine Bite (fixes #752)
- General combo point system cleanup
2017-06-24 22:41:16 -03:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
ariel-
b58a364192 Core/Spell: fix some spells that shouldn't allow stealth or invisibility
- Touch of Zanzil
- Glowing Blood
- Lambent Blood
- Vibrant Blood
- Black Blood
- Perpetual Instability
2017-06-11 02:31:59 -03:00
Keader
672bc29df9 Core/Spells: Allows Dispersion under Freeze (stun by hunter trap) 2017-06-05 12:02:05 -03:00
Keader
abc749034e Core/Spells: Allows Dispersion and Barkskin to be used under death coil 2017-06-03 20:01:57 -03:00
Chaouki Dhib
2ff76e828f Core/Spells: Change the radius of PBAoEs following the feedback received on (#16290) 2017-05-14 21:40:11 +02:00
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