Ejemplo n.º 1
0
        public void InitMartialArtsConfig(ref JSONObject source)
        {
            float  value       = 0;
            int    valueInt    = 0;
            string valueString = string.Empty;

            DataUtils.SetConfigValue(ref source, ref valueString, ref martialArtsName, "name");

            DataUtils.SetConfigValue(ref source, ref valueInt, ref id, "id");
            DataUtils.SetConfigValue(ref source, ref valueInt, ref type, "type");
            DataUtils.SetConfigValue(ref source, ref valueInt, ref levelMax, "level_max");
            DataUtils.SetConfigValue(ref source, ref valueInt, ref weaponType, "weapon_type");

            DataUtils.SetConfigValue(ref source, ref value, ref atk, "atk");
            DataUtils.SetConfigValue(ref source, ref value, ref def, "def");
            DataUtils.SetConfigValue(ref source, ref value, ref ingenious, "ingenious");
            DataUtils.SetConfigValue(ref source, ref value, ref gait, "gait");
            DataUtils.SetConfigValue(ref source, ref value, ref tactical, "tactical");
            DataUtils.SetConfigValue(ref source, ref value, ref qiCost, "qi_cost");
            DataUtils.SetConfigValue(ref source, ref value, ref series, "series");
            DataUtils.SetConfigValue(ref source, ref value, ref knack, "knack");
            DataUtils.SetConfigValue(ref source, ref value, ref fatal, "fatal");

            meridiansRaw = source["meridians"];
            meridians    = new KnightMeridian();
            DataUtils.SetKnightMeridian(ref meridiansRaw, ref meridians);

            attainmentsRaw = source["attainments"];
            attainments    = new KnightAttainments();
            DataUtils.SetKnightAttainments(ref attainmentsRaw, ref attainments);
        }
Ejemplo n.º 2
0
        public static void SetKnightAttainments(ref JSONObject source, ref KnightAttainments target)
        {
            float value = 0;

            SetConfigValue(ref source, ref value, ref target.blade, "blade");
            SetConfigValue(ref source, ref value, ref target.fist, "fist");
            SetConfigValue(ref source, ref value, ref target.meritDarkarm, "merit_darkarm");
            SetConfigValue(ref source, ref value, ref target.meritDodge, "merit_dodge");
            SetConfigValue(ref source, ref value, ref target.meritExternal, "merit_external");
            SetConfigValue(ref source, ref value, ref target.meritInternal, "merit_internal");
            SetConfigValue(ref source, ref value, ref target.meritMedical, "merit_medical");
            SetConfigValue(ref source, ref value, ref target.meritToxin, "merit_toxin");
            SetConfigValue(ref source, ref value, ref target.meritKnowledge, "merit_knowledge");
        }