Example #1
0
    public static void detailInfoForCows(InfoCows info, Dictionary <string, object> data)
    {
        if (info == null || data == null)
        {
            return;
        }

        if (data.ContainsKey("bankerCards")) // 庄家牌型
        {
            DbCowsCard c = BaseJsonSerializer.deserialize <DbCowsCard>(data["bankerCards"].ToString());
            info.createBankerCard(c);
        }
        if (data.ContainsKey("otherCards1")) // 东牌型
        {
            DbCowsCard c = BaseJsonSerializer.deserialize <DbCowsCard>(data["otherCards1"].ToString());
            info.createEastCard(c);
        }
        if (data.ContainsKey("otherCards2")) // 南牌型
        {
            DbCowsCard c = BaseJsonSerializer.deserialize <DbCowsCard>(data["otherCards2"].ToString());
            info.createSouthCard(c);
        }
        if (data.ContainsKey("otherCards3")) // 西牌型
        {
            DbCowsCard c = BaseJsonSerializer.deserialize <DbCowsCard>(data["otherCards3"].ToString());
            info.createWestCard(c);
        }
        if (data.ContainsKey("otherCards4")) // 北牌型
        {
            DbCowsCard c = BaseJsonSerializer.deserialize <DbCowsCard>(data["otherCards4"].ToString());
            info.createNorthCard(c);
        }
    }
Example #2
0
    // 解析牛牛json串信息
    public static InfoCows parseInfoCows(string exInfo, GMUser user)
    {
        InfoCows info = null;

        try
        {
            DbCowsBet bet = BaseJsonSerializer.deserialize <DbCowsBet>(exInfo);
            if (bet == null)
            {
                return(null);
            }

            info           = new InfoCows();
            info.m_betInfo = bet;

            ObjectId oid = ObjectId.Parse(bet.key);
            Dictionary <string, object> data = DBMgr.getInstance().getTableData(TableName.PUMP_COWS_CARD,
                                                                                "_id",
                                                                                oid,
                                                                                user.getDbServerID(),
                                                                                DbName.DB_PUMP);

            if (data == null)
            {
                return(null);
            }

            detailInfoForCows(info, data);
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
Example #3
0
    // 解析鳄鱼大亨json串信息
    public static InfoCrocodile parseInfoCrocodile(string exInfo)
    {
        InfoCrocodile info = null;

        try
        {
            Dictionary <string, object> dic = BaseJsonSerializer.deserialize <Dictionary <string, object> >(exInfo);
            info = new InfoCrocodile();
            if (dic.ContainsKey("betinfo"))
            {
                info.m_betInfo = BaseJsonSerializer.deserialize <List <BetInfoCrocodile> >(dic["betinfo"].ToString());
            }
            if (dic.ContainsKey("resulttype"))
            {
                info.m_resultType =
                    BaseJsonSerializer.deserialize <List <DbCrocodileResultType> >(dic["resulttype"].ToString());
            }
            if (dic.ContainsKey("resultList"))
            {
                info.m_resultList = BaseJsonSerializer.deserialize <List <DbCrocodileResultList> >(dic["resultList"].ToString());
            }
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
Example #4
0
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogModifyFishlordRoomExpRate param = BaseJsonSerializer.deserialize <LogModifyFishlordRoomExpRate>(str);

        if (param.m_roomList == "")
        {
            return("");
        }

        string[] arrs = Tool.split(param.m_roomList, ',', StringSplitOptions.RemoveEmptyEntries);
        string   room = "";

        for (int i = 0; i < arrs.Length; i++)
        {
            int roomType = Convert.ToInt32(arrs[i]);
            room += StrName.s_roomName[roomType - 1] + ",";
        }

        return(string.Format(info.m_fmt, room, StrName.s_gameName[param.m_gameId]));
    }
Example #5
0
    // 解析黑红梅方json串信息
    public static InfoShcd parseInfoShcd(string exInfo)
    {
        InfoShcd info = null;

        try
        {
            info = BaseJsonSerializer.deserialize <InfoShcd>(exInfo);
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
Example #6
0
    // 解析五龙json串信息
    public static InfoDragon parseInfoDragon(string exInfo)
    {
        InfoDragon info = null;

        try
        {
            info = BaseJsonSerializer.deserialize <InfoDragon>(exInfo);
            info.init();
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
Example #7
0
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogResetPwd param = BaseJsonSerializer.deserialize <LogResetPwd>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt, param.m_acc, param.m_phone));
        }
        return("");
    }
Example #8
0
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogFreezeHead param = BaseJsonSerializer.deserialize <LogFreezeHead>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt, param.m_playerId));
        }
        return("");
    }
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogCreatePlayer param = BaseJsonSerializer.deserialize <LogCreatePlayer>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt, param.m_acc));
        }
        return("");
    }
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogApiApprove param = BaseJsonSerializer.deserialize <LogApiApprove>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt, param.m_apiAcc, param.m_aliasName));
        }
        return("");
    }
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogReloadTable param = BaseJsonSerializer.deserialize <LogReloadTable>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt,
                                 StrName.s_gameName[param.m_gameId]));
        }
        return("");
    }
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogWishCurse param = BaseJsonSerializer.deserialize <LogWishCurse>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt,
                                 StrName.s_gameName[param.m_gameId],
                                 param.m_playerId,
                                 param.m_opType == 0 ? "添加" : "去除",
                                 StrName.s_wishCurse[param.m_wishType]));
        }
        return("");
    }
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogPlayerOp param = BaseJsonSerializer.deserialize <LogPlayerOp>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt,
                                 param.m_playerId,
                                 param.m_op == 1 ? "增加" : "减少",
                                 param.m_value,
                                 getProp(param)));
        }
        return("");
    }
Example #14
0
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogBlockAcc param = BaseJsonSerializer.deserialize <LogBlockAcc>(str);

        if (param != null)
        {
            if (param.m_isBlock)
            {
                return(string.Format(info.m_fmt, "封", param.m_acc));
            }
            return(string.Format(info.m_fmt, "解封", param.m_acc));
        }
        return("");
    }
Example #15
0
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogSendMail param = BaseJsonSerializer.deserialize <LogSendMail>(str);

        if (param != null)
        {
            if (param.m_playerList == "")
            {
                return(string.Format(info.m_fmt, "全服", param.m_title, param.m_sender, param.m_content, param.m_itemList, param.m_validDay));
            }
            return(string.Format(info.m_fmt, param.m_playerList, param.m_title, param.m_sender, param.m_content, param.m_itemList, param.m_validDay));
        }
        return("");
    }
Example #16
0
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogGmRecharge param = BaseJsonSerializer.deserialize <LogGmRecharge>(str);

        if (param != null)
        {
            RechargeCFGData rd = RechargeCFG.getInstance().getValue(param.m_param);
            if (rd != null)
            {
                return(string.Format(info.m_fmt, param.m_playerId, StrName.s_rechargeType[param.m_rtype], rd.m_price));
            }
        }
        return("");
    }
    public override string getDescription(OpInfo info, string str)
    {
        if (info == null)
        {
            return("引用空");
        }

        LogCowsAddCardType param = BaseJsonSerializer.deserialize <LogCowsAddCardType>(str);

        if (param != null)
        {
            return(string.Format(info.m_fmt,
                                 ItemHelp.getCowsCardTypeName(param.m_bankerType),
                                 ItemHelp.getCowsCardTypeName(param.m_other1Type),
                                 ItemHelp.getCowsCardTypeName(param.m_other2Type),
                                 ItemHelp.getCowsCardTypeName(param.m_other3Type),
                                 ItemHelp.getCowsCardTypeName(param.m_other4Type)));
        }
        return("");
    }
Example #18
0
    // 解析百家乐json串信息
    public static InfoBaccarat parseInfoBaccarat(string exInfo)
    {
        InfoBaccarat info = null;

        try
        {
            Dictionary <string, object> dic = BaseJsonSerializer.deserialize <Dictionary <string, object> >(exInfo);
            info = new InfoBaccarat();
            if (dic.ContainsKey("betinfo"))
            {
                info.m_betInfo = BaseJsonSerializer.deserialize <List <BetInfo> >(dic["betinfo"].ToString());
            }
            if (dic.ContainsKey("bankercard"))
            {
                info.m_bankerCard = BaseJsonSerializer.deserialize <List <CardInfo> >(dic["bankercard"].ToString());
            }
            if (dic.ContainsKey("playercard"))
            {
                info.m_playerCard = BaseJsonSerializer.deserialize <List <CardInfo> >(dic["playercard"].ToString());
            }
            if (dic.ContainsKey("isbanker"))
            {
                int t = Convert.ToInt32(dic["isbanker"]);
                info.setIsBanker(t);
            }
            if (dic.ContainsKey("chargerate"))
            {
                info.m_serviceChargeRatio = Convert.ToInt32(dic["chargerate"]);
            }
            if (dic.ContainsKey("charge"))
            {
                info.m_serviceCharge = Convert.ToInt32(dic["charge"]);
            }
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
Example #19
0
    // 解析鳄鱼公园json串信息
    public static InfoFishPark parseInfoFishPark(string exInfo)
    {
        InfoFishPark info = null;

        try
        {
            Dictionary <string, object> dic = BaseJsonSerializer.deserialize <Dictionary <string, object> >(exInfo);
            info = new InfoFishPark();
            if (dic.ContainsKey("Abandonedbullets"))
            {
                info.m_abandonedbullets = Convert.ToInt32(dic["Abandonedbullets"]);
            }
            if (dic.ContainsKey("fishinfos"))
            {
                info.m_fish = BaseJsonSerializer.deserialize <List <DbFish> >(dic["fishinfos"].ToString());
            }
            info.sort();
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }
Example #20
0
    // 解析骰宝json串信息
    public static InfoDice parseInfoDice(string exInfo)
    {
        InfoDice info = null;

        try
        {
            Dictionary <string, object> dic = BaseJsonSerializer.deserialize <Dictionary <string, object> >(exInfo);
            info = new InfoDice();
            if (dic.ContainsKey("dics_info"))
            {
                int num = Convert.ToInt32(dic["dics_info"]);
                info.setDiceNum(num);
            }
            if (dic.ContainsKey("bet_info"))
            {
                info.m_betInfo = BaseJsonSerializer.deserialize <List <DbDiceBet> >(dic["bet_info"].ToString());
            }
        }
        catch (System.Exception ex)
        {
        }
        return(info);
    }