[QUESTION] Trinitycore Death System

Hello, I would like to do a custom script (but I think it will not be possible) so I wanted to edit the TC Death system. The script has to be that if player has less than 100 HP, He gets spell, that makes you immune to all damage for few minutes. So I want to ask you, where is the Death System for players handled ? I tried to look for hour but was not able to find the right one.

Thanks in advance.

BTW: Sorry if I posted in wrong section, I didnt know where to post.

Modify Player::setDeathState(DeathState s) in if ( s == JUST_DIED), after if (!cur) and before SetDrunkValue(0);

Example of “how” tomorrow.

Solved