Commit Graph

5695 Commits

Author SHA1 Message Date
Kittnz
cd3425f6a6 Scripts/Outland: Fix logical error in Hellfire event in Honor Hold
(cherry picked from commit 8f64612cb1)
2021-06-16 14:32:07 +02:00
ariel-
85ffcd9826 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

(cherry picked from commit 9f5d1e2b10)
2021-06-16 14:26:09 +02:00
Keader
18b0135bf7 Scripts/Utgarde Keep: Fixed Ingvar evade in phase 2 (again)
Closes #21264

(cherry picked from commit 96983fc6bb)
2021-06-16 12:45:57 +02:00
ariel-
62c571076e Core/Scripts: added nullptr checks to DamageTaken hooks
Since cb9e72e521 attacker may not be in world when hook is called

(cherry picked from commit 0db5c2df3f)
2021-06-16 12:02:14 +02:00
Treeston
ea79b55698 Scripts/AzjolNerub: Missing nullptr check in Hadronox. Closes #21258.
(cherry picked from commit d9d26200f7)
2021-06-16 11:49:03 +02:00
Treeston
6fb45e31c2 DB/SpawnGroup: instance_spawn_group data for map 576 (The Nexus)
(cherry picked from commit 0319c713a4)
2021-06-16 11:46:50 +02:00
Moein
6d7288356a Scripts/Spells: quest "That's Abominable" (#21253)
- scripted spell "Burst At The Seams" (59576)
- added Pet Bar

Closes #10876

(cherry picked from commit e519e14df8)
2021-06-16 11:32:25 +02:00
ariel-
bb7869b31f Core/Scripts: fix some spells double dipping from done/taken bonuses
Closes #21007

(cherry picked from commit ab3307fc23)
2021-06-16 11:22:10 +02:00
ariel-
3bc3b3eeeb Core/Globals: revert back to unordered_map for templates
Partial revert of commit b64c504314
See discussion on b64c504314

(cherry picked from commit b75ff7d4bf)
2021-06-16 01:29:25 +02:00
ariel-
21556667c1 Core/Globals: throw some RAII into ObjectMgr, and load templates into vectors
Ref #14274

(cherry picked from commit b64c504314)
2021-06-16 01:00:11 +02:00
sirikfoll
5b5bc4c5c7 Scripts/Scarlet Enclave: Quest The Endless Hunger will work correctly after Unworthy Initiate Respawn
Due to dynamic spawns, we need to be able to update the Npc GUID after the respawn, otherwise the quest can only be completed by the first player

(cherry picked from commit 72ff2e30c3)
2021-06-15 23:43:17 +02:00
Keader
ca07b1a25d Scripts/Pit of Saron: Tyrannus followup
fix new issue caused by 947cb6a453

(cherry picked from commit 0b09e9ee4e)
2021-06-15 23:41:11 +02:00
Keader
ed8d57e72d Scripts/Pit of Saron: Fixed Tyrannus not working after evade
(cherry picked from commit 947cb6a453)
2021-06-15 23:40:47 +02:00
Keader
6ba82b56dc Scripts/Trial Of The Crusader: Lord Jaraxxus rework (#21216)
(cherry picked from commit a41cd41695)
2021-06-15 23:32:57 +02:00
ariel-
5fbddef85f Core/Spell: SpellValueOverrides encapsulation
- No sense to let scripts use SpellValueOverrides, we already have modifiers in CastSpellExtraArgs struct

(cherry picked from commit 3b01cccd7e)
2021-06-14 00:19:50 +02:00
Kittnz
267aeddc05 Scripts/EasternKingdoms: implement Children of Goldshire event (#20745)
* Script: Implement Childeren of Goldshire

Notes: Need to update waypoints and default location of the childeren
http://wowwiki.wikia.com/wiki/Children_of_Goldshire
(cherry picked from commit a9c853ee3f)
2021-06-13 22:30:10 +02:00
ariel-
fccf1a8c62 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

(cherry picked from commit cb9e72e521)
2021-06-13 00:59:13 +02:00
Shauren
f6b919fafe Core/Reputation: Named all reputation flags 2021-06-05 23:00:06 +02:00
Shauren
80a6347b7a Core/Reputation: Implemented "friendship reputation" 2021-06-04 19:27:26 +02:00
Shauren
0b2087ae41 Core/Criteria: Add all values of CriteriaStartEvent 2021-06-01 21:16:41 +02:00
Shauren
4b6ddfbbcc Core/Criteria: Add all values of CriteriaFailEvent 2021-06-01 21:04:22 +02:00
Kittnz
299746f9f6 Scripts/Outland: Implement Hellfire event in Honor Hold (#21110)
* Script/Outland: Implement Hellfire event in Honor Hold

This is hourly, event is only 60 seconds long.

(cherry picked from commit acc73d4693)
2021-05-29 21:27:11 +02:00
Shauren
6ecfe58cae Core/Maps & Extractors: Move copypasted map file headers into a single shared file and replace #defines with enums 2021-05-29 21:21:37 +02:00
sueastward
28c075765b Scripts/Spells: Implement mage Alter Time 2021-05-27 12:56:10 +02:00
Treeston
4a65dcaecb Scripts/World: New target dummy AI, because I don't trust the existing one in light of #21187.
(cherry picked from commit a23c97a0fc)
2021-05-17 00:02:27 +02:00
Treeston
e090c9a00e Scripts/Commands: New command: .debug threatinfo
(cherry picked from commit f45c211987)
2021-05-16 21:57:35 +02:00
Treeston
a121f47ba3 9ad11e6 follow-up, prevent Halion respawn without loot
tagging #21198

(cherry picked from commit f0a394753a)
2021-05-16 21:56:06 +02:00
Treeston
c31ae7ab33 Core/Threat: Fix a potential exploit allowing players to damage a boss without them taking damage.
Scripts/Halion: General cleanup of old hacks no longer needed under new combat system.

(cherry picked from commit 9ad11e67fb)
2021-05-16 21:56:06 +02:00
Treeston
8b7728f82e Core/Map: New Map::ForceRespawn to override objections and force a respawn (equivalent to force = true). Use this to fix various GM commands.
Scripts/Valithria: Fix an issue that could get the encounter stuck in an unloaded state.

(cherry picked from commit 3bb33e3108)
2021-05-16 21:56:06 +02:00
Shauren
c79e5528e1 Core/Units: Remove Unit::EnergizeBySpell overload taking spellId argument 2021-05-16 21:56:06 +02:00
Shauren
b9d63c2009 Core/Scripts: Remove deprecated overload of QuestReward without LootItemType argument 2021-05-16 21:56:06 +02:00
Treeston
dce39aedc2 Core/Combat: Some more sanity check asserts to try and track down #21187.
Also, some anti-annoyance treatment for dot tele.

(cherry picked from commit fdacf12739)
2021-05-16 21:56:05 +02:00
Moein
673cc20e79 MovementInform should overrides
(cherry picked from commit 18f5eae835)
2021-05-16 21:56:05 +02:00
Treeston
5aee452943 Core/Misc: A variety of clean-up changes, mostly following up on 532ab1c to fix legacy bugs exposed by it:
- Triggers can no longer have a threat list (this may expose some ugliness in old legacy scripts)
- Threat entries are forced to OFFLINE if the AI refuses to attack the target
- Clean up passive creature evade behavior to be more consistent
- Fix a months old issue in spawn group management that would cause "Inactive" to incorrectly show in .list respawns for system groups outside of map 0
- Valithria script cleanups, remove old hacks and make it work with the new system. Closes #21174.
- Some strings cleanup

(cherry picked from commit 9f9507e6a1)
2021-05-16 21:56:05 +02:00
Treeston
34c7810fe5 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.

(cherry picked from commit 532ab1c7f8)
2021-05-16 21:56:01 +02:00
Shauren
12ed21e690 Scripts/Spells: Clear arcane charge damage/cost/cast time modifier aura when reaching 0 arcane charges (power) 2021-05-15 17:44:31 +02:00
Shauren
331c7ec7c2 Scripts/Spells: Remove manual damage adjustment from Arcane Barrage for scaling with arcane charges and use spell cast for mana energize 2021-05-15 17:44:31 +02:00
Shauren
fd7f854995 Scripts/Spells: Properly utilize all Arcane Explosion energize effects 2021-05-15 17:44:31 +02:00
Matan Shukry
be8cbab4b3 Scripts/Spells: Fixed arcane barrage + explosion 2021-05-15 17:44:31 +02:00
Shauren
2906926173 Core/Scenes: Fix scenes played by package id storing pointers to stack variables 2021-05-12 14:23:21 +02:00
Shauren
f072bc4ca1 Core/Commands: Add ItemContext argument to .additem and .additemset commands 2021-05-11 18:25:22 +02:00
Shauren
91b91b502f Core/Quests: Quest improvements
* Add quest log slot argument to functions dealing with objective progress
* Implemented QUEST_OBJECTIVE_FLAG_SEQUENCED (prevent progressing hidden objectives)
2021-05-09 20:21:32 +02:00
ariel-
9bf5a03bc4 Core/Scripts: fix Millhouse Manastorm resetting dialogs after Skyriss encounter
Closes #21159

(cherry picked from commit fd7fff80c9)
2021-05-06 07:06:27 +02:00
ariel-
82fa6ede59 Core/Scripts: cast "Trial of the Naaru: Tenacity" credit spell when criteria is achieved
Closes #21155

(cherry picked from commit 036a05458e)
2021-05-06 07:06:27 +02:00
ariel-
f77bd1e7c9 Core/Scripts: fixed npc immunity flags during Harbinger Skyriss encounter
- Added missing _Reset
- Properly register Skyriss summons in SummonList

Closes #21154

Who ordered up an extra large can of whoop-ass?

(cherry picked from commit f8b148c334)
2021-05-06 07:06:27 +02:00
ariel-
87d5544f05 Core/Scripts: Implemented Shifting Naaru Sliver
(cherry picked from commit a5d4f34c31)
2021-05-06 07:06:27 +02:00
ariel-
5ac40cf9d1 Core/Scripts: fix issues with 'Squeeze' on Yogg-Saron encounter
- Unassigned spell script for 25-man difficulty
- Didn't remove aura on 25-man when tentacle killed

(cherry picked from commit de3fd4d076)
2021-05-06 07:06:27 +02:00
Shauren
14098b28b3 Core/Chat: Allow incorrect spell/skill language assignments to mirror client behavior 2021-05-03 23:53:24 +02:00
Matan Shukry
3b578fc6b9 Core/Chat: Load chat language data from db2 and implement serverside chat translations 2021-05-03 23:53:24 +02:00
Matan Shukry
c99f93d53d Scripts/Spells: Implemented monk stagger (#26295) 2021-04-22 22:45:26 +02:00