void CharacterFilter_ChangePlayer(object sender, ChangePlayerEventArgs e) { // Notes for usages: // Look under PlayerModifyEventType ... that will come here as e.Type. // e.Stat will map to a <type>Key enum, that will tell you what it is that changed. if (e.Type == PlayerModifyEventType.Statistic) { if (e.Stat == (int)LongValueKey.Age) { // This is updating Core.CharFilter.Age. // If you wanted to: // Character age in seconds is given by: // Core.CharacterFilter.Age // for giggles... // TODO: Add something in config to enable / disable this display... // for now, just enable it with debug... if (FEELING_CHEEKY) { int ageInSeconds = Core.CharacterFilter.Age; int hours = (int)Math.Floor(ageInSeconds / (60.0 * 60.0)); int minutes = (int)Math.Floor(ageInSeconds / 60.0) - (60 * hours); int seconds = ageInSeconds - (60 * minutes) - (60 * 60 * hours); wtc($"You have played for {hours} hour(s) {minutes} minutes {seconds} seconds."); } } } else { wtc("CF_ChangePlayer"); wtc("e.Type: " + e.Type.ToString()); wtc("e.Stat: " + e.Stat.ToString()); } }
void CharacterFilter_ChangePlayer(object sender, ChangePlayerEventArgs e) { // DO STUFF HERE }
private void CharacterFilter_ChangePlayer(object sender, ChangePlayerEventArgs e) { // DO STUFF HERE }