示例#1
0
        private static ConfSkyEye GetConfByDic(DataTable reader)
        {
            long id = reader.GetInt64(0);

            int[]  rewardNums     = (int[])reader.GetArrayData(1, 11);
            long[] rewards        = (long[])reader.GetArrayData(2, 17);
            long   refuteId       = reader.GetInt64(3);
            long   keyCollectorId = reader.GetInt64(4);

            long[] collectorIds = (long[])reader.GetArrayData(5, 17);
            long   npcId        = reader.GetInt64(6);
            string descs        = reader.GetString(7);
            string name         = reader.GetString(8);

            ConfSkyEye new_obj_ConfSkyEye = new ConfSkyEye(id,
                                                           rewardNums,
                                                           rewards,
                                                           refuteId,
                                                           keyCollectorId,
                                                           collectorIds,
                                                           npcId,
                                                           descs,
                                                           name
                                                           );

            return(new_obj_ConfSkyEye);
        }
示例#2
0
        public static bool GetConfig(string fieldName, object fieldValue, out ConfSkyEye config)
        {
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_SkyEye", fieldName, fieldValue);

            if (sqReader != null)
            {
                try
                {
                    sqReader.Read();
                    if (sqReader.HasRows)
                    {
                        config = GetConfByDic(sqReader);
                    }
                    else
                    {
                        config = null;
                        return(false);
                    }
                    return(true);
                }
                catch (Exception ex)
                {
                    SqliteDriver.SQLiteHelper.OnError(string.Format("SkyEye 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex));
                }
                config = null;
                return(false);
            }
            config = null;
            return(false);
        }
示例#3
0
        public void SetData(ConfSkyEye conSky, bool isUnLock, bool hasReward)
        {
            skyEyeId = conSky.id;
            ConfNpc npc = ConfNpc.Get(conSky.npcId);

            this.m_presuadeId         = conSky.refuteId;
            this.m_personNameLab.Text = isUnLock?LocalizeModule.Instance.GetString(npc.name):"?";
            this.m_detailLab.Text     = LocalizeModule.Instance.GetString(conSky.descs);
            this.m_personTex.Visible  = isUnLock;

            this.m_maskCom.Visible = !isUnLock;

            if (isUnLock)
            {
                this.m_personTex.TextureName = npc.icon;
            }
            int hasUnLockNumber = 0;

            this.m_resGrid.EnsureSize <SkyEyeProp>(conSky.collectorIds.Length);
            for (int i = 0; i < conSky.collectorIds.Length; i++)
            {
                SkyEyeProp    icon         = this.m_resGrid.GetChild <SkyEyeProp>(i);
                PlayerPropMsg playerProp   = GlobalInfo.MY_PLAYER_INFO.GetBagInfosByID(conSky.collectorIds[i]);
                bool          isPropUnLock = false;
                if (playerProp != null && playerProp.Count > 0)
                {
                    isPropUnLock = true;
                    hasUnLockNumber++;
                }
                icon.SetData(conSky.collectorIds[i], isPropUnLock);
                icon.Visible = true;
            }
            this.m_chatBtn.Visible = !hasReward && (hasUnLockNumber == conSky.collectorIds.Length);
        }
示例#4
0
        public bool SetData(ConfSkyEye skyeye, int index, SkyeyePersonDetailComponent detailUI)
        {
            this.m_detailUI = detailUI;
            m_confSkyeye    = skyeye;
            this.SkyEyeID   = skyeye.id;
            int num = 0;

            this.m_hasReward = GlobalInfo.MY_PLAYER_INFO.IsSkyEyeRewardContainId(skyeye.id);
            //this.m_alphaTweener.Delay = Mathf.Sqrt(index * 0.9f);// index * SkyeyeUILogic.PERSONTIME;
            this.m_scaleTweener.Delay = Mathf.Sqrt(index * 0.9f);; // index * SkyeyeUILogic.PERSONTIME;

            this.m_alphaText.Delay = this.m_scaleTweener.Delay + this.m_scaleTweener.Duration;
            this.m_posText.Delay   = this.m_scaleTweener.Delay + this.m_scaleTweener.Duration;
            isLock = true;
            for (int i = 0; i < m_confSkyeye.collectorIds.Length; i++)
            {
                PlayerPropMsg playerProp = GlobalInfo.MY_PLAYER_INFO.GetBagInfosByID(m_confSkyeye.collectorIds[i]);
                if (playerProp != null && playerProp.Count > 0)
                {
                    num++;
                    if (m_confSkyeye.collectorIds[i] == m_confSkyeye.keyCollectorId)
                    {
                        isLock = false;
                    }
                }
            }

            this.m_personName.Visible = !isLock;
            this.m_lockCom.Visible    = isLock;
            this.m_personCom.Visible  = !isLock;
            m_progress             = num / (float)m_confSkyeye.collectorIds.Length;
            this.m_tipsLab.Visible = false;
            if (m_progress == 1 && !m_hasReward)
            {
                this.m_tipsLab.Text    = "(" + LocalizeModule.Instance.GetString("theeye_tips") + ")";
                this.m_tipsLab.Visible = true;
            }

            if (m_hasReward)
            {
                this.m_progressFillImg.Color = m_targetColor;
                this.m_personName.color      = m_targetColor;
            }
            else
            {
                this.m_progressFillImg.Color = m_srcColor;
                this.m_personName.color      = m_srcColor;
            }
            //this.m_progressBar.Value = m_progress;
            if (!isLock)
            {
                ConfNpc npc = ConfNpc.Get(m_confSkyeye.npcId);
                this.m_personName.Text       = LocalizeModule.Instance.GetString(npc.name);
                this.m_personImg.TextureName = npc.icon;
            }
            return(m_hasReward);
        }
示例#5
0
 private static void GetArrrayList()
 {
     if (cacheArray.Count <= 0)
     {
         DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_SkyEye");
         if (sqReader != null)
         {
             while (sqReader.Read())
             {
                 ConfSkyEye _conf = GetConfByDic(sqReader);
                 cacheArray.Add(_conf);
                 dic[_conf.id] = _conf;
             }
             resLoaded = true;
         }
     }
 }
示例#6
0
        public static bool GetConfig(long id, out ConfSkyEye config)
        {
            if (dic.TryGetValue(id, out config))
            {
                return(config != null);
            }
            if (cacheLoaded)
            {
                config = null;
                return(false);
            }
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_SkyEye", id);

            if (sqReader != null)
            {
                try
                {
                    sqReader.Read();
                    if (sqReader.HasRows)
                    {
                        config = GetConfByDic(sqReader);
                    }
                    else
                    {
                        dic[id] = null;
                        config  = null;
                        return(false);
                    }
                    dic[id] = config;
                    return(true);
                }
                catch (Exception ex)
                {
                    SqliteDriver.SQLiteHelper.OnError(string.Format("SkyEye 表找不到SN={0} 的数据\n{1}", id, ex));
                }
                config = null;
                return(false);
            }
            else
            {
                config = null;
                return(false);
            }
        }
示例#7
0
 public static void Register()
 {
     ConfAchievement.Init();
     ConfActiveDrop.Init();
     ConfActivityBase.Init();
     ConfAssetManifest.Init();
     Confbranchtask.Init();
     ConfBuilding.Init();
     ConfCartoonScene.Init();
     ConfChapter.Init();
     ConfCharge.Init();
     ConfChat.Init();
     ConfChatItem.Init();
     ConfCheckIn.Init();
     ConfCombineFormula.Init();
     ConfDemoScene.Init();
     ConfDropOut.Init();
     ConfPropGiftItem0.Init();
     ConfPropGiftItem1.Init();
     ConfPropGiftItem2.Init();
     ConfDropOut2.Init();
     Confetl.Init();
     ConfEvent.Init();
     ConfEventAttribute.Init();
     ConfEventPhase.Init();
     Confexhibit.Init();
     ConfExpToLevel.Init();
     Conffailtips.Init();
     ConfFeedback.Init();
     ConfFind.Init();
     ConfFindClue.Init();
     ConfFindTypeIcon.Init();
     ConfGMCMD.Init();
     ConfGuid.Init();
     ConfGuidArt.Init();
     ConfGuidNew.Init();
     ConfGuidNewFunction.Init();
     Confinapppurchase.Init();
     ConfJigsawScene.Init();
     ConfKeyWords.Init();
     ConfLanguage.Init();
     ConfMsgCode.Init();
     ConfNode.Init();
     ConfNpc.Init();
     ConfOfficer.Init();
     ConfPath.Init();
     ConfPoliceRankIcon.Init();
     ConfProp.Init();
     ConfPropGift.Init();
     ConfPropGiftItem0.Init();
     ConfPropGiftItem1.Init();
     ConfPropGiftItem2.Init();
     ConfPush.Init();
     ConfReasoning.Init();
     ConfScene.Init();
     ConfSceneDifficulty.Init();
     ConfSceneSpecial.Init();
     ConfServiceConfig.Init();
     ConfSkill.Init();
     ConfSkyEye.Init();
     ConfSound.Init();
     ConfTask.Init();
     ConfTitle.Init();
 }