Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | private void ExcuteBuildUI()
|
| | | {
|
| | | AssetSource.allFromEditor = true;
|
| | | CheckFontSwitch.CheckAndReplaceFontSwitch();
|
| | | //CheckFontSwitch.CheckAndReplaceFontSwitch();
|
| | | UpdateUIPrefabSetting.SetAllUIPrefabAssetBundleName();
|
| | | UpdateUIWindowSetting.SetAllUIWindowAssetBundleName();
|
| | | UpdateSpriteSetting.SetAllSpriteAssetBundleName();
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, September 03, 2018 |
| | | // [ Date ]: Thursday, September 20, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public string itemAward { get ; private set; }
|
| | | public int[] successList;
|
| | | public int treasureId { get ; private set ; }
|
| | | public int sort { get ; private set ; }
|
| | | public string Icon { get ; private set; }
|
| | | public string Name { get ; private set; }
|
| | | public string targetDescription { get ; private set; }
|
| | |
| | |
|
| | | treasureId=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0;
|
| | |
|
| | | Icon = rawContents[9].Trim();
|
| | | sort=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; |
| | |
|
| | | Name = rawContents[10].Trim();
|
| | | Icon = rawContents[10].Trim();
|
| | |
|
| | | targetDescription = rawContents[11].Trim();
|
| | | Name = rawContents[11].Trim();
|
| | |
|
| | | effectId=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | targetDescription = rawContents[12].Trim();
|
| | | |
| | | effectId=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 761a8477b6259554ab927daec347dba7 |
| | | timeCreated: 1535981375 |
| | | timeCreated: 1537429075 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public int pkState;//是否在pk中 175 1--进入状态 2--退出状态
|
| | | public int bossState;//Boss状态 176 1--进入状态 2--退出状态
|
| | | public int OnlyFinalHurt;
|
| | | public int forbidenTalk;
|
| | | public int NpcHurtAddPer;//对怪物伤害加成 188
|
| | | public int FunalHurtPer;//对怪物伤害加成 189
|
| | | } |
| | |
| | | case PlayerDataRefresh.FunalHurtPer:
|
| | | extersion.FunalHurtPer = (int)value;
|
| | | break;
|
| | | case PlayerDataRefresh.CDBPlayerRefresh_ForbidenTalk:
|
| | | extersion.forbidenTalk = (int)value;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | // A5 C4 神兽装备强化 #tagCMDogzEquipPlus
|
| | |
|
| | |
|
| | |
|
| | | public class CA5C4_tagCMDogzEquipPlus : GameNetPackBasic {
|
| | |
|
| | | public byte EquipIndex; //神兽装备背包中索引
|
| | |
|
| | | public byte IndexCount; //材料所在神兽物品背包索引的数量
|
| | |
|
| | | public byte[] IndexList; //材料所在神兽物品背包索引列表
|
| | |
|
| | | public uint[] IndexUseCountList; //材料所在神兽物品背包索引对应使用个数列表
|
| | | public byte IsDouble; //是否双倍强化
|
| | |
|
| | |
|
| | |
|
| | | public CA5C4_tagCMDogzEquipPlus () {
|
| | |
|
| | | combineCmd = (ushort)0x03FE;
|
| | |
|
| | | _cmd = (ushort)0xA5C4;
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public override void WriteToBytes () {
|
| | |
|
| | | WriteBytes (EquipIndex, NetDataType.BYTE);
|
| | |
|
| | | WriteBytes (IndexCount, NetDataType.BYTE);
|
| | |
|
| | | WriteBytes (IndexList, NetDataType.BYTE, IndexCount);
|
| | |
|
| | | WriteBytes (IndexUseCountList, NetDataType.DWORD, IndexCount);
|
| | | WriteBytes (IsDouble, NetDataType.BYTE);
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | |
| | | #!/bin/sh |
| | | # -*- coding: UTF-8 -*- |
| | | |
| | | if [ "$(grep -in '^[0-9]*[1-9][0-9]* .*' "$1")" == "" ] && [ "$(grep -in '^Merge .*' "$1")" == "" ] && [ "$(grep -in '^Revert .*' "$1")" == "" ]; then |
| | | if [ "$(grep -in '^[0-9]\{4,5\} .*' "$1")" == "" ] && [ "$(grep -in '^Merge .*' "$1")" == "" ] && [ "$(grep -in '^Revert .*' "$1")" == "" ]; then |
| | | echo 以下3种是正确的备注信息是: |
| | | echo 1. 12345 正常提交备注信息必须以数字单号开头。#数字单号后面带空格# |
| | | echo 1. 12345 正常提交备注信息必须以4到5位数字单号开头。#数字单号后面带空格# |
| | | echo 2. Merge 以Merge开头说明这是一次git合并操作,这是被允许的。#Merge后面带空格# |
| | | echo 3. Revert 以Revert开头说明这是一次git还原操作,这是被允许的。#Revert后面带空格# |
| | | exit 1 |
| | |
| | | var _funcCfg = Config.Instance.Get<FuncConfigConfig>("BugleItem");
|
| | | bugleItem = int.Parse(_funcCfg.Numerical1);
|
| | | chatChannels = new List<ChatInfoType>();
|
| | | for (int i = (int)ChatInfoType.System; i <= (int)ChatInfoType.Friend; i++)
|
| | | {
|
| | | chatChannels.Add((ChatInfoType)i);
|
| | | }
|
| | | chatChannels.Add(ChatInfoType.System);
|
| | | chatChannels.Add(ChatInfoType.World);
|
| | | chatChannels.Add(ChatInfoType.Area);
|
| | | chatChannels.Add(ChatInfoType.Invite);
|
| | | chatChannels.Add(ChatInfoType.Trumpet);
|
| | | chatChannels.Add(ChatInfoType.Friend);
|
| | | }
|
| | |
|
| | | public event Action<string, bool, bool> UpdateChatValueEvent;
|
| | |
| | | const string downloadUrl = "http://{0}.voice.2460web.com:53001/voice/download";
|
| | | private void SendSpeech(byte[] encode, long _tick)
|
| | | {
|
| | | if (IsChatBanned)
|
| | | {
|
| | | SaveSpeech((int)PlayerDatas.Instance.PlayerId, _tick, encode);
|
| | | return;
|
| | | }
|
| | | VoiceHttpRequest.Instance.Enqueue(encode, _tick, (int)PlayerDatas.Instance.PlayerId);
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | | openChatAfterCollect = false;
|
| | | if (!WindowCenter.Instance.CheckOpen<ChatWin>())
|
| | | if (!WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>(false, 2);
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 聊天黑名单
|
| | |
|
| | | public string SetChatExtra()
|
| | | {
|
| | | var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | return StringUtility.Contact(vipLevel.ToString().PadLeft(2, '0'), 0, job);
|
| | | }
|
| | |
|
| | | public void HandleChatBanned(ChatInfoType channel, string message, int toPlayer)
|
| | | {
|
| | | if (IsChatBanned)
|
| | | {
|
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var playerName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
|
| | | switch (channel)
|
| | | {
|
| | | case ChatInfoType.World:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0201_tagTalkGong()
|
| | | {
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | PlayerID = playerId,
|
| | | Name = playerName,
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Area:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0207_tagTalkArea()
|
| | | {
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | PlayerID = playerId,
|
| | | SrcName = playerName,
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Team:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0205_tagTalkDui()
|
| | | {
|
| | | PlayerID = playerId,
|
| | | Name = playerName,
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Fairy:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0203_tagTalkBang()
|
| | | {
|
| | | PlayerID = playerId,
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | Name = playerName,
|
| | | });
|
| | | break;
|
| | | case ChatInfoType.Friend:
|
| | | ChatCtrl.Inst.RevChatInfo(new H0206_tagTalkMi()
|
| | | {
|
| | | PlayerID = playerId,
|
| | | SrcName = playerName,
|
| | | Content = message,
|
| | | Extras = SetChatExtra(),
|
| | | ToPlayerID = (uint)toPlayer,
|
| | | ToName = string.Empty,
|
| | | TalkType = 1,
|
| | | });
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsChatBanned
|
| | | {
|
| | | get
|
| | | {
|
| | | var value = PlayerDatas.Instance.extersion.forbidenTalk;
|
| | | var serverBanned = value == 1;
|
| | | return serverBanned;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | if (chatCenter.IsChatBanned)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var channelName = string.Empty;
|
| | | switch (chatType)
|
| | | {
|
| | |
| | |
|
| | | public void SendChatInfo(ChatInfoType type, string msg, ChatExtraData? info = null)
|
| | | {
|
| | | bool _dirty = false;
|
| | | bool isDirty = false;
|
| | | bool isVoice = ChatCenter.s_VoiceRegex.IsMatch(msg);
|
| | |
|
| | | if (CheckEmptyChat(msg))
|
| | | {
|
| | |
| | |
|
| | | ChatReport(type, msg, PteChatName);
|
| | |
|
| | | if (!ChatCenter.s_VoiceRegex.IsMatch(msg)
|
| | | && !InviteRegex.IsMatch(msg))
|
| | | if (!isVoice && !InviteRegex.IsMatch(msg))
|
| | | {
|
| | | _dirty = DirtyWordConfig.IsDirtWord(msg);
|
| | | isDirty = DirtyWordConfig.IsDirtWord(msg);
|
| | | msg = DirtyWordConfig.IsDirtWord(msg, '*');
|
| | | var length = msg.Length;
|
| | | if (length > CHAT_INFO_CNT)
|
| | |
| | | if (ok)
|
| | | {
|
| | | ChatCenter.RecentlyChat _recentlyChat = null;
|
| | | if (!_dirty)
|
| | | if (!isDirty && !isVoice)
|
| | | {
|
| | | _recentlyChat = chatCenter.SaveRecentlyChat(result);
|
| | | }
|
| | | msg = CheckHasItem(result, _recentlyChat);
|
| | | chatCenter.recentlyChat = null;
|
| | |
|
| | | if (chatCenter.IsChatBanned)
|
| | | {
|
| | | var toPlayer = PteChatID;
|
| | | if (info.HasValue && info.Value.infoint1 == 0)
|
| | | {
|
| | | toPlayer = info.Value.infoint1;
|
| | | }
|
| | | chatCenter.HandleChatBanned(type, msg, toPlayer);
|
| | | return;
|
| | | }
|
| | |
|
| | | switch (type)
|
| | | {
|
| | | case ChatInfoType.World:
|
| | |
| | | _pak.Text = msg;
|
| | | GameNetSystem.Instance.SendInfo(_pak);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case ChatInfoType.Invite:
|
| | | {
|
| | | SendInvite(msg);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | ItemConfig cfg = Config.Instance.Get<ItemConfig>(itemID);
|
| | | if (cfg != null)
|
| | | {
|
| | | string append = string.Format("<a><Word info=item id={1} userdata={5} chatsend=1/>|showitem={1} isbind={2} itemcnt={3} stone={4} userdata={5} suitLv={6} suitCnt={7} place={8} equipwash={9}</a>",
|
| | | cfg.ItemColor, strarray[0], strarray[1], strarray[2], strarray[3], strarray[4], strarray[5], strarray[6], strarray[7], strarray[8]);
|
| | | try
|
| | | {
|
| | | string append = string.Format("<a><Word info=item id={0} userdata={4} chatsend=1/>|showitem={0} isbind={1} itemcnt={2} stone={3} userdata={4} suitLv={5} suitCnt={6} place={7} equipwash={8}</a>",
|
| | | strarray[0], strarray[1], strarray[2], strarray[3], strarray[4], strarray[5], strarray[6], strarray[7], strarray[8]);
|
| | | append = UIHelper.GetTextColorByItemColor(cfg.ItemColor, append);
|
| | | data.richText.Append(append);
|
| | | }
|
| | | catch (Exception e)
|
| | | {
|
| | | data.richText.Append(cfg.ItemName);
|
| | | DebugEx.Log(e.Message);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | SinglePackModel singlePack = _packModel.GetSinglePackModel(PackType.rptItem);
|
| | | if (ChatCtrl.Inst.presentChatType == ChatInfoType.Trumpet)
|
| | | {
|
| | | if (chatCenter.IsChatBanned)
|
| | | {
|
| | | return;
|
| | | }
|
| | | List<ItemModel> _list = null;
|
| | | var _count = singlePack.GetItemCountByID(chatCenter.bugleItem, out _list);
|
| | | if (_count < 1)
|
| | |
| | |
|
| | | private void OnChatClick()
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>())
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | if (mapId == 31230)
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>(false, 2);
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | }
|
| | |
| | |
|
| | | void OnChatDataClick(ChatData data)
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>())
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | }
|
| | | switch (ChatCtrl.Inst.presentChatType)
|
| | | {
|
| | | case ChatInfoType.Team:
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>(false, 1);
|
| | | break;
|
| | | case ChatInfoType.Fairy:
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>(false, 2);
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | void OnRefreshChatTip(ChatInfoType type)
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, September 19, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class FairyChatWin : Window
|
| | | {
|
| | | [SerializeField] ChatSendComponent m_ChatSend;
|
| | | [SerializeField] ChatContentBehaviour m_ChatContent;
|
| | | [SerializeField] RectTransform m_ContainerNoFairy;
|
| | | [SerializeField] Button m_JoinFairy;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_JoinFairy.AddListener(JoinFairy);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | WindowCenter.Instance.windowBeforeOpenEvent += WindowBeforeOpenEvent;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += MyFairyRefresh;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine += MyFairyRefresh;
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | m_ChatContent.chatType = ChatInfoType.Fairy;
|
| | | MyFairyRefresh();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | var parent = WindowCenter.Instance.Get<SocialWin>();
|
| | | if (parent != null)
|
| | | {
|
| | | m_ChatSend.parent = parent;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= MyFairyRefresh;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyMine -= MyFairyRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | | private void JoinFairy()
|
| | | {
|
| | | int limit = Config.Instance.Get<FuncOpenLVConfig>((int)FuncOpenEnum.Fairy).LimitLV;
|
| | | if (PlayerDatas.Instance.baseData.LV < limit)
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("L1136", limit));
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.CloseImmediately<SocialWin>();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionFunc3);
|
| | | }
|
| | |
|
| | | void MyFairyRefresh()
|
| | | {
|
| | | m_ContainerNoFairy.gameObject.SetActive(!PlayerDatas.Instance.fairyData.HasFairy);
|
| | | m_ChatSend.gameObject.SetActive(PlayerDatas.Instance.fairyData.HasFairy);
|
| | | }
|
| | |
|
| | | private void WindowBeforeOpenEvent(Window win)
|
| | | {
|
| | | if (win is SocialWin)
|
| | | {
|
| | | m_ChatSend.parent = win;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e5cba53e40a60a847b072488a5a85b29 |
| | | timeCreated: 1537325731 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, September 19, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | |
|
| | | public class TeamChatWin : Window
|
| | | {
|
| | | [SerializeField] ChatSendComponent m_ChatSend;
|
| | | [SerializeField] ChatContentBehaviour m_ChatContent;
|
| | | [SerializeField] RectTransform m_NoTeamContainer;
|
| | | TeamModel team { get { return ModelCenter.Instance.GetModel<TeamModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | WindowCenter.Instance.windowBeforeOpenEvent += WindowBeforeOpenEvent;
|
| | | team.myTeamRefreshEvent += MyTeamRefresh;
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Team;
|
| | | m_ChatContent.chatType = ChatInfoType.Team;
|
| | | MyTeamRefresh();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | var parent = WindowCenter.Instance.Get<SocialWin>();
|
| | | if (parent != null)
|
| | | {
|
| | | m_ChatSend.parent = parent;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | WindowCenter.Instance.windowBeforeOpenEvent -= WindowBeforeOpenEvent;
|
| | | team.myTeamRefreshEvent -= MyTeamRefresh;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | | private void WindowBeforeOpenEvent(Window win)
|
| | | {
|
| | | if(win is SocialWin)
|
| | | {
|
| | | m_ChatSend.parent = win;
|
| | | }
|
| | | }
|
| | |
|
| | | private void MyTeamRefresh()
|
| | | {
|
| | | m_ChatSend.gameObject.SetActive(team.myTeam.inTeam);
|
| | | m_NoTeamContainer.gameObject.SetActive(!team.myTeam.inTeam);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e3087f05daf1a3245ac52b7732703971 |
| | | timeCreated: 1537322992 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | UIEventTrigger.Get(helpBtn.gameObject).OnUp = OnDownUp;
|
| | | successRate = 0;
|
| | | firstTypeDict = composeWinModel.GetFirstTypeModel((int)ComposeFuncType.Equip);
|
| | | CreateCell();
|
| | | if(curSecondType == 0)
|
| | | |
| | | bool isJumpTo = false;
|
| | | if (composeWinModel.secondType != 0)
|
| | | {
|
| | | RefreshUI(null);
|
| | | isJumpTo = true;
|
| | | curSecondType = composeWinModel.secondType;
|
| | | curThirdType = composeWinModel.thirdType;
|
| | | secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Equip, composeWinModel.secondType);
|
| | | OnClickSecondType(curSecondType,curThirdType);
|
| | | composeWinModel.ResetJumpToModel();
|
| | | }
|
| | |
|
| | | CreateCell();
|
| | | if (compoundModel != null)
|
| | | {
|
| | | RefreshUI(compoundModel);
|
| | | if (isJumpTo)
|
| | | {
|
| | | isJumpTo = false;
|
| | | if (!composeWinModel.IsEnoughFixedMat(compoundModel) || !composeWinModel.IsEnoughUnfixedMat(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
|
| | | }
|
| | | else if (!composeWinModel.IsEnoughMoney(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Z1011"));
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | RefreshUI(null);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (secondTypeDict != null)
|
| | | {
|
| | | if (secondTypeDict.Count >= 1 && curSecondType != 0
|
| | | && curThirdType == 1)
|
| | | && curThirdType >= 1)
|
| | | {
|
| | | int remain = curSecondType - firstTypeDict.Count;
|
| | | if(remain > 0)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickSecondType(int secondType)
|
| | | private void OnClickSecondType(int secondType,int _thirdType = 0)
|
| | | {
|
| | | curSecondType = secondType;
|
| | | secondTypeDict = composeWinModel.GetSecondTypeModel((int)ComposeFuncType.Equip, curSecondType);
|
| | |
|
| | | if(_thirdType == 0)
|
| | | {
|
| | | foreach (var thirdType in secondTypeDict.Keys)
|
| | | {
|
| | | if (thirdType != 0)
|
| | | {
|
| | |
|
| | | if (preSecondType == curSecondType)
|
| | | {
|
| | | curSecondType = 0;
|
| | |
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | curThirdType = _thirdType;
|
| | | }
|
| | |
|
| | | if (preSecondType != curSecondType)
|
| | | {
|
| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | | ComposeModel.ResetModel();
|
| | | if(WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | if(ComposeModel.CurComposeModel != null)
|
| | | {
|
| | | ComposeModel.SetJumpToModel((ComposeFuncType)ComposeModel.CurComposeModel.firstType,
|
| | | ComposeModel.CurComposeModel.secondType, ComposeModel.CurComposeModel.thirdType);
|
| | | switch ((ComposeFuncType)ComposeModel.CurComposeModel.firstType)
|
| | | {
|
| | | case ComposeFuncType.Wings:
|
| | | functionOrder = _wingsUITitleType.order;
|
| | | break;
|
| | | case ComposeFuncType.Ticket:
|
| | | functionOrder = _ticketUITitleType.order;
|
| | | break;
|
| | | case ComposeFuncType.Fairy:
|
| | | functionOrder = _godequipUITitleType.order;
|
| | | break;
|
| | | case ComposeFuncType.Equip:
|
| | | functionOrder = _equipUITitleType.order;
|
| | | break;
|
| | | case ComposeFuncType.Item:
|
| | | functionOrder = _itemUITitleType.order;
|
| | | break;
|
| | | case ComposeFuncType.MountDogz:
|
| | | functionOrder = _dogzEquipFunc.order;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | ComposeModel.ResetJumpToModel();
|
| | | selectModel.ClearSelectModel();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool CheckIsComposeByType(int firstType,int secondType,int thirdType)
|
| | | {
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(firstType,secondType,thirdType)[0];
|
| | | if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TicketComposeUnlock", itemCompound.levelNeed, itemCompound.secondTypeName);
|
| | | return false;
|
| | | }
|
| | | }
|
| | |
|
| | | public int secondType { get; private set; }
|
| | | public int thirdType { get; private set;}
|
| | | public void SetJumpToModel(ComposeFuncType type,int secondType,int thirdType)
|
| | |
| | | public class DogzCell : ScrollerUI
|
| | | {
|
| | | [SerializeField] Image m_DogzIcon;
|
| | | [SerializeField] RectTransform m_DogzIconRect;
|
| | | [SerializeField] Image m_DogzAssist;
|
| | | [SerializeField] Text m_DogzName;
|
| | | [SerializeField] Text m_DogzGrade;
|
| | |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DogzModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | public override void Refresh(CellView cell)
|
| | | {
|
| | | var _dogzCfg = Config.Instance.Get<DogzConfig>(cell.index);
|
| | | m_DogzIcon.SetSprite(_dogzCfg.HeadIcon);
|
| | | m_DogzIcon.SetNativeSize();
|
| | | m_DogzIconRect.sizeDelta = new Vector2(m_DogzIconRect.sizeDelta.x/2,m_DogzIconRect.sizeDelta.y/2);
|
| | | var _dogzEquips = model.GetDogzEquips(_dogzCfg.ID);
|
| | | bool isActive = (_dogzEquips == null || _dogzEquips.Count < 5) ? false : true;
|
| | | m_DogzName.text = _dogzCfg.Name;
|
| | |
| | | if (isActive)
|
| | | {
|
| | | m_DogzIcon.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | m_DogzName.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | m_DogzGrade.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | m_DogzName.color = UIHelper.s_NavyBrown;
|
| | | m_DogzGrade.color = UIHelper.s_BrightOrangeColor;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DogzIcon.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | m_DogzName.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | m_DogzGrade.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | m_DogzName.color = UIHelper.s_BrightWhiteColor;
|
| | | m_DogzGrade.color = UIHelper.s_BrightWhiteColor;
|
| | | }
|
| | | m_DogzBtn.image.color = model.presentSelectDogz == _dogzCfg.ID ? Color.blue : Color.white;
|
| | | m_DogzBtn.image.SetSprite(model.presentSelectDogz == _dogzCfg.ID ? "Title_RightWindow" : "Title_PopupWindow");
|
| | | m_DogzAssist.gameObject.SetActive(model.TryGetAssistDogzState(_dogzCfg.ID));
|
| | | m_DogzBtn.onClick.RemoveAllListeners();
|
| | | m_DogzBtn.onClick.AddListener(() =>
|
| | |
| | | GameNetSystem.Instance.SendInfo(buyCnt);
|
| | | }
|
| | |
|
| | | public void SendDogzEquipStrength(int index,List<int>indexlist,int isDouble)
|
| | | public void SendDogzEquipStrength(int index,List<int>indexlist,List<int> IndexUseCountList, int isDouble)
|
| | | {
|
| | | CA5C4_tagCMDogzEquipPlus dogzStren = new CA5C4_tagCMDogzEquipPlus();
|
| | | dogzStren.EquipIndex = (byte)index;
|
| | | dogzStren.IndexCount = (byte)indexlist.Count;
|
| | | byte[] indexByte = new byte[indexlist.Count];
|
| | | uint[] indexUseCountList = new uint[indexlist.Count];
|
| | | for(int i = 0; i < indexByte.Length; i++)
|
| | | {
|
| | | indexByte[i] = (byte)indexlist[i];
|
| | | }
|
| | | for (int i = 0; i < indexUseCountList.Length; i++)
|
| | | {
|
| | | indexUseCountList[i] = (uint)IndexUseCountList[i];
|
| | | }
|
| | | dogzStren.IndexUseCountList = indexUseCountList;
|
| | | dogzStren.IndexList = indexByte;
|
| | | dogzStren.IsDouble = (byte)isDouble;
|
| | | GameNetSystem.Instance.SendInfo(dogzStren);
|
| | |
| | | public bool IsReachSelectCondi(int itemId)
|
| | | {
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (itemConfig == null) return false;
|
| | | if (itemConfig == null || itemConfig.EquipPlace == 0) return false;
|
| | |
|
| | | if (SelectDogzItemQuality == 0 && SelectDogzItemStart == 0) return true;
|
| | |
|
| | |
| | | private void OnOpenFuncEvent(int order)
|
| | | {
|
| | | funcBtnGroup.TriggerByOrder(order);
|
| | | if(WindowCenter.Instance.CheckOpen<DogzPackWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<DogzPackWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnDogzStrengthen()
|
| | |
| | |
|
| | | ItemModel model = dogzModel.selectEquipPlacelist[cell.index];
|
| | | nameTex.text = model.chinItemModel.ItemName;
|
| | | nameTex.color = UIHelper.GetUIColor(model.chinItemModel.ItemColor);
|
| | | nameTex.color = UIHelper.GetUIColor(model.chinItemModel.ItemColor,true);
|
| | | itemBaisc.Init(model);
|
| | | int strenLv = 0;
|
| | | if (model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
|
| | |
| | | page = 0;
|
| | | OnSearchPageList();
|
| | | AddFairyRed = LocalSave.GetBool(StringUtility.Contact(FairyKey, PlayerDatas.Instance.PlayerId));
|
| | | UpdateFairyInfo();
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | [SerializeField] Toggle _Togle_13;//十三阶
|
| | | [SerializeField] Toggle _Togle_14;//十四阶
|
| | | [SerializeField] Toggle _Togle_15;//十五阶
|
| | | [SerializeField] Toggle m_Toggle_Start;
|
| | |
|
| | | [SerializeField] Text _CountText;//获取当前的积分值
|
| | | [SerializeField] GameObject _Dropdown2;//阶数界面
|
| | |
| | | QueryFamilyAction();//家族行为信息查询
|
| | | _Dropdown.SetActive(false);
|
| | | _Dropdown2.SetActive(false);
|
| | | m_Toggle_Start.gameObject.SetActive(false);
|
| | | _ExitBtn.gameObject.SetActive(false);
|
| | | _DeleteBtn.gameObject.SetActive(false);
|
| | | _DonateBtn.gameObject.SetActive(true);
|
| | |
| | | _Togle_13.onValueChanged.AddListener(delegate (bool _bool) { Togle_13(_bool); });
|
| | | _Togle_14.onValueChanged.AddListener(delegate (bool _bool) { Togle_14(_bool); });
|
| | | _Togle_15.onValueChanged.AddListener(delegate (bool _bool) { Togle_15(_bool); });
|
| | | m_Toggle_Start.onValueChanged.AddListener(ToggleStar);
|
| | | }
|
| | |
|
| | | void CloseButton()//关闭按钮
|
| | |
| | | {
|
| | | ScrollViewFirst.SetActive(false);
|
| | | ScrollViewSecond.SetActive(false);
|
| | | m_Toggle_Start.gameObject.SetActive(true);
|
| | | _ExitBtn.gameObject.SetActive(false);
|
| | | _CleanBtn.gameObject.SetActive(false);
|
| | | _Dropdown.SetActive(true);
|
| | |
| | | _WarehouseCountBG.SetActive(true);
|
| | | _Dropdown.SetActive(false);
|
| | | _Dropdown2.SetActive(false);
|
| | | m_Toggle_Start.gameObject.SetActive(false);
|
| | | _ExitBtn.gameObject.SetActive(false);
|
| | | _DeleteBtn.gameObject.SetActive(false);
|
| | | _bool = false;
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void ToggleStar(bool isBool)
|
| | | {
|
| | | SelectiveCleaningEquipment();//选择销毁
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | Item_lv = type_B;
|
| | | Item_Color = type_A;
|
| | | _EquipmentArray.Clear();
|
| | | if (m_Toggle_Start.isOn)
|
| | | {
|
| | | foreach (int key in playerFairyAuTreasureData._DicfamilyStoreItem.Keys)
|
| | | {
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(playerFairyAuTreasureData._DicfamilyStoreItem[key].ItemID);
|
| | | if ((Item_lv >= itemConfig.LV && Item_Color >= itemConfig.ItemColor && playerFairyAuTreasureData._DicfamilyStoreItem[key].Index != 0))
|
| | | if ((Item_lv >= itemConfig.LV && Item_Color >= itemConfig.ItemColor && playerFairyAuTreasureData._DicfamilyStoreItem[key].Index != 0 && itemConfig.StarLevel <= 1))
|
| | | {
|
| | | _EquipmentArray.Add(playerFairyAuTreasureData._DicfamilyStoreItem[key].Index, true);
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | foreach (int key in playerFairyAuTreasureData._DicfamilyStoreItem.Keys)
|
| | | {
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(playerFairyAuTreasureData._DicfamilyStoreItem[key].ItemID);
|
| | | if ((Item_lv >= itemConfig.LV && Item_Color >= itemConfig.ItemColor && playerFairyAuTreasureData._DicfamilyStoreItem[key].Index != 0 && itemConfig.StarLevel<=0))
|
| | | {
|
| | | _EquipmentArray.Add(playerFairyAuTreasureData._DicfamilyStoreItem[key].Index, true);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | _GridlineCtrl.m_Scorller.RefreshActiveCellViews();//刷新当前可见
|
| | | }
|
| | | int Color_T()//返回值1
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | personalRedpoint.count = own / ticketItem.count;
|
| | | personalRedpoint.count = Mathf.Clamp(own / ticketItem.count, 0, totalTimes - enterTimes);
|
| | | personalRedpoint.state = RedPointState.Quantity;
|
| | |
|
| | | }
|
| | |
|
| | | private void ParseConfig()
|
| | |
| | | else
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Friend;
|
| | | if (WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | {
|
| | | WindowJumpMgr.Instance.ClearJumpData();
|
| | | WindowCenter.Instance.CloseImmediately<SocialWin>();
|
| | | }
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | }
|
| | | }
|
| | |
| | | public class SocialWin : Window |
| | | { |
| | | [SerializeField] FunctionButton xianyuanBtn; |
| | | [SerializeField] FunctionButton m_TeamChat;
|
| | | [SerializeField] FunctionButton m_FairyChat;
|
| | | [SerializeField] FunctionButtonGroup btnGroup; |
| | | [SerializeField] Button closeBtn; |
| | | [SerializeField] GameObject friendTipsObj; |
| | |
| | | { |
| | | closeBtn.AddListener(CloseClick); |
| | | xianyuanBtn.AddListener(ClickXianYuanBtn); |
| | | m_TeamChat.AddListener(TeamChat);
|
| | | m_FairyChat.AddListener(FairyChat);
|
| | | } |
| | |
|
| | | protected override void OnPreOpen() |
| | | { |
| | | m_ChatSend.parent = this; |
| | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | |
| | | CloseChild();
|
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | |
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | } |
| | | |
| | | private void ClickXianYuanBtn() |
| | | { |
| | | CloseChild();
|
| | | friendTipsObj.SetActive(true); |
| | | functionOrder = xianyuanBtn.order; |
| | | } |
| | |
|
| | | private void TeamChat()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<TeamChatWin>();
|
| | | functionOrder = m_TeamChat.order;
|
| | | }
|
| | |
|
| | | private void FairyChat()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<FairyChatWin>();
|
| | | functionOrder = m_FairyChat.order;
|
| | | }
|
| | |
|
| | | void CloseChild()
|
| | | {
|
| | | friendTipsObj.SetActive(false);
|
| | | WindowCenter.Instance.CloseImmediately<TeamChatWin>();
|
| | | WindowCenter.Instance.CloseImmediately<FairyChatWin>();
|
| | | }
|
| | | } |
| | | } |
| | |
| | | [SerializeField] float maxTimeInter = 0.6f;
|
| | | [Header("最小时间间隔")]
|
| | | [SerializeField] float minTimeInter = 0.005f;
|
| | |
|
| | | [Header("闪烁次数")]
|
| | | [SerializeField] public int flashingTimes = 10;
|
| | | [Header("单次闪烁时间")]
|
| | | [SerializeField] public float flashingTime = 0.2f;
|
| | | [Header("得到物品停留时间")]
|
| | | [SerializeField] float stopTime = 2f;
|
| | | [Header("寻宝得到物品动画时间")]
|
| | |
| | | {
|
| | | if (cycle > cycleTimes)
|
| | | {
|
| | | for (int i = 0; i < xbItemlist.Count; i++)
|
| | | {
|
| | | xbItemlist[i].CheckToFlashing(1,curSelectIndex);
|
| | | }
|
| | | for (int i = 0; i < xbItemlist.Count; i++)
|
| | | {
|
| | | xbItemlist[i].RefreshSelectIcon(curSelectIndex);
|
| | | }
|
| | | if (isXBMany)
|
| | | {
|
| | | if (targetIndex >= targetIndexs.Count - 1)
|
| | |
| | |
|
| | | IEnumerator PlaySelectItemAni(bool isEndXB,int targetIndex = 0,int curSelectIndex = 0)
|
| | | {
|
| | | XBGetItemConfig getItemConfig = XBModel.GetXBItemConfigByType(1);
|
| | | if(getItemConfig != null && getItemConfig.LuckyGridNum == curSelectIndex)
|
| | | {
|
| | | yield return new WaitForSeconds(flashingTime*flashingTimes);
|
| | | }
|
| | | else
|
| | | {
|
| | | yield return new WaitForSeconds(stopTime);
|
| | | }
|
| | | |
| | | if(isEndXB)
|
| | | {
|
| | | if(targetIndexs.Count > 1)
|
| | |
| | | return dict;
|
| | | }
|
| | |
|
| | | public XBGetItemConfig GetXBItemConfigByType(int type)
|
| | | {
|
| | | int lv = 0;
|
| | | List<XBGetItemConfig> configlist = null;
|
| | | xbTypeItemDict.TryGetValue(type, out configlist);
|
| | | if (configlist != null)
|
| | | {
|
| | | for (int i = configlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= configlist[i].MinLV)
|
| | | {
|
| | | lv = configlist[i].MinLV;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | XBGetItemConfig xbItemConfig = null;
|
| | | string key = StringUtility.Contact(type, lv);
|
| | | xbGetItemDict.TryGetValue(key,out xbItemConfig);
|
| | | return xbItemConfig;
|
| | | }
|
| | |
|
| | | #region 处理服务端数据
|
| | | public event Action RefreshXBTypeInfoAct;
|
| | | public event Action RefreshXBResultAct;
|
| | |
| | | [SerializeField] float maxTimeInter = 0.6f;
|
| | | [Header("最小时间间隔")]
|
| | | [SerializeField] float minTimeInter = 0.005f;
|
| | | [Header("闪烁次数")]
|
| | | [SerializeField] public int flashingTimes = 10;
|
| | | [Header("单次闪烁时间")]
|
| | | [SerializeField] public float flashingTime = 0.2f;
|
| | |
|
| | | [Header("得到物品停留时间")]
|
| | | [SerializeField] float stopTime = 0.5f;
|
| | | [Header("寻宝得到物品动画时间")]
|
| | |
| | | {
|
| | | if (cycle > cycleTimes)
|
| | | {
|
| | | for (int i = 0; i < xbItemlist.Count; i++)
|
| | | {
|
| | | xbItemlist[i].CheckToFlashing(2, curSelectIndex);
|
| | | }
|
| | |
|
| | | if (isXBMany)
|
| | | {
|
| | | if (targetIndex >= targetIndexs.Count - 1)
|
| | |
| | |
|
| | | IEnumerator PlaySelectItemAni(bool isEndXB, int targetIndex = 0, int curSelectIndex = 0)
|
| | | {
|
| | | XBGetItemConfig getItemConfig = XBModel.GetXBItemConfigByType(2);
|
| | | if (getItemConfig != null && getItemConfig.LuckyGridNum == curSelectIndex)
|
| | | {
|
| | | yield return new WaitForSeconds(flashingTime * flashingTimes);
|
| | | }
|
| | | else
|
| | | {
|
| | | yield return new WaitForSeconds(stopTime);
|
| | | }
|
| | |
|
| | | if (isEndXB)
|
| | | {
|
| | | if (targetIndexs.Count > 1)
|
| | |
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System.Collections.Generic;
|
| | | using System.Collections;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | [SerializeField] Text nameText;
|
| | |
|
| | | ItemTipsModel itemTips { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | HappyXBModel XBModel { get { return ModelCenter.Instance.GetModel<HappyXBModel>(); } }
|
| | | int xbIndex = 0;
|
| | |
|
| | | public void SetModel(int itemId,int count,int index)
|
| | |
| | | selectIcon.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | public void CheckToFlashing(int xbType, int curSelect)
|
| | | {
|
| | | if (curSelect != xbIndex) return;
|
| | |
|
| | | XBGetItemConfig xbItemConfig = XBModel.GetXBItemConfigByType(xbType);
|
| | | if (xbItemConfig == null || xbItemConfig.LuckyGridNum != xbIndex) return;
|
| | | StartCoroutine(BestItemFlashing(xbType));
|
| | | }
|
| | |
|
| | | IEnumerator BestItemFlashing(int xbType)
|
| | | {
|
| | | int num = 0;
|
| | | BestXBWin bestXB = null;
|
| | | RuneXBWin runeXB = null;
|
| | | switch (xbType)
|
| | | {
|
| | | case 1:
|
| | | bestXB = WindowCenter.Instance.Get<BestXBWin>();
|
| | | break;
|
| | | case 2:
|
| | | runeXB = WindowCenter.Instance.Get<RuneXBWin>();
|
| | | break;
|
| | | }
|
| | | int flashingTimes = 0;
|
| | | float flashingTime = 0;
|
| | | if(bestXB != null)
|
| | | {
|
| | | flashingTimes = bestXB.flashingTimes;
|
| | | flashingTime = bestXB.flashingTime;
|
| | | }
|
| | | else if(runeXB != null)
|
| | | {
|
| | | flashingTimes = runeXB.flashingTimes;
|
| | | flashingTime = runeXB.flashingTime;
|
| | | }
|
| | |
|
| | | while (true)
|
| | | {
|
| | | selectIcon.SetActive(!selectIcon.activeInHierarchy);
|
| | | num += 1;
|
| | | if (num >= flashingTimes)
|
| | | {
|
| | | break;
|
| | | }
|
| | | yield return new WaitForSeconds(flashingTime);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | useDataDict = ConfigParse.Analysis(info.UserData);
|
| | | this.equipScore = modelInterface.SetEquipScore(packType,itemInfo.ItemID,useDataDict);
|
| | | DebugEx.Log("Pack:" + packType + "ID:" + info.ItemID + "GUID:" + info.ItemGUID);
|
| | | if(GetUseDataModel((int)ItemUseDataKey.Def_IudetItemCount) != null)
|
| | | {
|
| | | itemInfo.ItemCount = GetUseDataModel((int)ItemUseDataKey.Def_IudetItemCount)[0];
|
| | | }
|
| | | List<int> itemEffectTime = GetUseDataModel((int)ItemUseDataKey.Def_IudetCreateTime);
|
| | | if(itemEffectTime != null && itemEffectTime[0] != 0 && chinItemModel.ExpireTime > 0)
|
| | | {
|
| | | DebugEx.Log("创建时间:" + itemEffectTime[0]);
|
| | | //System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1)); // 当地时区
|
| | | //DateTime dt = startTime.AddSeconds(itemEffectTime[0]);
|
| | | //DesignDebug.Log("创建DataTime:" + dt);
|
| | |
|
| | | switch ((EquipReduceType)chinItemModel.EndureReduceType)
|
| | | {
|
| | | case EquipReduceType.Def_EquipReduceType_None:
|
| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using LitJson;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | |
| | | {
|
| | | public class ItemOverdueModel : Model,IBeforePlayerDataInitialize,IPlayerLoginOk, ISwitchAccount
|
| | | {
|
| | | private List<ItemModel> guardItemlist = new List<ItemModel>();
|
| | | private List<ItemModel> overdueGuardPushlist = new List<ItemModel>();
|
| | | private Dictionary<int, List<int>> itemOverdueDict;
|
| | | public static event Action FirstGoldWPOver;//首冲试用结束
|
| | |
|
| | |
| | | public event Action showItemRefreshEvent;
|
| | | public OverdueItem currentShowItem { get; private set; }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | bool isdelay = true;
|
| | | public readonly int VipExperirnceID = 985;
|
| | | public readonly int VipCardID = 978;
|
| | |
|
| | | Dictionary<int, Dictionary<int, List<ItemModel>>> allGuardDict = new Dictionary<int, Dictionary<int, List<ItemModel>>>(); //守护类型,守护ID
|
| | | public override void Init()
|
| | | {
|
| | | SysNotifyMgr.Instance.sysNotifyEvent += GetSysNotify;
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | isdelay = true;
|
| | | GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
|
| | | guardOverdueIndex = -1;
|
| | | itemStack.Clear();
|
| | | itemGuids.Clear();
|
| | |
| | |
|
| | | }
|
| | |
|
| | | void IPlayerLoginOk.OnPlayerLoginOk()
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
|
| | | time = 0;
|
| | | }
|
| | | float time = 0;
|
| | | private void UpdateSecond()
|
| | | {
|
| | | if(isdelay)
|
| | | {
|
| | | time += 1;
|
| | | if(time >= 5)
|
| | | {
|
| | | GetOverdueGuard();
|
| | | isdelay = false;
|
| | | time = 0;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetItem(string _guid, out OverdueItem _itemModel)
|
| | |
| | | switch (sysID)
|
| | | {
|
| | | case "Guardian_Timeout":
|
| | | DebugEx.Log("Guardian_Timeout:" + list.Count);
|
| | | if (list.Count > 1)
|
| | | {
|
| | | SetAllGuardIdlist();
|
| | | guardOverdueIndex = int.Parse(list[1].ToString());
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, guardOverdueIndex);
|
| | | if (itemModel != null)
|
| | | {
|
| | | if (itemModel.chinItemModel.EquipPlace == (int)RoleEquipType.retSpiritAnimal)
|
| | | List<int> renewallist = GetRenewallist(itemModel.itemId);
|
| | | if(renewallist != null && allGuardDict.ContainsKey(renewallist[0]))
|
| | | {
|
| | | OnGetOverdueItem(itemModel.itemInfo.ItemID,itemModel.itemInfo.ItemGUID,itemModel.itemInfo.ItemPlace);
|
| | | Dictionary<int, List<ItemModel>> pairs = allGuardDict[renewallist[0]];
|
| | | bool isOverdue = true;
|
| | | List<int> idlist = pairs.Keys.ToList();
|
| | | idlist.Sort();
|
| | | List<ItemModel> models = null;
|
| | | for (int i = idlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | models = pairs[idlist[i]];
|
| | | for (int j = 0; j < models.Count; j++)
|
| | | {
|
| | | if (!modelInterface.IsOverdue(models[j].itemInfo.ItemGUID, models[j].itemId, models[j].useDataDict))
|
| | | {
|
| | | isOverdue = false;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (isOverdue)
|
| | | {
|
| | | for (int i = idlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | models = pairs[idlist[i]];
|
| | | if (models != null && models.Count > 0)
|
| | | {
|
| | | ItemModel overdueModel = models[0];
|
| | | guardOverdueIndex = overdueModel.itemInfo.ItemPlace;
|
| | | OnGetOverdueItem(overdueModel.itemInfo.ItemID, overdueModel.itemInfo.ItemGUID, overdueModel.itemInfo.ItemPlace);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | guardOverdueIndex = -1;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | break;
|
| | | case "VipTiyan_Timeout":
|
| | |
|
| | | OnGetOverdueItem(VipExperirnceID, "", -1);
|
| | | break;
|
| | | case "Vip_Timeout":
|
| | |
| | |
|
| | | public void GetOverdueGuard()
|
| | | {
|
| | | guardItemlist.Clear();
|
| | | List<string> itemEffectlist = modelInterface.GetItemEffectTimelist();
|
| | | int i = 0;
|
| | | for (i = 0; i < itemEffectlist.Count; i++)
|
| | | SetAllGuardIdlist();
|
| | | overdueGuardPushlist.Clear();
|
| | | foreach(var type in allGuardDict.Keys)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByGUID(itemEffectlist[i]);
|
| | | if (itemModel != null && itemModel.packType == PackType.rptItem)
|
| | | bool isOverdue = true;
|
| | | List<int> idlist = allGuardDict[type].Keys.ToList();
|
| | | idlist.Sort();
|
| | | List<ItemModel> models = null;
|
| | | for (int i = idlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | if (itemModel.chinItemModel.EquipPlace == (int)RoleEquipType.retSpiritAnimal)
|
| | | models = allGuardDict[type][idlist[i]];
|
| | | for (int j = 0; j < models.Count; j++)
|
| | | {
|
| | | bool isOverdue = false;
|
| | | ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(itemModel.itemInfo.ItemGUID);
|
| | | if (itemModel.chinItemModel.ExpireTime > 0)
|
| | | if (!modelInterface.IsOverdue(models[j].itemInfo.ItemGUID, models[j].itemId, models[j].useDataDict))
|
| | | {
|
| | | switch ((EquipReduceType)itemModel.chinItemModel.EndureReduceType)
|
| | | {
|
| | | case EquipReduceType.Def_EquipReduceType_Time:
|
| | | List<int> itemEffectTime = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetCreateTime);
|
| | | if (itemEffectTime != null && itemEffectTime[0] != 0)
|
| | | {
|
| | | if (cool == null || cool.GetRemainTime() <= 0)
|
| | | {
|
| | | isOverdue = true;
|
| | | }
|
| | | }
|
| | | isOverdue = false;
|
| | | break;
|
| | |
|
| | | case EquipReduceType.Def_EquipReduceType_RTimeItem:
|
| | | if (cool == null || cool.GetRemainTime() <= 0)
|
| | | {
|
| | | isOverdue = true;
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | if (isOverdue)
|
| | | {
|
| | | guardItemlist.Add(itemModel);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (guardItemlist.Count > 0)
|
| | | for (int i = idlist.Count - 1; i > -1; i--)
|
| | | {
|
| | | guardItemlist.Sort(CompareItemID);
|
| | | OnGetOverdueItem(guardItemlist[0].itemInfo.ItemID, guardItemlist[0].itemInfo.ItemGUID, guardItemlist[0].itemInfo.ItemPlace);
|
| | | }
|
| | | }
|
| | |
|
| | | public int CompareItemID(ItemModel start, ItemModel end)
|
| | | models = allGuardDict[type][idlist[i]];
|
| | | if(models != null && models.Count > 0)
|
| | | {
|
| | | int startId = start.itemInfo.ItemID;
|
| | | int endId = end.itemInfo.ItemID;
|
| | | if (startId.CompareTo(endId) != 0)
|
| | | return -startId.CompareTo(endId);
|
| | |
|
| | | return 0;
|
| | | ItemModel itemModel = models[0];
|
| | | if (!overdueGuardPushlist.Contains(itemModel))
|
| | | {
|
| | | overdueGuardPushlist.Add(itemModel);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | for(int i = 0; i < overdueGuardPushlist.Count; i++)
|
| | | {
|
| | | OnGetOverdueItem(overdueGuardPushlist[i].itemInfo.ItemID, overdueGuardPushlist[i].itemInfo.ItemGUID, overdueGuardPushlist[i].itemInfo.ItemPlace);
|
| | | }
|
| | | }
|
| | |
|
| | | public bool IsMoneyEnough(int moneyType, int needMoney)
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public void SetAllGuardIdlist()
|
| | | {
|
| | | allGuardDict.Clear();
|
| | | foreach(var id in itemOverdueDict.Keys)
|
| | | {
|
| | | SetGurdIdlistByPack(PackType.rptItem,id);
|
| | | SetGurdIdlistByPack(PackType.rptEquip,id);
|
| | | SetGurdIdlistByPack(PackType.rptWarehouse,id);
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetGurdIdlistByPack(PackType type,int itemId)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(type);
|
| | | if (singlePack == null) return;
|
| | | List<ItemModel> itemModels = null;
|
| | | singlePack.GetItemCountByID(itemId, out itemModels);
|
| | | if (itemModels == null) return;
|
| | |
|
| | | List<int> renewallist = GetRenewallist(itemId);
|
| | | if (renewallist == null) return;
|
| | |
|
| | | if (!allGuardDict.ContainsKey(renewallist[0]))
|
| | | {
|
| | | Dictionary<int, List<ItemModel>> pairs = new Dictionary<int, List<ItemModel>>();
|
| | | List<ItemModel> modellist = new List<ItemModel>();
|
| | | modellist.AddRange(itemModels);
|
| | | pairs.Add(itemId,modellist);
|
| | | allGuardDict.Add(renewallist[0],pairs);
|
| | | }
|
| | | else
|
| | | {
|
| | | if(!allGuardDict[renewallist[0]].ContainsKey(itemId))
|
| | | {
|
| | | List<ItemModel> modellist = new List<ItemModel>();
|
| | | modellist.AddRange(itemModels);
|
| | | allGuardDict[renewallist[0]].Add(itemId, modellist);
|
| | | }
|
| | | else
|
| | | {
|
| | | allGuardDict[renewallist[0]][itemId].AddRange(itemModels);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public List<int> GetRenewallist(int itemID)
|
| | | {
|
| | | List<int> renewallist = null;
|
| | |
| | | //MainRedDot.Instance.redPointFriendChat.state = RedPointState.None;
|
| | | //ChatCtrl.Inst.presentChatType = ChatInfoType.Friend;
|
| | | //WindowCenter.Instance.Open<ChatWin>();
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | RedDotStatus();
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent;
|
| | | treasureModel.treasureStageUpEvent -= treasureStageUpEvent;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | { |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV;
|
| | | treasureModel.treasureStateChangeEvent += treasureStateChangeEvent;
|
| | | treasureModel.treasureStageUpEvent += treasureStageUpEvent;
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | RedDotStatus();
|
| | | }
|
| | |
|
| | |
|
| | |
| | | public override void UnInit()
|
| | | {
|
| | |
|
| | | }
|
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | {
|
| | | OpenFuncId = 0;
|
| | | RedPointChange = false;
|
| | | IsRedPoint = false;
|
| | | }
|
| | | }
|
| | | private void treasureStageUpEvent(int obj)
|
| | | {
|
| | |
| | | var mapConfig = Config.Instance.Get<MapConfig>(mapId);
|
| | | return mapConfig != null && mapConfig.MapFBType != 0;
|
| | | }
|
| | |
|
| | | public int GetOpenLv(int Inedx)
|
| | | {
|
| | | int lv = 0;
|
| | | var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
|
| | | foreach (var value in functionForecastValue)
|
| | | {
|
| | | if (value.OpenNumber == Inedx)
|
| | | {
|
| | | lv = value.DisplayLevel;
|
| | | return lv;
|
| | | }
|
| | | } |
| | | return lv;
|
| | | }
|
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | protected override void OnActived()
|
| | | {
|
| | | m_ScrollerController.JumpIndex(JumpIndex());
|
| | | m_ScrollerController.JumpIndex(Offset, 0, EnhancedScroller.TweenType.immediate);
|
| | | var offset = 0f;
|
| | | m_ScrollerController.JumpIndex(JumpIndex(), ref offset);
|
| | | m_ScrollerController.JumpIndex(Offset + offset, 0, EnhancedScroller.TweenType.immediate);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
|
| | | bool Type = false;
|
| | | int NeedLv = 0;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | Type = true;
|
| | | NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && Type && NeedLv > playerLv)
|
| | | {
|
| | | m_Text_ShowA.gameObject.SetActive(false);
|
| | | m_TextShowB.gameObject.SetActive(false);
|
| | |
| | | UI3DModelExhibition.Instance.StopShowWing();
|
| | | UI3DTreasureExhibition.Instance.StopShow();
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
|
| | | bool Type = false;
|
| | | int NeedLv = 0;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | Type = true;
|
| | | NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && Type && NeedLv > playerLv)
|
| | | {
|
| | | m_FeaturesImage.gameObject.SetActive(true);
|
| | | m_FeaturesImage.SetSprite("YGWENHAO");
|
| | |
| | | m_ButtonGoto.gameObject.SetActive(false);
|
| | | FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
|
| | | var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(ClickFuncID);
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
|
| | | bool Type = false;
|
| | | int NeedLv = 0;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | Type = true;
|
| | | NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(ClickFuncID) && Type && NeedLv > playerLv)
|
| | | {
|
| | | var functionForecastValue = Config.Instance.GetAllValues<FunctionForecastConfig>();
|
| | | string StrNanme = string.Empty;
|
| | |
| | | }
|
| | | }
|
| | | m_TextUnopened.gameObject.SetActive(true);
|
| | | m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), StrNanme, functionForecastConfig.FuncName);
|
| | | m_TextUnopened.text = string.Format(Language.Get("NextYGLimit"), NeedLv, functionForecastConfig.FuncName);
|
| | | return;
|
| | | }
|
| | | if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
|
| | |
| | | }
|
| | | m_FunctionName.text = functionForecastConfig.FuncName;
|
| | | m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+ Language.Get("Z1041");
|
| | | if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
|
| | |
|
| | | bool Type = false;
|
| | | int NeedLv = 0;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | Type = true;
|
| | | NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(funcId) && Type && NeedLv > playerLv)
|
| | | {
|
| | | m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
|
| | | }
|
| | |
| | | }
|
| | | m_FunctionName.text = functionForecastConfig.FuncName;
|
| | | m_FunctionalLevel.text = functionForecastConfig.DisplayLevel.ToString()+Language.Get("Z1041");
|
| | | if (!FuncOpen.Instance.IsFuncOpen(funcId) && functionForecastConfig.OpenNumber-1 > featureNoticeModel.FunctionForecastIndex)
|
| | | bool Type = false;
|
| | | int NeedLv = 0;
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (functionForecastConfig.OpenNumber - 2 >= featureNoticeModel.FunctionForecastIndex)
|
| | | {
|
| | | Type = true;
|
| | | NeedLv = featureNoticeModel.GetOpenLv(functionForecastConfig.OpenNumber - 2);
|
| | | }
|
| | | if (!FuncOpen.Instance.IsFuncOpen(funcId) && Type && NeedLv> playerLv)
|
| | | {
|
| | | m_FeaturesTypeIcon.SetSprite("UnKnowIcon");
|
| | | }
|
| | |
| | | m_ImgSelected.SetActive(true);
|
| | |
|
| | | taskmodel.GetNowTaskID = Task_ID;
|
| | |
|
| | | if (mainModel.TaskId_Skill1.Contains(Task_ID))//特殊支线任务解锁被动技能的
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | |
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | taskmodel.CompletionOfTask(Task_ID);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | }
|
| | | else
|
| | | {
|
| | | StateDetermination();
|
| | | var mapModel = ModelCenter.Instance.GetModel<MapModel>();
|
| | | var point = mapModel.GetRecommendHangPoint();
|
| | | var config = Config.Instance.Get<MapEventPointConfig>(point);
|
| | | MapTransferUtility.Instance.MoveToNPC(config.NPCID);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<HoistingWin>();
|
| | | }
|
| | | return;
|
| | | }
|
| | | if (mainModel.WingTask == Task_ID && ((int)taskmodel.GetTaskStatus(Task_ID) == 0 || (int)taskmodel.GetTaskStatus(Task_ID) == -5))//关于特殊翅膀任务
|
| | | {
|
| | | if (playerPack.GetSinglePackModel(PackType.rptItem) == null)
|
| | |
| | | case -5:
|
| | | case 0:
|
| | | StateDetermination();
|
| | | if (mainModel.TaskId_Skill.Contains(Task_ID))
|
| | | {
|
| | | mainModel.TaskSkillID = Task_ID;
|
| | | WindowCenter.Instance.Open<SkillTaskWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | ContentText.ExcuteHref();
|
| | | OpenPanel(Task_ID);
|
| | | }
|
| | | |
| | | break;
|
| | | case 1:
|
| | |
|
| | |
| | | private void OnClickDeliveryButton()//传送符
|
| | | {
|
| | | //--------------特殊任务的传送逻辑
|
| | | if (mainModel.TaskId_Skill1.Contains(Task_ID))
|
| | | {
|
| | | var mapModel = ModelCenter.Instance.GetModel<MapModel>();
|
| | | var point = mapModel.GetRecommendHangPoint();
|
| | | var config = Config.Instance.Get<MapEventPointConfig>(point);
|
| | |
|
| | | var flyBootOwn = ModelCenter.Instance.GetModel<PlayerPackModel>().GetItemCountByID(PackType.rptItem, GeneralConfig.Instance.flyBootItemId);
|
| | | var isVipFreeTransfer = ModelCenter.Instance.GetModel<VipModel>().GetVipPrivilegeCnt(VipPrivilegeType.FreeTransfer) > 0;
|
| | | if (isVipFreeTransfer || flyBootOwn > 0)
|
| | | {
|
| | | MapTransferUtility.Instance.MissionFlyTo(config.MapID, config.NPCID);
|
| | | }
|
| | | else
|
| | | {
|
| | | MapTransferUtility.Instance.MoveToNPC(config.NPCID);
|
| | | }
|
| | | return;
|
| | | }
|
| | | mainModel.FlyShoseTaskID = Task_ID;
|
| | | string _FlyID = Config.Instance.Get<FuncConfigConfig>("TransportPay").Numerical1;
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, int.Parse(_FlyID));//获取飞鞋的数量
|
| | |
| | | {
|
| | | m_TitleText.text = "<color=#ec4bf6>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskID))
|
| | | {
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | m_TitleText.text = "<color=#109d06>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TitleText.text = "<color=#feed28>" + TaskTitle(TaskID) + "</color>";
|
| | | }
|
| | | }
|
| | | string str = taskmodel.allMissionDict[TaskID].InforList;
|
| | | var taskinfo = Config.Instance.Get<TASKINFOConfig>(str);
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskID))//特殊任务
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, itemNumber);
|
| | | string Str_B = Language.Get("PassiveSkillTask2");
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | m_ContentText.text = Str_B;
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ContentText.text = Str_A;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | string Str_C = string.Format(Language.Get("PassiveSkillTask5"), mainModel.TaskLv);
|
| | | m_ContentText.text = Str_C;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (taskinfo != null)
|
| | | {
|
| | | m_ContentText.text = taskinfo.show_writing;
|
| | |
| | | {
|
| | | DebugEx.LogError("任务表格PyTaskInfo配置缺失");
|
| | | return;
|
| | | }
|
| | | }
|
| | | bool isOPenTransferButton = HrefAnalysis.Inst.ContainsKey(taskinfo.show_writing, "flynpc");
|
| | | if (isOPenTransferButton && !IsKaJiBool)
|
| | |
| | | {
|
| | | m_DeliveryButton.gameObject.SetActive(false);
|
| | | }
|
| | | //----------------特殊采集魔团任务的传送云处理 |
| | | if (mainModel.TaskId_Skill1.Contains(TaskID))//特殊任务
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | m_DeliveryButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_DeliveryButton.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | m_ContentText.raycastTarget = false;
|
| | |
|
| | | if (taskmodel._DicTaskInformation.ContainsKey(TaskID))
|
| | | {
|
| | | Dictionary<string, string> SkillDic = new Dictionary<string, string>();
|
| | |
| | | public bool IsEmperor = false;
|
| | |
|
| | | //---------关于任务需要的数据
|
| | | public List<int> TaskId_Skill = new List<int>();
|
| | | public List<int> TaskId_Skill1 = new List<int>();
|
| | | public int ItemID = 0;
|
| | | public int UnitPrice = 0;
|
| | | public int ItemNumber = 0;
|
| | | public int TaskLv = 0;//任务等级
|
| | | public List<int> TaskId_Skill = new List<int>();//任务ID
|
| | | public List<int> SkillIndex = new List<int>();//技能槽索引
|
| | | public List<int> NeedFairyJade = new List<int>();//所需解锁仙玉
|
| | | public int Skill_Index = 0;
|
| | | public int TaskSkillID = 0;
|
| | | //-----关于支线翅膀任务的特殊逻辑
|
| | | public int WingTask = 0;
|
| | |
|
| | |
| | | private void GetPassiveSkillTask()//获取任务数据
|
| | | {
|
| | | TaskId_Skill.Clear();
|
| | | TaskId_Skill1.Clear();
|
| | | SkillIndex.Clear();
|
| | | NeedFairyJade.Clear();
|
| | | var PassiveSkillTaskconfig = Config.Instance.Get<FuncConfigConfig>("PassiveSkillTask");
|
| | | int[] TaskId_SkillInt = ConfigParse.GetMultipleStr<int>(PassiveSkillTaskconfig.Numerical1);
|
| | | for (int i = 0; i < TaskId_SkillInt.Length; i++)
|
| | |
| | | int[] TaskId_SkillInt1 = ConfigParse.GetMultipleStr<int>(PassiveSkillTaskconfig.Numerical2);
|
| | | for (int i = 0; i < TaskId_SkillInt1.Length; i++)
|
| | | {
|
| | | TaskId_Skill1.Add(TaskId_SkillInt1[i]);
|
| | | SkillIndex.Add(TaskId_SkillInt1[i]);
|
| | | }
|
| | | int[] PassiveSkillTask = ConfigParse.GetMultipleStr<int>(PassiveSkillTaskconfig.Numerical3);
|
| | | string str4 =PassiveSkillTaskconfig.Numerical4;
|
| | | TaskLv = int.Parse(str4);
|
| | | if (PassiveSkillTask.Length >= 3)
|
| | | int[] TaskId_SkillInt2 = ConfigParse.GetMultipleStr<int>(PassiveSkillTaskconfig.Numerical3);
|
| | | for (int i = 0; i < TaskId_SkillInt2.Length; i++)
|
| | | {
|
| | | ItemID = PassiveSkillTask[0];
|
| | | UnitPrice = PassiveSkillTask[1];
|
| | | ItemNumber = PassiveSkillTask[2];
|
| | | |
| | | NeedFairyJade.Add(TaskId_SkillInt2[i]);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | SideQuestsType17 = 17,//支线17-21新增
|
| | | SideQuestsType18 = 18,
|
| | | SideQuestsType19 = 19,
|
| | | SideQuestsType20 = 20,
|
| | | SideQuestsType20 = 20,//(后端特殊处理,暂定不让使用)
|
| | | SideQuestsType21 = 21,
|
| | | }
|
| | |
|
| | |
| | |
|
| | | [SerializeField] Button _Btn_Forward;//支线前往按钮
|
| | | [SerializeField] Text _Text_Forward;//按钮文字
|
| | | [SerializeField] Button m_FinishAtOnce;//立即完成
|
| | | PlayerTaskDatas m_TaskModel;
|
| | | PlayerTaskDatas taskmodel { get { return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } }
|
| | | ItemTipsModel _itemTipsModel;
|
| | |
| | | private void Start()
|
| | | {
|
| | | _Btn_Forward.onClick.AddListener(ForwardButton);
|
| | | m_FinishAtOnce.AddListener(OnClickSkillTask);
|
| | | }
|
| | | private void OnEnable()
|
| | | {
|
| | | TaskIdNow = 0;
|
| | | _TaskRamusList.OnRefreshCell += OnRefreshGridCell;
|
| | | playerPack.RefreshItemCountAct += RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
|
| | | OnCreateGridLineCell(_TaskRamusList);
|
| | | }
|
| | |
| | | private void OnDisable()
|
| | | {
|
| | | _TaskRamusList.OnRefreshCell -= OnRefreshGridCell;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct -= ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418)
|
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)
|
| | | {
|
| | | if (obj == PlayerDataRefresh.LV)
|
| | | {
|
| | | OpenShowButton();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OpenShowButton()
|
| | | private void OnClickSkillTask()
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskIdNow))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | _Btn_Forward.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | _Btn_Forward.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | private void ItemCntReduceAct(PackType arg1, int arg2, int arg3)
|
| | | {
|
| | | if (arg1 == PackType.rptItem && arg3 == mainModel.ItemID)
|
| | | {
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(key))
|
| | | {
|
| | | _TaskRamusList.m_Scorller.RefreshActiveCellViews();//刷新当前可见
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | TaskAllocation.Instance.SkillTask(TaskIdNow);
|
| | |
|
| | | private void RefreshItemCountAct(PackType arg1, int arg2, int arg3)
|
| | | {
|
| | | if (arg1 == PackType.rptItem && arg3 == mainModel.ItemID)
|
| | | {
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(key))
|
| | | {
|
| | | _TaskRamusList.m_Scorller.RefreshActiveCellViews();//刷新当前可见
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void ForwardButton()
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(TaskIdNow))
|
| | | {
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | taskmodel.CompletionOfTask(TaskIdNow);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | }
|
| | | else
|
| | | {
|
| | | int Gold = (int)UIHelper.GetMoneyCnt(1);//仙玉
|
| | | string strNull = string.Empty;
|
| | | int needNumber = (mainModel.ItemNumber - itemNumber) * mainModel.UnitPrice;//所需金额
|
| | | strNull = string.Format(Language.Get("PassiveSkillTask3"), needNumber);
|
| | |
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (Gold >= needNumber)
|
| | | {
|
| | | taskmodel.CompletionOfTask(TaskIdNow);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | return;
|
| | | }
|
| | | if ((int)taskmodel.GetTaskStatus(TaskIdNow) == 3)
|
| | | {
|
| | | taskmodel.CompletionOfTask(TaskIdNow);
|
| | |
| | | if (TaskId != TaskIdNow)
|
| | | {
|
| | | TaskIdNow = TaskId;
|
| | | OpenShowButton();
|
| | | _TaskRamusList.m_Scorller.RefreshActiveCellViews();//刷新当前可见
|
| | | }
|
| | | });
|
| | |
| | | _Text_TaskDescribe.text = Config.Instance.Get<TASKINFOConfig>(taskmodel.SideQuestsDic[taskID].Desclist).show_writing;//任务描述
|
| | | string strINfor = taskmodel.SideQuestsDic[taskID].InforList;
|
| | | string str = string.Empty;
|
| | | if (mainModel.TaskId_Skill1.Contains(taskID))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= mainModel.TaskLv)
|
| | | {
|
| | | int itemNumber = playerPack.GetItemCountByID(PackType.rptItem, mainModel.ItemID);//获取特殊物品
|
| | | if (itemNumber >= mainModel.ItemNumber)
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, mainModel.ItemNumber);
|
| | | str = Str_A;
|
| | | }
|
| | | else
|
| | | {
|
| | | string Str_A = string.Format(Language.Get("PassiveSkillTask1"), mainModel.ItemID, itemNumber);
|
| | | str = Str_A;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | string Str_C = string.Format(Language.Get("PassiveSkillTask5"), mainModel.TaskLv);
|
| | | str = Str_C;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | str = Config.Instance.Get<TASKINFOConfig>(strINfor).show_writing;
|
| | | }
|
| | | str = WordAnalysis.Color_Start_Regex.Replace(str, string.Empty);
|
| | | str = WordAnalysis.Color_End_Regex.Replace(str, string.Empty);
|
| | | _Text_TaskTarget.text = str;//任务目标
|
| | |
|
| | | if ((int)taskmodel.GetTaskStatus(TaskIdNow) == 3 || mainModel.TaskId_Skill1.Contains(taskID))//能够进行立即完成的支线任务
|
| | | SkillTask(taskID);
|
| | | if ((int)taskmodel.GetTaskStatus(TaskIdNow) == 3)//能够进行立即完成的支线任务
|
| | | {
|
| | | _Text_Forward.text = string.Format(Language.Get("FinishAtOnce_Z"));
|
| | | }
|
| | |
| | | }
|
| | | return string.Empty;
|
| | | }
|
| | |
|
| | | private void SkillTask(int TsakID)
|
| | | {
|
| | | if (!taskmodel.allMissionDict.ContainsKey(TsakID) || !mainModel.TaskId_Skill.Contains(TsakID))
|
| | | {
|
| | | m_FinishAtOnce.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | m_FinishAtOnce.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, September 18, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class SkillTaskWin : Window |
| | | { |
| | | [SerializeField] RichText m_Text_Condition_1;//条件 |
| | | [SerializeField] RichText m_Text_Reward_1;//奖励 |
| | | [SerializeField] Text m_NeedMoney_Text;//所需仙玉 |
| | | [SerializeField] Button m_GoToSkillBtn;
|
| | | [SerializeField] Button m_OpenNowBtn;
|
| | | [SerializeField] Button m_GoToBtn; |
| | | [SerializeField] Button m_ClaoseBtn; |
| | | PlayerMainDate m_MainModel;
|
| | | PlayerMainDate mainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | PlayerTaskDatas m_TaskModel;
|
| | | PlayerTaskDatas taskmodel { get { return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>()); } } |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_ClaoseBtn.AddListener(() => { Close(); }); |
| | | m_GoToSkillBtn.AddListener(OnClickGoToSkillBtn); |
| | | m_OpenNowBtn.AddListener(OnClickOpenNowBtn); |
| | | m_GoToBtn.AddListener(OnClickGoToBtn); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | if (!taskmodel.allMissionDict.ContainsKey(mainModel.TaskSkillID))
|
| | | {
|
| | | return;
|
| | | }
|
| | | string str = taskmodel.allMissionDict[mainModel.TaskSkillID].InforList;
|
| | | var taskinfo = Config.Instance.Get<TASKINFOConfig>(str);
|
| | | if (taskinfo != null)
|
| | | {
|
| | | m_Text_Condition_1.text = taskinfo.show_writing;
|
| | | }
|
| | | if (mainModel.TaskId_Skill.Contains(mainModel.TaskSkillID))
|
| | | {
|
| | | int Index = mainModel.TaskId_Skill.IndexOf(mainModel.TaskSkillID);
|
| | | m_Text_Reward_1.text = string.Format(Language.Get("PassiveSkillTask1"), (mainModel.SkillIndex[Index] + 1));
|
| | | m_NeedMoney_Text.text = string.Format(Language.Get("PassiveSkillTask2"), mainModel.NeedFairyJade[Index]);
|
| | | }
|
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | {
|
| | |
|
| | | } |
| | | |
| | | private void OnClickGoToSkillBtn()
|
| | | {
|
| | | if (mainModel.TaskId_Skill.Contains(mainModel.TaskSkillID))
|
| | | {
|
| | | int Index = mainModel.TaskId_Skill.IndexOf(mainModel.TaskSkillID);
|
| | | mainModel.Skill_Index = mainModel.SkillIndex[Index] + 1;
|
| | | }
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | } |
| | | private void OnClickOpenNowBtn()
|
| | | {
|
| | | int Gold = (int)UIHelper.GetMoneyCnt(1);//仙玉
|
| | | if (mainModel.TaskId_Skill.Contains(mainModel.TaskSkillID))
|
| | | {
|
| | | int Index = mainModel.TaskId_Skill.IndexOf(mainModel.TaskSkillID);
|
| | | int NeedMoney = mainModel.NeedFairyJade[Index];
|
| | | string strNull = string.Format(Language.Get("PassiveSkillTask3"), NeedMoney);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (Gold >= NeedMoney)
|
| | | {
|
| | | taskmodel.CompletionOfTask(mainModel.TaskSkillID);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | } |
| | | private void OnClickGoToBtn()
|
| | | {
|
| | |
|
| | | m_Text_Condition_1.ExcuteHref();
|
| | |
|
| | | // Close();
|
| | | } |
| | | #endregion |
| | |
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0b9954631fd01f04e9b1422443d7cb4c |
| | | timeCreated: 1537273256 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | using System.Text.RegularExpressions;
|
| | | using System.Collections.Generic;
|
| | | //用于任务分配
|
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class TaskAllocation:Singleton<TaskAllocation> {
|
| | | public class TaskAllocation : Singleton<TaskAllocation>
|
| | | {
|
| | |
|
| | | private static StringBuilder textBuilder = new StringBuilder();
|
| | | private const string Info_Pattern = "{([a-zA-Z0-9_]+)}";
|
| | |
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | PlayerMainDate m_MainModel;
|
| | | PlayerMainDate mainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } }
|
| | | public void SkillTask(int TaskID)//用于解锁被动技能任务
|
| | | {
|
| | | int Gold = (int)UIHelper.GetMoneyCnt(1);//仙玉
|
| | | if (mainModel.TaskId_Skill.Contains(TaskID))
|
| | | {
|
| | | int Index = mainModel.TaskId_Skill.IndexOf(TaskID);
|
| | | int NeedMoney = mainModel.NeedFairyJade[Index];
|
| | | string strNull = string.Format(Language.Get("PassiveSkillTask3"), NeedMoney);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), strNull, (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (Gold >= NeedMoney)
|
| | | {
|
| | | taskmodel.CompletionOfTask(TaskID);
|
| | | if (WindowCenter.Instance.CheckOpen<SkillPanel>())
|
| | | {
|
| | | return;
|
| | | }
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.SkillFunc2);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | PlayerTaskDatas.Event_TaskToDelete += OnTaskToDelete;//任务的删除
|
| | | PlayerTaskDatas.Event_TaskInformation += TaskInformation;//任务字典信息
|
| | | PlayerTaskDatas.MainCardLevelChange += MainCardLevelChange;//卡级任务修改
|
| | | PlayerTaskDatas.CardLevelChange += CardLevelChangeEvent;//卡级任务状态改变
|
| | | model.collectingTreasureChangeEvent += OnCollectingTreasureChangeEvent;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent += CloseTreasureNewGotWinEvent;
|
| | | playerPack.RefreshItemCountAct += RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418)
|
| | | OnCollectingTreasureChangeEvent(TreasureCategory.Human);
|
| | | TaskScheduling();//任务排序 1
|
| | |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | TreasureNewGotWin.CloseTreasureNewGotWinEvent -= CloseTreasureNewGotWinEvent;
|
| | | PlayerTaskDatas.MainCardLevelChange -= MainCardLevelChange;//卡级任务修改
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | playerPack.ItemCntReduceAct -= ItemCntReduceAct;
|
| | | PlayerTaskDatas.CardLevelChange -= CardLevelChangeEvent;//卡级任务状态改变
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting;//数据的刷新(h0418)
|
| | | }
|
| | |
|
| | | private void Updatefighting(PlayerDataRefresh obj)//等级刷新
|
| | | {
|
| | | if (obj == PlayerDataRefresh.LV)
|
| | | {
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(key))
|
| | | {
|
| | | TaskIdUpdate(key);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void ItemCntReduceAct(PackType arg1, int arg2, int arg3)
|
| | | {
|
| | | if (arg1 == PackType.rptItem && arg3== mainModel.ItemID)
|
| | | {
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(key))
|
| | | {
|
| | | TaskIdUpdate(key);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void RefreshItemCountAct(PackType arg1, int arg2, int arg3)
|
| | | {
|
| | | if (arg1 == PackType.rptItem && arg3 == mainModel.ItemID)
|
| | | {
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (mainModel.TaskId_Skill1.Contains(key))
|
| | | {
|
| | | TaskIdUpdate(key);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void TaskIdUpdate(int taskId)
|
| | | {
|
| | | int leng = Content.childCount;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void CardLevelChangeEvent(int taskID)
|
| | | {
|
| | | if (taskmodel.allMissionDict.ContainsKey(taskID) && taskmodel.allMissionDict[taskID].Type == 3)
|
| | | {
|
| | | TaskScheduling();
|
| | | TheTaskToGenerate();
|
| | | TaskJump(taskID);
|
| | | }
|
| | | }
|
| | | private void MainCardLevelChange(int _id)
|
| | | {
|
| | | TaskScheduling();
|
| | |
| | | foreach (var key in taskmodel.MainTaskDic.Keys)
|
| | | {
|
| | | var State = taskmodel.GetTaskStatus(key);
|
| | | if (State == PlayerTaskDatas.TaskStatus.CardLevel)
|
| | | if (State == PlayerTaskDatas.TaskStatus.TreasureCardLevel)
|
| | | {
|
| | | IsDefault = false;
|
| | | }
|
| | |
| | | {
|
| | | return _index0.CompareTo(_index1);
|
| | | }
|
| | | if (xPack.LV.CompareTo(yPack.LV) != 0)
|
| | | {
|
| | | return -xPack.LV.CompareTo(yPack.LV);
|
| | | }
|
| | | return 1;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | return _index0.CompareTo(_index1);
|
| | | }
|
| | | if (xPack.LV.CompareTo(yPack.LV) != 0)
|
| | | {
|
| | | return -xPack.LV.CompareTo(yPack.LV);
|
| | | }
|
| | | |
| | | return 1;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | OperationFlashSale operation = operationBase as OperationFlashSale;
|
| | | m_OpreationTime.text = StringUtility.Contact(Language.Get("ExpActivity_Text1"), operation.ToDisplayTime());
|
| | | m_RefreshGiftTime.gameObject.SetActive(operation.allDay);
|
| | | m_RefreshGiftTime.gameObject.SetActive(operation.allDay && operation.dayReset);
|
| | | OperationFlashSale.FlashSale flashSale;
|
| | | if (operation.TryGetFlashSale(TimeUtility.ServerNow, out flashSale))
|
| | | {
|
| | |
| | |
|
| | | public enum OSActivityType
|
| | | {
|
| | | [Header("全名冲榜")]
|
| | | ImpactRank,
|
| | | [Header("消费返利")]
|
| | | ConsumeRebate,
|
| | | [Header("开服红包")]
|
| | | OSRedpack,
|
| | | [Header("开服特惠")]
|
| | | OSSale,
|
| | | [Header("限时特惠")]
|
| | | FlashSale,
|
| | | [Header("多倍经验")]
|
| | | MultipleExp,
|
| | | [Header("超值礼包")]
|
| | | OSGift,
|
| | | [Header("限时礼包")]
|
| | | FlashGift,
|
| | | [Header("多倍修行点")]
|
| | | MultipleRealmPoint,
|
| | | BossReborn
|
| | | [Header("Boss复活")]
|
| | | BossReborn,
|
| | | [Header("仙玉投资")]
|
| | | FairyInvest,
|
| | | [Header("VIP投资")]
|
| | | VipInvest
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public Image downArrow { get { return m_DownArrow; } }
|
| | | [SerializeField] Image m_UpArrow;
|
| | | public Image upArrow { get { return m_UpArrow; } }
|
| | | [SerializeField] Image m_TitleImg;
|
| | | public Image titleImage { get { return m_TitleImg; } }
|
| | |
|
| | | private int m_Order = 0;
|
| | | public int order { get { return m_Order; } set { m_Order = value; } }
|
| | |
| | | [SerializeField] ScrollerController m_ActivityCtrl;
|
| | | [SerializeField] Button m_BtnClose;
|
| | | [SerializeField] Image m_TitleIcon;
|
| | | [SerializeField, Header("排序")] List<int> m_SortArray;
|
| | | [SerializeField] List<CustomActivityDisplay> m_CustomActivitys;
|
| | |
|
| | | Dictionary<int, bool> m_ActivitySpreadDict = new Dictionary<int, bool>();
|
| | |
|
| | |
| | | {
|
| | | m_ActivityCtrl.OnRefreshCell += OnOpenServerActivityRefresh;
|
| | | m_ActivityCtrl.OnGetDynamicSize += OnGetDynamicSize;
|
| | | m_ActivityCtrl.lockType = EnhanceLockType.KeepVertical;
|
| | | m_BtnClose.onClick.AddListener(CloseClick);
|
| | | }
|
| | |
|
| | |
| | | TimeUtility.OnServerOpenDayRefresh += OnStepServerDayEvent;
|
| | | OperationTimeHepler.Instance.operationTimeUpdateEvent += OperationTimeUpdateEvent;
|
| | | OpenServerActivityCenter.Instance.openServerActivityStateChange += OpenServerActivityStateChange;
|
| | | for (int i = 0; i < m_SortArray.Count; i++)
|
| | | for (int i = 0; i < m_CustomActivitys.Count; i++)
|
| | | {
|
| | | m_ActivitySpreadDict[m_SortArray[i]] = false;
|
| | | m_ActivitySpreadDict[(int)m_CustomActivitys[i].activityType] = false;
|
| | | }
|
| | | var impactDefaultType= impactRankModel.GetDefaultSelectType();
|
| | | if (impactRankModel.IsLock(impactDefaultType))
|
| | |
| | | openActivitys.Clear();
|
| | | priorityActivitys.Clear();
|
| | |
|
| | | for (int i = 0; i < m_SortArray.Count; i++)
|
| | | for (int i = 0; i < m_CustomActivitys.Count; i++)
|
| | | {
|
| | | if (OpenServerActivityCenter.Instance.IsActivityOpen(m_SortArray[i]))
|
| | | if (OpenServerActivityCenter.Instance.IsActivityOpen((int)m_CustomActivitys[i].activityType))
|
| | | {
|
| | | openActivitys.Add(m_SortArray[i]);
|
| | | if (OpenServerActivityCenter.Instance.IsPriorityOpenOpen(m_SortArray[i]))
|
| | | openActivitys.Add((int)m_CustomActivitys[i].activityType);
|
| | | if (OpenServerActivityCenter.Instance.IsPriorityOpenOpen((int)m_CustomActivitys[i].activityType))
|
| | | {
|
| | | priorityActivitys.Add(m_SortArray[i]);
|
| | | priorityActivitys.Add((int)m_CustomActivitys[i].activityType);
|
| | |
|
| | | switch (m_SortArray[i])
|
| | | switch (m_CustomActivitys[i].activityType)
|
| | | {
|
| | | case 2:
|
| | | case OpenServerActivityCenter.OSActivityType.OSRedpack:
|
| | | envelopeModel.selectType = envelopeModel.m_RedAchieveRedpoint.state == RedPointState.Simple ? 1 : 2;
|
| | | break;
|
| | | }
|
| | |
| | | void CheckAlreadyOpen()
|
| | | {
|
| | | alreadyOpenActivitys.Clear();
|
| | | for (int i = 0; i < m_SortArray.Count; i++)
|
| | | for (int i = 0; i < m_CustomActivitys.Count; i++)
|
| | | {
|
| | | if (OpenServerActivityCenter.Instance.IsActivityOpen(m_SortArray[i]))
|
| | | if (OpenServerActivityCenter.Instance.IsActivityOpen((int)m_CustomActivitys[i].activityType))
|
| | | {
|
| | | alreadyOpenActivitys.Add(m_SortArray[i]);
|
| | | alreadyOpenActivitys.Add((int)m_CustomActivitys[i].activityType);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | _cell.ChangeState(_cell.order == functionOrder ? TitleBtnState.Click : TitleBtnState.Normal);
|
| | | _cell.downArrow.gameObject.SetActive(false);
|
| | | _cell.upArrow.gameObject.SetActive(false);
|
| | |
|
| | | var customActivity = m_CustomActivitys.Find((x) =>
|
| | | {
|
| | | return (int)x.activityType == _cell.index;
|
| | | });
|
| | |
|
| | | bool customIcon = !string.IsNullOrEmpty(customActivity.titleIcon);
|
| | | _cell.title.gameObject.SetActive(!customIcon);
|
| | | _cell.titleImage.gameObject.SetActive(customIcon);
|
| | | if (customIcon)
|
| | | {
|
| | | _cell.titleImage.SetSprite(customActivity.titleIcon);
|
| | | _cell.titleImage.SetNativeSize();
|
| | | }
|
| | |
|
| | | if(_cell.order == 0 || _cell.order == 2)
|
| | | {
|
| | | _cell.downArrow.gameObject.SetActive(m_ActivitySpreadDict[_cell.order]);
|
| | |
| | | private void UpdateFunctionBtns()
|
| | | {
|
| | | m_ActivityCtrl.Refresh();
|
| | | for (int i = 0; i < m_SortArray.Count; i++)
|
| | | for (int i = 0; i < m_CustomActivitys.Count; i++)
|
| | | {
|
| | | var sort = m_SortArray[i];
|
| | | var sort = (int)m_CustomActivitys[i].activityType;
|
| | | if (!alreadyOpenActivitys.Contains(sort))
|
| | | {
|
| | | continue;
|
| | |
| | | WindowCenter.Instance.CloseImmediately<VipInvestWin>();
|
| | | }
|
| | |
|
| | | private int Compare(int x, int y)
|
| | | private int Compare(int order_x, int order_y)
|
| | | {
|
| | | var index_x = m_SortArray.IndexOf(x);
|
| | | var index_y = m_SortArray.IndexOf(y);
|
| | | var index_x = m_CustomActivitys.FindIndex((x) =>
|
| | | {
|
| | | return order_x == (int)x.activityType;
|
| | | });
|
| | | var index_y = m_CustomActivitys.FindIndex((x) =>
|
| | | {
|
| | | return order_y == (int)x.activityType;
|
| | | });
|
| | | return index_x.CompareTo(index_y);
|
| | | }
|
| | |
|
| | |
| | | private void OpenServerActivityStateChange()
|
| | | {
|
| | | bool _update = false;
|
| | | for (int i = 0; i < m_SortArray.Count; i++)
|
| | | for (int i = 0; i < m_CustomActivitys.Count; i++)
|
| | | {
|
| | | if (OpenServerActivityCenter.Instance.IsActivityOpen(m_SortArray[i])
|
| | | && !alreadyOpenActivitys.Contains(m_SortArray[i]))
|
| | | if (OpenServerActivityCenter.Instance.IsActivityOpen((int)m_CustomActivitys[i].activityType)
|
| | | && !alreadyOpenActivitys.Contains((int)m_CustomActivitys[i].activityType))
|
| | | {
|
| | | alreadyOpenActivitys.Add(m_SortArray[i]);
|
| | | alreadyOpenActivitys.Add((int)m_CustomActivitys[i].activityType);
|
| | | _update = true;
|
| | | }
|
| | | }
|
| | |
| | | UpdateFunctionBtns();
|
| | | }
|
| | | }
|
| | |
|
| | | [Serializable]
|
| | | public struct CustomActivityDisplay
|
| | | {
|
| | | [Header("活动类型"), EnumLabel(typeof(OpenServerActivityCenter.OSActivityType))]
|
| | | public OpenServerActivityCenter.OSActivityType activityType;
|
| | | public string titleIcon;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | [SerializeField] UIEffect m_RealmDungeonSfx;
|
| | |
|
| | | [SerializeField] Button m_SingleDungeon;
|
| | | [SerializeField] Button m_FuncButton;
|
| | | [SerializeField] Text m_FuncButtonTxt;
|
| | | [SerializeField] Text m_RealmStageTip;
|
| | |
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_SingleDungeon.onClick.AddListener(SingleDungeon);
|
| | | m_FuncButton.onClick.AddListener(OnFunctionClick);
|
| | | m_RealmPreview.onClick.AddListener(OnRealmPreview);
|
| | | }
|
| | |
| | | var _realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | m_FuncButton.gameObject.SetActive(!realmModel.IsRealmHighest);
|
| | | m_SingleDungeon.gameObject.SetActive(false);
|
| | | if (_realmPoint >= config.NeedPoint)
|
| | | {
|
| | | m_FuncButtonTxt.text = Language.Get(config.IsBigRealm == 1 ? "RealmWin_Bewrite_13" : "RealmWin_Bewrite_12");
|
| | | m_SingleDungeon.gameObject.SetActive(config.IsBigRealm == 1 && !realmModel.IsRealmHighest);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void SingleDungeon()
|
| | | {
|
| | | var _realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (_realmPoint >= config.NeedPoint)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().SingleChallenge(RealmModel.REALM_DUNGEON_ID, config.IsBigRealm == 1 ? 1 : 0);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnRealmPreview()
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmPreviewWin>();
|
| | |
| | | #region 配置
|
| | | public Dictionary<int, int> wingLv2GenerDict = new Dictionary<int, int>();
|
| | | public Dictionary<int, List<RoleStrongerConfig>> roleStrongerDic = new Dictionary<int, List<RoleStrongerConfig>>();
|
| | | List<int> promotePercents = new List<int>();
|
| | | void ParseConfig()
|
| | | {
|
| | | var dict = Config.Instance.GetAllValues<RoleStrongerConfig>();
|
| | |
| | | }
|
| | | list.Add(cfg);
|
| | | }
|
| | | var _funcCfg = Config.Instance.Get<FuncConfigConfig>("WingLV");
|
| | | LitJson.JsonData _json = LitJson.JsonMapper.ToObject(_funcCfg.Numerical1);
|
| | | var funcConfig = Config.Instance.Get<FuncConfigConfig>("WingLV");
|
| | | LitJson.JsonData _json = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
|
| | | foreach (var _wingLv in _json.Keys)
|
| | | {
|
| | | wingLv2GenerDict.Add(int.Parse(_wingLv), int.Parse(_json[_wingLv].ToString()));
|
| | | }
|
| | | funcConfig = Config.Instance.Get<FuncConfigConfig>("FightpowerUp");
|
| | | promotePercents.AddRange(ConfigParse.GetMultipleStr<int>(funcConfig.Numerical1));
|
| | | }
|
| | | public List<RoleStrongerConfig> GetRoleStrongerList(int funcType)
|
| | |
|
| | | public List<RoleStrongerConfig> GetStrongerConfigs(int funcType)
|
| | | {
|
| | | List<RoleStrongerConfig> list = null;
|
| | | roleStrongerDic.TryGetValue(funcType, out list);
|
| | | return list;
|
| | | }
|
| | | public bool IsHighestStage(int funcType, int id)
|
| | |
|
| | | public int GetPromoteState(int percent)
|
| | | {
|
| | | List<RoleStrongerConfig> list = GetRoleStrongerList(funcType);
|
| | | if (list != null && list.Count > 0)
|
| | | for (int i = 0; i < promotePercents.Count; i++)
|
| | | {
|
| | | if (id == list[list.Count - 1].id)
|
| | | if (percent <= promotePercents[i])
|
| | | {
|
| | | return true;
|
| | | return i;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | return promotePercents.Count - 1;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public RoleStrongerConfig GetPresentRoleStronger(int funcType, out int presentValue, out bool reached)
|
| | | public RoleStrongerConfig GetPresentRoleStronger(int funcType)
|
| | | {
|
| | | presentValue = 0;
|
| | | List<RoleStrongerConfig> list = GetRoleStrongerList(funcType);
|
| | | reached = false;
|
| | | List<RoleStrongerConfig> list = GetStrongerConfigs(funcType);
|
| | | int i = 0;
|
| | | int presentLevel = PlayerDatas.Instance.baseData.LV;
|
| | | if (list != null && list.Count > 0)
|
| | | {
|
| | | switch ((FuncPowerType)list[0].funcType)
|
| | | {
|
| | | case FuncPowerType.Equip:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | presentValue = GetEquipCnt(list[i].conditions[0]
|
| | | , list[i].conditions.Length > 1 ? list[i].conditions[1] : 0
|
| | | , list[i].conditions.Length > 2 ? list[i].conditions[2] : 0);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Plus:
|
| | | {
|
| | | var packTypeModel = playerPack.GetSinglePackModel(PackType.rptEquip);
|
| | | if (packTypeModel == null || packTypeModel.GetPackModelIndexDict() == null || packTypeModel.GetPackModelIndexDict().Count == 0)
|
| | | {
|
| | | return list[0];
|
| | | }
|
| | | foreach (var itemPlace in packTypeModel.GetPackModelIndexDict().Keys)
|
| | | {
|
| | | presentValue += strengthengmodel.StrengthenTheCeiling(itemPlace);
|
| | | }
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Rune:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | bool _satisfy = GetRuneCnt(list[i].conditions[0], out presentValue);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (!_satisfy || presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.GodWeapon:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | var magicianData = magicianModel.GetMagicianData(list[i].conditions[0]);
|
| | | if (magicianData == null)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | presentValue = magicianData.level;
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Horse:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | int _itemColor = list[i].conditions.Length > 1 ? list[i].conditions[1] : 0;
|
| | | int _lv = list[i].conditions.Length > 0 ? list[i].conditions[0] : 0;
|
| | | presentValue = GetMountCnt(_itemColor, _lv);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Wing:
|
| | | {
|
| | | var itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | if (itemModel == null)
|
| | | {
|
| | | presentValue = 0;
|
| | | break;
|
| | | }
|
| | | ItemConfig _tagChinItemModel = Config.Instance.Get<ItemConfig>((int)itemModel.itemInfo.ItemID);
|
| | | presentValue = wingLv2GenerDict[_tagChinItemModel.LV];
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].conditions[0])
|
| | | {
|
| | | presentValue = 0;
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Stone:
|
| | | {
|
| | | presentValue = allStoneLv;
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Suit:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | presentValue = SuitModel.GetSameSuitCntByType((SuitType)list[i].conditions[0]);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Wash:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | presentValue = GetWashCnt(list[i].conditions[0]);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Prestige:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | presentValue = PlayerDatas.Instance.baseData.realmLevel;
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Pet:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | presentValue = GetPetCnt(list[i].conditions.Length > 1 ? list[i].conditions[1] : list[i].conditions[0]);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.Demon:
|
| | | case FuncPowerType.Fairy:
|
| | | case FuncPowerType.Human:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | Treasure treasure = null;
|
| | | presentValue = 0;
|
| | | if (treasureModel.TryGetTreasure(list[i].targetValue, out treasure))
|
| | | {
|
| | | if (treasure.state == TreasureState.Collected)
|
| | | {
|
| | | presentValue = 1;
|
| | | continue;
|
| | | }
|
| | | }
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | break;
|
| | | case FuncPowerType.BlastFurnace:
|
| | | {
|
| | | for (i = 0; i < list.Count; i++)
|
| | | {
|
| | | presentValue = GetBlastFurnaceDragUseCount(list[i].conditions.Length > 0 ? list[i].conditions[0] : 1);
|
| | | if (presentLevel < list[i].LV)
|
| | | {
|
| | | break;
|
| | | }
|
| | | if (presentValue < list[i].targetValue)
|
| | | {
|
| | | return list[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | reached = true;
|
| | | i = Mathf.Max(0, i - 1);
|
| | | i = Mathf.Min(list.Count - 1, i);
|
| | | return list[i];
|
| | | return list[list.Count - 1];
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
| | | RolePromoteModel m_Model;
|
| | | RolePromoteModel model
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RolePromoteModel>());
|
| | | }
|
| | | get { return ModelCenter.Instance.GetModel<RolePromoteModel>(); }
|
| | | }
|
| | |
|
| | | RoleParticularModel m_RoleParticularModel;
|
| | | RoleParticularModel roleParticularModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_RoleParticularModel ?? (m_RoleParticularModel = ModelCenter.Instance.GetModel<RoleParticularModel>());
|
| | | }
|
| | | get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); }
|
| | | }
|
| | |
|
| | | [SerializeField] Image funcIcon;
|
| | | [SerializeField] Text presentFightPowerTxt;
|
| | | [SerializeField] Transform m_ContainerStrongerLabel;
|
| | | [SerializeField] Text strongerFightPowerTxt;
|
| | | [SerializeField] Text targetTxt;
|
| | | [SerializeField] Text m_FuncTxt;
|
| | | [SerializeField] Button strongerBtn;
|
| | | [SerializeField] GameObject reachTxtObj;
|
| | | [SerializeField] GameObject reachImgObj;
|
| | | [SerializeField] Image m_FuncIcon;
|
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] Text m_FuncName;
|
| | | [SerializeField] Image m_State;
|
| | | [SerializeField] Slider m_Slider;
|
| | | [SerializeField] Text m_Progress;
|
| | | [SerializeField] Button m_Goto;
|
| | |
|
| | | public override void Refresh(CellView cell)
|
| | | {
|
| | | int funcType = cell.index;
|
| | | int presentTargetValue = 0;
|
| | | bool reached = false;
|
| | | var cfg = model.GetPresentRoleStronger(funcType, out presentTargetValue, out reached);
|
| | | strongerBtn.onClick.RemoveAllListeners();
|
| | | if (cfg != null)
|
| | | var config = model.GetPresentRoleStronger(funcType);
|
| | | m_Goto.onClick.RemoveAllListeners();
|
| | | if (config != null)
|
| | | {
|
| | | var highestStage = model.IsHighestStage(funcType, cfg.id) && reached;
|
| | | funcIcon.SetSprite(cfg.Icon);
|
| | | m_FuncTxt.text = cfg.Name;
|
| | | ulong _presentFightPower = 0;
|
| | | _presentFightPower = roleParticularModel.GetFuncFightPower(funcType);
|
| | | presentFightPowerTxt.text = Language.Get("RolePromoteNowFight", _presentFightPower);
|
| | | m_FuncIcon.SetSprite(config.Icon);
|
| | | m_FuncName.text = config.Name;
|
| | | ulong fightPower = roleParticularModel.GetFuncFightPower(funcType);
|
| | | var highestStage = fightPower >= (ulong)config.recommendFightPower;
|
| | | m_FightPower.text = Language.Get("RolePromoteNowFight", fightPower);
|
| | |
|
| | | strongerFightPowerTxt.text = StringUtility.Contact(_presentFightPower >= (ulong)cfg.recommendFightPower ? Language.Get("RolePromoteMoreFight") : Language.Get("RolePromoteBetterFight"),
|
| | | _presentFightPower >= (ulong)cfg.recommendFightPower ? cfg.strongerFightPower : cfg.recommendFightPower);
|
| | | strongerFightPowerTxt.color = _presentFightPower >= (ulong)cfg.recommendFightPower ?
|
| | | UIHelper.GetUIColor(TextColType.Red) : UIHelper.GetUIColor(TextColType.Green, true);
|
| | | if (!highestStage)
|
| | | {
|
| | | if (funcType == (int)FuncPowerType.Human
|
| | | || funcType == (int)FuncPowerType.Demon
|
| | | || funcType == (int)FuncPowerType.Fairy)
|
| | | {
|
| | | targetTxt.text = StringUtility.Contact(cfg.desc, "(", UIHelper.GetTextColorByItemColor(presentTargetValue > 0 ? TextColType.Green : TextColType.Red,
|
| | | presentTargetValue.ToString()), "/", 1, ")");
|
| | | }
|
| | | else
|
| | | {
|
| | | targetTxt.text = StringUtility.Contact(cfg.desc, "(", UIHelper.GetTextColorByItemColor(presentTargetValue >= cfg.targetValue ? TextColType.Green : TextColType.Red,
|
| | | presentTargetValue.ToString()), "/", cfg.targetValue, ")");
|
| | | }
|
| | | }
|
| | | var progress = Mathf.Clamp01((float)fightPower / config.recommendFightPower);
|
| | | var percent = (int)(progress * 100);
|
| | |
|
| | | reachTxtObj.SetActive(highestStage);
|
| | | reachImgObj.SetActive(highestStage);
|
| | | targetTxt.gameObject.SetActive(!highestStage);
|
| | | strongerBtn.gameObject.SetActive(!highestStage);
|
| | | m_ContainerStrongerLabel.gameObject.SetActive(!highestStage);
|
| | | m_Slider.value = progress;
|
| | | m_Progress.text = StringUtility.Contact(percent, "%");
|
| | |
|
| | | strongerBtn.onClick.AddListener(() =>
|
| | | var state = model.GetPromoteState(percent);
|
| | | switch (state)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)cfg.OpenUI);
|
| | | case 0:
|
| | | m_State.SetSprite("XT_WYBQ_3");
|
| | | break;
|
| | | case 1:
|
| | | m_State.SetSprite("XT_WYBQ_2");
|
| | | break;
|
| | | case 2:
|
| | | m_State.SetSprite("XT_WYBQ_1");
|
| | | break;
|
| | | }
|
| | | m_State.SetNativeSize();
|
| | |
|
| | | m_Goto.onClick.AddListener(() =>
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.OpenUI);
|
| | | });
|
| | |
|
| | | }
|
| | |
| | | var _data = model.runeBreakList[key];
|
| | | _itemCnt += model.GetRuneBreakExp(_data);
|
| | | _soulCnt += model.GetRuneSoulBreakExp(_data);
|
| | | if (runeComposeModel.m_RuneBothPropertys.Contains(_data.id))
|
| | | if (runeComposeModel.m_RuneBothPropertys.Contains(_data.id)
|
| | | && model.ResolveFusionStone(_data.sourceType))
|
| | | {
|
| | | var _composeCfg = Config.Instance.Get<RuneComposeConfig>(_data.id);
|
| | | _magicCnt += (_composeCfg == null ? 0 : _composeCfg.NeedMJ);
|
| | |
| | | runeData = runeData.Insert(0, _textBuilder.ToString());
|
| | | int id = int.Parse(runeData.Substring(5, 5));
|
| | | int lv = int.Parse(runeData.Substring(2, 3)) + 1;
|
| | | int sourceType = int.Parse(runeData.Substring(1, 1));
|
| | | int packType = vNetData.PackType;
|
| | | int index = item.ItemPlace;
|
| | | RuneData data = null;
|
| | | runePackData.TryGetValue(index, out data);
|
| | | if (data == null)
|
| | | {
|
| | | data = new RuneData(index, id, lv, packType, 0);
|
| | | data = new RuneData(index, id, lv, packType, sourceType, 0);
|
| | | runePackData.Add(index, data);
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetRuneData(index, id, lv, packType, 0);
|
| | | data.SetRuneData(index, id, lv, packType, sourceType, 0);
|
| | | }
|
| | | }
|
| | | if (OnRefreshRunePack != null)
|
| | |
| | | continue;
|
| | | }
|
| | | int lv = int.Parse(runeData.Substring(2, 3)) + 1;
|
| | | int sourceType = int.Parse(runeData.Substring(1, 1));
|
| | | int placetype = 1;
|
| | | if (data == null)
|
| | | {
|
| | | data = new RuneData(i, id, lv, (int)PackType.rptInterimPack, placetype);
|
| | | data = new RuneData(i, id, lv, (int)PackType.rptInterimPack, sourceType, placetype);
|
| | | runeHoleData.Add(i, data);
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetRuneData(i, id, lv, (int)PackType.rptInterimPack, placetype);
|
| | | data.SetRuneData(i, id, lv, (int)PackType.rptInterimPack, sourceType, placetype);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public bool ResolveFusionStone(int sourceType)
|
| | | {
|
| | | if (sourceType == 0 || sourceType == 2)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool IsSpeicalHole(int hole)
|
| | |
| | | public int cost;
|
| | | }
|
| | |
|
| | | public enum RuneSource
|
| | | {
|
| | | Normal,
|
| | | Compose,
|
| | | }
|
| | |
|
| | | public class RuneData
|
| | | {
|
| | | /// <summary>
|
| | | /// 符印对应位置索引,若在孔上则对应孔id,若在背包,则对应背包位置索引
|
| | | /// </summary>
|
| | | private int _index = -1;
|
| | | public int index {
|
| | | get { return _index; }
|
| | | }
|
| | | private int m_Index = -1;
|
| | | public int index { get { return m_Index; } }
|
| | | /// <summary>
|
| | | /// 符印对应物品id
|
| | | /// </summary>
|
| | | private int _id = -1;
|
| | | public int id { get { return _id; } }
|
| | | private int m_Id = -1;
|
| | | public int id { get { return m_Id; } }
|
| | | /// <summary>
|
| | | /// 符印对应强化等级
|
| | | /// </summary>
|
| | | private int _lv = 0;
|
| | | public int lv {
|
| | | get { return _lv; }
|
| | | }
|
| | | private int m_Level = 0;
|
| | | public int lv { get { return m_Level; } }
|
| | | /// <summary>
|
| | | /// 预留字段
|
| | | /// </summary>
|
| | | private int _locked = -1;
|
| | | public int locked { get { return _locked; } }
|
| | | private int m_Lock = -1;
|
| | | public int locked { get { return m_Lock; } }
|
| | | /// <summary>
|
| | | /// 背包类型,符印背包255
|
| | | /// </summary>
|
| | | private int _packtype = -1;
|
| | | public int packtype { get { return _packtype; } }
|
| | | private int m_PackType = -1;
|
| | | public int packtype { get { return m_PackType; } }
|
| | | /// <summary>
|
| | | /// 符印放置位置,默认为符印背包
|
| | | /// </summary>
|
| | | private int _placetype = 0;
|
| | | public int placetype { get { return _placetype; } }
|
| | | private int m_PlaceType = 0;
|
| | | public int placetype { get { return m_PlaceType; } }
|
| | |
|
| | | public int m_SourceType = 0;
|
| | | public int sourceType { get { return m_SourceType; } }//来源(老号0,默认1,合成2)
|
| | |
|
| | | public bool IsRuneCream { get; private set; }
|
| | |
|
| | | public RuneData(int index, int id, int lv, int packtype, int placetype = 0)
|
| | | public RuneData(int index, int id, int level, int packtype, int sourcetype, int placetype = 0)
|
| | | {
|
| | | this._index = index;
|
| | | this._id = id;
|
| | | this._lv = lv;
|
| | | this._packtype = packtype;
|
| | | this._placetype = placetype;
|
| | | var _itemCfg = Config.Instance.Get<ItemConfig>(id);
|
| | | if (_itemCfg != null)
|
| | | m_Index = index;
|
| | | m_Id = id;
|
| | | m_Level = level;
|
| | | m_PackType = packtype;
|
| | | m_PlaceType = placetype;
|
| | | m_SourceType = sourcetype;
|
| | | var config = Config.Instance.Get<ItemConfig>(id);
|
| | | if (config != null)
|
| | | {
|
| | | IsRuneCream = _itemCfg.Type == RuneModel.RUNE_CREAMTYPE;
|
| | | IsRuneCream = config.Type == RuneModel.RUNE_CREAMTYPE;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetRuneData(int index, int id, int lv, int packtype, int placetype = 0)
|
| | | public void SetRuneData(int index, int id, int level, int packtype, int sourcetype, int placetype = 0)
|
| | | {
|
| | | this._index = index;
|
| | | this._id = id;
|
| | | this._lv = lv;
|
| | | this._packtype = packtype;
|
| | | this._placetype = placetype;
|
| | | var _itemCfg = Config.Instance.Get<ItemConfig>(id);
|
| | | if (_itemCfg != null)
|
| | | m_Index = index;
|
| | | m_Id = id;
|
| | | m_Level = level;
|
| | | m_PackType = packtype;
|
| | | m_PlaceType = placetype;
|
| | | m_SourceType = sourcetype;
|
| | | var config = Config.Instance.Get<ItemConfig>(id);
|
| | | if (config != null)
|
| | | {
|
| | | IsRuneCream = _itemCfg.Type == RuneModel.RUNE_CREAMTYPE;
|
| | | IsRuneCream = config.Type == RuneModel.RUNE_CREAMTYPE;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | cacheJump = index;
|
| | | return;
|
| | | }
|
| | | if ((index < 0 || index >= _data.Count) && !m_Scorller.Loop) return;
|
| | | if ((index < 0 || index >= _data.Count) && !m_Scorller.Loop)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var _size = m_Scorller.GetScrollPositionForDataIndex(index, EnhancedScroller.CellViewPositionEnum.Before);
|
| | | var _contentSize = vertical ? m_Scorller.scrollRect.content.rect.size.y : m_Scorller.scrollRect.content.rect.size.x;
|
| | | if (_contentSize - _size < m_Scorller.ScrollRectSize)
|
| | | {
|
| | | _size = _contentSize - m_Scorller.ScrollRectSize;
|
| | | }
|
| | | m_Scorller.ScrollPosition = _size;
|
| | | }
|
| | |
|
| | | public void JumpIndex(int index,ref float offset)
|
| | | {
|
| | | if (!inited)
|
| | | {
|
| | | cacheJump = index;
|
| | | return;
|
| | | }
|
| | | if ((index < 0 || index >= _data.Count) && !m_Scorller.Loop)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var _size = m_Scorller.GetScrollPositionForDataIndex(index, EnhancedScroller.CellViewPositionEnum.Before);
|
| | | var _contentSize = vertical ? m_Scorller.scrollRect.content.rect.size.y : m_Scorller.scrollRect.content.rect.size.x;
|
| | | offset = 0f;
|
| | | if (_contentSize - _size < m_Scorller.ScrollRectSize)
|
| | | {
|
| | | offset = _size - (_contentSize - m_Scorller.ScrollRectSize);
|
| | | _size = _size - offset;
|
| | | }
|
| | | m_Scorller.ScrollPosition = _size;
|
| | | }
|
| | |
| | |
|
| | | public void ResetScrollPos()
|
| | | {
|
| | | if (_data.Count == 0)
|
| | | if (_data.Count == 0 || !inited)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | public bool jumpToPass { get; set; }
|
| | | public int minTaskHole { get; private set; }
|
| | | public int maxTaskHole { get; private set; }
|
| | | public int immediatelyUnlockTask { get; private set; }
|
| | | void ParseConfig()
|
| | | {
|
| | | for (int i = 1; i <= 3; i++)
|
| | |
| | | passEquipCnt = int.Parse(funcCfg.Numerical2);
|
| | | taskHoleDict = ConfigParse.GetDic<int, int>(funcCfg.Numerical4);
|
| | | }
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassiveSkillTask");
|
| | | immediatelyUnlockTask = int.Parse(funcCfg.Numerical2);
|
| | | funcCfg = Config.Instance.Get<FuncConfigConfig>("PassSkillEquipGetWay");
|
| | | if (funcCfg != null)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | PlayerTaskDatas task { get { return ModelCenter.Instance.GetModel<PlayerTaskDatas>(); } }
|
| | |
|
| | | PlayerMainDate mainData { get { return ModelCenter.Instance.GetModel<PlayerMainDate>(); } }
|
| | | public void SendEquipPassSkill(int _page, int _index, int _skillId)
|
| | | {
|
| | | var pak = new CB407_tagCMPassiveSet();
|
| | |
| | | foreach (var hole in taskHoleDict.Keys)
|
| | | {
|
| | | var taskId = taskHoleDict[hole];
|
| | | if (taskId == immediatelyUnlockTask)
|
| | | if (IsImmediatelyUnlock(hole))
|
| | | {
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool IsImmediatelyUnlock(int hole)
|
| | | {
|
| | | if (taskHoleDict.ContainsKey(hole))
|
| | | {
|
| | | var taskId = taskHoleDict[hole];
|
| | | return mainData.TaskId_Skill.Contains(taskId);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void SetTaskHoleRemind()
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.TASK_SKILL_HOLE, true);
|
| | |
| | | [SerializeField, Header("特效时长")] float m_EffectDuration = 1f;
|
| | | private List<SkillConfig> skillListPass = new List<SkillConfig>();
|
| | | private int presentSltEquipIndex = -1;
|
| | |
|
| | | Coroutine cacheCoroutine = null;
|
| | | SkillModel m_Model;
|
| | | SkillModel model
|
| | |
| | | base.OnActived();
|
| | | UpdatePageBtn();
|
| | |
|
| | | if (model.taskHoleRedpoint.state == RedPointState.Simple)
|
| | | if (taskMain.Skill_Index != 0)
|
| | | {
|
| | | var hole = taskMain.Skill_Index - 1;
|
| | | if (!model.IsPassSkillHoleOpen(hole))
|
| | | {
|
| | | OnClickEquipHole(hole, false);
|
| | | }
|
| | | }
|
| | | else if (model.taskHoleRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | model.SetTaskHoleRemind();
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | |
| | | PassSkillLimit limit;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | {
|
| | | if (limit.OpenSkillSlots > 0
|
| | | && model.taskHoleDict[limit.OpenSkillSlots] == model.immediatelyUnlockTask)
|
| | | if (limit.OpenSkillSlots > 0 && model.IsImmediatelyUnlock(i))
|
| | | {
|
| | | OnClickEquipHole(i, false);
|
| | | return;
|
| | |
| | | model.taskUnlockUpdate -= TaskUnlockUpdate;
|
| | | model.SetDayRemind();
|
| | | model.UnlockPassHole = 0;
|
| | | taskMain.Skill_Index = 0;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | var taskId = model.taskHoleDict[_limit.OpenSkillSlots];
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | | && taskId == model.immediatelyUnlockTask)
|
| | | && model.IsImmediatelyUnlock(_index))
|
| | | {
|
| | | return 2;
|
| | | }
|
| | |
| | | UIHelper.ReplaceNewLine(Language.Get(StringUtility.Contact("PassSkillHoleLimitTask_", limit.OpenSkillSlots)));
|
| | | continue;
|
| | | }
|
| | | else if (model.taskHoleDict[limit.OpenSkillSlots] == model.immediatelyUnlockTask
|
| | | else if (model.IsImmediatelyUnlock(i)
|
| | | && model.IsTaskHoleUnlock(limit.OpenSkillSlots))
|
| | | {
|
| | | if (m_ImmediatelyUnlock.gameObject.activeSelf)
|
| | |
| | | m_GetWayBtn.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | | if (taskId == model.immediatelyUnlockTask)
|
| | | if (model.IsImmediatelyUnlock(index))
|
| | | {
|
| | | m_ImmediatelyUnlock.gameObject.SetActive(true);
|
| | | }
|
| | |
| | |
|
| | | void ImmediatelyUnlock()
|
| | | {
|
| | | var count = pack.GetItemCountByID(PackType.rptItem, taskMain.ItemID);
|
| | | if (count >= taskMain.ItemNumber)
|
| | | if (model.taskHoleDict.ContainsKey(presentSltEquipIndex))
|
| | | {
|
| | | task.CompletionOfTask(model.immediatelyUnlockTask);
|
| | | }
|
| | | else
|
| | | {
|
| | | var requireJade = (ulong)((taskMain.ItemNumber - count) * taskMain.UnitPrice);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("PassiveSkillTask3", requireJade), |
| | | (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if (UIHelper.GetMoneyCnt(1) >= requireJade)
|
| | | {
|
| | | task.CompletionOfTask(model.immediatelyUnlockTask);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GoldErr");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | }
|
| | | });
|
| | | var taskId = model.taskHoleDict[presentSltEquipIndex];
|
| | | TaskAllocation.Instance.SkillTask(taskId);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | equipPassSkills[_index].skillData.m_SelectImg.gameObject.SetActive(true);
|
| | | if (equipPassSkills[_index].skillData.skillId != 0)
|
| | | {
|
| | | equipPassSkills[_index].skillData.m_SelectImg.gameObject.SetActive(true);
|
| | | model.presentSltSkillID = equipPassSkills[_index].skillData.skillId;
|
| | | flipScroll.RefreshActive();
|
| | | OnUpdateSltSkillInfo();
|
| | | }
|
| | | else
|
| | | {
|
| | | equipPassSkills[_index].skillData.m_SelectImg.gameObject.SetActive(false);
|
| | | }
|
| | | //else
|
| | | //{
|
| | | // equipPassSkills[_index].skillData.m_SelectImg.gameObject.SetActive(false);
|
| | | //}
|
| | | }
|
| | |
|
| | | private int GetEquipHoleIndex(int _skillId)
|
| | |
| | | private void OnClickStrengthBtn()
|
| | | {
|
| | | Dictionary<int, int> DicAb = godBeastModel.Absorption_Dic;
|
| | | List<int> List = new List<int>();
|
| | | List<int> ListIndex = new List<int>();
|
| | | List<int> ListCount = new List<int>();
|
| | | foreach (var key in DicAb.Keys)
|
| | | {
|
| | | List.Add(key);
|
| | | ListIndex.Add(key);
|
| | | ListCount.Add(DicAb[key]);
|
| | | }
|
| | | if (m_DoubleToggle.isOn)
|
| | | {
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, List,1);
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, List, 0);
|
| | | dogz_model.SendDogzEquipStrength(m_DogZItemModel.itemInfo.ItemPlace, ListIndex, ListCount, 0);
|
| | | }
|
| | | }
|
| | | private void ChooseToModify(int locationMarker)
|
| | |
| | | m_Item_Text.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | if (IudetDogzEquipPlus != null && IudetDogzEquipPlus[0] > 0)
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName+" +"+ IudetDogzEquipPlus[0];
|
| | | string str= itemConfig.ItemName + " +" + IudetDogzEquipPlus[0];
|
| | | m_Item_Text.text = UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, str, true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Item_Text.text = itemConfig.ItemName;
|
| | | string str = itemConfig.ItemName;
|
| | | m_Item_Text.text = UIHelper.GetTextColorByItemColor(itemConfig.ItemColor, str, true);
|
| | | }
|
| | | if (locationMarker == currentlySelected)
|
| | | {
|
| | |
| | |
|
| | | private void OpenFriend()
|
| | | {
|
| | | WindowCenter.Instance.Open<TeamInviteWin>();
|
| | | model.InvitePlayers(TeamInviteType.Friend);
|
| | | WindowCenter.Instance.Open<TeamInviteWin>();
|
| | | }
|
| | |
|
| | | private void OpenFairy()
|
| | | {
|
| | | WindowCenter.Instance.Open<TeamInviteWin>();
|
| | | model.InvitePlayers(TeamInviteType.Fairy);
|
| | | WindowCenter.Instance.Open<TeamInviteWin>();
|
| | | }
|
| | |
|
| | | private void OpenNearby()
|
| | | {
|
| | | WindowCenter.Instance.Open<TeamInviteWin>();
|
| | | model.InvitePlayers(TeamInviteType.NearBy);
|
| | | WindowCenter.Instance.Open<TeamInviteWin>();
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | |
| | | bool serverInited = false;
|
| | | FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } }
|
| | |
|
| | | public bool autoAcceptApplication {
|
| | | get { return (PlayerDatas.Instance.baseData.ExAttr2 / 10) % 10 == 0; }
|
| | |
| | | levelMaxBuf = GeneralConfig.Instance.playerMaxLevel;
|
| | | ParseTeamMission();
|
| | | DTCB309_tagGCAnswerPlayerShortInfo.OnPlayerShortInfoEvent += OnGetPlayerShortInfo;
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo += OnUpdateFairyInfo;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | PlayerDatas.Instance.fairyData.OnRefreshFairyInfo -= OnUpdateFairyInfo;
|
| | | DTCB309_tagGCAnswerPlayerShortInfo.OnPlayerShortInfoEvent -= OnGetPlayerShortInfo;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | break;
|
| | | case TeamInviteType.Fairy:
|
| | | GetFairyMemebers();
|
| | | if (teamInvitesUpdateEvent != null)
|
| | | {
|
| | | teamInvitesUpdateEvent(_inviteType);
|
| | | }
|
| | | fairyModel.UpdateFairyInfo();
|
| | | break;
|
| | | case TeamInviteType.NearBy:
|
| | | RequestQueryNearbyPlayers();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnUpdateFairyInfo()
|
| | | {
|
| | | if (currentInviteType == TeamInviteType.Fairy)
|
| | | {
|
| | | GetFairyMemebers();
|
| | | if (teamInvitesUpdateEvent != null)
|
| | | {
|
| | | teamInvitesUpdateEvent(TeamInviteType.Fairy);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnGetPlayerShortInfo(HB309_tagGCAnswerPlayerShortInfo _inTeamInfo)
|
| | | {
|
| | | if (playerInTeamAnswerEvent != null)
|
| | |
| | | index++;
|
| | | if (treasure.treasureStages[k].unlockType == TreasureStageUnlock.Func ||
|
| | | treasure.treasureStages[k].unlockType == TreasureStageUnlock.Skill ||
|
| | | treasure.treasureStages[k].unlockType == TreasureStageUnlock.Treasure)
|
| | | treasure.treasureStages[k].unlockType == TreasureStageUnlock.Treasure ||
|
| | | treasure.treasureStages[k].unlockType == TreasureStageUnlock.TreasureSoul)
|
| | | {
|
| | | _stage = treasure.treasureStages[k];
|
| | | displayStageCount++;
|
| | |
| | |
|
| | | if (!isMax)
|
| | | {
|
| | | AutoSelectPotentialBook();
|
| | | DisplayUpgradeCost();
|
| | | DisplayGetSkill();
|
| | | DisplaySuccessRatio();
|
| | |
| | | var isMax = level >= config.SkillMaxLV;
|
| | | if (!isMax)
|
| | | {
|
| | | DisplayPotentialBook(0);
|
| | | AutoSelectPotentialBook();
|
| | | DisplayPotentialBook(model.selectedPotentialBook);
|
| | | }
|
| | |
|
| | | model.onPotentialLevelUpResultEvent -= OnPotentialLevelUp;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void AutoSelectPotentialBook()
|
| | | {
|
| | | var potential = m_Treasure.GetPotential(model.selectedPotential);
|
| | | if (potential == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var levelUpType = model.GetSkillLevelUpType(potential.id);
|
| | | var levelupId = TreasureModel.GetSkillLevelUpId(levelUpType, potential.level + 1);
|
| | | var config = Config.Instance.Get<TreasureSkillConfig>(levelupId);
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var itemId = config.Meterial2ID.Length > 0 ? config.Meterial2ID[0] : 0;
|
| | | if (itemId != 0)
|
| | | {
|
| | | var own = playerPack.GetItemCountByID(PackType.rptItem, itemId);
|
| | | var need = config.MeterialNum2[0];
|
| | | var rate = config.Rate[0];
|
| | | if (rate >= 60 && own >= need)
|
| | | {
|
| | | model.selectedPotentialBook = itemId;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayUpgradeCost()
|
| | | {
|
| | | var potential = m_Treasure.GetPotential(selectedPotential);
|
| | |
| | |
|
| | | int Compare(int x, int y)
|
| | | {
|
| | | TreasureSpecialData special_x;
|
| | | TreasureSpecialData special_y;
|
| | | if (model.TryGetTreasureSoul(x, out special_x) && model.TryGetTreasureSoul(y, out special_y))
|
| | | var leftConfig = Config.Instance.Get<TreasurePrivilegeConfig>(x);
|
| | | var rightConfig = Config.Instance.Get<TreasurePrivilegeConfig>(y);
|
| | | if (leftConfig != null && rightConfig != null)
|
| | | {
|
| | | return special_x.treasureId.CompareTo(special_y.treasureId);
|
| | | return leftConfig.sort.CompareTo(rightConfig.sort);
|
| | | }
|
| | | return x.CompareTo(y);
|
| | | }
|
| | |
| | | {
|
| | | if (OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("LimitGilt1");
|
| | | var seconds = 0;
|
| | | if (operationBase != null)
|
| | | {
|
| | | if (operationBase.InAdvanceTime(TimeUtility.ServerNow))
|
| | | {
|
| | | seconds = operationBase.GetSecondsBeforeStart(TimeUtility.ServerNow);
|
| | | }
|
| | | }
|
| | | SysNotifyMgr.Instance.ShowTip("LimitGilt1", TimeUtility.SecondsToDHMSCHS(seconds));
|
| | | return;
|
| | | }
|
| | | else
|
| | |
| | | private void VipInvestRedPoint()//Vip 投资红点
|
| | | {
|
| | | JumpIndex = 0;
|
| | | redPointStre1.state = RedPointState.None;
|
| | | InvestInfo = GetInvestInfoByType((int)InvestType.Vip);
|
| | | cycle = GetInvestCycle(InvestInfo.curDay);
|
| | | if (InvestInfo.investGold <= 0)
|
| | |
| | | [SerializeField] GameObject m_Realized_BGM;
|
| | | [SerializeField] Text m_RemainingDays;//剩余天数
|
| | | [SerializeField] Button m_GoToVipBoss;
|
| | | [SerializeField] Text m_FairyJadeText;//仙玉
|
| | | [SerializeField] Text m_TieTheJadeText;//绑玉
|
| | | VipInvestModel _investModel;
|
| | | VipInvestModel investModel { get { return _investModel ?? (_investModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } }
|
| | | ItemTipsModel _tipsModel;
|
| | |
| | | InvestInfo = investModel.GetInvestInfoByType((int)InvestType.Vip);
|
| | | cycle = investModel.GetInvestCycle(InvestInfo.curDay);
|
| | | investIndex = investModel.GetVipInvestIndex();
|
| | |
|
| | | GetFairyJade();
|
| | | if (InvestInfo.curDay <= 0)
|
| | | {
|
| | | m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, 0.ToString(), true));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (7 - InvestInfo.curDay).ToString(), true));
|
| | | int Day = 0;
|
| | | if (7 - InvestInfo.curDay > 0)
|
| | | {
|
| | | Day = 7 - InvestInfo.curDay;
|
| | | }
|
| | | m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, Day.ToString(), true));
|
| | | }
|
| | |
|
| | | if (InvestInfo.investGold <= 0)
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV;
|
| | | if (investModel.redPointStre1.state == RedPointState.Simple)
|
| | | {
|
| | | investModel.IsRedpoint = false;
|
| | |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | investModel.RefreshInvestAct -= RefreshInvestState;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, (7 - InvestInfo.curDay).ToString(), true));
|
| | | int Day = 0;
|
| | | if (7 - InvestInfo.curDay > 0)
|
| | | {
|
| | | Day = 7 - InvestInfo.curDay;
|
| | | }
|
| | | m_RemainingDays.text = string.Format(Language.Get("TheRemainingNumberDays_Z"), UIHelper.GetTextColorByItemColor(TextColType.Green, Day.ToString(), true));
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FindPreciousFrameFunc3);
|
| | | }
|
| | | private void OnPlayersUpLV(PlayerDataRefresh obj)
|
| | | {
|
| | | if (obj == PlayerDataRefresh.Gold || obj == PlayerDataRefresh.GoldPaper)
|
| | | {
|
| | | GetFairyJade();
|
| | | }
|
| | | }
|
| | | private void GetFairyJade()
|
| | | {
|
| | | m_FairyJadeText.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | m_TieTheJadeText.text = UIHelper.GetMoneyCnt(2).ToString();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | TrialDungeonModel trialDungeonModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
|
| | | ImpactRankModel rankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
|
| | | public bool IsJumpState { get; private set; }
|
| | | private int jumpPhase = 0;
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case JumpUIType.VipRechargeFunc5:
|
| | | if (!OpenServerActivityCenter.Instance.IsActivityOpen(_tagWinSearchModel.TABID))
|
| | | {
|
| | | return;
|
| | | }
|
| | | break;
|
| | | case JumpUIType.OpenServerRank:
|
| | | case JumpUIType.OSTimeLimitGift:
|
| | | case JumpUIType.OpenServerActivityFunc2_1:
|
| | |
| | | break;
|
| | | case JumpUIType.OpenServerGift:
|
| | | return;
|
| | | case JumpUIType.EquipCompose1:
|
| | | case JumpUIType.EquipCompose2:
|
| | | case JumpUIType.EquipCompose3:
|
| | | case JumpUIType.EquipCompose4:
|
| | | case JumpUIType.ComposeTicketFairy:
|
| | | case JumpUIType.ComposeTicketGod:
|
| | | case JumpUIType.ComposeTicketIce:
|
| | | int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | if (types.Length > 0)
|
| | | {
|
| | | if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID+1,types[0],types[1]))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | DebugEx.Log("WindowJumpTo" + jumpType);
|
| | |
| | | case JumpUIType.StrengthFunc3:
|
| | | case JumpUIType.StrengthFunc4:
|
| | | case JumpUIType.StrengthFunc5:
|
| | | case JumpUIType.EquipWashType2:
|
| | | case JumpUIType.StrengthFunc1Type2:
|
| | | case JumpUIType.EquipSuitType2:
|
| | | SetJumpLogic<EquipReinforceWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.ComposeFunc1:
|
| | |
| | | case JumpUIType.TicketCompose1:
|
| | | case JumpUIType.TicketCompose2:
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.EquipCompose1:
|
| | | case JumpUIType.EquipCompose2:
|
| | | case JumpUIType.EquipCompose3:
|
| | | case JumpUIType.EquipCompose4:
|
| | | int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | if(types.Length > 0)
|
| | | {
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1,types[0],types[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | }
|
| | | break;
|
| | | case JumpUIType.RuneFunc1:
|
| | | case JumpUIType.RuneFunc2:
|
| | |
| | | break;
|
| | | case JumpUIType.PetFunc1:
|
| | | case JumpUIType.PetFunc2:
|
| | | case JumpUIType.MountType2:
|
| | | case JumpUIType.FairyGrabBoss:
|
| | | SetJumpLogic<PetWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | |
| | | case JumpUIType.VipRechargeFunc1:
|
| | | case JumpUIType.VipRechargeFunc2:
|
| | | case JumpUIType.VipRechargeFunc4:
|
| | | case JumpUIType.VipRechargeFunc5:
|
| | | if (VersionConfig.Get().isBanShu)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FuncNoOpen_VIP");
|
| | |
| | | case JumpUIType.UnionChat1:
|
| | | case JumpUIType.UnionChat2:
|
| | | ChatCtrl.Inst.presentChatType = (ChatInfoType)(int.Parse(_tagWinSearchModel.SelectActive) - 1);
|
| | | switch (ChatCtrl.Inst.presentChatType)
|
| | | {
|
| | | case ChatInfoType.Team:
|
| | | case ChatInfoType.Fairy:
|
| | | SetJumpLogic<SocialWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | default:
|
| | | SetJumpLogic<ChatWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | }
|
| | | break;
|
| | | case JumpUIType.MakeDrug:
|
| | | if (PackSendQuestMgr.Instance.useItemModel != null)
|
| | |
| | | case JumpUIType.OpenServerGift3:
|
| | | case JumpUIType.LimitedTimePackage:
|
| | | case JumpUIType.OpenServerRank:
|
| | | case JumpUIType.VipRechargeFunc5:
|
| | | SetJumpLogic<OpenServerActivityWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.OpenServerMountRank:
|
| | |
| | | case JumpUIType.ComposeTicketFairy:
|
| | | case JumpUIType.ComposeTicketGod:
|
| | | case JumpUIType.ComposeTicketIce:
|
| | | var composeModel = ModelCenter.Instance.GetModel<ComposeWinModel>();
|
| | | int[] composeTypelist = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1, composeTypelist[0], composeTypelist[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | |
| | | StrengthFunc2 = 13,
|
| | | StrengthFunc3 = 14,
|
| | | StrengthFunc4 = 15,
|
| | | EquipSuitType2 = 241, //套装界面
|
| | | StrengthFunc5 = 16,
|
| | | EquipWashType2 = 239, //装备洗练界面
|
| | | ComposeFunc1 = 17,
|
| | | ComposeFunc2 = 18,
|
| | | ComposeFunc3 = 19,
|
| | |
| | | UnionFunc5 = 31,
|
| | | PetFunc1 = 32,
|
| | | PetFunc2 = 33,
|
| | | MountType2 = 240,//坐骑界面
|
| | | PetStone = 34,
|
| | | Treasure = 35,
|
| | | WorldChat = 38,
|
| | |
| | | Kylin5= 232,//麒麟之府的5层
|
| | | Kylin6 = 233,//麒麟之府的6层
|
| | | PrayforDrug = 234, //炼丹祈福(太上老君的馈赠)
|
| | | EquipCompose1 = 235, //装备合成-龙魂红二
|
| | | EquipCompose2 = 236, //装备合成-龙魂红三
|
| | | EquipCompose3 = 237, //装备合成-灵瑶红二
|
| | | EquipCompose4 = 238, //装备合成-灵瑶红三
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| | | GyzTs = 1003,//鬼牙刃功法提升界面
|
| | |
| | | BasicsScoreAHit = 181,//基础命中
|
| | | BasicsDodge = 182,//基础闪避
|
| | | OnlyFinalHurt = 183,// 额外伤害附加
|
| | | CDBPlayerRefresh_ForbidenTalk = 184,//禁言
|
| | | CDBPlayerRefresh_FuncDef = 185, // 功能层防御 185
|
| | | CDBPlayerRefresh_TreasureScore = 186, //寻宝商店积分
|
| | | CDBPlayerRefresh_Danjing = 187, // 丹精 187
|
| | |
| | | {
|
| | | Def_IudetMapLoaction = 15, // 物品记录地图坐标[mapid, posx, posy]
|
| | | Def_IudetLegendAttrID = 17, //物品传奇属性ID列表
|
| | | Def_IudetItemCount = 18, // 物品个数,支持20亿,目前仅特殊转化物品会用到
|
| | | Def_IudetLegendAttrValue = 19, //物品传奇属性值列表
|
| | | Def_IudetOutOfPrintAttrID = 21, //物品绝版属性ID列表
|
| | | Def_IudetOutOfPrintAttrValue = 23, //物品绝版属性值列表
|
| | |
|
| | |
|
| | | Def_IudetItemColor = 16, //物品颜色,如果该值没有就取物品
|
| | | Def_IudetCancelUseLimit = 20, //物品取消使用限制
|
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | #if UNITY_EDITOR |
| | | using UnityEditor; |
| | | using System.Reflection; |
| | | #endif |
| | | |
| | | [AttributeUsage(AttributeTargets.Field)] |
| | | public class EnumLabelAttribute : PropertyAttribute
|
| | | { |
| | | public readonly Type enumType; |
| | | public EnumLabelAttribute(Type type)
|
| | | {
|
| | | this.enumType = type;
|
| | | } |
| | | } |
| | | |
| | | #if UNITY_EDITOR |
| | | [CustomPropertyDrawer(typeof(EnumLabelAttribute))] |
| | | public class EnumLabelPropertyDrawer : PropertyDrawer
|
| | | {
|
| | | List<string> m_EnumLabels = new List<string>();
|
| | | public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
| | | {
|
| | | var customAttribute = (EnumLabelAttribute)attribute;
|
| | | if (m_EnumLabels.Count != property.enumNames.Length)
|
| | | {
|
| | | m_EnumLabels.Clear();
|
| | | var enumtype = customAttribute.enumType;
|
| | | foreach (var enumName in property.enumNames)
|
| | | {
|
| | | var enumfield = enumtype.GetField(enumName);
|
| | | var customAttributes = enumfield.GetCustomAttributes(typeof(HeaderAttribute), false);
|
| | | m_EnumLabels.Add(customAttributes.Length <= 0 ? enumName : ((HeaderAttribute)customAttributes[0]).header);
|
| | | }
|
| | | }
|
| | | EditorGUI.BeginChangeCheck();
|
| | | var value = EditorGUI.Popup(position, fieldInfo.Name, property.enumValueIndex, m_EnumLabels.ToArray());
|
| | | if (EditorGUI.EndChangeCheck())
|
| | | {
|
| | | property.enumValueIndex = value;
|
| | | }
|
| | | }
|
| | | } |
| | | #endif |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ce694ab87ddaeeb4eaf384d8cc6b284b |
| | | timeCreated: 1537268726 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | { |
| | | static Font m_Preferred; |
| | | public static Font preferred {
|
| | | get { return m_Preferred ?? (m_Preferred = Resources.Load<Font>("Font/方正准圆简体")); }
|
| | | get { return m_Preferred ?? (m_Preferred = UILoader.LoadFont("方正准圆简体")); }
|
| | | } |
| | | |
| | | static Font m_Secondary; |
| | |
| | | public void VerifyChat(string content, ChatInfoType channelType, Action<bool, string> callback)
|
| | | {
|
| | | int channel = 0;
|
| | | var chatCenter = ModelCenter.Instance.GetModel<ChatCenter>();
|
| | | if (!requireVerify || !GetChannel(channelType, out channel) || PlayerDatas.Instance.baseData.VIPLv >= 4
|
| | | || IsFairyFeast(channelType))
|
| | | || IsFairyFeast(channelType) || chatCenter.IsChatBanned)
|
| | | {
|
| | | if (callback != null)
|
| | | {
|
| | |
| | | public static readonly Color32 s_BrightRedColor = new Color32(255, 3, 3, 255);
|
| | | public static readonly Color32 s_BrightPurpleColor = new Color32(218, 72, 213, 255);
|
| | | public static readonly Color32 s_BrightBlueColor = new Color32(0, 107, 227, 255);
|
| | | public static readonly Color32 s_BrightOrangeColor = new Color32(255, 103, 1, 255);
|
| | | public static readonly Color32 s_BrightWhiteColor = new Color32(104, 104, 104, 255);
|
| | | public static readonly Color32 s_BrightOrangeColor = new Color32(255, 103, 1, 255); //FF6701FF
|
| | | public static readonly Color32 s_BrightWhiteColor = new Color32(104, 104, 104, 255); //686868
|
| | | public static readonly Color32 s_BrightGreenColor = new Color32(16, 157, 6, 255);
|
| | |
|
| | | public static readonly Color32 s_DarkPinkColor = new Color32(255, 124, 124, 255);
|