[DiscordArchive] Well is your source different than the one compiled in the worldserver.exe?
[DiscordArchive] Well is your source different than the one compiled in the worldserver.exe?
Archived author: MR.MUSTACHE • Posted: 2019-06-05T13:36:11.430000+00:00
Original source
after that I can make a sql table with `creatureEntry`, `modNormal`, `modSpell`
Archived author: Luka • Posted: 2019-06-05T13:36:14.858000+00:00
Original source
Don't write two separate functions for that
Archived author: Luka • Posted: 2019-06-05T13:36:33.361000+00:00
Original source
`uint32 Modifer_DealDamage(Unit* target, Unit* attacker, uint32 damage, bool isSpellDamage)`
Archived author: MR.MUSTACHE • Posted: 2019-06-05T13:36:58.610000+00:00
Original source
oh yea you are right
Archived author: Luka • Posted: 2019-06-05T13:36:58.837000+00:00
Original source
And then pass true or false depending on the type of damage and use different modifiers for it
Archived author: MR.MUSTACHE • Posted: 2019-06-05T13:37:02.751000+00:00
Original source
a boolean can do it
Archived author: Luka • Posted: 2019-06-05T13:37:11.287000+00:00
Original source
Also, your function naming is weird,
` uint32 ModiferDealDamage(Unit* target, Unit* attacker, uint32 damage)`
Archived author: Luka • Posted: 2019-06-05T13:37:17.511000+00:00
Original source
Remove the _
Archived author: Luka • Posted: 2019-06-05T13:37:43.331000+00:00
Original source
And pass the damage as a reference, that way you don't have to return it
Archived author: Luka • Posted: 2019-06-05T13:39:14.226000+00:00
Original source
`uint32 modiferDealDamage(Unit* target, Unit* attacker, uint32& damage)`
example in hook
```cpp
void ModifySpellDamageTaken(Unit* target, Unit* attacker, int32& damage) override
{
damage = Modifer_DealDamage(target, attacker, damage);
}```
end of modiferDealDamage function
```cpp
damage * damageMultiplier;```