/// <summary> /// 게시물 처리후 중복된 게시물들 삭제한다. /// </summary> public void Clear_OverlapedPosts(NEWSTYPE newType) { //if (newType == NEWSTYPE.INVITE) { if (Dic_userPosts.Count > 0) { var overLpInvitePost = from post in Dic_userPosts where (post.Value.SndUserID == OverlapedPost.SndUserID) && (post.Value.PstPasIdx == 2) && (post.Value.PostIdx != OverlapedPost.PostIdx) // 발신자가 같고 pstIdx 초대형태(2) 이고 중복게시물과 인덱스같지않는것 select post; int num = overLpInvitePost.Count(); if (num <= 0) { set_refresh(); return; } int count = 0; foreach (var overLpPost in overLpInvitePost) // 중복된것들도 서버에서도 없어지게 프로토콜 쏘자 { if (count == num - 1) { webRequest.PostRecv(overLpPost.Value.PostIdx, (uint)overLpPost.Value.ctime.Month, false, set_refresh); } else { webRequest.PostRecv(overLpPost.Value.PostIdx, (uint)overLpPost.Value.ctime.Month, false, null); } count++; } } } }
// element 의 어느 토글키 소속인지 알도록 설정 void Set_ToggleType(NEWSTYPE _type) { if (_type == NEWSTYPE.INFORM || newsType == NEWSTYPE.REQUEST) { toggleType = NewsToggle_Type.NORMAL; } else if (_type == NEWSTYPE.SUPPLY) { toggleType = NewsToggle_Type.ATTACH; } }
void Set_NewsType(User_Posts _userPost) { if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinRquestMsg) { newsType = NEWSTYPE.REQUEST; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinInviteMsg) { newsType = NEWSTYPE.REQUEST; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.GiftFromOperator) { if (!string.IsNullOrEmpty(_userPost.PostTxt) && (_userPost.ItTp == ITEMTYPE.NONE)) { newsType = NEWSTYPE.INFORM; } else { newsType = NEWSTYPE.SUPPLY; } } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.GiftBonusFromInAppPurchase) { newsType = NEWSTYPE.SUPPLY; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinSucces) { newsType = NEWSTYPE.INFORM; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.CompleteRwdTutorial) { newsType = NEWSTYPE.SUPPLY; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.Monthly) { newsType = NEWSTYPE.SUPPLY; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.ClanKickMsg) { newsType = NEWSTYPE.INFORM; } else if (_userPost.PstPasIdx == (byte)PostIdx_TYPE.AttdReward) { newsType = NEWSTYPE.SUPPLY; } }
void Set_ButtonObj(NEWSTYPE newsType) { if (newsType == NEWSTYPE.INFORM) { Lst_ButtonObj[(int)newsButton_TYPE.Delete].SetActive(true); // 삭제버튼만 active } else if (newsType == NEWSTYPE.REQUEST) { Lst_ButtonObj[(int)newsButton_TYPE.Dedail].SetActive(true); // 정보 버튼만 active Lst_ButtonObj[(int)newsButton_TYPE.Accept].SetActive(true); // 수락 버튼만 active Lst_ButtonObj[(int)newsButton_TYPE.Delete].SetActive(true); // 삭제버튼만 active } else if (newsType == NEWSTYPE.SUPPLY) { Lst_ButtonObj[(int)newsButton_TYPE.Supply].SetActive(true); // 수령버튼만 active if (user_post.ItTp == ITEMTYPE.GEM) { text_supply.text = TextDataManager.Dic_TranslateText[37]; Image_supply.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}", DefineKey.Gem)); } else if (user_post.ItTp == ITEMTYPE.GOLD) { text_supply.text = TextDataManager.Dic_TranslateText[36]; Image_supply.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}", DefineKey.Gold)); } else if (user_post.ItTp == ITEMTYPE.ITEMBOX) { if (user_post.ItIdx == (uint)SUPPLYBOX_TYPE.BronzeSupply) { text_supply.text = TextDataManager.Dic_TranslateText[1001]; // 일반상자 } else if (user_post.ItIdx == (uint)SUPPLYBOX_TYPE.SilverSupply) { text_supply.text = TextDataManager.Dic_TranslateText[1002]; // 고급상자 } else if (user_post.ItIdx == (uint)SUPPLYBOX_TYPE.GoldSupply) { text_supply.text = TextDataManager.Dic_TranslateText[1003]; //최고급상자 } Image_supply.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.boxIcon, user_post.ItIdx)); } else if (user_post.ItTp == ITEMTYPE.UNIT) { if (TableDataManager.instance.Infos_units.ContainsKey(user_post.ItIdx)) { text_supply.text = TableDataManager.instance.Infos_units[user_post.ItIdx].UnitName; } Image_supply.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.boxIcon, 0)); } else if (user_post.ItTp == ITEMTYPE.EXP) { text_supply.text = TextDataManager.Dic_TranslateText[177]; Image_supply.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}", DefineKey.Exp)); } //선물일떄 element 본체에 버튼이벤트부여 button_Element.onClick.AddListener(ResponseButton_Gift); text_supplyItemNum.text = string.Format("x {0}", user_post.ItNum); Image_supply.SetNativeSize(); } }
public void Apply_element(NEWSTYPE _type) { //=====================우편물 if (user_post != null) { //메인 내용 if (!string.IsNullOrEmpty(user_post.PostTxt)) { if (user_post.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinInviteMsg) { text_newsMain.text = string.Format("{0} {1}", user_post.PostTxt, TextDataManager.Dic_TranslateText[182]); // ~클랜에 초대합니다 } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.GiftFromOperator) { text_newsMain.text = user_post.PostTxt; } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.ClanKickMsg) { if (user_post.PostTxt == "0") { text_newsMain.text = TextDataManager.Dic_TranslateText[288]; //게임초대 보상 } else { text_newsMain.text = string.Format(TextDataManager.Dic_TranslateText[288], user_post.PostTxt); //게임초대 보상 ~회 } } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.Monthly) { text_newsMain.text = string.Format("{0}{1}{2}, {3}{4}{5}", TableDataManager.instance.Infos_shops[301].SellItNum , TextDataManager.Dic_TranslateText[181], TextDataManager.Dic_TranslateText[307] , TextDataManager.Dic_TranslateText[176], user_post.PostTxt, TextDataManager.Dic_TranslateText[181]); //25일패키지 보상,남은기간 ~일 } } else { if (user_post.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinInviteMsg) { text_newsMain.text = TextDataManager.Dic_TranslateText[262]; } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinRquestMsg) { text_newsMain.text = string.Format("{0}", TextDataManager.Dic_TranslateText[205]); // ~클랜 가입을 요청합니다 } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.GiftFromOperator) { text_newsMain.text = TextDataManager.Dic_TranslateText[263]; } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.GiftBonusFromInAppPurchase) { text_newsMain.text = TextDataManager.Dic_TranslateText[264]; } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.ClanJoinSucces) { text_newsMain.text = string.Format("{0} {1}", user_post.SndNkNm, TextDataManager.Dic_TranslateText[183]); // ~클랜에 가입이 되었습니다 } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.CompleteRwdTutorial) { text_newsMain.text = TextDataManager.Dic_TranslateText[267]; } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.ClanKickMsg) { text_newsMain.text = string.Format(TextDataManager.Dic_TranslateText[204], user_post.SndNkNm); //~클랜에 강퇴되었습니다. } else if (user_post.PstPasIdx == (byte)PostIdx_TYPE.AttdReward) { text_newsMain.text = string.Format(TextDataManager.Dic_TranslateText[287]); //출석보상 } } //보낸사람 text_sender.text = user_post.SndNkNm.ToString(); // 남은 시간 if (newsType == NEWSTYPE.SUPPLY) //선물만 남은시간 표시 { RemainDay(user_post.ctime, user_post.ExpiryDay, text_remainday); } else { text_remainday.gameObject.SetActive(false); } //StartCoroutine(routine_RemainDay(user_post.ctime, text_remainday)); } //========================== notice else if (infos_notice != null) { //메인내용 text_newsMain.text = infos_notice.NotiText; //보낸사람 text_sender.text = infos_notice.NotiTitle; // 남은 시간 StartCoroutine(routine_RemainDay(infos_notice.Noticetime, text_remainday)); } //버튼 활성화 Set_ButtonObj(_type); }
void Set_NewsType(Infos_Notice _notice) { newsType = NEWSTYPE.INFORM; }