示例#1
0
    public override void analyzeData(object jsonObj)
    {
        List <object> cardsDataList = (List <object>)jsonObj;

        updateList = new Dictionary <int, ServerMsgHerocardInfo>();
        foreach (object obj in cardsDataList)
        {
            ServerMsgHerocardInfo cardInfo = new ServerMsgHerocardInfo();
            cardInfo.analyzeData(obj);
            if (cardInfo.slot_id != 0)
            {
                updateList.Add(cardInfo.slot_id, cardInfo);
            }
        }
    }
示例#2
0
    public override void analyzeData(object jsonObj)
    {
        Dictionary <string, object> msgData = (Dictionary <string, object>)jsonObj;

        capacity = GetInt(msgData, "capacity");
        Dictionary <string, object> cardsData = msgData["herocardList"] as Dictionary <string, object>;

        if (cardsData == null)
        {
            return;
        }

        foreach (KeyValuePair <string, object> CardInfoData in cardsData)
        {
            ServerMsgHerocardInfo cardInfo = new ServerMsgHerocardInfo();
            cardInfo.analyzeData(CardInfoData.Value);
            herocardList.Add(cardInfo.slot_id, cardInfo);
        }
    }