How+are+events+fired+in+TrinityCore?

I’ve recently started getting my feet wet in trinitycore, and I have a question.

Things like Reset(), ModifyHealth(), JustDied(), etc, etc, are not ever called by code.

Obviously, they are called by events. But the thing is, I can’t find anywhere these events are registered. So how does TrinityCore know to call it?
Does the client send the event to the server? If so, how on earth did the original developers know what to look for?

The reason I ask this is because I want to be able to use ModifyHealth(...damage), and make it ModifyHealth(...damage, ...source), where source is what kind of damage was it (aura, direct, spell, etc)

This will allow me to do some nifty stuff, but if I change that method signature, its not just going to magically give me that information, so how can I redefine the event to do so?

Thanks.

Call Unit::DealDamage