public SkillInfo(
            int skillID,
            string name,
            double strScale,
            double dexScale,
            double intScale,
            string title,
            SkillUseCallback callback,
            double strGain,
            double dexGain,
            double intGain,
            double gainFactor,
            StatCode primary,
            StatCode secondary,
            bool mastery = false)
        {
            Name       = name;
            Title      = title;
            m_SkillID  = skillID;
            StrScale   = strScale / 100.0;
            DexScale   = dexScale / 100.0;
            IntScale   = intScale / 100.0;
            Callback   = callback;
            StrGain    = strGain;
            DexGain    = dexGain;
            IntGain    = intGain;
            GainFactor = gainFactor;
            Primary    = primary;
            Secondary  = secondary;
            IsMastery  = mastery;

            StatTotal = strScale + dexScale + intScale;
        }
Exemple #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            StatCode = await _context.StatCode
                       .Include(s => s.Cat).FirstOrDefaultAsync(m => m.Id == id);

            if (StatCode == null)
            {
                return(NotFound());
            }
            return(Page());
        }
Exemple #3
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            StatCode = await _context.StatCode.FindAsync(id);

            if (StatCode != null)
            {
                _context.StatCode.Remove(StatCode);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
Exemple #4
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            StatCode = await _context.StatCode
                       .Include(s => s.Cat).FirstOrDefaultAsync(m => m.Id == id);

            if (StatCode == null)
            {
                return(NotFound());
            }
            ViewData["CatId"] = new SelectList(_context.Category, "Id", "CategoryName");
            return(Page());
        }
Exemple #5
0
 public StatInfo(StatCode code)
 {
     Code = code;
     Address = 0;
     Chain = null;
     Id = 0;
     Name = null;
     Offset = 0;
     Region = 0;
     InvalidRegions = new List<uint> ();
     Regions = new List<RegionInfo> ();
 }