Forums WoW Modding Support Archives TrinityCore Discord Archives [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?

[DiscordArchive] Do you know if there is a way to check if a cooldown is ready?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
02-12-2023, 01:28 AM
#1
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?
rektbyfaith
02-12-2023, 01:28 AM #1

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?

rektbyfaith
Administrator
0
02-12-2023, 01:29 AM
#2
Archived author: Deleted User • Posted: 2023-02-12T01:29:53.860000+00:00
Original source

`Unit::GetSpellHistory`
rektbyfaith
02-12-2023, 01:29 AM #2

Archived author: Deleted User • Posted: 2023-02-12T01:29:53.860000+00:00
Original source

`Unit::GetSpellHistory`

rektbyfaith
Administrator
0
02-12-2023, 01:33 AM
#3
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"
rektbyfaith
02-12-2023, 01:33 AM #3

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"

rektbyfaith
Administrator
0
02-12-2023, 01:33 AM
#4
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))
```
rektbyfaith
02-12-2023, 01:33 AM #4

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))
```

rektbyfaith
Administrator
0
02-12-2023, 01:33 AM
#5
Archived author: Deleted User • Posted: 2023-02-12T01:33:54.509000+00:00
Original source

`#include "SpellHistory.h"`
rektbyfaith
02-12-2023, 01:33 AM #5

Archived author: Deleted User • Posted: 2023-02-12T01:33:54.509000+00:00
Original source

`#include "SpellHistory.h"`

rektbyfaith
Administrator
0
02-12-2023, 01:34 AM
#6
Archived author: Drikish • Posted: 2023-02-12T01:34:19.764000+00:00
Original source

❤️
rektbyfaith
02-12-2023, 01:34 AM #6

Archived author: Drikish • Posted: 2023-02-12T01:34:19.764000+00:00
Original source

❤️

rektbyfaith
Administrator
0
02-12-2023, 01:34 AM
#7
Archived author: Drikish • Posted: 2023-02-12T01:34:29.534000+00:00
Original source

Thank you very much
rektbyfaith
02-12-2023, 01:34 AM #7

Archived author: Drikish • Posted: 2023-02-12T01:34:29.534000+00:00
Original source

Thank you very much

rektbyfaith
Administrator
0
02-12-2023, 01:36 AM
#8
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?
rektbyfaith
02-12-2023, 01:36 AM #8

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?

rektbyfaith
Administrator
0
02-12-2023, 01:37 AM
#9
Archived author: Drikish • Posted: 2023-02-12T01:37:03.922000+00:00
Original source

I see GetSpellInfo method
rektbyfaith
02-12-2023, 01:37 AM #9

Archived author: Drikish • Posted: 2023-02-12T01:37:03.922000+00:00
Original source

I see GetSpellInfo method

rektbyfaith
Administrator
0
02-12-2023, 01:37 AM
#10
Archived author: Drikish • Posted: 2023-02-12T01:37:56.537000+00:00
Original source

GetSpellHistory()->HasCooldown seems to be allowed though
rektbyfaith
02-12-2023, 01:37 AM #10

Archived author: Drikish • Posted: 2023-02-12T01:37:56.537000+00:00
Original source

GetSpellHistory()->HasCooldown seems to be allowed though

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)