Code:
if (totaldamage >= monsterToAttack.HP)
{
string x = $"{monsterToAttack.Level}";
// Player reputation is increased by Monster level
Session.Character.Reputation += monsterToAttack.Level;
// Tells the player he gained reputation
Session.SendPacket(Session.Character.GenerateSay($"Gained {x} reputation", 11));
}
Add this or something similar to GenerateDamage in Character.cs, you can easily improve it but I'm not gonna do your job, hope it helps.
Note : check the names of the properties and functions (monsterToAttack, sendPacket) I probably misspelled them.