Commit Graph

788 Commits

Author SHA1 Message Date
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
ariel-
5d91beb1db Core/Auras: periodics refactor part 1:
- Don't skip ticks if diff is greater than amplitude
- Fixed spells without ampltude in DBC
2017-12-15 00:25:58 -03:00
jackpoz
24e82fe83d Core/Misc: Fix static analysis issues
Fix static analysis issues reported by 3rd party tools
2017-12-08 23:27:30 +01:00
Killyana
00e3023b32 DB/Creature: Scourging Crystal
And fix spell script spell_q11396_11399_scourging_crystal_controller
Closes #17596
2017-11-26 17:40:42 +01:00
sirikfoll
6e7e43172e Core/Scripts Fix issues with Midsummer's Ribbon Pole
Closes #6876

Fixed achievement Burning Hot Pole Dance
Update scripts for quest Torch Tossing, using all correct spells and timers
Updated script register model
2017-11-17 23:41:11 -02:00
sirikfoll
1a638b39e3 Core/Scripts: Fixed typo in spell_pilgrims_bounty_a_serving_of 2017-11-08 10:21:32 -02:00
DanVS
654b89ef02 Core/Spells: Sheath of Light - overheal scaling fix (#20787) 2017-11-04 17:09:18 +01:00
Keader
4eababa9f0 Core/Spells: Fixed Dragon's Breath with Living Bomb explosion (#20622)
Close: #19949
2017-10-16 23:36:40 -02:00
Treeston
c7896f3102 Core/Unit: For convenience, explicitly redirect CastSpell with nullptr as first argument to the Unit* overloads. No more ->CastSpell((Unit*)nullptr, ...) all over the place! 2017-07-21 18:02:48 +02:00
Treeston
49aa8a2e59 Scripts/Spell: Port spell_generic.cpp to new script registration syntax wherever possible. No actual changes in functionality. (fb87ac8 follow-up) 2017-07-20 16:43:45 +02:00
Treeston
37f59f8850 Scripts/Item: Port spell_item.cpp scripts to new script registration syntax wherever possible. No actual changes in functionality. (fb87ac8 follow-up) 2017-07-20 01:26:15 +02:00
treeston
fb87ac8e8d Core/Scripts: Implement generic script loaders (and script registry macros) to greatly reduce code duplication (#19526) (cherry-picked from commit a9174d5). 2017-07-20 00:27:20 +02:00
treeston
02b1d8bb48 Scripts/Item: Change Nitro -> Boosts <- to use the correct knockup effect for their backfire. Also, script that knockup effect to work properly ("usually" deploy a rescue parachute). 2017-07-18 18:32:56 +02:00
treeston
125127ea73 Scripits/Item: Nitro. BOOSTS. 2017-07-18 14:11:12 +02:00
treeston
f953d85960 Scripts/Item: Fix Nitro Boosts to only fail in flyable areas. Also, it's called nitro _boosts_. Not _boots_. Nitro _boosts_. 2017-07-18 14:08:10 +02:00
treeston
74af880217 Hi, I'm Treeston, and welcome to Combat PR Prep Refactors.
Today, we're moving UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC to higher-level abstraction so combat manager can react to it.
New methods on Unit:
- void SetImmuneTo<All/PC/NPC>(apply, keepCombat = false);
- bool IsImmuneTo<All/PC/NPC>() const;
2017-07-09 02:07:29 +02:00
Treeston
e2a1ccd118 [3.3.5] Combat/Threat rewrite - prep & refactor (#19966)
* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.
2017-07-01 20:18:02 +02:00
Shauren
5879eb2198 Core/Spells: Add missing validate 2017-07-01 11:57:16 +02:00
treeston
e07a322a3e Combustion will now properly go on cooldown when the buff is manually cancelled. Fixes #19968. 2017-06-30 18:25:11 +02:00
treeston
e35092c6a1 Combat/threat rewrite prep - merge RBAC/DB changes. 2017-06-28 17:27:34 +02:00
Gildor
629095ae21 Warrior: Fix T10 Melee 4P Bonus (#19954) 2017-06-24 15:20:59 +02:00
ariel-
85a7d5ce9a Core: ported headers cleanup from master branch 2017-06-19 23:20:06 -03:00
Shauren
d6201e5dbb Core/Grids: Ported cmangos/mangos-wotlk@ea99457e50
(cherry picked from commit 9299e9bde0)
2017-06-19 13:16:13 -03:00
Gildor
d58fe103bf Hunter: Fix Piercing Shot dot clipping (#19882)
Closes #19881
2017-06-15 03:11:29 +02:00
ariel-
d6cae113c6 Core/Scripts: fix some /W4 warnings 2017-06-11 18:06:39 -03:00
Shauren
abac1b34bc Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
* Also fix gcc build

(cherry picked from commit f097e341f5)
2017-06-03 02:27:48 -03:00