Ejemplo n.º 1
0
 private void HandleIndex(string name, string value, ref EWeaponStat type)
 {
     if (EnumUtil <EWeaponStat> .TryGetEnumValue(name, ref type))
     {
         this._threats.Table.Add(type, double.Parse(value));
     }
 }
Ejemplo n.º 2
0
        private void HandleStatsFromFile(string name, EWeaponStat x, double v, EEquipmentTier tier)
        {
            var stats = WeaponParamTable.Instance;
            var key   = name + "_" + tier.ToString();

            switch (x)
            {
            case (EWeaponStat.Accuracy_Mod): { stats.Table[key].AccuracyMod = v; } break;

            case (EWeaponStat.Armor_Ignore): { stats.Table[key].ArmorIgnore = v; } break;

            case (EWeaponStat.Armor_Pierce): { stats.Table[key].ArmorPierce = v; } break;

            case (EWeaponStat.AP_Mod): { stats.Table[key].APMod = v; } break;

            case (EWeaponStat.Block_Ignore): { stats.Table[key].BlockIgnore = v; } break;

            case (EWeaponStat.Damage): { stats.Table[key].Damage = (int)v; } break;

            case (EWeaponStat.Dodge_Mod): { stats.Table[key].Dodge_Mod = v; } break;

            case (EWeaponStat.Fatigue_Mod): { stats.Table[key].FatigueMod = v; } break;

            case (EWeaponStat.Max_Durability): { stats.Table[key].MaxDurability = (int)v; } break;

            case (EWeaponStat.Initiative_Mod): { stats.Table[key].InitiativeMod = v; } break;

            case (EWeaponStat.Melee_Block_Chance): { stats.Table[key].MeleeBlockChance = v; } break;

            case (EWeaponStat.Parry_Mod): { stats.Table[key].ParryMod = v; } break;

            case (EWeaponStat.Range_Mod): { stats.Table[key].RangeMod = (int)v; } break;

            case (EWeaponStat.Ranged_Block_Chance): { stats.Table[key].RangeBlockChance = v; } break;

            case (EWeaponStat.Shield_Damage_Percent): { stats.Table[key].ShieldDamagePercent = v; } break;

            case (EWeaponStat.Stamina_Mod): { stats.Table[key].StaminaMod = v; } break;

            case (EWeaponStat.Value): { stats.Table[key].Value = v; } break;
            }
        }
Ejemplo n.º 3
0
        public double GetStat(EWeaponStat stat)
        {
            switch (stat)
            {
            case (EWeaponStat.Accuracy_Mod): { return(this._model.Data.AccuracyMod); }

            case (EWeaponStat.AP_Mod): { return(this._model.Data.APMod); }

            case (EWeaponStat.Armor_Ignore): { return(this._model.Data.ArmorIgnore); }

            case (EWeaponStat.Armor_Pierce): { return(this._model.Data.ArmorPierce); }

            case (EWeaponStat.Block_Ignore): { return(this._model.Data.BlockIgnore); }

            case (EWeaponStat.Damage): { return(this._model.Data.Damage); }

            case (EWeaponStat.Dodge_Mod): { return(this._model.Data.DodgeMod); }

            case (EWeaponStat.Fatigue_Mod): { return(this._model.Data.FatigueMod); }

            case (EWeaponStat.Initiative_Mod): { return(this._model.Data.InitiativeMod); }

            case (EWeaponStat.Max_Durability): { return(this._model.Data.MaxDurability); }

            case (EWeaponStat.Melee_Block_Chance): { return(this._model.Data.MeleeBlockChance); }

            case (EWeaponStat.Parry_Mod): { return(this._model.Data.ParryMod); }

            case (EWeaponStat.Ranged_Block_Chance): { return(this._model.Data.RangeBlockChance); }

            case (EWeaponStat.Range_Mod): { return(this._model.Data.RangeMod); }

            case (EWeaponStat.Shield_Damage_Percent): { return(this._model.Data.ShieldDamagePercent); }

            case (EWeaponStat.Stamina_Mod): { return(this._model.Data.StaminaMod); }

            case (EWeaponStat.Value): { return(this._model.Data.Value); }

            default: return(-1);
            }
        }
Ejemplo n.º 4
0
 public ref Stat AccessWeaponStat(EWeaponStat stat)
 {
     Debug.Assert((int)stat >= 0 && (int)stat < m_weaponStats.Length, "Incorrect Stat Index : Value Passed In: " + stat.ToString());
     return(ref m_weaponStats[(int)stat]);