public void AddFellowshipMember(Player inviter, Player newMember) { if (FellowshipMembers.Count == MaxFellows) { inviter.Session.Network.EnqueueSend(new GameMessageSystemChat("Fellowship is already full", ChatMessageType.Fellowship)); return; } if (newMember.Fellowship != null) { inviter.Session.Network.EnqueueSend(new GameMessageSystemChat($"{newMember.Name} is already in a fellowship", ChatMessageType.Fellowship)); } else { if (newMember.GetCharacterOption(CharacterOption.AutomaticallyAcceptFellowshipRequests)) { AddConfirmedMember(inviter, newMember, true); } else { var confirm = new Confirmation(ConfirmationType.Fellowship, $"{inviter.Name} invites to you join a fellowship.", inviter, newMember); ConfirmationManager.AddConfirmation(confirm); newMember.Session.Network.EnqueueSend(new GameEventConfirmationRequest(newMember.Session, ConfirmationType.Fellowship, confirm.ConfirmationID, confirm.Message)); } } }
public ConfirmationManager() { manager = this; GameObject confrim = GameObject.Find(ObjectName.CONFIRAMATION); confirmation = confrim.GetComponent <Confirmation>(); confirmation.gameObject.SetActive(false); }
void Start() { GachaManager manager = new GachaManager(rateButton); TiketManager ticket = new TiketManager(); ConfirmationManager confirmation = new ConfirmationManager(); IniRequest(); }
public static void Handle(ClientMessage message, Session session) { int confirmType = message.Payload.ReadInt32(); uint context = message.Payload.ReadUInt32(); bool response = message.Payload.ReadInt32() > 0; ConfirmationManager.ProcessConfirmation(context, response); }
public Central(string dbConnectionStringGanttPlan, string dbConnectionStringMaster, WorkTimeGenerator workTimeGenerator, SimulationType simulationType = SimulationType.Default) : base(childMaker: null, simulationType: simulationType) { _workTimeGenerator = workTimeGenerator; _dbConnectionStringGanttPlan = dbConnectionStringGanttPlan; _dbConnectionStringMaster = dbConnectionStringMaster; _confirmationManager = new ConfirmationManager(dbConnectionStringGanttPlan); _stockPostingManager = new StockPostingManager(dbConnectionStringGanttPlan); using (var localganttplanDB = GanttPlanDBContext.GetContext(_dbConnectionStringGanttPlan)) { _products = localganttplanDB.GptblMaterial.Where(x => x.Info1.Equals("Product")).ToList(); } }
/// <summary> /// 邮件确认 /// </summary> /// <returns></returns> public ActionResult Confirmation(string id) { var cm = new ConfirmationManager(); var result = cm.Comfirm(id); ViewBag.IsConfirm = result; if (result) { FormsAuthentication.SetAuthCookie(cm.CurrentUser.UserName, true); } return(View()); }
public JsonResult Register(string returnUrl, UserRegisterModel usr, string InviteCode, string VerifyCode = "") { if (ModelState.IsValid) { var icm = new InviteCodeManager(); if (!icm.Valid(InviteCode)) { return(Json(new { result = false, msg = "您的邀请码已被使用或无效,请重新获取邀请码." })); } if (string.IsNullOrEmpty(VerifyCode) || !string.Equals(CurrentVerifyCode, VerifyCode, StringComparison.InvariantCultureIgnoreCase)) { return(Json(new { result = false, msg = "您输入的验证码错误,请重新输入." })); } if (UserHelper.Exists(usr.UserName)) { return(Json(new { result = false, msg = "您选择用户名已被注册,请重新输入一个." })); } if (!usr.Password.Equals(usr.ConfirmPassword, StringComparison.InvariantCultureIgnoreCase)) { return(Json(new { result = false, msg = "您两次输入的密码不一致,请重试." })); } if (string.IsNullOrEmpty(usr.Email) || !usr.Email.IsEmail()) { return(Json(new { result = false, msg = "您输入的邮箱格式不正确,请重新输入." })); } if (UserHelper.Register(usr)) { //使用邀请码 icm.UseInviteCode(InviteCode, Membership.GetUser(usr.UserName).ProviderUserKey.ToString(), usr.UserName); #region /*(-_-)*/ 发送激活邮件/*(-_-)*/ //生成激活邮件 var cm = new ConfirmationManager(usr.UserName); var code = cm.Generator(); //发送邮件 var confirmUrl = string.Format("http://yqurl.com/User/Confirmation/{0}", code); var email = new EmailManager(usr.Email, "跃迁网用户验证邮件", string.Format("请点击链接以下链接,若不能点击请复制到浏览器地址栏。<a href=\"0\" target=\"_blank\">{0}</a>", confirmUrl)); email.SendEmail(); #endregion return(Json(new { result = true, msg = "注册成功!将转到用户中心.", url = string.IsNullOrEmpty(returnUrl) ? "/User" : returnUrl })); } } return(Json(new { result = false, msg = "注册失败,请重试!" })); }
private void SetEphemeralValues() { ObjectDescriptionFlags |= ObjectDescriptionFlag.Player; // This is the default send upon log in and the most common. Anything with a velocity will need to add that flag. // This should be handled automatically... //PositionFlags |= PositionFlags.OrientationHasNoX | PositionFlags.OrientationHasNoY | PositionFlags.IsGrounded | PositionFlags.HasPlacementID; SetStance(MotionStance.NonCombat, false); // radius for object updates ListeningRadius = 5f; if (Session != null && Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) { if (Session.AccessLevel == AccessLevel.Admin) { IsAdmin = true; } if (Session.AccessLevel == AccessLevel.Developer) { IsArch = true; } if (Session.AccessLevel == AccessLevel.Envoy || Session.AccessLevel == AccessLevel.Sentinel) { IsSentinel = true; } if (Session.AccessLevel == AccessLevel.Advocate) { IsAdvocate = true; } } ContainerCapacity = (byte)(7 + AugmentationExtraPackSlot); if (Session != null && AdvocateQuest && IsAdvocate) // Advocate permissions are per character regardless of override { if (Session.AccessLevel == AccessLevel.Player) { Session.SetAccessLevel(AccessLevel.Advocate); // Elevate to Advocate permissions } if (AdvocateLevel > 4) { IsPsr = true; // Enable AdvocateTeleport via MapClick } } QuestManager = new QuestManager(this); ContractManager = new ContractManager(this); ConfirmationManager = new ConfirmationManager(this); LootPermission = new Dictionary <ObjectGuid, DateTime>(); Squelches = new SquelchDB(); return; // todo // ======================================= // This code was taken from the old Load() // ======================================= /*AceCharacter character; * * if (Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) * { * if (Session.AccessLevel == AccessLevel.Admin) * character.IsAdmin = true; * if (Session.AccessLevel == AccessLevel.Developer) * character.IsArch = true; * if (Session.AccessLevel == AccessLevel.Envoy) * character.IsEnvoy = true; * // TODO: Need to setup and account properly for IsSentinel and IsAdvocate. * // if (Session.AccessLevel == AccessLevel.Sentinel) * // character.IsSentinel = true; * // if (Session.AccessLevel == AccessLevel.Advocate) * // character.IsAdvocate= true; * }*/ // FirstEnterWorldDone = false; // IsAlive = true; }
private void SetEphemeralValues() { BaseDescriptionFlags |= ObjectDescriptionFlag.Player; // This is the default send upon log in and the most common. Anything with a velocity will need to add that flag. // This should be handled automatically... //PositionFlags |= PositionFlags.OrientationHasNoX | PositionFlags.OrientationHasNoY | PositionFlags.IsGrounded | PositionFlags.HasPlacementID; SetStance(MotionStance.NonCombat, false); // radius for object updates ListeningRadius = 5f; if (Session != null && Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) { if (Session.AccessLevel == AccessLevel.Admin) { IsAdmin = true; } if (Session.AccessLevel == AccessLevel.Developer) { IsArch = true; } if (Session.AccessLevel == AccessLevel.Envoy) { IsEnvoy = true; } // TODO: Need to setup and account properly for IsSentinel and IsAdvocate. // if (Session.AccessLevel == AccessLevel.Sentinel) // character.IsSentinel = true; // if (Session.AccessLevel == AccessLevel.Advocate) // character.IsAdvocate= true; } ContainerCapacity = (byte)(7 + AugmentationExtraPackSlot); if (Session != null && AdvocateQuest && IsAdvocate) // Advocate permissions are per character regardless of override { if (Session.AccessLevel == AccessLevel.Player) { Session.SetAccessLevel(AccessLevel.Advocate); // Elevate to Advocate permissions } if (AdvocateLevel > 4) { IsPsr = true; // Enable AdvocateTeleport via MapClick } } QuestManager = new QuestManager(this); ConfirmationManager = new ConfirmationManager(this); LastUseTracker = new Dictionary <int, DateTime>(); LootPermission = new Dictionary <ObjectGuid, DateTime>(); Squelches = new SquelchDB(); return; // todo /* todo fix for new EF model * TrackedContracts = new Dictionary<uint, ContractTracker>(); * // Load the persisted tracked contracts into the working dictionary on player object. * foreach (var trackedContract in AceObject.TrackedContracts) * { * ContractTracker loadContract = new ContractTracker(trackedContract.Value.ContractId, Guid.Full) * { * DeleteContract = trackedContract.Value.DeleteContract, * SetAsDisplayContract = trackedContract.Value.SetAsDisplayContract, * Stage = trackedContract.Value.Stage, * TimeWhenDone = trackedContract.Value.TimeWhenDone, * TimeWhenRepeats = trackedContract.Value.TimeWhenRepeats * }; * * TrackedContracts.Add(trackedContract.Key, loadContract); * }*/ // ======================================= // This code was taken from the old Load() // ======================================= /*AceCharacter character; * * if (Common.ConfigManager.Config.Server.Accounts.OverrideCharacterPermissions) * { * if (Session.AccessLevel == AccessLevel.Admin) * character.IsAdmin = true; * if (Session.AccessLevel == AccessLevel.Developer) * character.IsArch = true; * if (Session.AccessLevel == AccessLevel.Envoy) * character.IsEnvoy = true; * // TODO: Need to setup and account properly for IsSentinel and IsAdvocate. * // if (Session.AccessLevel == AccessLevel.Sentinel) * // character.IsSentinel = true; * // if (Session.AccessLevel == AccessLevel.Advocate) * // character.IsAdvocate= true; * }*/ // FirstEnterWorldDone = false; // IsAlive = true; }
public static BookingStatus GetConfirmationBooking(string Sid, string BN) { BookingStatus confirmed = new BookingStatus(); try { // check confirmation var Confirm = ConfirmationDate.CheckBookingConfirmation(BN, Sid); // get data from DB // if (Confirm != true) { var data = ConfirmationDate.GetAllConfirmationData(Sid, BN); // call provider if (data != null) { confirmed = ConfirmationManager.CallProviders(data, BN); // Change Booking status if (confirmed.status == 0) { // save it in DB // Change Booking status var ConfirmStatus = ConfirmationDate.ChangeBookingStatus(Sid, BN, "Booked"); if (ConfirmStatus != null) { return(confirmed); } confirmed.status = 1; return(confirmed); } else if (confirmed.status == 1) { var ConfirmStatus = ConfirmationDate.ChangeBookingStatus(Sid, BN, "Missing"); if (ConfirmStatus != null) { return(confirmed); } confirmed.status = 1; return(confirmed); } else if (confirmed.status == 2) { var ConfirmStatus = ConfirmationDate.ChangeBookingStatus(Sid, BN, "Booking Not Confirmed"); if (ConfirmStatus != null) { return(confirmed); } confirmed.status = 2; return(confirmed); } return(confirmed); } confirmed.status = 2; return(confirmed); } else { confirmed.status = 3; return(confirmed); } }catch (Exception ex) { LoggingHelper.WriteToFile("SaveBookingConfirmationController/Errors/", "ConfirmationBooking GetConfirmationBooking" + "ServOrch" + Sid, ex.InnerException?.Message, ex.Message + ex.StackTrace); if (confirmed.status != 2) { confirmed.status = 1; } return(confirmed); } }