// Checking if it's other death causes, if so returns it. private string CheckDamage(BaseCombatEntity entity) { if (entity.ToPlayer() == null) { return(null); } var damage = entity.lastDamage.ToString(); if (damage == null) { return(null); } if (DamageTypes.Contains(damage)) { return(damage); } return(null); }