コード例 #1
0
		public void save()
		{
			bool doneId = NewbieModel.getDoneId(this.id);
			if (!doneId)
			{
				string text = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");
				bool flag = text == "";
				if (flag)
				{
					text = this.id.ToString();
				}
				else
				{
					text = text + "," + this.id;
				}
				FileMgr.saveString(FileMgr.TYPE_NEWBIE, "n", text);
			}
		}
コード例 #2
0
        public void save()
        {
            if (NewbieModel.getDoneId(id))
            {
                return;
            }
            string str = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");

            if (str == "")
            {
                str = id.ToString();
            }
            else
            {
                str += "," + id;
            }
            FileMgr.saveString(FileMgr.TYPE_NEWBIE, "n", str);
        }
コード例 #3
0
        public void initNewbieData()
        {
            if (inited)
            {
                return;
            }

            string str = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");

            if (str != "")
            {
                string[] arr = str.Split(',');
                for (int i = 0; i < arr.Length; i++)
                {
                    doneId[int.Parse(arr[i])] = 1;
                }
            }



            inited = true;
            List <SXML> xml = XMLMgr.instance.GetSXMLList("newbie.n");

            //SXML xmls = xml.GetNode("skill");
            if (xml != null)
            {
                foreach (SXML x in xml)
                {
                    int id = x.getInt("id");
                    if (getDoneId(id))
                    {
                        continue;
                    }

                    NewbieTeachMgr.getInstance().add(x.getString("p"), id);
                }
            }
        }
コード例 #4
0
ファイル: NewbieModel.cs プロジェクト: atom-chen/rongyaojt
        public void initNewbieData()
        {
            bool flag = this.inited;

            if (!flag)
            {
                string text  = FileMgr.loadString(FileMgr.TYPE_NEWBIE, "n");
                bool   flag2 = text != "";
                if (flag2)
                {
                    string[] array = text.Split(new char[]
                    {
                        ','
                    });
                    for (int i = 0; i < array.Length; i++)
                    {
                        NewbieModel.doneId[int.Parse(array[i])] = 1;
                    }
                }
                this.inited = true;
                List <SXML> sXMLList = XMLMgr.instance.GetSXMLList("newbie.n", "");
                bool        flag3    = sXMLList != null;
                if (flag3)
                {
                    foreach (SXML current in sXMLList)
                    {
                        int  @int  = current.getInt("id");
                        bool flag4 = NewbieModel.getDoneId(@int);
                        if (!flag4)
                        {
                            NewbieTeachMgr.getInstance().add(current.getString("p"), @int);
                        }
                    }
                }
            }
        }
コード例 #5
0
        public void init()
        {
            if (isInited)
            {
                return;
            }
            isInited = true;
            if (HttpAppMgr.instance != null)
            {
                HttpAppMgr.instance.addEventListener(HttpAppMgr.EVENT_GET_GIFT_CARD, getGiftCard);
                E_mailProxy.getInstance();
            }
            timeSmp = muNetCleint.instance.CurServerTimeStamp;
            //timeSmp=ConvertDateTimeInt(nowTime);
            debug.Log(timeSmp.ToString());
            perLocalStr.Clear();
            famLocalStr.Clear();

            //bool b = PlayeLocalInfo.checkKey("aa");
            //if (b)
            //{
            //    string st = PlayeLocalInfo.loadString("aa");

            //}
            //else
            //{
            //    PlayeLocalInfo.saveString("aa", "aaaaaaaaaaaaaaa");
            //}

            string perStr = "";

            perStr = FileMgr.loadString(FileMgr.TYPE_MAIL, "per");
            string famStr = "";

            famStr = FileMgr.loadString(FileMgr.TYPE_MAIL, "fam");

            if (perStr != "" && perStr != " ")
            {
                string[] msgPer = perStr.Split(sep2, StringSplitOptions.None);

                try
                {
                    foreach (string str in msgPer)
                    {
                        string[] arr = str.Split(sep1, StringSplitOptions.None);
                        debug.Log(arr[0] + 22);
                        //frmcid+frmsex+cid+time+frmname+msg
                        if (arr[0] != "" && arr[0] != " ")
                        {
                            if (int.Parse(arr[6]) + _15days > timeSmp)
                            {
                                mailData data = new mailData();
                                data.frmcid  = int.Parse(arr[0]);
                                data.frmsex  = int.Parse(arr[1]);
                                data.cid     = int.Parse(arr[2]);
                                data.time    = arr[3];
                                data.frmname = arr[4];
                                data.msg     = arr[5];
                                data.str     = str + "#)#&";
                                if (E_mailModel.getInstance().personalMailDic.ContainsKey(data.frmcid))
                                {
                                    E_mailModel.getInstance().personalMailDic[data.frmcid].Add(data);
                                }
                                else
                                {
                                    List <mailData> list = new List <mailData>();
                                    list.Add(data);
                                    E_mailModel.getInstance().personalMailDic.Add(data.frmcid, list);
                                }
                                perLocalStr.Add(data);
                            }
                        }
                    }
                    saveLocalData(perLocalStr, 4);
                }
                catch (System.Exception ex)
                {
                    FileMgr.saveString(FileMgr.TYPE_MAIL, "per", " ");
                    FileMgr.saveString(FileMgr.TYPE_MAIL, "fam", " ");
                }
            }
            if (famStr != "" && famStr != " ")
            {
                string[] msgFam = famStr.Split(sep2, StringSplitOptions.None);
                foreach (string str in msgFam)
                {
                    string[] arr = str.Split(sep1, StringSplitOptions.None);
                    if (arr[0] != "" && arr[0] != " ")
                    {
                        if (int.Parse(arr[6]) + _15days > timeSmp)
                        {
                            mailData data = new mailData();
                            //frmcid+frmsex+cid+time+frmname+msg
                            data.frmcid  = int.Parse(arr[0]);
                            data.frmsex  = int.Parse(arr[1]);
                            data.cid     = int.Parse(arr[2]);
                            data.time    = arr[3];
                            data.frmname = arr[4];
                            data.msg     = arr[5];
                            data.clanc   = int.Parse(arr[7]);
                            data.str     = str + "#)#&";
                            familyMailDic.Add(data);
                            famLocalStr.Add(data);
                        }
                    }
                }
                saveLocalData(famLocalStr, 3);
            }
            UIClient.instance.addEventListener(UI_EVENT.ON_LOAD_ITEMS, onEndLoadItem);
        }
コード例 #6
0
ファイル: E_mailModel.cs プロジェクト: atom-chen/rongyaojt
        public void init()
        {
            bool flag = this.isInited;

            if (!flag)
            {
                this.isInited = true;
                bool flag2 = HttpAppMgr.instance != null;
                if (flag2)
                {
                    HttpAppMgr.instance.addEventListener(HttpAppMgr.EVENT_GET_GIFT_CARD, new Action <GameEvent>(this.getGiftCard));
                    BaseProxy <E_mailProxy> .getInstance();
                }
                this.timeSmp = muNetCleint.instance.CurServerTimeStamp;
                debug.Log(this.timeSmp.ToString());
                this.perLocalStr.Clear();
                this.famLocalStr.Clear();
                string text  = FileMgr.loadString(FileMgr.TYPE_MAIL, "per");
                string text2 = "";
                text2 = FileMgr.loadString(FileMgr.TYPE_MAIL, "fam");
                bool flag3 = text != "" && text != " ";
                if (flag3)
                {
                    string[] array = text.Split(this.sep2, StringSplitOptions.None);
                    try
                    {
                        string[] array2 = array;
                        for (int i = 0; i < array2.Length; i++)
                        {
                            string   text3  = array2[i];
                            string[] array3 = text3.Split(this.sep1, StringSplitOptions.None);
                            debug.Log(array3[0] + 22);
                            bool flag4 = array3[0] != "" && array3[0] != " ";
                            if (flag4)
                            {
                                bool flag5 = int.Parse(array3[6]) + 1296000 > this.timeSmp;
                                if (flag5)
                                {
                                    mailData mailData = new mailData();
                                    mailData.frmcid  = int.Parse(array3[0]);
                                    mailData.frmsex  = int.Parse(array3[1]);
                                    mailData.cid     = int.Parse(array3[2]);
                                    mailData.time    = array3[3];
                                    mailData.frmname = array3[4];
                                    mailData.msg     = array3[5];
                                    mailData.str     = text3 + "#)#&";
                                    bool flag6 = ModelBase <E_mailModel> .getInstance().personalMailDic.ContainsKey(mailData.frmcid);

                                    if (flag6)
                                    {
                                        ModelBase <E_mailModel> .getInstance().personalMailDic[mailData.frmcid].Add(mailData);
                                    }
                                    else
                                    {
                                        List <mailData> list = new List <mailData>();
                                        list.Add(mailData);
                                        ModelBase <E_mailModel> .getInstance().personalMailDic.Add(mailData.frmcid, list);
                                    }
                                    this.perLocalStr.Add(mailData);
                                }
                            }
                        }
                        this.saveLocalData(this.perLocalStr, 4);
                    }
                    catch (Exception var_15_26F)
                    {
                        FileMgr.saveString(FileMgr.TYPE_MAIL, "per", " ");
                        FileMgr.saveString(FileMgr.TYPE_MAIL, "fam", " ");
                    }
                }
                bool flag7 = text2 != "" && text2 != " ";
                if (flag7)
                {
                    string[] array4 = text2.Split(this.sep2, StringSplitOptions.None);
                    string[] array5 = array4;
                    for (int j = 0; j < array5.Length; j++)
                    {
                        string   text4  = array5[j];
                        string[] array6 = text4.Split(this.sep1, StringSplitOptions.None);
                        bool     flag8  = array6[0] != "" && array6[0] != " ";
                        if (flag8)
                        {
                            bool flag9 = int.Parse(array6[6]) + 1296000 > this.timeSmp;
                            if (flag9)
                            {
                                mailData mailData2 = new mailData();
                                mailData2.frmcid  = int.Parse(array6[0]);
                                mailData2.frmsex  = int.Parse(array6[1]);
                                mailData2.cid     = int.Parse(array6[2]);
                                mailData2.time    = array6[3];
                                mailData2.frmname = array6[4];
                                mailData2.msg     = array6[5];
                                mailData2.clanc   = int.Parse(array6[7]);
                                mailData2.str     = text4 + "#)#&";
                                this.familyMailDic.Add(mailData2);
                                this.famLocalStr.Add(mailData2);
                            }
                        }
                    }
                    this.saveLocalData(this.famLocalStr, 3);
                }
                UIClient.instance.addEventListener(9001u, new Action <GameEvent>(this.onEndLoadItem));
            }
        }