Пример #1
0
    public void Init(SimpleJson.JsonObject o)
    {
        this.id = Convert.ToInt32(o ["id"]);
        this.name = Convert.ToString(o ["name"]);
        this.level = Convert.ToInt32(o ["level"]);
        this.limitId = Convert.ToInt32(o ["limitId"]);
        this.limitTimes = Convert.ToInt32(o ["limitTimes"]);
        this.start = Convert.ToInt32(o ["start"]);
        this.end = Convert.ToInt32(o ["end"]);
        this.mechanism = (TaskMechanism)Convert.ToInt32(o ["mechanism"]);
        this.groupId = Convert.ToInt32(o ["groupId"]);
        this.cmpType = Convert.ToInt32(o ["type"]);
        this.objective = Convert.ToInt32(o ["objective"]);
        this.seekId1 = Convert.ToInt32(o ["seekId1"]);
        this.seekId2 = Convert.ToInt32(o ["seekId2"]);
        this.seekId3 = Convert.ToInt32(o ["seekId3"]);

        this.next = Convert.ToInt32(o ["continue"]);

        this.amount = Convert.ToInt32(o ["amount"]);
        this.depict = Convert.ToString(o ["depict"]);
        this.desc = Convert.ToString(o ["desc"]);
        this.exp = Convert.ToInt32(o ["exp"]);
        this.armorExp = Convert.ToInt32(o["armorExp"]);
        this.money = Convert.ToInt32(o ["money"]);
        this.props = Convert.ToInt32(o ["props"]);

        this.chapterGroup = Convert.ToInt32(o ["section"]);
        this.dungeon = Convert.ToInt32(o ["dungeon"]);
        //this.giveup = Convert.ToInt32(o["giveup"]);
    }
Пример #2
0
    public TaskData(JsonObject o)
    {
        count = Convert.ToInt32(o ["count"]);
        killCount = Convert.ToInt32(o ["killCount"]);
        createTime = (long)Convert.ToInt64(o ["createtime"]);
        prizedTime = (long)Convert.ToInt64(o["finishtime"]);
        templateID = Convert.ToInt32(o ["tid"]);
        status = (TaskStatus)Convert.ToInt32(o ["status"]);       
        if (o.ContainsKey("buyCount"))
        {
            buyCount = Convert.ToInt32(o ["buyCount"]);
        }

        if (o.ContainsKey("buyTime"))
        {
            buyTime = (long)Convert.ToInt64(o ["buyTime"]);
        }

        taskType = (TaskMechanism)Convert.ToInt32(o ["taskType"]);

        if (o.ContainsKey("starLevel"))
        {
            starLevel = Convert.ToInt32(o["starLevel"]);
        }
    }