Ejemplo n.º 1
0
        public static QuestRewards Parse(int id, WZProperty data, QuestState state)
        {
            if (data == null)
            {
                return(null);
            }

            QuestRewards result = new QuestRewards();

            result.Id         = id;
            result.State      = state;
            result.Message    = data.ResolveForOrNull <string>("message");
            result.Exp        = data.ResolveFor <int>("exp");
            result.BuffItemId = data.ResolveFor <int>("buffItemId");
            result.charmExp   = data.ResolveFor <int>("charmEXP");
            result.SenseEXP   = data.ResolveFor <int>("senseEXP");
            result.Fame       = data.ResolveFor <int>("pop");
            result.PetSkill   = data.ResolveFor <int>("petskill");
            result.Items      = data.Resolve("item")?.Children.Select(c => ItemReward.Parse(c));
            result.Skills     = data.Resolve("skill")?.Children.Select(c => SkillReward.Parse(c));
            result.Meso       = data.ResolveFor <int>("money");
            result.MoveToMap  = (uint?)data.ResolveFor <int>("transferField");

            return(result);
        }
Ejemplo n.º 2
0
        public int SkillLevel;                 // skillLevel

        public static SkillReward Parse(WZProperty data)
        {
            if (data == null)
            {
                return(null);
            }
            SkillReward result = new SkillReward();

            result.Id           = data.ResolveFor <int>("id") ?? -1;
            result.RequiredJobs = data.Resolve("job")?.Children.Select(c => Convert.ToInt32(((IWZPropertyVal)c).GetValue()));
            result.MasterLevel  = data.ResolveFor <int>("masterLevel") ?? -1;
            result.SkillLevel   = data.ResolveFor <int>("skillLevel") ?? -1;

            return(result);
        }