diff options
| -rw-r--r-- | sql/updates/world/master/2024_04_27_00_world.sql | 3 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 29 | 
2 files changed, 26 insertions, 6 deletions
diff --git a/sql/updates/world/master/2024_04_27_00_world.sql b/sql/updates/world/master/2024_04_27_00_world.sql new file mode 100644 index 00000000000..b01213bf329 --- /dev/null +++ b/sql/updates/world/master/2024_04_27_00_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (429020); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(429020,0x00,224,0x00400800,0x00000000,0x00000000,0x00000000,0x0,0x0,0x2,0x2,0x403,0x0,0x0,0,0,0,0); -- Fragile Echoes diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 1bc95391071..347d8936474 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -4308,6 +4308,7 @@ enum AmalgamsSeventhSpine      SPELL_FRAGILE_ECHOES_PALADIN            = 225297,      SPELL_FRAGILE_ECHOES_DRUID              = 225298,      SPELL_FRAGILE_ECHOES_PRIEST_HOLY        = 225366, +    SPELL_FRAGILE_ECHOES_EVOKER             = 429020,      SPELL_FRAGILE_ECHO_ENERGIZE             = 215270,  }; @@ -4316,17 +4317,19 @@ class spell_item_amalgams_seventh_spine : public AuraScript  {      bool Validate(SpellInfo const* /*spellInfo*/) override      { -        return ValidateSpellInfo({ +        return ValidateSpellInfo +        ({              SPELL_FRAGILE_ECHOES_MONK,              SPELL_FRAGILE_ECHOES_SHAMAN,              SPELL_FRAGILE_ECHOES_PRIEST_DISCIPLINE,              SPELL_FRAGILE_ECHOES_PALADIN,              SPELL_FRAGILE_ECHOES_DRUID, -            SPELL_FRAGILE_ECHOES_PRIEST_HOLY +            SPELL_FRAGILE_ECHOES_PRIEST_HOLY, +            SPELL_FRAGILE_ECHOES_EVOKER          });      } -    void UpdateSpecAura() +    void UpdateSpecAura(bool apply) const      {          Player* target = GetUnitOwner()->ToPlayer();          if (!target) @@ -4334,7 +4337,7 @@ class spell_item_amalgams_seventh_spine : public AuraScript          auto updateAuraIfInCorrectSpec = [&](ChrSpecialization spec, AmalgamsSeventhSpine aura)          { -            if (target->GetPrimarySpecialization() != spec) +            if (!apply || target->GetPrimarySpecialization() != spec)                  target->RemoveAurasDueToSpell(aura);              else if (!target->HasAura(aura))                  target->CastSpell(target, aura, GetEffect(EFFECT_0)); @@ -4358,14 +4361,28 @@ class spell_item_amalgams_seventh_spine : public AuraScript              case CLASS_DRUID:                  updateAuraIfInCorrectSpec(ChrSpecialization::DruidRestoration, SPELL_FRAGILE_ECHOES_DRUID);                  break; +            case CLASS_EVOKER: +                updateAuraIfInCorrectSpec(ChrSpecialization::EvokerPreservation, SPELL_FRAGILE_ECHOES_EVOKER); +                break;              default:                  break;          }      } +    void HandleHeartbeat() const +    { +        UpdateSpecAura(true); +    } + +    void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const +    { +        UpdateSpecAura(false); +    } +      void Register() override      { -        OnHeartbeat += AuraHeartbeatFn(spell_item_amalgams_seventh_spine::UpdateSpecAura); +        OnHeartbeat += AuraHeartbeatFn(spell_item_amalgams_seventh_spine::HandleHeartbeat); +        AfterEffectRemove += AuraEffectRemoveFn(spell_item_amalgams_seventh_spine::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);      }  }; @@ -4377,7 +4394,7 @@ class spell_item_amalgams_seventh_spine_mana_restore : public AuraScript          return ValidateSpellInfo({ SPELL_FRAGILE_ECHO_ENERGIZE });      } -    void TriggerManaRestoration(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) +    void TriggerManaRestoration(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) const      {          if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE)              return;  | 
