Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, December 20, 2018 |
| | | // [ Date ]: Thursday, December 27, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | |
| | | public int DanLV { get ; private set ; }
|
| | | public string Name { get ; private set; }
|
| | | public int DanType { get ; private set ; }
|
| | | public string IconKey { get ; private set; }
|
| | | public int LVUpScore { get ; private set ; }
|
| | | public string DanLVAwardList { get ; private set; }
|
| | |
| | |
|
| | | Name = rawContents[1].Trim();
|
| | |
|
| | | IconKey = rawContents[2].Trim();
|
| | | DanType=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | |
|
| | | LVUpScore=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | IconKey = rawContents[3].Trim();
|
| | |
|
| | | DanLVAwardList = rawContents[4].Trim();
|
| | | LVUpScore=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; |
| | |
|
| | | SeasonAwardList = rawContents[5].Trim(); |
| | | DanLVAwardList = rawContents[5].Trim();
|
| | | |
| | | SeasonAwardList = rawContents[6].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f10a2faba8659904ab5c13d1a770a7e2 |
| | | timeCreated: 1545293132 |
| | | timeCreated: 1545893867 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | {
|
| | | var arenaConfig = Config.Instance.Get<CrossServerArenaConfig>(playerInfo.DanLV);
|
| | | rankText.text = arenaConfig.Name;
|
| | | rankText.color = UIHelper.GetDanLVColor(playerInfo.DanLV);
|
| | | rankImg.SetSprite(arenaConfig.IconKey);
|
| | | }
|
| | |
|
| | |
| | | public Redpoint redPointStre1 = new Redpoint(21301, Redpoint_key1);
|
| | | private const int Redpoint_key2 = 2130103;//赛季奖励红点
|
| | | public Redpoint redPointStre2 = new Redpoint(21301, Redpoint_key2);
|
| | |
|
| | | private int MianOpenLV = 0;//跨服按钮开启条件
|
| | | public override void Init()
|
| | | {
|
| | | GetSeasonAward();
|
| | | GetSegmentReward();
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("CrossServerIcon").Numerical1;
|
| | | MianOpenLV = int.Parse(config);
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | crossServerModel.UpdatePkResultEvent += UpdatePkResultEvent;
|
| | | CrossServerOneVsOnePlayerInfo.Instance.UpdatePlayerInfoEvent += UpdatePlayerInfoEvent;
|
| | | RedPointSeg();
|
| | | RedPointSea();
|
| | | }
|
| | |
|
| | | |
| | |
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
| | | private void UpdatePlayerInfoEvent()
|
| | | {
|
| | | RedPointSeg();
|
| | | RedPointSea();
|
| | | }
|
| | |
|
| | | public bool IsShowCrossServerOneVsOne()//是否开启跨服按钮
|
| | | {
|
| | | bool Isbool = false;
|
| | | if (PlayerDatas.Instance.baseData.LV >= MianOpenLV && TimeUtility.OpenDay >= crossServerModel.afterOpenDayOpenCross)
|
| | | {
|
| | | Isbool = true;
|
| | | }
|
| | | return Isbool;
|
| | | }
|
| | |
|
| | | private void UpdatePkResultEvent()
|
| | | {
|
| | | if (GameNetSystem.Instance.crossServerConnected_Loigc)//副本结算界面
|
| | |
| | | CrossRealmPKAwardStateUpdate();
|
| | | }
|
| | | RedPointSeg();
|
| | | RedPointSea();
|
| | | }
|
| | |
|
| | | public bool IsAwardState(CrossRealmPKAwardStateEnum _cross, int Index)//是否已领取奖励
|
| | |
| | | bool Isbool = false;
|
| | | foreach (var key in SegmentRewardDic.Keys)
|
| | | {
|
| | | if (SegmentRewardDic[key].DanLv >= Danlv && !IsAwardState(CrossRealmPKAwardStateEnum.DanLVAwardState, SegmentRewardDic[key].DanLv))
|
| | | if (Danlv >= SegmentRewardDic[key].DanLv && !IsAwardState(CrossRealmPKAwardStateEnum.DanLVAwardState, SegmentRewardDic[key].DanLv))
|
| | | {
|
| | | Isbool = true;
|
| | | }
|
| | |
| | | redPointStre1.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | private void RedPointSea()//赛季奖励红点
|
| | | {
|
| | | bool Isbool = false;
|
| | | int Danlv = CrossServerOneVsOnePlayerInfo.Instance.DanLV;
|
| | | bool isbool = IsAwardState(CrossRealmPKAwardStateEnum.SeasonAwardState, -1);
|
| | | if (CrossServerOneVsOnePKSeason.Instance.SeasonState == 2 && !isbool)
|
| | | {
|
| | | if ((MyRank > -1 && MyRank < 100) || SeasonRewardConfigDic.ContainsKey(Danlv))
|
| | | {
|
| | | Isbool = true;
|
| | | }
|
| | | }
|
| | | if (Isbool)
|
| | | {
|
| | | redPointStre2.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | redPointStre2.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | int moneyType = 0;
|
| | | int require = 0;
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
|
| | | }
|
| | |
|
| | | private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
|
| | | {
|
| | | if (refreshType == PlayerDataRefresh.CDBPlayerRefresh_SoulCore
|
| | | || refreshType == PlayerDataRefresh.CDBPlayerRefresh_SoulDust
|
| | | || refreshType == PlayerDataRefresh.CDBPlayerRefresh_SoulSplinters)
|
| | | {
|
| | | if (this.moneyType != 0)
|
| | | {
|
| | | Display(moneyType, this.require);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void Display(int moneyType, int require = 0)
|
| | | {
|
| | | this.moneyType = moneyType;
|
| | |
| | | OSGiftModel osGiftModel { get { return ModelCenter.Instance.GetModel<OSGiftModel>(); } }
|
| | | LimitedTimePackageItemClassModel limitedTimePackageItemModel { get { return ModelCenter.Instance.GetModel<LimitedTimePackageItemClassModel>(); } }
|
| | | ImpactRankModel impactRankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | public void Init()
|
| | | {
|
| | | if (LatencyTimeList.Count <= 0)
|
| | |
| | | }
|
| | | else if (IndexOf == 2)
|
| | | {
|
| | | if (crossServerRewardModel.IsShowCrossServerOneVsOne())//跨服
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | | else//------第三层
|
| | | {
|
| | | SelectCaseRequest selectCaseRequest = new SelectCaseRequest();
|
| | | selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i);
|
| | | selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki;
|
| | | selectCaseRequest.Index = highBtnRecord.Index;
|
| | | AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 3)
|
| | | {
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//限时礼包
|
| | | {
|
| | | if (AnimationFadeOutDicLow.Count < 6)//------第二层
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 3)
|
| | | else if (IndexOf == 4)
|
| | | {
|
| | | bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4);
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时特惠
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 4)
|
| | | else if (IndexOf == 5)
|
| | | {
|
| | | bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(14);
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时抢购
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | else if (IndexOf == 5)
|
| | | else if (IndexOf == 6)
|
| | | {
|
| | | bool Isopen = impactRankModel.IsInImpactRank;
|
| | | if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//全民冲榜
|
| | |
| | | if (divisionConfig != null)
|
| | | {
|
| | | m_Division.text = divisionConfig.Name;
|
| | | m_Division.color = UIHelper.GetDanLVColor(history.division);
|
| | | }
|
| | | m_Score.gameObject.SetActive(true);
|
| | | m_Score.text = Language.Get("KingTreasureScore", model.GetSeasonScore(treasureId));
|
| | |
| | | {
|
| | | m_DivisionIcon.SetSprite(divisionConfig.IconKey);
|
| | | m_Division.text = divisionConfig.Name;
|
| | | m_Division.color = UIHelper.GetDanLVColor(history.division);
|
| | | }
|
| | | KingTreasureModel.Division division;
|
| | | if (kingTreasureModel.TryGetDivision(model.selectedTreasure, history.rewardLevel, out division))
|
| | |
| | | public static readonly Color s_LightYellow = new Color32(255, 244, 205, 255); //fff4cd
|
| | | public static readonly Color s_Gray = new Color32(204, 204, 204, 255);
|
| | |
|
| | | public static readonly Color s_BrightDanLV0 = new Color32(102,102,102,255); //666666
|
| | | public static readonly Color s_BrightDanLV1 = new Color32(148, 96, 255, 255); //9460ff
|
| | | public static readonly Color s_BrightDanLV2 = new Color32(0, 102, 255, 255); //0066ff
|
| | | public static readonly Color s_BrightDanLV3 = new Color32(0, 179, 55, 255); //00b337
|
| | | public static readonly Color s_BrightDanLV4 = new Color32(255, 102, 0, 255); //ff6600
|
| | | public static readonly Color s_BrightDanLV5 = new Color32(255, 0, 0, 255); //ff0000
|
| | | public static readonly Color s_BrightDanLV6 = new Color32(255, 0, 246, 255); //ff00f6
|
| | |
|
| | | public static readonly Color s_GrayDanLV0 = new Color32(221,221, 221, 255); //dddddd
|
| | | public static readonly Color s_GrayDanLV1 = new Color32(121,153, 255, 255); //7999ff
|
| | | public static readonly Color s_GrayDanLV2 = new Color32(0, 198, 255, 255); //00c6ff
|
| | | public static readonly Color s_GrayDanLV3 = new Color32(102, 255, 0, 255); //66ff00
|
| | | public static readonly Color s_GrayDanLV4 = new Color32(255, 144, 0, 255); //ff9000
|
| | | public static readonly Color s_GrayDanLV5 = new Color32(255, 0, 0, 255); //ff0000
|
| | | public static readonly Color s_GrayDanLV6 = new Color32(240, 0, 255, 255); //f000ff
|
| | |
|
| | | public static Color GetDanLVColor(int danLv,bool bright = false)
|
| | | {
|
| | | var crossDanLVConfig = Config.Instance.Get<CrossServerArenaConfig>(danLv);
|
| | | if(crossDanLVConfig != null)
|
| | | {
|
| | | switch (crossDanLVConfig.DanType)
|
| | | {
|
| | | case 0:
|
| | | return bright ? s_BrightDanLV0 : s_GrayDanLV0;
|
| | | case 1:
|
| | | return bright ? s_BrightDanLV1 : s_GrayDanLV1;
|
| | | case 2:
|
| | | return bright ? s_BrightDanLV2 : s_GrayDanLV2;
|
| | | case 3:
|
| | | return bright ? s_BrightDanLV3 : s_GrayDanLV3;
|
| | | case 4:
|
| | | return bright ? s_BrightDanLV4 : s_GrayDanLV4;
|
| | | case 5:
|
| | | return bright ? s_BrightDanLV5 : s_GrayDanLV5;
|
| | | case 6:
|
| | | return bright ? s_BrightDanLV6 : s_GrayDanLV6;
|
| | | }
|
| | | }
|
| | | return Color.white;
|
| | | }
|
| | |
|
| | | public static Color GetUIColor(int itemColor, bool bright = false)
|
| | | {
|
| | | switch (itemColor)
|
| | |
| | | }
|
| | | return bright ? s_BrightWhiteColor : s_DarkWhiteColor;
|
| | | }
|
| | |
|
| | | private static Regex m_TextColorRegex = new Regex("<color=#[0-9a-zA-Z]+>(.*)</color>", RegexOptions.Singleline);
|
| | |
|
| | | public static string AppendStringColor(TextColType type, string msg, bool bright = false)
|