示例#1
0
    public PrizeSample[] prizes; //奖品


    private void parse(string str)
    {
        string[] strArr = str.Split('|');
        //strArr[0]
        this.prizeSid = StringKit.toInt(strArr [0]);
        //strArr[1] totalDays
        this.totalDays = StringKit.toInt(strArr [1]);

        //strArr[2] rewardType
        this.rewardType = StringKit.toInt(strArr [2]);

        //strArr[3] prizes
        parsePrizes(strArr[3]);
    }
示例#2
0
    override public void parse(int sid, string str)
    {
        this.sid = sid;
        string[] strArr = str.Split('|');
        checkLength(strArr.Length, 19);
        //strArr[0] is sid
        //strArr[1] name
        this.name = strArr [1];

        //strArr[2] iconId
        this.iconId = strArr [2];
        //strArr[3] levelId
        this.levelId = StringKit.toInt(strArr [3]);
        //strArr[4] effects
        parseEffects(strArr [4]);
        //strArr[5] describe
        this.describe = strArr [5];
        //strArr[6] type
        this.type = StringKit.toInt(strArr [6]);
        //strArr[7] activeType
        this.activeType = StringKit.toInt(strArr [7]);
        //strArr[8] buffSid
        this.buffSid = StringKit.toInt(strArr [8]);
        //strArr[9] spellEffect
        this.spellEffect = StringKit.toInt(strArr [9]);
        //strArr[10] isNeedSpell
        parseIsNeedSpell(strArr [10]);
        //strArr[11] bulletEffect
        this.bulletEffect = StringKit.toInt(strArr [11]);
        //原来是是否aoe标志,换成环绕特效
        this.aroundEffect = StringKit.toInt(strArr [12]);
        //strArr[13] damageEffect
        this.damageEffect = StringKit.toInt(strArr [13]);
        //strArr[14] maxLevel
        this.maxLevel = StringKit.toInt(strArr [14]);
        this.quality  = StringKit.toInt(strArr [15]);
        this.isBind   = StringKit.toInt(strArr [16]) == 1;

        if (strArr [17] == "1")
        {
            this.canHitBack = true;
        }
        else
        {
            this.canHitBack = false;
        }

        this.attackNum = StringKit.toInt(strArr [18]);
        this.showType  = StringKit.toInt(strArr [19]);
    }
    private void parseInvite(ErlArray _data)
    {
        invitefriend.Clear();
        ErlArray tempArray;

        for (int i = 0; i < _data.Value.Length; i++)
        {
            tempArray = _data.Value[i] as ErlArray;
            FriendsInvite tmp = new FriendsInvite();
            tmp.uid       = tempArray.Value[0].getValueString();
            tmp.inviteNum = StringKit.toInt(tempArray.Value[1].getValueString());
            invitefriend.Add(tmp);
        }
    }
示例#4
0
    public void donationResult(ErlArray array)
    {
        int index        = 0;
        int liveness     = StringKit.toInt(array.Value [index++].getValueString());
        int contribution = StringKit.toInt(array.Value [index++].getValueString());

        guild.livenessing     += liveness;
        guild.livenessed      += liveness;
        guild.contributioning += contribution;
        guild.contributioned  += contribution;
        UiManager.Instance.openDialogWindow <MessageWindow> ((win) => {
            win.initWindow(1, LanguageConfigManager.Instance.getLanguage("s0093"), null, LanguageConfigManager.Instance.getLanguage("Guild_27", contribution.ToString(), liveness.ToString()), null);
        });
    }
示例#5
0
    void parseWeather(string str)
    {
        string[] strID = str.Split(',');
        if (strID == null || strID.Length < 1)
        {
            return;
        }
        weather = new int[strID.Length];

        for (int i = 0; i < strID.Length; i++)
        {
            weather [i] = StringKit.toInt(strID [i]);
        }
    }
 /** 解析装备星魂等级限制 */
 private void parseGrooveOpneLevel(string str)
 {
     //表示空
     if (str == Convert.ToString(0))
     {
         return;
     }
     string[] strArr = str.Split('#');
     grooveOpneLevel = new int[strArr.Length];
     for (int i = 0; i < strArr.Length; i++)
     {
         grooveOpneLevel [i] = StringKit.toInt(strArr [i]);
     }
 }
示例#7
0
 //类型,基础百分比,基础绝对值,成长百分比,成长绝对值
 public void parse(string str)
 {
     string[] strArr = str.Split(',');
     if (strArr.Length < 2)
     {
         throw new Exception("skill effect error! str" + str);
     }
     if (strArr.Length == 3)
     {
         this.type   = strArr[0];
         this.init   = StringKit.toInt(strArr[1]);
         this.combat = StringKit.toInt(strArr[2]);
     }
 }
示例#8
0
    private void parseNum(string str)
    {
        string[] strID = str.Split('#');
        if (strID == null || strID.Length < 1)
        {
            return;
        }
        num = new int[strID.Length];

        for (int i = 0; i < strID.Length; i++)
        {
            num [i] = StringKit.toInt(strID [i]);
        }
    }
示例#9
0
    public override void read(ErlKVMessage message)
    {
        ErlArray list  = message.getValue("msg") as ErlArray;
        int      score = StringKit.toInt(list.Value[0].getValueString());

        ErlArray   receiveSidErlArr = list.Value[1] as ErlArray;
        List <int> receiveSid       = new List <int>(receiveSidErlArr.Value.Length);

        for (int i = 0; i < receiveSidErlArr.Value.Length; i++)
        {
            receiveSid.Add(StringKit.toInt(receiveSidErlArr.Value[i].getValueString()));
        }
        callback(score, receiveSid);
    }
示例#10
0
 //解析分解结果
 private void parseResolve(string str)
 {
     string[] strArr = str.Split(',');
     if (strArr.Length == 1)
     {
         beastSkillCoe = null;
         return;
     }
     beastSkillCoe = new int[strArr.Length];
     for (int i = 0; i < strArr.Length; i++)
     {
         beastSkillCoe [i] = StringKit.toInt(strArr [i]);
     }
 }
示例#11
0
    PrizeSample parsePrize(string str)
    {
        string[]    strs   = str.Split(',');
        PrizeSample sample = new PrizeSample();

        sample.type = StringKit.toInt(strs [0]);
        sample.pSid = StringKit.toInt(strs [1]);
        sample.num  = strs [2];
        if (sample.type == PrizeType.PRIZE_MERIT)
        {
            meritAwardNum = StringKit.toInt(sample.num);
        }
        return(sample);
    }
示例#12
0
 private PrizeSample[] parsePrizes(string str)
 {
     string[]      strArr = str.Split('#');
     PrizeSample[] prizes = new PrizeSample[strArr.Length];
     for (int i = 0; i < strArr.Length; i++)
     {
         prizes[i] = new PrizeSample();
         string[] strs = strArr[i].Split(',');
         prizes[i].type = StringKit.toInt(strs[0]);
         prizes[i].pSid = StringKit.toInt(strs[1]);
         prizes[i].num  = strs[2];
     }
     return(prizes);
 }
示例#13
0
    public SuitAttrChange[] infos = null; //技能产生属性影响效果(影响角色本身属性) 同时对技能描述参数提供数值(影响描述信息数值) 不会影响装备基础属性

    public override void parse(int sid, string str)
    {
        this.sid = sid;
        string[] strArr = str.Split('|');
        //strArr[0] is sid
        //strArr[1] name
        this.name = strArr [1];
        //strArr[2] iconId
        this.iconId = StringKit.toInt(strArr [2]);
        //strArr[3] parts
        parseParts(strArr [3]);
        //strArr[3] attrChange
        parseSuitAttrChange(sid, strArr [4]);
    }
    /// <summary>
    /// 得到下次刷新的时间差
    /// </summary>
    /// <returns>The next flush time.</returns>
    public long getNextFlushTime()
    {
        string temp = getUseData();

        string[] temps       = temp.Split(':');
        long     nowTime     = ServerTimeKit.getCurrentSecond() * 1000;                                            //现在的时间
        long     timeLoading = (StringKit.toInt(temps[0]) * 60 + StringKit.toInt(temps[1])) * 60 * 1000 - nowTime; //时间差

        if (timeLoading < 0)
        {
            timeLoading = 24 * 60 * 60 * 1000 - nowTime + (StringKit.toInt(temps[0]) * 60 + StringKit.toInt(temps[1])) * 60 * 1000;
        }
        return(timeLoading);
    }
示例#15
0
    public override void parseConfig(string str)
    {
        //30|15|7|8|180|180|挂机:讨伐副本开放等级、剧情副本开放等级、讨伐副本挂机免cd所需vip、剧情副本挂机免cd所需vip、讨伐副本cd、剧情副本cd
        string[] arrStr = str.Split('|');

        bossWarSweepMinLevel  = StringKit.toInt(arrStr[0]);
        storyWarSweepMinLevel = StringKit.toInt(arrStr[1]);

        skipBossVipMinLevel  = StringKit.toInt(arrStr[2]);
        skipStoryVipMinLevel = StringKit.toInt(arrStr[3]);

        perBossCdTime  = StringKit.toInt(arrStr[4]);
        perStoryCdTime = StringKit.toInt(arrStr[5]);
    }
示例#16
0
    public Equip createEquip(ErlArray array)
    {
        int    j           = 0;
        int    arrayLength = array.Value.Length;
        string uid         = array.Value [j++].getValueString();
        int    sid         = StringKit.toInt(array.Value [j++].getValueString());
        long   exp         = StringKit.toLong(array.Value [j++].getValueString());
        int    state       = StringKit.toInt(array.Value [j++].getValueString());
        //特殊处理,聊天分享中存在装备,后台没给升星等级,按0级处理。
        int  starLevel = (j == arrayLength ? 0 : StringKit.toInt(array.Value[j++].getValueString()));//StringKit.toInt (array.Value [j++].getValueString ());
        long reexp     = StringKit.toLong(array.Value[j++].getValueString());

        return(new Equip(uid, sid, exp, state, starLevel, reexp));
    }
    public override void read(ErlKVMessage message)
    {
        ErlArray array = message.getValue("msg") as ErlArray;

        if (array == null)
        {
            if (callback != null)
            {
                callback(null, null);
            }
            return;
        }
        ErlType[] vs = array.Value;

        Guild guild = new Guild();

        guild.uid           = vs [0].getValueString();
        guild.level         = StringKit.toInt(vs[1].getValueString());
        guild.name          = vs [2].getValueString();
        guild.membership    = StringKit.toInt(vs[3].getValueString());
        guild.membershipMax = StringKit.toInt(vs[4].getValueString());
        guild.livenessing   = StringKit.toInt(vs[5].getValueString());
        guild.livenessed    = StringKit.toInt(vs[6].getValueString());

        array = vs [7] as ErlArray;
        List <GuildMember> list = new List <GuildMember> ();

        for (int i = 0; i < array.Value.Length; i++)
        {
            ErlArray a2 = array.Value[i] as ErlArray;
            vs = a2.Value;
            GuildMember m = new GuildMember();
            m.uid   = vs [0].getValueString();
            m.icon  = StringKit.toInt(vs[1].getValueString());
            m.name  = vs [2].getValueString();
            m.level = StringKit.toInt(vs[3].getValueString());
            m.job   = StringKit.toInt(vs[4].getValueString());
            list.Add(m);

            if (m.job == GuildJobType.JOB_PRESIDENT)
            {
                guild.presidentName = m.name;
            }
        }

        if (callback != null)
        {
            callback(guild, list);
        }
    }
示例#18
0
    //解析ErlKVMessgae
    public void parseKVMsg(ErlKVMessage message)
    {
        ErlType type = message.getValue("msg") as ErlType;

        if (type is ErlArray)
        {
            ErlArray        array           = type as ErlArray;
            int             index           = 0;
            string          uid             = array.Value [index++].getValueString();
            string          name            = array.Value [index++].getValueString();
            int             level           = StringKit.toInt(array.Value [index++].getValueString());
            int             membership      = StringKit.toInt(array.Value [index++].getValueString());
            int             membershipMax   = StringKit.toInt(array.Value [index++].getValueString());
            int             livenessing     = StringKit.toInt(array.Value [index++].getValueString());
            int             livenessed      = StringKit.toInt(array.Value [index++].getValueString());
            string          declaration     = array.Value [index++].getValueString();
            string          notice          = array.Value [index++].getValueString();
            string          presidentName   = array.Value [index++].getValueString();
            int             job             = StringKit.toInt(array.Value [index++].getValueString());
            int             contributioning = StringKit.toInt(array.Value [index++].getValueString());
            int             contributioned  = StringKit.toInt(array.Value [index++].getValueString());
            ErlArray        msgArray        = array.Value [index++] as ErlArray;
            List <GuildMsg> list            = new List <GuildMsg> ();
            for (int i = 0; i < msgArray.Value.Length; i++)
            {
                GuildMsg msg = new GuildMsg(msgArray.Value [i].getValueString());
                list.Add(msg);
            }
            int  todayDonateTimes = StringKit.toInt(array.Value [index++].getValueString());
            int  rename           = StringKit.toInt(array.Value[index++].getValueString());
            bool isCanRename      = false;
            if (rename == 1)
            {
                isCanRename = true;
            }
            int autoJoin       = StringKit.toInt(array.Value[index++].getValueString());
            int joinTime       = StringKit.toInt(array.Value[index++].getValueString());
            int haveFirstAward = StringKit.toInt(array.Value[index++].getValueString());
            if (index < array.Value.Length)
            {
                GuildManagerment.Instance.selfScore = StringKit.toInt(array.Value[index++].getValueString());
            }
            GuildManagerment.Instance.createGuild(uid, name, level, membership, membershipMax, livenessing, livenessed, declaration, notice, presidentName, job, contributioning, contributioned, list, todayDonateTimes, isCanRename, autoJoin, joinTime, haveFirstAward);
        }
        else
        {
            GuildManagerment.Instance.setGuild(null);
        }
    }
示例#19
0
 /// <summary>
 /// justShowNum 是否显示消耗为:几个物品,而不是对应物品的价格
 /// </summary>
 public void calculateTotal()
 {
     if (msg.msgInfo.GetType() == typeof(Goods) || item.GetType() == typeof(NoticeActiveGoods))
     {
         Goods good = msg.msgInfo as Goods;
         //if (good.getGoodsShopType() == ShopType.LADDER_HEGOMONEY)
         //{
         //    totalMoney.text = (now *  (good.getCostPrice ()/good.getGoodsShowNum())).ToString ();
         //} else {
         //   //totalMoney.text = (now * good.getCostPrice ()).ToString ();
         //    totalMoney.text = getTotalCost(good, now);
         //}
         totalMoney.text = getTotalCost(good, now, good.getGoodsShopType());
     }
     //这里添加多样性
     else if (msg.msgInfo.GetType() == typeof(Prop))
     {
         //使用道具不显示cost
     }
     else if (msg.msgInfo.GetType() == typeof(ArenaChallengePrice))
     {
         ArenaChallengePrice are = msg.msgInfo as ArenaChallengePrice;
         totalMoney.text = are.getPrice(now).ToString();
     }
     else if (msg.msgInfo.GetType() == typeof(BuyStruct))
     {
         BuyStruct buyStruct = msg.msgInfo as BuyStruct;
         totalMoney.text = (buyStruct.unitPrice * now).ToString();
     }
     else if (msg.msgInfo.GetType() == typeof(BossAttackTimeBuyStruct))
     {
         BossAttackTimeBuyStruct buyStruct = msg.msgInfo as BossAttackTimeBuyStruct;
         totalMoney.text = (buyStruct.unitPrice * now).ToString();
     }
     else if (msg.msgInfo.GetType() == typeof(LaddersChallengePrice))
     {
         LaddersChallengePrice are = msg.msgInfo as LaddersChallengePrice;
         totalMoney.text = are.getPrice(now).ToString();
     }
     else if (msg.msgInfo.GetType() == typeof(ActivityChapter))
     {
         ActivityChapter _chapter = msg.msgInfo as ActivityChapter;
         int[]           prises   = GoodsBuyCountManager.Instance.getSampleByGoodsSid(_chapter.sid).prise;
         int             rmb      = prises.Length <= _chapter.getReBuyNum() ? prises[prises.Length - 1] : prises[_chapter.getReBuyNum()];
         totalMoney.text = ((now * (rmb + (rmb + (now - 1) * (prises[1] - prises[0]))))) / 2 + "";
         msg.costNum     = StringKit.toInt(totalMoney.text);
         msg.msgNum      = now;
     }
 }
示例#20
0
    public override void read(ErlKVMessage message)
    {
        ErlType data = message.getValue("msg") as ErlType;

        if (data != null)
        {
            if (!(data is  ErlArray))
            {
                string str = (data as ErlAtom).Value;
                if (str == "timeout")
                {
                    MessageWindow.ShowAlert(LanguageConfigManager.Instance.getLanguage("mining_timeout"));
                }
            }
            else
            {
                ErlArray arr = data as ErlArray;
                MiningManagement.Instance.NewEnemyNum = StringKit.toInt(arr.Value[0].getValueString());
                MiningManagement.Instance.ClearEnemyInfoList();
                ErlArray peies = arr.Value[1] as ErlArray;
                for (int i = 0; i < peies.Value.Length; i++)
                {
                    ErlArray         info = peies.Value[i] as ErlArray;
                    int              k    = 0;
                    PillageEnemyInfo pei  = new PillageEnemyInfo();
                    pei.node       = info.Value[k++].getValueString();
                    pei.RoleUid    = info.Value[k++].getValueString();
                    pei.HeadIconId = StringKit.toInt(info.Value[k++].getValueString());
                    pei.playerName = info.Value[k++].getValueString();
                    pei.serverName = info.Value[k++].getValueString();
                    pei.time       = StringKit.toLong(info.Value[k++].getValueString());
                    pei.sid        = StringKit.toInt(info.Value[k++].getValueString());
                    pei.count      = StringKit.toInt(info.Value[k++].getValueString());
                    ErlArray minerals = info.Value[k++] as ErlArray;
                    for (int j = 0; j < minerals.Value.Length; j++)
                    {
                        ErlArray mineral = minerals.Value[j] as ErlArray;
                        pei.minerals.Add(StringKit.toInt(mineral.Value[0].getValueString()), StringKit.toInt(mineral.Value[1].getValueString()));
                    }

                    MiningManagement.Instance.AddEnemyInfoList(pei);
                }
            }
        }
        if (this.callback != null)
        {
            callback();
        }
    }
示例#21
0
    public override void read(ErlKVMessage message)
    {
        ErlType type = message.getValue("msg") as ErlType;

        if (type is ErlArray)
        {
            GuildManagerment.Instance.clearGuildList();
            ErlArray array = type as ErlArray;
            ErlArray list  = array.Value[0] as ErlArray;
            for (int i = 0; i < list.Value.Length; i++)
            {
                ErlArray temp = list.Value[i] as ErlArray;
                if (temp != null)
                {
                    int           index         = 0;
                    string        uid           = temp.Value[index++].getValueString();
                    int           level         = StringKit.toInt(temp.Value[index++].getValueString());
                    string        name          = temp.Value[index++].getValueString();
                    string        declaration   = temp.Value[index++].getValueString();
                    int           membership    = StringKit.toInt(temp.Value[index++].getValueString());
                    int           membershipMax = StringKit.toInt(temp.Value[index++].getValueString());
                    int           liveness      = StringKit.toInt(temp.Value[index++].getValueString());
                    GuildRankInfo info          = new GuildRankInfo(uid, level, name, membership, membershipMax, declaration, liveness);
                    GuildManagerment.Instance.createGuildList(info);
                }
            }
            int  startIndex = StringKit.toInt(array.Value[1].getValueString());
            bool isMax      = array.Value[1].getValueString().ToLower() == "true"?true:false;
            if (callback1 != null)
            {
                callback1(isMax);
            }
            if (callback != null)
            {
                callback(startIndex);
            }
        }
        else if (type.getValueString() == "none_guild")
        {
            if (callback1 != null)
            {
                callback1(true);
            }
            if (callback != null)
            {
                callback(1);
            }
        }
    }
示例#22
0
    /** 初始化后台题库数据 */
    public void initQuiz(ErlKVMessage message, CallBack _callback)
    {
        ErlType msg = message.getValue("msg") as ErlType;

        if (msg is ErlArray && msg != null)
        {
            ErlArray arr = msg as ErlArray;

            ErlArray arr2;
            examSamples = new List <ExamSample>();
            ExamSample sample = null;
            for (int i = 0; i < arr.Value.Length; i++)
            {
                if (arr.Value[i] is ErlArray)
                {
                    arr2                  = arr.Value[i] as ErlArray;
                    sample                = new ExamSample();
                    sample.quizId         = StringKit.toInt(arr2.Value [0].getValueString()); //题库ID
                    sample.overTime       = StringKit.toInt(arr2.Value [1].getValueString()); //答题结束时间
                    sample.getAwardType   = StringKit.toInt(arr2.Value [2].getValueString()); //是否领取奖励
                    sample.righeAnswerNum = StringKit.toInt(arr2.Value [3].getValueString()); //答对数量
                    sample.score          = StringKit.toInt(arr2.Value [4].getValueString()); //积分

                    ErlArray arr3 = arr2.Value [5] as ErlArray;                               //剩余题目sid组
//					int index;
                    int        sid;
                    List <int> sids = new List <int>(arr3.Value.Length);
                    for (int j = 0; j < arr3.Value.Length; j++)
                    {
//						index = StringKit.toInt(((arr3.Value [j] as ErlArray).Value [0] as ErlType).getValueString ());
                        sid = StringKit.toInt(((arr3.Value [j] as ErlArray).Value [1] as ErlType).getValueString());
                        sids.Add(sid);
                    }
                    sample.quizSids      = sids;
                    sample.questionCount = StringKit.toInt(arr2.Value [6].getValueString());                      //总数
                    examSamples.Add(sample);
                }
            }
        }
        else
        {
            MonoBase.print(GetType() + "==error:" + msg);
        }

        if (_callback != null)
        {
            _callback();
        }
    }
示例#23
0
    public void parseKVMsg(ErlKVMessage message)
    {
        ErlType type = message.getValue("msg") as ErlType;

        if (type is ErlAtom)
        {
            ClmbTowerManagerment.Instance.canPassBox = true;
            callback(3);
        }
        if (type is ErlArray)
        {
            ErlArray teamp = type as ErlArray;
            if (teamp.Value.Length <= 0)
            {
                ClmbTowerManagerment.Instance.turnSpriteData = null;
                callback(0);
                return;
            }
            int oldSid = StringKit.toInt(teamp.Value[0].getValueString());
            ClmbTowerManagerment.Instance.missionSid = oldSid;
            ErlArray       itemArray = teamp.Value[1] as ErlArray;
            TurnSpriteData data      = new TurnSpriteData();
            if (itemArray.Value.Length <= 0)
            {
                ClmbTowerManagerment.Instance.turnSpriteData = null;
                callback(0);
            }
            else
            {
                for (int i = 0; i < itemArray.Value.Length; i++)
                {
                    ErlArray         rewardArray = itemArray.Value[i] as ErlArray;
                    TurnSpriteReward reward      = new TurnSpriteReward();
                    int offset = 0;
                    reward.sid   = StringKit.toInt(rewardArray.Value[offset++].getValueString());
                    reward.type  = rewardArray.Value[offset++].getValueString();
                    reward.num   = StringKit.toInt(rewardArray.Value[offset++].getValueString());
                    reward.index = StringKit.toInt(rewardArray.Value[offset++].getValueString());
                    data.rewardList.Add(reward);
                    if (reward.index != 0)
                    {
                        data.towerRewardList.Add(reward);
                    }
                    ClmbTowerManagerment.Instance.turnSpriteData = data;
                }
                callback(1);
            }
        }
    }
    //serverInfo=[[400000000商品id,1全服已购买次数]],userInfo=[[[consume_rmb类型,200活动期间消耗]暂时只有一个],[[[role_times,400000000],1]个人消耗次数,...]]
    private void initConsumeRebateGoods(int activeID, ErlArray serverInfo, ErlArray userInfo)
    {
        NoticeActiveServerInfo consumeInfo = activeInfo.get(activeID) as NoticeActiveServerInfo;

        if (consumeInfo == null)
        {
            consumeInfo = new NoticeActiveServerInfo();
            activeInfo.put(activeID, consumeInfo);
        }
        ErlArray          temp, temp1;
        NoticeActiveGoods goods;
        int sid;

        for (int i = 0; i < serverInfo.Value.Length; i++)
        {
            temp  = serverInfo.Value[i] as ErlArray;
            sid   = StringKit.toInt(temp.Value[0].getValueString());
            goods = consumeInfo.goodsList.get(sid) as NoticeActiveGoods;
            if (goods == null)
            {
                goods        = new NoticeActiveGoods(sid);
                goods.timeID = activeID;
                consumeInfo.goodsList.put(sid, goods);
            }
            goods.serverBuyCount = StringKit.toInt(temp.Value[1].getValueString());
        }
        if (userInfo.Value.Length > 0)
        {
            temp = (userInfo.Value[0] as ErlArray);
            if (temp.Value.Length > 0)
            {
                consumeInfo.consumeValue = StringKit.toInt((temp.Value[0] as ErlArray).Value[1].getValueString()); //兑换rmb消耗入门限制
            }
            temp = userInfo.Value[1] as ErlArray;
            for (int i = 0; i < temp.Value.Length; i++)
            {
                temp1 = temp.Value[i] as ErlArray;
                sid   = StringKit.toInt((temp1.Value[0] as ErlArray).Value[1].getValueString());
                goods = consumeInfo.goodsList.get(sid) as NoticeActiveGoods;
                if (goods == null)
                {
                    goods        = new NoticeActiveGoods(sid);
                    goods.timeID = activeID;
                    consumeInfo.goodsList.put(sid, goods);
                }
                goods.roleBuyCount = StringKit.toInt(temp1.Value[1].getValueString());
            }
        }
    }
示例#25
0
    //buffer生效 BUFFER_ABILITY
    private void createBufferAbility(BattleSkillMsg msg, ErlArray array)
    {
        //buffer生效者
        string str1 = array.Value [0].getValueString();

        msg.userID = StringKit.toInt(str1);
        //buffer技能编号sid
        string str2 = array.Value [1].getValueString();

        msg.skillID = StringKit.toInt(str2);
        //buffer技能编号id
        string str3 = array.Value [2].getValueString();

        msg.skillID = StringKit.toInt(str3);
    }
示例#26
0
    //解析阵型点位信息
    private void parseForm(string str)
    {
        string[] strArr = str.Split(',');
        formations = new int[strArr.Length];


        for (int i = 0; i < strArr.Length; i++)
        {
            formations [i] = StringKit.toInt(strArr [i]);
            if (formations [i] != 0)
            {
                teamLength += 1;
            }
        }
    }
 /** 解析 */
 public override void parse(string str)
 {
     base.parse(str);
     string[] strs = str.Split(',');
     checkLength(strs.Length, 9);
     sourceEquipSid      = StringKit.toInt(strs [0]);
     targetEquipSid      = StringKit.toInt(strs [1]);
     showUserLevel       = StringKit.toInt(strs [2]);
     showVipLevel        = StringKit.toInt(strs [3]);
     usedVipLevel        = StringKit.toInt(strs [4]);
     usedGetBackVipLevel = StringKit.toInt(strs [5]);
     consumRmbValue      = StringKit.toInt(strs [6]);
     exchangePropSid     = StringKit.toInt(strs [7]);
     exchangePropRate    = StringKit.toInt(strs [8]);
 }
示例#28
0
    //[109,[[5,11423],[8,11423],[10,11423],[11,11425]],0,36000,79200]}
    // 109=dy [[星座id,奖励sid],...],0=cd,36000=start,79200=end
    public void initData(ErlArray array)
    {
        day = StringKit.toInt((array.Value [0] as ErlType).getValueString());
        ErlArray array1 = array.Value [1] as ErlArray;

        luckyStarAndSid = new int[array1.Value.Length * 2];
        for (int i = 0; i < array1.Value.Length; i++)
        {
            luckyStarAndSid [i * 2]     = StringKit.toInt((((array1.Value [i] as ErlArray).Value [0]) as ErlType).getValueString());
            luckyStarAndSid [i * 2 + 1] = StringKit.toInt(((array1.Value [i] as ErlArray).Value [1] as ErlType).getValueString());
        }
        prayTime  = StringKit.toInt((array.Value [2] as ErlType).getValueString());
        beginTime = StringKit.toInt((array.Value [3] as ErlType).getValueString());
        endTime   = StringKit.toInt((array.Value [4] as ErlType).getValueString());
    }
示例#29
0
    //解析默认技能配置
    void parseSkills(string str)
    {
        string[] strArr = str.Split('#');

        skills = new int[strArr.Length];
        for (int i = 0; i < strArr.Length; i++)
        {
            if (strArr [i] == "0")
            {
                skills = null;
                break;
            }
            skills [i] = StringKit.toInt(strArr [i]);
        }
    }
示例#30
0
    void updatePage(GameObject obj)
    {
        //更新当前显示的ShowItem;
        ActiveShowItem = sampleContent.getCenterObj().GetComponent <ButtonBeast> ();
        ButtonBeast bookitem = obj.GetComponent <ButtonBeast> ();
        int         index    = StringKit.toInt(obj.name) - 1;

        //不够3页.隐藏
        if (beastList == null || index >= beastList.Count || beastList [index] == null)
        {
            return;
        }
        //防止出现几个相同女神形象
        bookitem.updateBeast(beastList [index]);
    }