Ekisto

Untitled

Aug 28th, 2025
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.30 KB | None | 0 0
  1. class spell_dru_custom_hot_trigger : public AuraScript
  2. {
  3.     PrepareAuraScript(spell_dru_custom_hot_trigger);
  4.  
  5.     // Ton nouveau HoT custom
  6.     static constexpr uint32 triggerSpellId = 8140110;
  7.  
  8.     // Tous les HoTs du druide qui doivent déclencher
  9.     std::set<uint32> druidHoTs =
  10.     {
  11.         774,    // Rejuvenation
  12.         8936,   // Regrowth
  13.         33763,  // Lifebloom
  14.         48438   // Wild Growth
  15.         // ajoute d’autres IDs si besoin
  16.     };
  17.  
  18.     void OnTick(AuraEffect const* aurEff)
  19.     {
  20.         Unit* target = GetTarget(); // Cible qui reçoit le tick
  21.         Unit* caster = GetCaster(); // Druide qui a appliqué le HoT
  22.  
  23.         if (!target || !caster)
  24.             return;
  25.  
  26.         // Vérifie si c’est bien un HoT de la liste
  27.         if (druidHoTs.find(GetSpellInfo()->Id) != druidHoTs.end())
  28.         {
  29.             // Lance le nouveau HoT sur la cible du tick
  30.             // true = instantané, pas de GCD, pas de mana cost
  31.             caster->CastSpell(target, triggerSpellId, true);
  32.         }
  33.     }
  34.  
  35.     void Register() override
  36.     {
  37.         // Hook : quand l’effet heal périodique tick
  38.         OnEffectPeriodic += AuraEffectPeriodicFn(
  39.             spell_dru_custom_hot_trigger::OnTick,
  40.             EFFECT_0,
  41.             SPELL_AURA_DUMMY
  42.         );
  43.     }
  44. };
Advertisement
Add Comment
Please, Sign In to add comment