diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2017-12-30 20:28:41 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-04-16 15:22:42 +0200 |
| commit | 9b141207d170e4b2b4e6d9290d5f921f76cbcea0 (patch) | |
| tree | 47d65d966a66699f6de7e308047e408bdb255bff /src/server/game/Entities/Pet | |
| parent | 2ea8f5e6fced094f28c45ac84123c85477122567 (diff) | |
[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
(cherry picked from commit d507a7e3388382960108b24143da48e5f912b4a7)
Diffstat (limited to 'src/server/game/Entities/Pet')
| -rw-r--r-- | src/server/game/Entities/Pet/Pet.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index d66e0b859e6..0e32be435b4 100644 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -1702,13 +1702,13 @@ void Pet::CastPetAura(PetAura const* aura) if (!auraId) return; + CastSpellExtraArgs args; + args.TriggerFlags = TRIGGERED_FULL_MASK; + if (auraId == 35696) // Demonic Knowledge - { - int32 basePoints = CalculatePct(aura->GetDamage(), GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT)); - CastCustomSpell(this, auraId, &basePoints, nullptr, nullptr, true); - } - else - CastSpell(this, auraId, true); + args.SpellValueOverrides.AddMod(SPELLVALUE_BASE_POINT0, CalculatePct(aura->GetDamage(), GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT))); + + CastSpell(this, auraId, args); } bool Pet::IsPetAura(Aura const* aura) |
