Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Uni

[DiscordArchive] okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Uni

[DiscordArchive] okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Uni

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
09-27-2023, 04:19 AM
#1
Archived author: KJack • Posted: 2023-09-27T04:19:17.525000+00:00
Original source

okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Unit hooks related to damage (and later healing). All of these seem relevant:

- OnDamage
- DealDamage
- ModifyPeriodicDamageAurasTick / ModifySpellDamageTaken / ModifyMeleeDamage

`DealDamage` I can't for the life of me get to trigger. I fight creatures, creatures fight each other, I duel another (test) player, and it still doesn't trigger.

`OnDamage` triggers as you'd expect, every time damage is dealt. It doesn't have any information about *what* caused the damage, only that it happened.

`Modify*` applies to just that one type of damage, but only the ModifySpellDamageTaken hook has spell information about what caused it.

Questions:
- what does `DealDamage` do?
- when should I use `OnDamage` vs `Modify*`?
rektbyfaith
09-27-2023, 04:19 AM #1

Archived author: KJack • Posted: 2023-09-27T04:19:17.525000+00:00
Original source

okay, maybe an easier one? I'm struggling with under what circumstances I should use each of the Unit hooks related to damage (and later healing). All of these seem relevant:

- OnDamage
- DealDamage
- ModifyPeriodicDamageAurasTick / ModifySpellDamageTaken / ModifyMeleeDamage

`DealDamage` I can't for the life of me get to trigger. I fight creatures, creatures fight each other, I duel another (test) player, and it still doesn't trigger.

`OnDamage` triggers as you'd expect, every time damage is dealt. It doesn't have any information about *what* caused the damage, only that it happened.

`Modify*` applies to just that one type of damage, but only the ModifySpellDamageTaken hook has spell information about what caused it.

Questions:
- what does `DealDamage` do?
- when should I use `OnDamage` vs `Modify*`?

rektbyfaith
Administrator
0
09-27-2023, 04:20 AM
#2
Archived author: KJack • Posted: 2023-09-27T04:20:05.353000+00:00
Original source

~~None of these seem to trigger from environmental damage, by the way - lava and falling both do not generate events.~~

I was wrong, `OnDamage()` catches them.
rektbyfaith
09-27-2023, 04:20 AM #2

Archived author: KJack • Posted: 2023-09-27T04:20:05.353000+00:00
Original source

~~None of these seem to trigger from environmental damage, by the way - lava and falling both do not generate events.~~

I was wrong, `OnDamage()` catches them.

rektbyfaith
Administrator
0
09-27-2023, 07:10 AM
#3
Archived author: KJack • Posted: 2023-09-27T07:10:38.578000+00:00
Original source

you nailed it - if i disable transports it doesn't happen anymore.
rektbyfaith
09-27-2023, 07:10 AM #3

Archived author: KJack • Posted: 2023-09-27T07:10:38.578000+00:00
Original source

you nailed it - if i disable transports it doesn't happen anymore.

rektbyfaith
Administrator
0
09-27-2023, 07:12 AM
#4
Archived author: Anchy • Posted: 2023-09-27T07:12:06.501000+00:00
Original source

lmao
rektbyfaith
09-27-2023, 07:12 AM #4

Archived author: Anchy • Posted: 2023-09-27T07:12:06.501000+00:00
Original source

lmao

rektbyfaith
Administrator
0
09-27-2023, 07:12 AM
#5
Archived author: Anchy • Posted: 2023-09-27T07:12:08.519000+00:00
Original source

nice
rektbyfaith
09-27-2023, 07:12 AM #5

Archived author: Anchy • Posted: 2023-09-27T07:12:08.519000+00:00
Original source

nice

rektbyfaith
Administrator
0
09-27-2023, 07:43 AM
#6
Archived author: Trojan • Posted: 2023-09-27T07:43:35.942000+00:00
Original source

can we change allowable races in quest template from smallint to int? its a mess with custom races
rektbyfaith
09-27-2023, 07:43 AM #6

Archived author: Trojan • Posted: 2023-09-27T07:43:35.942000+00:00
Original source

can we change allowable races in quest template from smallint to int? its a mess with custom races

rektbyfaith
Administrator
0
09-27-2023, 07:44 AM
#7
Archived author: Honey • Posted: 2023-09-27T07:44:44.985000+00:00
Original source

How many custom races do you have?
rektbyfaith
09-27-2023, 07:44 AM #7

Archived author: Honey • Posted: 2023-09-27T07:44:44.985000+00:00
Original source

How many custom races do you have?

rektbyfaith
Administrator
0
09-27-2023, 07:45 AM
#8
Archived author: Trojan • Posted: 2023-09-27T07:45:05.350000+00:00
Original source

4
rektbyfaith
09-27-2023, 07:45 AM #8

Archived author: Trojan • Posted: 2023-09-27T07:45:05.350000+00:00
Original source

4

rektbyfaith
Administrator
0
09-27-2023, 07:45 AM
#9
Archived author: Anchy • Posted: 2023-09-27T07:45:08.074000+00:00
Original source

32768
rektbyfaith
09-27-2023, 07:45 AM #9

Archived author: Anchy • Posted: 2023-09-27T07:45:08.074000+00:00
Original source

32768

rektbyfaith
Administrator
0
09-27-2023, 07:45 AM
#10
Archived author: Trojan • Posted: 2023-09-27T07:45:22.830000+00:00
Original source

but racemask is always double
rektbyfaith
09-27-2023, 07:45 AM #10

Archived author: Trojan • Posted: 2023-09-27T07:45:22.830000+00:00
Original source

but racemask is always double

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