[DiscordArchive] Do you know if there is a way to check if a cooldown is ready?
[DiscordArchive] Do you know if there is a way to check if a cooldown is ready?
Archived author: Drikish • Posted: 2023-02-12T01:28:50.601000+00:00
Original source
Do you know if there is a way to check if a cooldown is ready?
So if the scripted NPC casts a spell, be able to write a check to see if a spell ID is ready to be used again?
Archived author: Deleted User • Posted: 2023-02-12T01:29:53.860000+00:00
Original source
`Unit::GetSpellHistory`
Archived author: Drikish • Posted: 2023-02-12T01:33:06.129000+00:00
Original source
Unfortunately it says "C++ pointer to incomplete class type is not allowed"
Archived author: Drikish • Posted: 2023-02-12T01:33:17.822000+00:00
Original source
```c++
if (me->HealthBelowPct(50) && me->GetSpellHistory()->IsReady(SPELL_ENRAGED_REGENERATION))
```
Archived author: Deleted User • Posted: 2023-02-12T01:33:54.509000+00:00
Original source
`#include "SpellHistory.h"`
Archived author: Drikish • Posted: 2023-02-12T01:34:19.764000+00:00
Original source
❤️
Archived author: Drikish • Posted: 2023-02-12T01:34:29.534000+00:00
Original source
Thank you very much
Archived author: Drikish • Posted: 2023-02-12T01:36:50.346000+00:00
Original source
if (me->HealthBelowPct(50) && me->GetSpellHistory()->IsReady(SPELL_ENRAGED_REGENERATION))
I need a reference to the spellInfo not the spell itself, how do I do that?
Archived author: Drikish • Posted: 2023-02-12T01:37:03.922000+00:00
Original source
I see GetSpellInfo method
Archived author: Drikish • Posted: 2023-02-12T01:37:56.537000+00:00
Original source
GetSpellHistory()->HasCooldown seems to be allowed though