[DiscordArchive] whats your issue?
[DiscordArchive] whats your issue?
Archived author: Thulz • Posted: 2024-05-21T20:06:05.980000+00:00
Original source
if it's an aura
Archived author: Thulz • Posted: 2024-05-21T20:06:08.451000+00:00
Original source
why you casting spell
Archived author: Thulz • Posted: 2024-05-21T20:06:10.749000+00:00
Original source
instead of AddAura
Archived author: Ĝ̷̳r̸̹͊a̷̜̚k̴̞̔ • Posted: 2024-05-21T20:06:26.772000+00:00
Original source
```void AuraEffect::HandleModTriggerSpellOnStacks(AuraApplication const* aurApp, uint8 mode, bool apply) const
{
if (!(mode & (AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK | AURA_EFFECT_HANDLE_REAPPLY)))
return;
Unit* target = aurApp->GetTarget();
Unit* caster = GetCaster();
if (!caster || !target || !(target->GetTypeId() == TYPEID_UNIT || target->GetTypeId() == TYPEID_PLAYER))
return;
if (apply)
{
Aura* aura = target->GetAura(GetId());
// Aleist3r: in theory it should be impossible to get stack amount higher than Misc A but just in case...
if (aura->GetStackAmount() >= GetMiscValue())
{
caster->CastSpell(target, GetTriggerSpell(), true);
// Aleist3r: cannot think of any case that would require aura to not be removed after but keeping it from old implementation anyways
if (!GetMiscValueB())
target->RemoveAura(aura);
}
}
else
return;
}
uint32 AuraEffect::GetTriggerSpell() const
{
return m_spellInfo->Effects[GetEffIndex()].TriggerSpell;
}``` the whole bit if you want it, i pulled it from here: https://github.com/Duskhaven-Reforged/Du...8ec4d2ef4e
Archived author: Thulz • Posted: 2024-05-21T20:06:53.105000+00:00
Original source
`caster->CastSpell(target, GetTriggerSpell(), true);` Why do you trigger an spell instead of AddAura()
Archived author: Ĝ̷̳r̸̹͊a̷̜̚k̴̞̔ • Posted: 2024-05-21T20:07:15.776000+00:00
Original source
because its not my code lol, its someone elses im trying to make work
Archived author: Thulz • Posted: 2024-05-21T20:07:35.165000+00:00
Original source
Replace that line with AddAura and test
Archived author: Ĝ̷̳r̸̹͊a̷̜̚k̴̞̔ • Posted: 2024-05-21T20:08:17.928000+00:00
Original source
like just ```caster->AddAura(target, GetTriggerSpell(), true);```
Archived author: Thulz • Posted: 2024-05-21T20:08:34.925000+00:00
Original source
I don't remember its parameters, IIRC auras do not have args (the third param)
Archived author: Thulz • Posted: 2024-05-21T20:09:16.438000+00:00
Original source
also