Commit Graph

813 Commits

Author SHA1 Message Date
sirikfoll
e7e46b2a82 Scripts/Spells: Quest King of the Mountain
Added missing jump jets and battle standard visuals
Added allowed area conditions for the vehicle
Fixed Jumpbot's attack spell (thanks @keader for fixing the proc)
2018-03-10 13:31:49 -03:00
ariel-
1a2c6f6545 Scripts/Spells: fix Hypothermia 2018-03-10 03:55:35 -03:00
ariel-
bd3530dd1f Core/Spells: move m_preCastSpell logic to scripts
- Bad name because it was actaully executed after effects
2018-03-10 00:55:24 -03:00
ariel-
93eda20d5c Core/Spells: Fix periodic rolling adding bonuses twice
Calculation is now done in CalculateAmount
2018-03-09 14:41:28 -03:00
ariel-
45c5e1b9d6 Core/Spells: rework part 5: GameObject casting
Closes #21330
Closes #18885
Ref #18752
2018-03-09 14:41:28 -03:00
ariel-
6e0b9a7916 Core/Creatures: port power type updates from master branch
Core/Misc: Added helper function Unit::SetFullPower
Cherry-picked from 8199eef81c

Core/Creatures: Updated power type handling (#20981)
Cherry-picked from 16a7a414ab
2018-03-07 03:34:45 -03:00
ariel-
1074a9b053 Core/Scripts: remove hack that caused aura to not be applied and saved twice on owned auras, causing an error on save
- This is handled by group stack rules actually
- Also reset removed aura counter when cleaning removed auras

Closes #21486
2018-02-23 13:16:42 -03:00
ariel-
3753ec5647 Core/Scripts: apply resilience on Vampiric Touch and Unstable Affliction dispel effect
- Spell with SPELL_ATTR4_FIXED_DAMAGE won't do it by itself to avoid applying resilience twice, but because those are triggered from a periodic aura, those apply resilience on tick, not saved to amount.
- This is one of the cases where you have to call Unit::SpellDamageBonusTaken directly

Closes #21393
2018-02-22 02:37:00 -03:00
ariel-
a6673f6aa7 Core/Scripts: implement Drain Mana breaking some auras on hit
Updates #20234
2018-02-17 17:46:38 -03:00
ariel-
7dc78d8e3f Core/Scripts: implemented Fungal Decay & Tail Sting
Refs #18542
2018-02-16 00:54:53 -03:00
ariel-
ab1aa8e384 Core/Scripts: fix Glyph of Renew interaction with Empowered Renew
- Get actual ticks from aura, because glyph reduces them by 1
2018-02-16 00:54:53 -03:00
ariel-
1edd81f9d5 Core/Scripts: fix Healing Stream Totem coefficient and animation 2018-02-14 22:07:06 -03:00
ariel-
a93d74c8df Core/Scripts: fix nopch 2018-02-14 16:36:56 -03:00
ariel-
df5afca278 Core/Scripts: implemented Seed of Corruption scaling damage tolerance 2018-02-14 05:58:56 -03:00
Treeston
ac8b9be5d6 Core/Spell: Properly remove REACT_PASSIVE on permanent feign death unapply. Fixes and closes #21156. 2018-02-13 15:47:44 +01:00
ariel-
4d14f613f3 Core/Unit: corrected calculation for SPELL_AURA_MOD_DAMAGE_TAKEN/SPELL_AURA_MOD_HEALING auras
- Spell bonus calculation and penalty was done twice, but it's simply flat +SP, which should be taken into account before other bonuses
- Fixed missing code from SpellDamageBonusDone/SpellHealingBonusDone and killed multiplication by stack amount twice for default coefficient spells (already multiplied on level penalty)
2018-02-12 16:52:59 -03:00
ariel-
303efcf0e4 Core/Spells: remove 'Vanish Purge' hack, the spell is present on DB and is copy of one in vanilla DBC
Thanks to killerwife for the heads-up
2018-02-08 23:18:45 -03:00
Shauren
2ab4e6c7aa Core/Spells: Fixed downranking coefficient penalty formula
Closes #21318
2018-01-27 12:19:18 +01:00
Keader
db525a1401 Scripts/Spells: Fixed Nature's Guardian proc (#21314) 2018-01-26 00:06:50 -02:00
ariel-
c099174ff7 Core/Misc: fix some /W4 warnings and some reported by GCC 6.3 2018-01-22 23:55:33 -03:00
ariel-
9f5d1e2b10 Core/Scripts: fix wrong uses of SetHitDamage hook.
This hook modifies damage AFTER it has been reduced by target auras/armor/resistances etc, it's useful if you want to scale damage by a factor, but not to add flat bonuses.
We're fixing those by moving calculation to Launch phase, where target taken bonuses haven't been used yet.

- Bronjahm: Magic's Bane
- BPC: Shadow Prison
- Oculus: Shock Lance
- Ymiron: Dark Slash (extra fix, it was wrongly damaging half of total health, it's supposed to be half of CURRENT health!)
- DK: Raise Ally Thrash spell (also extra fix: corrected formula)
- Warrior: Bloodthirst (shouldn't matter much as it's damage class none and those don't get bonuses by default)
- Warrior: Concussion Blow
- Warlock: extra fix for Haunt, healing part shouldn't scale with spell power

Closes #9560
2018-01-20 21:09:22 -03:00
ariel-
cb75105434 Core/Scripts: fix Wild Growth losing info about caster bonuses
Closes #21281
2018-01-20 19:08:03 -03:00
ariel-
7167edf27c Core/Scripts: fix Roar of Sacrifice 2018-01-18 18:13:38 -03:00
Moein
e519e14df8 Scripts/Spells: quest "That's Abominable" (#21253)
- scripted spell "Burst At The Seams" (59576)
- added Pet Bar

Closes #10876
2018-01-17 23:55:05 +01:00
ariel-
fb8885fabc Core/Scripts: fix warning 2018-01-17 13:07:44 -03:00
ariel-
ab3307fc23 Core/Scripts: fix some spells double dipping from done/taken bonuses
Closes #21007
2018-01-17 13:01:18 -03:00
ariel-
50a84f0b2b Core/Scripts: fix static analysis issue
CID 1384439
2018-01-14 17:28:10 -03:00
ariel-
f1986c6aaf Core/Entities: implement secondary damage for some weapons and removal of old voodoo
- Fixed correct Retaliation damage spell according to sniffs is 20240
- CalcArmorReducedDamage insisted on dealing a minimum of 1 damage even if damage was 0
- CalculateDamage was zero-phobic too: it defaulted to arbitrary max 5 damage

Closes #19081
2018-01-14 09:23:34 -03:00
ariel-
a305661785 Core/Scripts: fix Sanctified Wrath 2018-01-13 20:49:43 -03:00
ariel-
3b01cccd7e Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct
2018-01-13 20:49:43 -03:00
ariel-
31a3a6f0c5 Core: fix non pch build, redux 2018-01-13 17:07:25 -03:00
ariel-
cb9e72e521 Core/Auras: removed caster dependency from core
- Decoupled Unit logic: split of spell critical chance into done (caster bonuses) and taken (target bonuses), this allows to precalculate caster bonuses on aura apply and then check victim's auras on damage/healing calc
- Made static a bunch of methods (they no longer have this pointer because they are now called from periodic handlers which may or may not have an active caster in world)
- Simplified all AuraEffect bonuses into AuraEffect::_amount, no more duplicated code
- Critical chance and whether or not caster is player owned unit (for resilience calcs) is now saved one level upper, on Aura itself (it's impossible as of 3.3.5 to have different effects with different critical chances)
- Minor cleanup of SPELL_DAMAGE_CLASS_NONE and Arcane Potency (#18813) crit handling

Closes #19876
2018-01-13 06:45:21 -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
ariel-
a5d4f34c31 Core/Scripts: Implemented Shifting Naaru Sliver 2018-01-02 02:58:19 -03:00
joschiwald
2a5d3a64bc Scripts: Fixed typo
thanks @shenhuyong
2018-01-02 01:46:40 +01:00
tkrokli
f6b6f57a6d Update copyright note for 2018
Best wishes for the new year.
2018-01-01 01:55:29 +01:00
Treeston
d507a7e338 [3.3.5] CastSpell unclusterfucking (that's a word now) (#21123)
Core/Spell: The giant CastSpell unclusterfucking (that's a word now) of this generation.

- CastSpell now always takes three arguments - target, spellId, and a struct containing extra arguments
- This struct (CastSpellExtraArgs, see SpellDefines.h) serves as a conglomerate of every previous combination of the 20 billion different CastSpell overloads, all merged into one
  - It has some great utility constructors - check them out! All of these can be used to implicitly construct the ExtraArgs object.
- A gajillion refactors to make everything behave the way it always has
2017-12-30 20:28:41 +01:00
Keader
502864e86c Core/Scripts: Val'anyr Hammer of Ancient Kings should proc only with effective heal 2017-12-29 14:16:53 -03:00
ariel-
f4629d83c6 Core/Scripts: prevent applying Aspect of the Beast on pet load if owner has switched aspects 2017-12-28 12:16:39 -03:00
jackpoz
12701cb0c6 Core/Misc: Replace time(NULL) with GameTime::GetGameTime() 2017-12-24 22:50:59 +01:00
Keader
2362e9c794 Scripts/Trial of Crusader: Northrend Beasts Rework (#21031)
* Rewritten Gormok encounter
* Rewritten Snobold Vassal Script
* Rewritten Jormungars encounter
* Rewritten Icehowl encounter
* Added missing texts
* Added missing spells
* Implemented berserk mechanic on heroic diffs.
* Implemented Achievement requirement to make heroic diffs.
* Rewritten Barrett Ramsay scripts
* Added Barrett gossips and ported everything to DB.
* Added right Barrett in each encounter
* Removed a lot of hacks
* Rewritten Tirion Fordring script
* Rewritten Varian Wrynn script
* Rewritten Garrosh script
* Rewritten Wilfred event
* Rewritten Lich King event
* Updated codestyle
* Added missing spawns
* Fixed combat behavior before Gormok
* Fixed some visual stuff
2017-12-23 22:03:57 -03:00
ariel-
de9f904269 Core/Spells: fix some DB errors
Ref #18542

- Implemented Choking Vines transformation at 5 stacks
- Implemented periodic Aura of Fear ticks
- Fixed Savage Rend passive proccing on anything (raptor pets)
2017-12-20 02:25:25 -03:00
ariel-
5fc4d36a1f Core/Scripts: fix drink auras 2017-12-15 19:58:12 -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
ariel-
2d07d4f7b3 Core/Scripts: more travis 2017-12-15 03:39:42 -03:00
ariel-
ea0224e3bd Core/Scripts: travis fixes 2017-12-15 02:51:48 -03:00
ariel-
a36e804ae4 Core/Auras: periodics refactor part 5: ported periodic trigger spell auras to scripts 2017-12-15 01:46:52 -03:00
ariel-
193bd3b452 Core/Auras: periodics refactor part 4: ported periodic dummy auras to scripts 2017-12-15 01:46:51 -03:00
ariel-
16e20711d2 Core/Auras: periodics refactor part 3: move more switch hacks to scripts
- Incidentally fixed some spells which were supposed to be removed by proc instead of healing to full
2017-12-15 00:37:12 -03:00
ariel-
0510bf7afe Core/Auras: periodics refactor part 2: Move UpdatePeriodic to AuraScripts 2017-12-15 00:35:28 -03:00