Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class spell_dru_custom_hot_trigger : public AuraScript
- {
- PrepareAuraScript(spell_dru_custom_hot_trigger);
- // Ton nouveau HoT custom
- static constexpr uint32 triggerSpellId = 8140110;
- // Tous les HoTs du druide qui doivent déclencher
- std::set<uint32> druidHoTs =
- {
- 774, // Rejuvenation
- 8936, // Regrowth
- 33763, // Lifebloom
- 48438 // Wild Growth
- // ajoute d’autres IDs si besoin
- };
- void OnTick(AuraEffect const* aurEff)
- {
- Unit* target = GetTarget(); // Cible qui reçoit le tick
- Unit* caster = GetCaster(); // Druide qui a appliqué le HoT
- if (!target || !caster)
- return;
- // Vérifie si c’est bien un HoT de la liste
- if (druidHoTs.find(GetSpellInfo()->Id) != druidHoTs.end())
- {
- // Lance le nouveau HoT sur la cible du tick
- // true = instantané, pas de GCD, pas de mana cost
- caster->CastSpell(target, triggerSpellId, true);
- }
- }
- void Register() override
- {
- // Hook : quand l’effet heal périodique tick
- OnEffectPeriodic += AuraEffectPeriodicFn(
- spell_dru_custom_hot_trigger::OnTick,
- EFFECT_0,
- SPELL_AURA_DUMMY
- );
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment