Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] so you want it to return when target is not a player?

[DiscordArchive] so you want it to return when target is not a player?

[DiscordArchive] so you want it to return when target is not a player?

Pages (7): Previous 1 3 4 5 6 7 Next  
rektbyfaith
Administrator
0
05-21-2024, 09:07 PM
#41
Archived author: Ĝ̷̳r̸̹͊a̷̜̚k̴̞̔ • Posted: 2024-05-21T21:07:33.592000+00:00
Original source

oh its that easy? here i thought id have to recompile
rektbyfaith
05-21-2024, 09:07 PM #41

Archived author: Ĝ̷̳r̸̹͊a̷̜̚k̴̞̔ • Posted: 2024-05-21T21:07:33.592000+00:00
Original source

oh its that easy? here i thought id have to recompile

rektbyfaith
Administrator
0
05-21-2024, 09:08 PM
#42
Archived author: stoneharry • Posted: 2024-05-21T21:08:43.138000+00:00
Original source

just need to restart the program after changing it
rektbyfaith
05-21-2024, 09:08 PM #42

Archived author: stoneharry • Posted: 2024-05-21T21:08:43.138000+00:00
Original source

just need to restart the program after changing it

rektbyfaith
Administrator
0
05-21-2024, 09:09 PM
#43
Archived author: Thulz • Posted: 2024-05-21T21:09:06.296000+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 (!apply || !caster || !target || target->GetTypeId() != TYPEID_UNIT)
return;

Aura* aura = aurApp->GetBase();
if (!aura)
return;

if (aura->GetStackAmount() >= GetMiscValue())
{
caster->CastSpell(target, GetTriggerSpell(), true);

if (!GetMiscValueB())
target->RemoveAura(aura);
}
}
```
rektbyfaith
05-21-2024, 09:09 PM #43

Archived author: Thulz • Posted: 2024-05-21T21:09:06.296000+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 (!apply || !caster || !target || target->GetTypeId() != TYPEID_UNIT)
return;

Aura* aura = aurApp->GetBase();
if (!aura)
return;

if (aura->GetStackAmount() >= GetMiscValue())
{
caster->CastSpell(target, GetTriggerSpell(), true);

if (!GetMiscValueB())
target->RemoveAura(aura);
}
}
```

rektbyfaith
Administrator
0
05-21-2024, 09:09 PM
#44
Archived author: Thulz • Posted: 2024-05-21T21:09:08.579000+00:00
Original source

bit more cleaned up
rektbyfaith
05-21-2024, 09:09 PM #44

Archived author: Thulz • Posted: 2024-05-21T21:09:08.579000+00:00
Original source

bit more cleaned up

rektbyfaith
Administrator
0
05-21-2024, 09:09 PM
#45
Archived author: Thulz • Posted: 2024-05-21T21:09:25.613000+00:00
Original source

test the if, it should work tho (I have not had any issues with UNIT not referencing players as well)
rektbyfaith
05-21-2024, 09:09 PM #45

Archived author: Thulz • Posted: 2024-05-21T21:09:25.613000+00:00
Original source

test the if, it should work tho (I have not had any issues with UNIT not referencing players as well)

rektbyfaith
Administrator
0
05-21-2024, 09:09 PM
#46
Archived author: Aleist3r • Posted: 2024-05-21T21:09:59.154000+00:00
Original source

also i'd remove those cringy comments, at least one of them is factually incorrect
rektbyfaith
05-21-2024, 09:09 PM #46

Archived author: Aleist3r • Posted: 2024-05-21T21:09:59.154000+00:00
Original source

also i'd remove those cringy comments, at least one of them is factually incorrect

rektbyfaith
Administrator
0
05-21-2024, 09:10 PM
#47
Archived author: stoneharry • Posted: 2024-05-21T21:10:51.931000+00:00
Original source

I would nullptr check aura to be safe, had some strange crashes from getting things not set which I expected to be set in all cases. I think you can get a reference to the aura through `aurApp->GetBase()`
rektbyfaith
05-21-2024, 09:10 PM #47

Archived author: stoneharry • Posted: 2024-05-21T21:10:51.931000+00:00
Original source

I would nullptr check aura to be safe, had some strange crashes from getting things not set which I expected to be set in all cases. I think you can get a reference to the aura through `aurApp->GetBase()`

rektbyfaith
Administrator
0
05-21-2024, 09:11 PM
#48
Archived author: Thulz • Posted: 2024-05-21T21:11:28.806000+00:00
Original source

yea
rektbyfaith
05-21-2024, 09:11 PM #48

Archived author: Thulz • Posted: 2024-05-21T21:11:28.806000+00:00
Original source

yea

rektbyfaith
Administrator
0
05-21-2024, 09:12 PM
#49
Archived author: Thulz • Posted: 2024-05-21T21:12:03.436000+00:00
Original source

` Aura* aura = aurApp->GetBase();` this you saying?
rektbyfaith
05-21-2024, 09:12 PM #49

Archived author: Thulz • Posted: 2024-05-21T21:12:03.436000+00:00
Original source

` Aura* aura = aurApp->GetBase();` this you saying?

rektbyfaith
Administrator
0
05-21-2024, 09:12 PM
#50
Archived author: stoneharry • Posted: 2024-05-21T21:12:17.059000+00:00
Original source

‍♂️ would need to check in VS to check what the API is
rektbyfaith
05-21-2024, 09:12 PM #50

Archived author: stoneharry • Posted: 2024-05-21T21:12:17.059000+00:00
Original source

‍♂️ would need to check in VS to check what the API is

Pages (7): Previous 1 3 4 5 6 7 Next  
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)