public void SetBotStatus <T>() where T : BaseStatus, new() { if (CurBotStatus != null) { CurBotStatus.Deactivate(); } var baseStatus = new T(); baseStatus.Bot = this; baseStatus.Activate(); CurBotStatus = baseStatus; }