public static int AASStateGet(GamePlayer player) { int userID = player.PlayerCharacter.ID; bool result = true; player.IsAASInfo = false; player.IsMinor = true; using (ProduceBussiness db = new ProduceBussiness()) { String ID = db.GetASSInfoSingle(userID); if (ID != "") { player.IsAASInfo = true; result = false; int Age = Convert.ToInt32(ID.Substring(6, 4)); int month = Convert.ToInt32(ID.Substring(10, 2)); if (DateTime.Now.Year.CompareTo(Age + 18) > 0 || (DateTime.Now.Year.CompareTo(Age + 18) == 0 && DateTime.Now.Month.CompareTo(month) >= 0)) player.IsMinor = false; } } //int now= DateTime.Now.Month; if (result && player.PlayerCharacter.IsFirst != 0 && player.PlayerCharacter.DayLoginCount < 1 && ISASSon) { player.Out.SendAASState(result); } //if (player.IsMinor || !player.IsAASInfo && ISASSon) //{ player.Out.SendAASControl(AntiAddictionMgr.ISASSon, player.IsAASInfo, player.IsMinor); //} return 0; }