Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PersonaType personaType = db.PersonaTypes.Find(id);

            db.PersonaTypes.Remove(personaType);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "PersonaTypeId,PersonaTypeName")] PersonaType personaType)
 {
     if (ModelState.IsValid)
     {
         db.Entry(personaType).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(personaType));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "PersonaTypeId,PersonaTypeName")] PersonaType personaType)
        {
            if (ModelState.IsValid)
            {
                db.PersonaTypes.Add(personaType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(personaType));
        }
Пример #4
0
        // GET: PersonaTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PersonaType personaType = db.PersonaTypes.Find(id);

            if (personaType == null)
            {
                return(HttpNotFound());
            }
            return(View(personaType));
        }
Пример #5
0
        public List <SkillInheritance> GetSkillInheritance(PersonaType type)
        {
            List <SkillInheritance> matrix = new List <SkillInheritance>();

            for (int i = 0; i < 13; i++)
            {
                SkillInheritance item = new SkillInheritance();
                item.Type       = (InheritanceType)i;
                item.CanInherit = skillInheritance[(int)type, i];
                if (item.CanInherit)
                {
                    matrix.Add(item);
                }
            }

            return(matrix);
        }
    // Token: 0x060018D0 RID: 6352 RVA: 0x000E5B54 File Offset: 0x000E3D54
    public void UpdateLabel(PersonaType Persona, float Reputation, float Duration)
    {
        switch (Persona)
        {
        case PersonaType.Loner:
            this.SubtitleArray = this.LonerReactions;
            break;

        case PersonaType.TeachersPet:
            this.SubtitleArray = this.TeachersPetReactions;
            break;

        case PersonaType.Heroic:
            this.SubtitleArray = this.HeroicReactions;
            break;

        case PersonaType.Coward:
            this.SubtitleArray = this.CowardReactions;
            break;

        case PersonaType.Evil:
            this.SubtitleArray = this.EvilReactions;
            break;

        case PersonaType.SocialButterfly:
            this.SubtitleArray = this.SocialButterflyReactions;
            break;

        case PersonaType.Lovestruck:
            this.SubtitleArray = this.LovestruckReactions;
            break;

        case PersonaType.Dangerous:
            this.SubtitleArray = this.DangerousReactions;
            break;

        case PersonaType.Strict:
            this.SubtitleArray = this.StrictReactions;
            break;

        case PersonaType.PhoneAddict:
            this.SubtitleArray = this.PhoneAddictReactions;
            break;

        case PersonaType.Fragile:
            this.SubtitleArray = this.FragileReactions;
            break;

        case PersonaType.Spiteful:
            this.SubtitleArray = this.SpitefulReactions;
            break;

        case PersonaType.Sleuth:
            this.SubtitleArray = this.SleuthReactions;
            break;

        case PersonaType.Vengeful:
            this.SubtitleArray = this.VengefulReactions;
            break;

        case PersonaType.Protective:
            this.SubtitleArray = this.ProtectiveReactions;
            break;

        case PersonaType.Violent:
            this.SubtitleArray = this.ViolentReactions;
            break;

        default:
            if (Persona == PersonaType.Nemesis)
            {
                this.SubtitleArray = this.NemesisReactions;
            }
            break;
        }
        if (Reputation < -0.333333343f)
        {
            this.Subtitle.Label.text = this.SubtitleArray[1];
        }
        else if (Reputation > 0.333333343f)
        {
            this.Subtitle.Label.text = this.SubtitleArray[3];
        }
        else
        {
            this.Subtitle.Label.text = this.SubtitleArray[2];
        }
        this.Subtitle.Timer = Duration;
    }
Пример #7
0
 // Token: 0x060013C8 RID: 5064 RVA: 0x000AD60D File Offset: 0x000AB80D
 public Persona(PersonaType type)
 {
     this.type = type;
 }
Пример #8
0
 public List <Persona> GetPersonaListByType(PersonaType type)
 {
     return(personaModel.GetPersonaList(type));
 }
Пример #9
0
 public Context(List <FactTypes> facts, PersonaType type)
 {
     Facts = facts;
     Type  = type;
 }
Пример #10
0
 public List <Persona> GetPersonaList(PersonaType type)
 {
     return(personaList.Where(o => o.Type == type).OrderBy(o => o.InitialLevel).ToList <Persona>());
 }