public int AddPointQuick(int id, int points) { var child = BL.GetChildForId(id); var point = new PointAllocation(); point.ChildId = child.ChildId; point.Approved = true; //point.Saved = true; DateTime curtime = DateTime.Now; point.AllocationDate = curtime; string contributorStr = child.ParentUser; var presetpoint = BL.GetBehaviours().Where(a => a.ParentUser == child.ParentUser && a.Preset == true && a.BehaviourPoints == points).FirstOrDefault(); point.BehaviourId = presetpoint.BehaviourId; point.Points = presetpoint.BehaviourPoints; if (point.ContributorId > 0) { var contributor = BL.GetContributorForId(point.ContributorId); contributorStr = contributor.ContributorName; } // lookup appropriate range value BL.AddPoint(point); var newpoints = BL.GetPointsValueForId(id); return(newpoints); }
public Rimu(Player Player) : base(Player) { PointRate = new PointAllocation { JustShoot = 0.7, Shoot = 0.35, Hit = 0.175, Miss = 0, Combo = 0.1, ClearPoint = 0.2 }; // スキルの登録 Skills = new Skill[] { new Amaterasu(this), new Tsukuyomi(this), new Susanoo(this) }; }
public JsonResult AddPoint(PointAllocation point, string Contributor) { DateTime curtime = DateTime.Now; point.AllocationDate = curtime; BL.AddPoint(point); // Broadcast Change using SignalR var child = BL.GetChildForId(point.ChildId); string contributorStr = child.ParentUser; if (point.ContributorId > 0) { var contributor = BL.GetContributorForId(point.ContributorId); contributorStr = contributor.ContributorName; } var gc = GlobalHost.ConnectionManager.GetHubContext <KidHub>(); gc.Clients.All.addNewMessageToPage(child.ParentUser, contributorStr + "- Points Allocated:" + point.Points.ToString()); return(Json(point, JsonRequestBehavior.AllowGet)); }
public Kanon(Player Player) : base(Player) { // 得点比率の設定 PointRate = new PointAllocation { JustShoot = 0.8, Shoot = 0.56, Hit = 0.32, Miss = 0, Combo = 0.1, ClearPoint = 0.1 }; // スキルの登録 Skills = new Skill[] { new Amanomurakumo(this), new Yata(this), new Yasakani(this) }; }
public Kakeru(Player Player) : base(Player) { PointRate = new PointAllocation { JustShoot = 0.7, Shoot = 0.56, Hit = 0.42, Miss = 0, Combo = 0.05, ClearPoint = 0.25 }; // スキルの登録 Skills = new Skill[] { new Mute(this), new Echo(this), new Howl(this) }; IncreseRate = 3000; }
public Rintaro(Player Player) : base(Player) { // 得点比率の設定 PointRate = new PointAllocation { JustShoot = 0.5, Shoot = 0.4, Hit = 0.15, Miss = 0, Combo = 0.4, ClearPoint = 0.1 }; // スキルの登録 Skills = new Skill[] { new Eclipse(this), new Prominence(this), new Flare(this) }; GaugeAdd = 5000; }
public PointAllocation AddPoint(PointAllocation point) { var test = point.ContributorId; using (var db = new ModelKids()) { //var behaviour = db.Behaviour.Where(a => a.BehaviourId == point.BehaviourId).First(); var p1 = new PointAllocation(); p1.ChildId = point.ChildId; p1.BehaviourId = point.BehaviourId; p1.Points = point.Points; p1.AllocationDate = DateTime.Now; p1.Saved = false; p1.ContributorId = point.ContributorId; p1.Approved = point.Approved; //point.Behaviour = behaviour; db.PointAllocation.Add(p1); db.SaveChanges(); var newid = p1.PointId; point = p1; } return(point); }