Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] I cannot, for the life of me, get this health check event to schedule. Can someone tell me what flav

[DiscordArchive] I cannot, for the life of me, get this health check event to schedule. Can someone tell me what flav

[DiscordArchive] I cannot, for the life of me, get this health check event to schedule. Can someone tell me what flav

rektbyfaith
Administrator
0
11-09-2023, 05:19 PM
#1
Archived author: KJack • Posted: 2023-11-09T17:19:26.461000+00:00
Original source

I cannot, for the life of me, get this health check event to schedule. Can someone tell me what flavor of idiot I'm being?

```c++
scheduler.Schedule(6s, [this](TaskContext /*context*/) {

<RP Stuff>

scheduler.Schedule(30s, [this](TaskContext context) {
DoCastSelf(SPELL_FRENZY);
context.Repeat();
}).Schedule(4s, [this](TaskContext context) {
DoCastVictim(SPELL_FORCEPUNCH);
context.Repeat(16s, 21s);
}).Schedule(12s, [this](TaskContext context) {
<charge logic>
context.Repeat(15s, 22s);
}).Schedule(25s, [this](TaskContext context) {
DoCastVictim(SPELL_SUMMONTIGERS, true);
context.Repeat(10s, 14s);
});

// schedule Enrage at 20% health - WHY DOESN'T THIS WORK!?
ScheduleHealthCheckEvent(20, [this] {
DoCastSelf(SPELL_ENRAGE);
});
});
```

I'm guessing it has to do with how the AI is getting passed to ScheduleHealthCheckEvent, but I've tried it a bunch of ways and gotten nowhere. Can you not call `ScheduleHealthCheckEvent` from inside a scheduled event like I'm doing?
rektbyfaith
11-09-2023, 05:19 PM #1

Archived author: KJack • Posted: 2023-11-09T17:19:26.461000+00:00
Original source

I cannot, for the life of me, get this health check event to schedule. Can someone tell me what flavor of idiot I'm being?

```c++
scheduler.Schedule(6s, [this](TaskContext /*context*/) {

<RP Stuff>

scheduler.Schedule(30s, [this](TaskContext context) {
DoCastSelf(SPELL_FRENZY);
context.Repeat();
}).Schedule(4s, [this](TaskContext context) {
DoCastVictim(SPELL_FORCEPUNCH);
context.Repeat(16s, 21s);
}).Schedule(12s, [this](TaskContext context) {
<charge logic>
context.Repeat(15s, 22s);
}).Schedule(25s, [this](TaskContext context) {
DoCastVictim(SPELL_SUMMONTIGERS, true);
context.Repeat(10s, 14s);
});

// schedule Enrage at 20% health - WHY DOESN'T THIS WORK!?
ScheduleHealthCheckEvent(20, [this] {
DoCastSelf(SPELL_ENRAGE);
});
});
```

I'm guessing it has to do with how the AI is getting passed to ScheduleHealthCheckEvent, but I've tried it a bunch of ways and gotten nowhere. Can you not call `ScheduleHealthCheckEvent` from inside a scheduled event like I'm doing?

rektbyfaith
Administrator
0
11-09-2023, 05:36 PM
#2
Archived author: Rymercyble • Posted: 2023-11-09T17:36:21.172000+00:00
Original source

i never saw "scheduler" yet
rektbyfaith
11-09-2023, 05:36 PM #2

Archived author: Rymercyble • Posted: 2023-11-09T17:36:21.172000+00:00
Original source

i never saw "scheduler" yet

rektbyfaith
Administrator
0
11-09-2023, 05:37 PM
#3
Archived author: KJack • Posted: 2023-11-09T17:37:14.417000+00:00
Original source

I am making friends with it. It's a rocky start in spots.
rektbyfaith
11-09-2023, 05:37 PM #3

Archived author: KJack • Posted: 2023-11-09T17:37:14.417000+00:00
Original source

I am making friends with it. It's a rocky start in spots.

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)