[DiscordArchive] If i want to use more than one of the custom changes branches, what is the best way to go about that
[DiscordArchive] If i want to use more than one of the custom changes branches, what is the best way to go about that
Archived author: RapidFire05 • Posted: 2023-07-23T00:22:25.174000+00:00
Original source
If i want to use more than one of the custom changes branches, what is the best way to go about that?
ealDamage`,Archived author: Srzm • Posted: 2023-07-23T09:18:46.015000+00:00
Original source
Damage is calculated server side, so you can manipulate it directly with no custom debuff aura.
To adjust the damage,
- go to `Unit.cpp`,
- find `Unit:
ealDamage`,
- and tweak the numbers there if the unit dealing the damage is a player.
But that only changes the damage itself, it does not adjust the damage numbers shown to the player and in the combat log.
To change that as well,
- find `Unit::SendSpellNonMeleeDamageLog` and
- `Unit::SendPeriodicAuraLog`
and adjust the damage numbers there too.
That's the general idea.
https://www.mmopro.org/c-scripts-and-pat...ifier.html
That's the guide I used to get started, I adjusted it to manipulate class damage in general, not only the damage of certain spells.
Hope that helps for starters, now it's your turn. Feel free to ask if you have questions left.
[Embed: [TrinityCore] 3.3.5 Spell Regulator/Modifier]
Originally posted by Jameyboor People these days are lazy ****s and want everything to be easily doable, spell buffing/nerfing is no exception here. S
https://www.mmopro.org/c-scripts-and-pat...ifier.html
Archived author: Traesh • Posted: 2023-07-23T13:30:21.007000+00:00
Original source
You can use a custom UnitScript.
```c++
class DivideDamageScript : public UnitScript
{
public:
DivideDamageScript() : UnitScript("DivideDamageScript") { }
void OnDamage(Unit* attacker, Unit* victim, uint32& damage) override
{
if (victim->IsPlayer())
damage *= 0.5f;
}
};
void AddSC_my_custom_script()
{
new DivideDamageScript();
}
```