Forums WoW Modding Support Archives WoWModding Support Archives [DiscordArchive] Why is SpellBaseDamageBonusDone recalculated for each aura it's used by at least in ACore? Why not s

[DiscordArchive] Why is SpellBaseDamageBonusDone recalculated for each aura it's used by at least in ACore? Why not s

[DiscordArchive] Why is SpellBaseDamageBonusDone recalculated for each aura it's used by at least in ACore? Why not s

rektbyfaith
Administrator
0
07-25-2022, 02:45 PM
#1
Archived author: whatwere • Posted: 2022-07-25T14:45:13.674000+00:00
Original source

Why is SpellBaseDamageBonusDone recalculated for each aura it's used by at least in ACore? Why not save values for 1 of each schoolMasks instead with UpdateSpellDamageAndHealingBonus and use that?
rektbyfaith
07-25-2022, 02:45 PM #1

Archived author: whatwere • Posted: 2022-07-25T14:45:13.674000+00:00
Original source

Why is SpellBaseDamageBonusDone recalculated for each aura it's used by at least in ACore? Why not save values for 1 of each schoolMasks instead with UpdateSpellDamageAndHealingBonus and use that?

rektbyfaith
Administrator
0
07-25-2022, 03:06 PM
#2
Archived author: Deamon • Posted: 2022-07-25T15:06:36.103000+00:00
Original source

I'm not familiar with the code, but as far as I remember, the spell damage can depend on several auras. For mages: intellect buff, that arcane buff that increases damage by 20%, buff from druid mark of wild, buff from elixir, buff from potion

All this stuff are auras. Thus you need to go through active auras on player and opponent to Calc final damage done
rektbyfaith
07-25-2022, 03:06 PM #2

Archived author: Deamon • Posted: 2022-07-25T15:06:36.103000+00:00
Original source

I'm not familiar with the code, but as far as I remember, the spell damage can depend on several auras. For mages: intellect buff, that arcane buff that increases damage by 20%, buff from druid mark of wild, buff from elixir, buff from potion

All this stuff are auras. Thus you need to go through active auras on player and opponent to Calc final damage done

rektbyfaith
Administrator
0
07-25-2022, 03:08 PM
#3
Archived author: whatwere • Posted: 2022-07-25T15:08:45.545000+00:00
Original source

This is already recalculated by UpdateSpellDamageAndHealingBonus on every aura change and value change though in
```
for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + i, SpellBasePowerBonusDone(SpellSchoolMask(1 << i)));```
rektbyfaith
07-25-2022, 03:08 PM #3

Archived author: whatwere • Posted: 2022-07-25T15:08:45.545000+00:00
Original source

This is already recalculated by UpdateSpellDamageAndHealingBonus on every aura change and value change though in
```
for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
SetStatInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + i, SpellBasePowerBonusDone(SpellSchoolMask(1 << i)));```

rektbyfaith
Administrator
0
07-25-2022, 03:09 PM
#4
Archived author: whatwere • Posted: 2022-07-25T15:09:04.001000+00:00
Original source

This is used exclusively for client
rektbyfaith
07-25-2022, 03:09 PM #4

Archived author: whatwere • Posted: 2022-07-25T15:09:04.001000+00:00
Original source

This is used exclusively for client

rektbyfaith
Administrator
0
07-25-2022, 03:10 PM
#5
Archived author: whatwere • Posted: 2022-07-25T15:10:01.697000+00:00
Original source

And the only auras calculated in SpellBasePowerBonusDone seem to be done with schoolMask rather than spellFamilyMask unless I'm really missing something
rektbyfaith
07-25-2022, 03:10 PM #5

Archived author: whatwere • Posted: 2022-07-25T15:10:01.697000+00:00
Original source

And the only auras calculated in SpellBasePowerBonusDone seem to be done with schoolMask rather than spellFamilyMask unless I'm really missing something

rektbyfaith
Administrator
0
07-25-2022, 03:10 PM
#6
Archived author: whatwere • Posted: 2022-07-25T15:10:54.686000+00:00
Original source

In theory you could have a per-player bool on every spell power change to only recalculate when the spell damage modifiers are called upon, and store them until the next spell power change
rektbyfaith
07-25-2022, 03:10 PM #6

Archived author: whatwere • Posted: 2022-07-25T15:10:54.686000+00:00
Original source

In theory you could have a per-player bool on every spell power change to only recalculate when the spell damage modifiers are called upon, and store them until the next spell power change

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