void OnXpGain(DateTime timestamp, Match m) { if (XP != null) { XpEventArgs xp = new XpEventArgs(); xp.Timestamp = timestamp; uint xpAmount; if (uint.TryParse(m.Groups[1].Value, out xpAmount)) xp.XP = xpAmount; XP(null, xp); } }
private void combatParser_XP(object sender, XpEventArgs e) { if (You != null) You.AddXp(e); }