Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] can you cancel a cast too by setting the state?

[DiscordArchive] can you cancel a cast too by setting the state?

[DiscordArchive] can you cancel a cast too by setting the state?

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
01-17-2023, 10:10 PM
#11
Archived author: Pandaros • Posted: 2023-01-17T22:10:55.456000+00:00
Original source

TY
rektbyfaith
01-17-2023, 10:10 PM #11

Archived author: Pandaros • Posted: 2023-01-17T22:10:55.456000+00:00
Original source

TY

rektbyfaith
Administrator
0
01-17-2023, 10:21 PM
#12
Archived author: Pandaros • Posted: 2023-01-17T22:21:58.785000+00:00
Original source

```
void HandleAfterCast()
{
Unit* caster = GetCaster();
Unit* target = GetExplTargetUnit();
if (!caster || !target)
return;

std::list<Creature*> dreadstalkers;
caster->GetCreatureListWithEntryInGrid(dreadstalkers, 98035);
for (Creature* dreadstalker : dreadstalkers)
{
if (dreadstalker->GetOwner() == caster)
{
dreadstalker->SetLevel(caster->GetLevel());
dreadstalker->SetMaxHealth(caster->GetMaxHealth() / 3);
dreadstalker->SetHealth(caster->GetHealth() / 3);
dreadstalker->AI()->AttackStart(target);
dreadstalker->SetReactState(REACT_DEFENSIVE);
}
}

if (uint32 impsToSummon = caster->GetAuraEffectAmount(SPELL_WARLOCK_IMPROVED_DREADSTALKERS, EFFECT_0))
{
if (impsToSummon > 1)
caster->CastSpell(caster, 296553, true);

for (uint32 i = 0; i < impsToSummon; ++i)
caster->CastSpell(target->GetRandomNearPosition(3.f), SPELL_WARLOCK_WILD_IMP_SUMMON, true);
}
}
```

I checked if the caster had the talent and summoned the imps, do I just cast the aura?
rektbyfaith
01-17-2023, 10:21 PM #12

Archived author: Pandaros • Posted: 2023-01-17T22:21:58.785000+00:00
Original source

```
void HandleAfterCast()
{
Unit* caster = GetCaster();
Unit* target = GetExplTargetUnit();
if (!caster || !target)
return;

std::list<Creature*> dreadstalkers;
caster->GetCreatureListWithEntryInGrid(dreadstalkers, 98035);
for (Creature* dreadstalker : dreadstalkers)
{
if (dreadstalker->GetOwner() == caster)
{
dreadstalker->SetLevel(caster->GetLevel());
dreadstalker->SetMaxHealth(caster->GetMaxHealth() / 3);
dreadstalker->SetHealth(caster->GetHealth() / 3);
dreadstalker->AI()->AttackStart(target);
dreadstalker->SetReactState(REACT_DEFENSIVE);
}
}

if (uint32 impsToSummon = caster->GetAuraEffectAmount(SPELL_WARLOCK_IMPROVED_DREADSTALKERS, EFFECT_0))
{
if (impsToSummon > 1)
caster->CastSpell(caster, 296553, true);

for (uint32 i = 0; i < impsToSummon; ++i)
caster->CastSpell(target->GetRandomNearPosition(3.f), SPELL_WARLOCK_WILD_IMP_SUMMON, true);
}
}
```

I checked if the caster had the talent and summoned the imps, do I just cast the aura?

rektbyfaith
Administrator
0
01-17-2023, 10:37 PM
#13
Archived author: Pandaros • Posted: 2023-01-17T22:37:20.545000+00:00
Original source

nope
rektbyfaith
01-17-2023, 10:37 PM #13

Archived author: Pandaros • Posted: 2023-01-17T22:37:20.545000+00:00
Original source

nope

rektbyfaith
Administrator
0
01-17-2023, 10:37 PM
#14
Archived author: Pandaros • Posted: 2023-01-17T22:37:22.081000+00:00
Original source

lol
rektbyfaith
01-17-2023, 10:37 PM #14

Archived author: Pandaros • Posted: 2023-01-17T22:37:22.081000+00:00
Original source

lol

rektbyfaith
Administrator
0
01-17-2023, 10:37 PM
#15
Archived author: Pandaros • Posted: 2023-01-17T22:37:29.200000+00:00
Original source

I get the imps
rektbyfaith
01-17-2023, 10:37 PM #15

Archived author: Pandaros • Posted: 2023-01-17T22:37:29.200000+00:00
Original source

I get the imps

rektbyfaith
Administrator
0
01-17-2023, 10:37 PM
#16
Archived author: Pandaros • Posted: 2023-01-17T22:37:33.070000+00:00
Original source

not the buff
rektbyfaith
01-17-2023, 10:37 PM #16

Archived author: Pandaros • Posted: 2023-01-17T22:37:33.070000+00:00
Original source

not the buff

rektbyfaith
Administrator
0
01-17-2023, 11:17 PM
#17
Archived author: Pandaros • Posted: 2023-01-17T23:17:36.168000+00:00
Original source

how do I apply the aura
rektbyfaith
01-17-2023, 11:17 PM #17

Archived author: Pandaros • Posted: 2023-01-17T23:17:36.168000+00:00
Original source

how do I apply the aura

rektbyfaith
Administrator
0
01-17-2023, 11:17 PM
#18
Archived author: Pandaros • Posted: 2023-01-17T23:17:50.094000+00:00
Original source

sorry learning this code still
rektbyfaith
01-17-2023, 11:17 PM #18

Archived author: Pandaros • Posted: 2023-01-17T23:17:50.094000+00:00
Original source

sorry learning this code still

rektbyfaith
Administrator
0
01-17-2023, 11:20 PM
#19
Archived author: ModoX • Posted: 2023-01-17T23:20:41.751000+00:00
Original source

Just cast it
rektbyfaith
01-17-2023, 11:20 PM #19

Archived author: ModoX • Posted: 2023-01-17T23:20:41.751000+00:00
Original source

Just cast it

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