示例#1
0
        public IHttpActionResult Put(int id, [FromBody] cv tutor)
        {
            using (cvmakeEntities entities = new cvmakeEntities())
            {
                var entity = entities.cvs.FirstOrDefault(t => t.ID == id);

                if (entity == null)
                {
                    return(NotFound());
                }


                else
                {
                    entity.Names   = tutor.Names;
                    entity.Email   = tutor.Email;
                    entity.Addres  = tutor.Addres;
                    entity.Contact = tutor.Contact;



                    entities.SaveChanges();
                    return(CreatedAtRoute("DefaultApi", new
                    {
                        id = tutor.ID
                    }, tutor));
                }
            }
        }
示例#2
0
 public static bool a(aj.a A_0, string A_1, cv A_2, out bool A_3)
 {
     try
     {
         dk.d = true;
         b    = A_0;
         c    = A_2;
         dk.a a = dk.a(A_1);
         if (a.a == dk.b.b)
         {
             A_3 = dk.d;
             return(!(a.c == 0.0));
         }
         A_3 = dk.d;
         return(A_0.a.Trim().Equals(a.b.Trim(), StringComparison.OrdinalIgnoreCase));
     }
     catch (dk.d d)
     {
         ai.a("Parse error in monster spec: \"" + A_1 + "\", ignoring entry (" + d.Message + ").");
         A_3 = true;
         return(false);
     }
     catch
     {
         ai.a("Unspecified error in monster spec: \"" + A_1 + "\", ignoring entry.");
         A_3 = true;
         return(false);
     }
 }
示例#3
0
 private void a(cv A_0)
 {
     try
     {
         int k = A_0.k;
         if (((PluginCore.cq.aw.get_WorldFilter().get_Item(k) != null) && ((PluginCore.cq.q.j != 0) && (PluginCore.cq.aw.get_WorldFilter().get_Item(k).get_Container() == PluginCore.cq.q.j))) && !this.c.ContainsKey(k))
         {
             this.h--;
             cz.a a = new cz.a {
                 c = this.b(k)
             };
             if (a.c)
             {
                 PluginCore.cq.u.a(k, b0.a.b);
             }
             else
             {
                 this.a(k, a);
             }
             this.c.Add(k, a);
         }
     }
     catch (Exception exception)
     {
         ad.a(exception);
     }
 }
示例#4
0
 public void d()
 {
     if ((this.i != 0) && (this.j != this.i))
     {
         this.m = this.i;
         PluginCore.cq.ax.get_Actions().UseItem(this.i, 0);
         if (this.e.ContainsKey(this.i))
         {
             b5.a a = this.e[this.i];
             a.j++;
             if (a.j >= er.i("BlacklistCorpseOpenAttemptCount"))
             {
                 a.j = 0;
                 a.k = DateTimeOffset.Now;
                 cv     cv  = PluginCore.cq.p.d(this.i);
                 string str = "???";
                 if (cv != null)
                 {
                     str = cv.e();
                 }
                 PluginCore.e("Blacklisting unopenable corpse \"" + str + "\" for " + er.i("BlacklistCorpseOpenTimeoutSeconds").ToString() + " seconds.");
             }
         }
     }
 }
示例#5
0
 public void a(int A_0, e5 A_1, bool A_2)
 {
     if (!this.f() && (!A_2 || (dh.d() == 1)))
     {
         this.h = DateTimeOffset.Now + TimeSpan.FromMilliseconds(800.0);
         this.j = A_0;
         this.i = true;
         cv cv = PluginCore.cq.p.d(A_0);
         if ((cv != null) && (cv.c() == ObjectClass.MeleeWeapon))
         {
             if (A_1 == e5.b)
             {
                 dh.a(A_0, true, 0);
             }
             else
             {
                 dh.a(A_0, true, 1);
             }
         }
         else
         {
             PluginCore.cq.ax.get_Actions().UseItem(A_0, 0);
         }
     }
 }
示例#6
0
 public void a(int A_0, bool A_1)
 {
     if (PluginCore.cq.an.h() == A_0)
     {
         cv cv = PluginCore.cq.p.d(A_0);
         if (cv != null)
         {
             int num  = PluginCore.cq.ax.get_Actions().get_Vital().get_Item(2);
             int num2 = PluginCore.cq.ax.get_Actions().get_Vital().get_Item(1);
             int num3 = PluginCore.cq.an.b();
             int num4 = ((int)Math.Ceiling((double)((num2 * er.i("Recharge-Norm-HitP")) / 100.0))) - 1;
             if (((num != 0) && (num2 != 0)) && (num3 != 0))
             {
                 bool flag = true;
                 v    v    = PluginCore.cq.x.c["MonsterImmunities"].a(0, k.a(cv.g()));
                 if ((v != null) && ((k.e(v[1]) & 2) > 0))
                 {
                     flag = false;
                 }
                 MySpell spell = bq.a(num, num2, num4, num3, flag, A_1);
                 if (spell != null)
                 {
                     PluginCore.cq.g.a(spell, A_0);
                 }
                 else
                 {
                     PluginCore.cq.ak.Recharge(eRechargeVital_Single.Health);
                 }
             }
         }
     }
 }
示例#7
0
        public ActionResult Index(cv c)
        {
            string role = null;

            ViewData["Role"] = "";
            IEnumerable <string> roles = new List <string>();

            roles = ((ClaimsIdentity)User.Identity).Claims
                    .Where(x => x.Type == ClaimTypes.Role)
                    .Select(x => x.Value);
            foreach (var x in roles)
            {
                role = x;
            }

            if (role != null)
            {
                ViewData["Role"] = role;
            }
            cv c1 = new cv();

            c1 = s.GetById(c.idCv);

            c1.title       = c.title;
            c1.specialite  = c.specialite;
            c1.description = c.description;


            s.Update(c1);
            s.Commit();
            return(RedirectToAction("Index"));
        }
示例#8
0
        public ActionResult Create(cv c)
        {
            string role = null;

            ViewData["Role"] = "";
            IEnumerable <string> roles = new List <string>();

            roles = ((ClaimsIdentity)User.Identity).Claims
                    .Where(xc => xc.Type == ClaimTypes.Role)
                    .Select(xc => xc.Value);
            foreach (var x in roles)
            {
                role = x;
            }

            if (role != null)
            {
                ViewData["Role"] = role;
            }
            c.user_idUser = User.Identity.GetUserId();
            s.Add(c);
            s.Commit();

            return(RedirectToAction("Index"));
        }
示例#9
0
 private void b(cv A_0)
 {
     if (this.b.Contains(A_0.k))
     {
         this.b.Remove(A_0.k);
     }
 }
示例#10
0
        // GET: ListUsers/Delete/5
        public ActionResult Delete(string id)
        {
            string role = null;

            ViewData["Role"] = "";
            IEnumerable <string> roles = new List <string>();

            roles = ((ClaimsIdentity)User.Identity).Claims
                    .Where(ca => ca.Type == ClaimTypes.Role)
                    .Select(ca => ca.Value);
            foreach (var x in roles)
            {
                role = x;
            }

            if (role != null)
            {
                ViewData["Role"] = role;
            }

            aspnetuser u = new aspnetuser();

            u     = userService.getUser(id);
            u.cvs = null;
            cv c = s.Get(x => x.user_idUser.Equals(id));

            c.user_idUser = null;
            c.aspnetuser  = null;
            s.Delete(c);
            s.Commit();
            userService.Delete(u);
            userService.Commit();
            return(RedirectToAction("Index"));
        }
示例#11
0
    private void b(NetworkMessageEventArgs A_0)
    {
        this.u   = new o();
        this.u.c = A_0.get_Message().Value <int>("merchant");
        this.u.d = A_0.get_Message().Value <int>("buyCategories");
        this.u.e = A_0.get_Message().Value <int>("unknown1");
        this.u.f = A_0.get_Message().Value <int>("buyValue");
        this.u.g = A_0.get_Message().Value <int>("unknown2");
        this.u.h = A_0.get_Message().Value <float>("buyRate");
        this.u.i = A_0.get_Message().Value <float>("sellRate");
        int num = A_0.get_Message().Value <int>("itemCount");

        for (int i = 0; i < num; i++)
        {
            cv            cv      = new cv();
            MessageStruct struct2 = A_0.get_Message().Struct("items").Struct(i);
            cv.u = struct2.Value <int>("count");
            cv.k = struct2.Value <int>("object");
            this.e(cv, struct2.Struct("game"));
            cv.v = true;
            this.u.a(cv);
        }
        if (this.t != null)
        {
            this.t(this, null);
        }
    }
示例#12
0
 private void a(cv A_0, List <cv> A_1)
 {
     if (this.f(A_0.k) == this.o)
     {
         if (!this.m.Contains(A_0))
         {
             this.m.Add(A_0);
         }
     }
     else if (this.m.Contains(A_0))
     {
         this.m.Remove(A_0);
     }
     A_1.Add(A_0);
     if (this.l.ContainsKey(A_0.k))
     {
         foreach (cv cv in this.l[A_0.k])
         {
             if (!A_1.Contains(cv))
             {
                 this.a(cv, A_1);
             }
         }
     }
 }
示例#13
0
    protected override bool e()
    {
        if (PluginCore.cq.ax.get_Actions().get_VendorId() == this.a)
        {
            return(true);
        }
        cv cv = PluginCore.cq.p.d(this.a);

        if (cv == null)
        {
            ai.a("OpenVendor waypoint action ignored, vendor " + this.a.ToString() + " (" + this.b + ") not found.");
            return(true);
        }
        if (cv.c() != ObjectClass.Vendor)
        {
            ai.a("OpenVendor waypoint action ignored, vendor " + this.a.ToString() + " (" + this.b + ") is not a vendor.");
            return(true);
        }
        TimeSpan span = (TimeSpan)(DateTimeOffset.Now - this.c);

        if (span.TotalSeconds > 2.0)
        {
            this.c = DateTimeOffset.Now;
            PluginCore.cq.ax.get_Actions().UseItem(this.a, 0);
        }
        return(false);
    }
示例#14
0
 public void b(int A_0)
 {
     if (this.b.ContainsKey(A_0))
     {
         Dictionary <int, int> dictionary;
         int num2;
         (dictionary = this.b)[num2 = A_0] = dictionary[num2] + 1;
     }
     else
     {
         this.b[A_0] = 1;
     }
     if (this.b[A_0] > er.i("BlacklistMonsterAttemptCount"))
     {
         if (PluginCore.cq.n.f.ContainsKey(A_0))
         {
             string str = "???";
             cv     cv  = PluginCore.cq.p.d(A_0);
             if (cv != null)
             {
                 str = cv.g();
             }
             int num = er.i("BlacklistMonsterTimeoutSeconds");
             PluginCore.e("Blacklisting unhittable monster " + str + " (" + A_0.ToString() + ") for " + num.ToString() + " seconds.");
             PluginCore.cq.n.f[A_0].a(TimeSpan.FromSeconds((double)num));
         }
         this.b.Remove(A_0);
     }
 }
示例#15
0
    private void f(NetworkMessageEventArgs A_0)
    {
        int num = A_0.get_Message().Value <int>("object");
        cv  n   = new cv();

        if ((num == this.o) && (this.n != null))
        {
            n      = this.n;
            this.n = null;
        }
        MessageStruct struct2 = A_0.get_Message().Struct("game");
        MessageStruct struct3 = A_0.get_Message().Struct("model");
        MessageStruct struct4 = A_0.get_Message().Struct("physics");

        n.k = num;
        this.e(n, struct2);
        this.d(n, struct3);
        this.c(n, struct4);
        if ((struct2.Value <int>("behavior") & 0x1000) != 0)
        {
            n.l = (struct4.Value <int>("unknown") & 4) > 0;
        }
        this.e(n);
        this.c(n);
        if (this.b != null)
        {
            this.b(n);
        }
    }
示例#16
0
    private void d(cv A_0, MessageStruct A_1)
    {
        A_0.q = true;
        A_0.t.Clear();
        byte num = A_1.Value <byte>("paletteCount");

        if (num == 0xff)
        {
            A_0.r = true;
            A_0.s = A_1.Value <int>("palette");
        }
        else
        {
            A_0.r = false;
            MessageStruct struct2 = A_1.Struct("palettes");
            for (int i = 0; i < num; i++)
            {
                bo item = new bo {
                    a = struct2.Struct(i).Value <int>("palette"),
                    b = struct2.Struct(i).Value <byte>("offset"),
                    c = struct2.Struct(i).Value <byte>("length")
                };
                A_0.t.Add(item);
            }
        }
    }
示例#17
0
    public aj.c b(cv A_0)
    {
        aj.a key = new aj.a(A_0);
        int  num = PluginCore.cq.l.c["MyMonsters"].c();

        for (int i = 0; i < num; i++)
        {
            string str = k.b(PluginCore.cq.l.c["MyMonsters"].a(i)[0]);
            if (str != "<DEFAULT>")
            {
                if (this.c.ContainsKey(key) && this.c[key].ContainsKey(i))
                {
                    if (this.c[key][i])
                    {
                        PluginCore.e(string.Format("Entry \"{0}\" match! (Result cached)", str));
                        return(this.c(str));
                    }
                    PluginCore.e(string.Format("Entry \"{0}\" does not match. (Result cached)", str));
                }
                else
                {
                    bool flag;
                    if (dk.a(key, str, A_0, out flag))
                    {
                        PluginCore.e(string.Format("Entry \"{0}\" match!", str));
                        return(this.c(str));
                    }
                    PluginCore.e(string.Format("Entry \"{0}\" does not match.", str));
                }
            }
        }
        PluginCore.e("No rules match selected monster, using default entry.");
        return(this.d());
    }
示例#18
0
 private void c(cv A_0)
 {
     if (this.a(A_0.k))
     {
         if (PluginCore.cq.p.f(A_0))
         {
             if (!this.a.Contains(A_0.k) && !this.b.Contains(A_0.k))
             {
                 if (A_0.b())
                 {
                     this.b.Add(A_0.k);
                 }
                 else
                 {
                     this.a.Add(A_0.k);
                 }
             }
         }
         else
         {
             if (this.a.Contains(A_0.k))
             {
                 this.a.Remove(A_0.k);
             }
             if (this.b.Contains(A_0.k))
             {
                 this.b.Remove(A_0.k);
             }
         }
     }
 }
示例#19
0
 private void a()
 {
     if ((er.j("DeleteGhostMonstersByHPTracker") && PluginCore.cq.n.b) && (PluginCore.cq.an.h() != 0))
     {
         cv cv = PluginCore.cq.p.d(PluginCore.cq.an.h());
         if (cv != null)
         {
             string str = cv.g();
             if (PluginCore.cq.x.e(str) > 0)
             {
                 TimeSpan span = (TimeSpan)(DateTimeOffset.Now - PluginCore.cq.an.g());
                 if (span.TotalSeconds >= er.i("GhostDeleteHPTrackerSeconds"))
                 {
                     TimeSpan span2 = (TimeSpan)(DateTimeOffset.Now - PluginCore.cq.an.e());
                     if (span2.TotalSeconds >= er.i("GhostDeleteHPTrackerSeconds"))
                     {
                         int num = PluginCore.cq.an.h();
                         cv  cv2 = PluginCore.cq.p.d(num);
                         if ((cv2 != null) && (cv2.c() == ObjectClass.Monster))
                         {
                             PluginCore.e("Deleting ghost monster " + cv2.g() + " (" + num.ToString() + ") due to HP tracker notification.");
                             dh.d(num);
                         }
                     }
                 }
             }
         }
     }
 }
示例#20
0
    private void d(cv A_0)
    {
        A_0.m = false;
        if (this.i.ContainsKey(A_0.k))
        {
            this.i.Remove(A_0.k);
        }
        if (this.j.ContainsKey(A_0.g()) && this.j[A_0.g()].Contains(A_0))
        {
            this.j[A_0.g()].Remove(A_0);
            if (this.j[A_0.g()].Count == 0)
            {
                this.j.Remove(A_0.g());
            }
        }
        ObjectClass key = A_0.c();

        if (this.k.ContainsKey(key) && this.k[key].Contains(A_0))
        {
            this.k[key].Remove(A_0);
            if (this.k[key].Count == 0)
            {
                this.k.Remove(key);
            }
        }
        if (this.m.Contains(A_0))
        {
            this.m.Remove(A_0);
        }
        this.b(A_0);
    }
示例#21
0
 private void e(cv A_0)
 {
     A_0.m = true;
     if (this.i.ContainsKey(A_0.k))
     {
         A_0.n = 1 + this.i[A_0.k].n;
         if (this.d != null)
         {
             this.d(this.i[A_0.k]);
         }
         this.d(this.i[A_0.k]);
     }
     this.i[A_0.k] = A_0;
     if (!this.j.ContainsKey(A_0.g()))
     {
         this.j[A_0.g()] = new List <cv>();
     }
     this.j[A_0.g()].Add(A_0);
     if (!this.k.ContainsKey(A_0.c()))
     {
         this.k[A_0.c()] = new List <cv>();
     }
     this.k[A_0.c()].Add(A_0);
     this.a(A_0);
 }
示例#22
0
 public bool f(cv A_0)
 {
     if (A_0 == null)
     {
         return(false);
     }
     return(this.m.Contains(A_0));
 }
示例#23
0
 public static bool a(cv A_0)
 {
     if (A_0 == null)
     {
         return(false);
     }
     return(c(A_0) != 0);
 }
        public ActionResult DeleteConfirmed(int id)
        {
            cv cv = db.cv.Find(id);

            db.cv.Remove(cv);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#25
0
 public static bool b(cv A_0)
 {
     if (A_0 == null)
     {
         return(false);
     }
     return(a(c(A_0)));
 }
示例#26
0
    private void b(cv A_0, MessageStruct A_1)
    {
        int   num  = A_1.Value <int>("landcell");
        float num2 = A_1.Value <float>("x");
        float num3 = A_1.Value <float>("y");
        float num4 = A_1.Value <float>("z");

        A_0.w = dz.a(num2, num3, num4 / 240f, num);
    }
示例#27
0
 internal void a(cv A_0)
 {
     this.a[A_0.k] = A_0;
     if (!this.b.ContainsKey(A_0.g()))
     {
         this.b[A_0.g()] = new List <cv>();
     }
     this.b[A_0.g()].Add(A_0);
 }
示例#28
0
 public void a(MySpell A_0, int A_1, bool A_2)
 {
     if (((PluginCore.cq.ax.get_Actions().get_CombatMode() == 8) && ((A_0.School.Name != "Void Magic") || !PluginCore.cq.n.n.b(ActionLockType.VoidSpellLockedOut))) && ((A_0.School.Name != "War Magic") || !PluginCore.cq.n.n.b(ActionLockType.WarSpellLockedOut)))
     {
         this.l = A_2;
         if ((A_0.isValid && !PluginCore.cq.z.d()) && (this.h == dv.d.a))
         {
             try
             {
                 if (A_0.Duration > 0.0)
                 {
                     PluginCore.PC.b(A_0.Id, A_1, A_0.SkillWithSchool);
                 }
                 this.k.n.a("Casting: " + A_0.Name + " on " + A_1.ToString() + " (" + this.k.aw.get_WorldFilter().get_Item(A_1).get_Name() + ")", e8.d);
             }
             catch (Exception)
             {
                 this.k.n.a("Casting: " + A_0.Name + " on " + A_1.ToString() + " (Target Invalid)", e8.d);
             }
             this.f = A_0;
             this.e = A_1;
             cv cv = PluginCore.cq.p.d(this.e);
             if (cv != null)
             {
                 if (this.f.School.Name.Equals("Item Enchantment"))
                 {
                     this.d = null;
                 }
                 else if (cv.k == PluginCore.cg)
                 {
                     this.d = "yourself";
                 }
                 else
                 {
                     this.d = cv.g();
                 }
             }
             else
             {
                 this.d = null;
             }
             this.a(A_0.Id, A_1);
             if (PluginCore.cq.ax.get_Actions().get_Vital().get_Item(6) < 10)
             {
                 this.j.a(100);
             }
             else
             {
                 this.j.a(200);
             }
             this.m = 0x1388 / this.j.h();
             PluginCore.cq.n.a("SpellCaster: Begin", e8.i);
             this.a(dv.d.b);
         }
     }
 }
 public ActionResult Edit([Bind(Include = "cv_id,birthday,nationality,drivers_license,registration_date,profil")] cv cv)
 {
     if (ModelState.IsValid)
     {
         db.Entry(cv).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(cv));
 }
示例#30
0
    private void c(cv A_0, MessageStruct A_1)
    {
        int num = A_1.Value <int>("flags");

        A_0.a[0xd000027] = num;
        if ((num & 0x8000) > 0)
        {
            this.b(A_0, A_1.Struct("position"));
        }
    }