Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | EditorApplication.delayCall += ExcuteBuildConfig;
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("Lua"))
|
| | | {
|
| | | EditorApplication.delayCall += ExcuteBuildLua;
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("UI"))
|
| | | {
|
| | | EditorApplication.delayCall += ExcuteBuildUI;
|
| | |
| | | TableTool.CopyConfigsToOutPutPath(StringUtility.Contact(m_UserData.m_OutputPath, "/config"));
|
| | | }
|
| | |
|
| | | private void ExcuteBuildLua()
|
| | | {
|
| | | LuaBuildHelper.OnPreBuild();
|
| | | UpdateLuaSetting.SetAllLuaAssetBundleName();
|
| | | ExcuteBuildAsset("lua");
|
| | | LuaBuildHelper.OnPostBuild();
|
| | | }
|
| | |
|
| | | private void ExcuteBuildLevels()
|
| | | {
|
| | | UpdateLevelSetting.SetAllLevelAssetBundleName();
|
| | |
| | |
|
| | | public partial class EquipSuitAttrConfig : ConfigBase, IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<string, EquipSuitAttrConfig> suitAttrDic = new Dictionary<string, EquipSuitAttrConfig>();
|
| | | private static Dictionary<string, EquipSuitAttrData> suitAttrDic = new Dictionary<string, EquipSuitAttrData>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | string key = StringUtility.Contact(groupType, suiteType, suiteLV, job);
|
| | | if (!suitAttrDic.ContainsKey(key))
|
| | | {
|
| | | suitAttrDic.Add(key, this);
|
| | | EquipSuitAttrData attrData = new EquipSuitAttrData();
|
| | | attrData.guid = key;
|
| | | attrData.attrConfig = this;
|
| | | attrData.attr1Ids = ConfigParse.GetMultipleStr<int>(propList1);
|
| | | attrData.attr1Values = ConfigParse.GetMultipleStr<int>(propValueList1);
|
| | | attrData.attr2Ids = ConfigParse.GetMultipleStr<int>(propList2);
|
| | | attrData.attr2Values = ConfigParse.GetMultipleStr<int>(propValueList2);
|
| | | attrData.attr3Ids = ConfigParse.GetMultipleStr<int>(propList3);
|
| | | attrData.attr3Values = ConfigParse.GetMultipleStr<int>(propValueList3);
|
| | | suitAttrDic.Add(key,attrData);
|
| | | }
|
| | | }
|
| | |
|
| | | public static EquipSuitAttrConfig GetSuitAttrConfig(int groupType, int suitType, int suiteLV, int job)
|
| | | public static EquipSuitAttrData GetSuitAttrData(int groupType, int suitType, int suiteLV, int job)
|
| | | {
|
| | | string key = StringUtility.Contact(groupType, suitType, suiteLV, job);
|
| | | EquipSuitAttrConfig suitAttrConfig = null;
|
| | | suitAttrDic.TryGetValue(key, out suitAttrConfig);
|
| | | return suitAttrConfig;
|
| | | return GetSuitAttrDataBySuitID(key);
|
| | | }
|
| | |
|
| | | public static EquipSuitAttrConfig GetSuitAttrConfigBySuitID(string suitId)
|
| | | public static EquipSuitAttrData GetSuitAttrDataBySuitID(string suitId)
|
| | | {
|
| | | EquipSuitAttrConfig suitAttrConfig = null;
|
| | | suitAttrDic.TryGetValue(suitId, out suitAttrConfig);
|
| | | return suitAttrConfig;
|
| | | EquipSuitAttrData attrData = null;
|
| | | suitAttrDic.TryGetValue(suitId, out attrData);
|
| | | return attrData;
|
| | | }
|
| | |
|
| | | public static Dictionary<string, EquipSuitAttrConfig> GetSuitAttrDict()
|
| | | public static Dictionary<string,EquipSuitAttrData> GetSuitAttrDict()
|
| | | {
|
| | | return suitAttrDic;
|
| | | }
|
| | |
|
| | | public class EquipSuitAttrData
|
| | | {
|
| | | public string guid;
|
| | | public EquipSuitAttrConfig attrConfig;
|
| | | public int[] attr1Ids;
|
| | | public int[] attr1Values;
|
| | | public int[] attr2Ids;
|
| | | public int[] attr2Values;
|
| | | public int[] attr3Ids;
|
| | | public int[] attr3Values;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | public partial class EquipWashSpecConfig : ConfigBase, IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<int, List<EquipWashSpecConfig>> _washSpecDict = new Dictionary<int, List<EquipWashSpecConfig>>();
|
| | | private static Dictionary<int, List<EquipWashSpecData>> _washSpecDict = new Dictionary<int, List<EquipWashSpecData>>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | EquipWashSpecData washSpecData = new EquipWashSpecData();
|
| | | washSpecData.washSpecType = typeNeed;
|
| | | washSpecData.specConfig = this;
|
| | | washSpecData.activeIds = ConfigParse.GetMultipleStr<int>(attByLevel);
|
| | | washSpecData.activeValues = ConfigParse.GetMultipleStr<int>(attByLevelValue);
|
| | |
|
| | | if (!_washSpecDict.ContainsKey(typeNeed))
|
| | | {
|
| | | List<EquipWashSpecConfig> washSpeclist = new List<EquipWashSpecConfig>();
|
| | | washSpeclist.Add(this);
|
| | | List<EquipWashSpecData> washSpeclist = new List<EquipWashSpecData>();
|
| | | washSpeclist.Add(washSpecData);
|
| | | _washSpecDict.Add(typeNeed, washSpeclist);
|
| | | }
|
| | | else
|
| | | {
|
| | | _washSpecDict[typeNeed].Add(this);
|
| | | _washSpecDict[typeNeed].Add(washSpecData);
|
| | | }
|
| | | }
|
| | |
|
| | | //得到相同洗练类型对应的所有套装属性
|
| | | public static List<EquipWashSpecConfig> GetWashSpecModel(int type)
|
| | | public static List<EquipWashSpecData> GetWashSpecModel(int type)
|
| | | {
|
| | | if (_washSpecDict.ContainsKey(type))
|
| | | return _washSpecDict[type];
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public class EquipWashSpecData
|
| | | {
|
| | | public int washSpecType;
|
| | | public EquipWashSpecConfig specConfig;
|
| | | public int[] activeIds;
|
| | | public int[] activeValues;
|
| | | }
|
| | |
|
| | | }
|
| | | } |
| | |
| | | {
|
| | | public partial class ItemPlusConfig : ConfigBase, IConfigPostProcess
|
| | | {
|
| | | private static Dictionary<string, ItemPlusConfig> t_ItemP = new Dictionary<string, ItemPlusConfig>();
|
| | | private static Dictionary<string, ItemPlusData> t_ItemP = new Dictionary<string, ItemPlusData>();
|
| | |
|
| | | public void OnConfigParseCompleted()
|
| | | {
|
| | | t_ItemP.Add(StringUtility.Contact(type, level).ToString(), this);
|
| | | ItemPlusData plusData = new ItemPlusData();
|
| | | plusData.guid = StringUtility.Contact(type, level);
|
| | | plusData.plusConfig = this;
|
| | | plusData.attrIds = ConfigParse.GetMultipleStr<int>(attType);
|
| | | plusData.attrValues = ConfigParse.GetMultipleStr<int>(attValue);
|
| | | t_ItemP.Add(plusData.guid,plusData);
|
| | | }
|
| | |
|
| | | public static ItemPlusConfig GetTypeAndGrade(int _type, int _level)
|
| | | {
|
| | | ItemPlusConfig itemPlus = null;
|
| | | t_ItemP.TryGetValue(StringUtility.Contact(_type, _level).ToString(), out itemPlus);
|
| | | string key = StringUtility.Contact(_type, _level);
|
| | | if(t_ItemP.ContainsKey(key))
|
| | | {
|
| | | itemPlus = t_ItemP[key].plusConfig;
|
| | | }
|
| | | return itemPlus;
|
| | | }
|
| | |
|
| | | public static ItemPlusData GetItemPlusData(int _type, int _level)
|
| | | {
|
| | | ItemPlusData itemPlus = null;
|
| | | string key = StringUtility.Contact(_type, _level);
|
| | | t_ItemP.TryGetValue(key,out itemPlus);
|
| | | return itemPlus;
|
| | | }
|
| | |
|
| | | public class ItemPlusData
|
| | | {
|
| | | public string guid;
|
| | | public ItemPlusConfig plusConfig;
|
| | | public int[] attrIds;
|
| | | public int[] attrValues;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
| | | { |
| | | IsStateActive = true; |
| | | |
| | | if (targetPlayer != null)
|
| | | {
|
| | | var bornpos = targetPlayer.Root.position + targetPlayer.Root.right * 0.6f - targetPlayer.Forward * 0.3f;
|
| | | bornpos.y = targetPlayer.Root.position.y + model.height;
|
| | | Pos = bornpos; |
| | | } |
| | | |
| | | |
| | | m_Model.SetLayer(LayerUtility.Monster, true); |
| | | |
| | |
| | | env.DoString(content, chunkName, _table); |
| | | } |
| | | |
| | | private static string LoadAsset(ref string _fileName) |
| | | private static string LoadAsset(ref string file) |
| | | { |
| | | _fileName = _fileName.Replace('.', '/'); |
| | | file = file.Replace('.', '/'); |
| | | |
| | | var path = string.Empty; |
| | | if (AssetSource.luaFromEditor) |
| | | { |
| | | path = ResourcesPath.LUA_FODLER + "/" + _fileName + ".lua"; |
| | | path = ResourcesPath.LUA_FODLER + "/" + file + ".lua"; |
| | | return File.ReadAllText(path); |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath(StringUtility.Contact("lua/", _fileName, ".lua")); |
| | | var assetBundle = StringUtility.Contact("lua/", file).ToLower(); |
| | | var lastDotIndex = file.LastIndexOf('.'); |
| | | var assetName = file.Substring(lastDotIndex, file.Length - lastDotIndex); |
| | | var asset = AssetBundleUtility.Instance.Sync_LoadAsset(assetBundle, assetName) as TextAsset; |
| | | return asset.text; |
| | | } |
| | | |
| | | return File.ReadAllText(path); |
| | | } |
| | | |
| | | private static byte[] LoadAssetBytes(ref string _fileName) |
| | |
| | |
|
| | | public override void Init()
|
| | | {
|
| | | GetRefineStoveConditions();
|
| | | _blastFurnaceExpDict = new Dictionary<int, int>();
|
| | | extraMats = null;
|
| | | alchemyModellist = null;
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | /// <summary>
|
| | | /// 得到可以选择炉火的丹药
|
| | | /// </summary>
|
| | | public List<int> canUseFireDandrugIDs { get; private set; }
|
| | | public void GetBlastFurnaceRecipe()
|
| | | {
|
| | | canUseFireDandrugIDs = null;
|
| | | _tagfuncModel = Config.Instance.Get<FuncConfigConfig>("BlastFurnaceRecipe");
|
| | | if (_tagfuncModel == null)
|
| | | return;
|
| | | canUseFireDandrugIDs = ConfigParse.GetMultipleStr<int>(_tagfuncModel.Numerical1).ToList();
|
| | | }
|
| | |
|
| | | #region 选择炉火逻辑处理
|
| | |
|
| | |
| | | _fireCellCtrl.OnRefreshCell += RefreshMatCell;
|
| | | playerPack.RefreshItemCountAct += InitModel;
|
| | | _closeBtn.onClick.AddListener(CloseWin);
|
| | | FurnaceModel.GetRefineStoveConditions();
|
| | | CreateCell();
|
| | | }
|
| | |
|
| | |
| | | WindowCenter.Instance.windowAfterOpenEvent += WindowAfterOpenEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | PlayerRealmData.OnPlayerCollectEnd += OnPlayerCollectEnd;
|
| | |
|
| | | var time = bandTime;
|
| | | banTimeArray[0] = time.Year;
|
| | | banTimeArray[1] = time.Month;
|
| | | banTimeArray[2] = time.Day;
|
| | | banTimeArray[3] = time.Hour;
|
| | | banTimeArray[4] = time.Minute;
|
| | | banTimeArray[5] = time.Second;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | chatChannels.Add(ChatInfoType.Trumpet);
|
| | | chatChannels.Add(ChatInfoType.Fairy);
|
| | | chatChannels.Add(ChatInfoType.Friend);
|
| | |
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("ClientChatBan");
|
| | | banCheckSecond = int.Parse(config.Numerical1);
|
| | | repeatCountLimit = int.Parse(config.Numerical2);
|
| | | maliceCheckCount = int.Parse(config.Numerical3);
|
| | | maliceLimitCount = int.Parse(config.Numerical4);
|
| | | }
|
| | |
|
| | | 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)
|
| | | if (IsChatBanned || clientBanned)
|
| | | {
|
| | | SaveSpeech((int)PlayerDatas.Instance.PlayerId, _tick, encode);
|
| | | return;
|
| | |
| | |
|
| | | public void HandleChatBanned(ChatInfoType channel, string message, int toPlayer)
|
| | | {
|
| | | if (IsChatBanned)
|
| | | if (IsChatBanned || clientBanned)
|
| | | {
|
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var playerName = UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName);
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 聊天禁言
|
| | | public bool clientBanned
|
| | | {
|
| | | get
|
| | | {
|
| | | var time = new DateTime(banTimeArray[0], banTimeArray[1], banTimeArray[2],
|
| | | banTimeArray[3], banTimeArray[4], banTimeArray[5]);
|
| | | return TimeUtility.ServerNow < time;
|
| | | }
|
| | | }
|
| | |
|
| | | public int banCheckSecond = 60;
|
| | | public int repeatCountLimit = 5;
|
| | | public int maliceCheckCount = 10;
|
| | | public int maliceLimitCount = 5;
|
| | |
|
| | | public int banHour
|
| | | {
|
| | | get { return LocalSave.GetInt("ClientChatBanHour", 0); }
|
| | | set
|
| | | {
|
| | | LocalSave.SetInt("ClientChatBanHour", value);
|
| | | }
|
| | | }
|
| | |
|
| | | private int[] banTimeArray = new int[6];
|
| | | private DateTime bandTime
|
| | | {
|
| | | get
|
| | | {
|
| | | var timeArray = LocalSave.GetIntArray("ClientChatBanTime");
|
| | | if (null == timeArray)
|
| | | {
|
| | | return TimeUtility.OriginalTime;
|
| | | }
|
| | | else
|
| | | {
|
| | | return new DateTime(timeArray[0], timeArray[1], timeArray[2], timeArray[3], timeArray[4], timeArray[5]);
|
| | | }
|
| | | }
|
| | | set
|
| | | {
|
| | | banTimeArray[0] = value.Year;
|
| | | banTimeArray[1] = value.Month;
|
| | | banTimeArray[2] = value.Day;
|
| | | banTimeArray[3] = value.Hour;
|
| | | banTimeArray[4] = value.Minute;
|
| | | banTimeArray[5] = value.Second;
|
| | | LocalSave.SetIntArray("ClientChatBanTime", banTimeArray);
|
| | | }
|
| | | }
|
| | |
|
| | | public void ChatClientBan()
|
| | | {
|
| | | var time = TimeUtility.ServerNow;
|
| | | var hour = Mathf.Min(24, banHour + 1);
|
| | | banHour = hour;
|
| | | time = time.AddTicks(hour * TimeSpan.TicksPerHour);
|
| | | bandTime = time;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | try
|
| | | {
|
| | | if (chatCenter.IsChatBanned || IsInviteChat(content)
|
| | | || KillRegex.IsMatch(content))
|
| | | if (chatCenter.IsChatBanned || chatCenter.clientBanned ||
|
| | | IsInviteChat(content) || KillRegex.IsMatch(content))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | msg = CheckHasItem(result, _recentlyChat);
|
| | | chatCenter.recentlyChat = null;
|
| | |
|
| | | if (chatCenter.IsChatBanned)
|
| | | if (chatCenter.IsChatBanned || chatCenter.clientBanned)
|
| | | {
|
| | | var toPlayer = PteChatID;
|
| | | if (info.HasValue && info.Value.infoint1 == 0)
|
| | |
| | | SinglePackModel singlePack = _packModel.GetSinglePackModel(PackType.rptItem);
|
| | | if (ChatCtrl.Inst.presentChatType == ChatInfoType.Trumpet)
|
| | | {
|
| | | if (chatCenter.IsChatBanned)
|
| | | if (chatCenter.IsChatBanned || chatCenter.clientBanned)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (CheckRepeatContent(m_ChatInput.text))
|
| | | if (!chatCenter.clientBanned)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("RepeatChat");
|
| | | return;
|
| | | CheckRepeatContent(m_ChatInput.text);
|
| | | CheckMaliceChat(m_ChatInput.text);
|
| | | }
|
| | | if (CheckChatCD())
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | #region 重复内容
|
| | | #region 恶意发言
|
| | | private string repeatChatContent = string.Empty;
|
| | | private int repeatChatCount = 0;
|
| | | private DateTime repeatTime = DateTime.Now;
|
| | | private bool CheckRepeatContent(string _content)
|
| | | private void CheckRepeatContent(string _content)
|
| | | {
|
| | | if (repeatChatContent.Equals(_content) && (DateTime.Now - repeatTime).TotalSeconds < 10)
|
| | | if (repeatChatContent.Equals(_content)
|
| | | && (TimeUtility.ServerNow - repeatTime).TotalSeconds < chatCenter.banCheckSecond)
|
| | | {
|
| | | repeatChatCount++;
|
| | | if (repeatChatCount > 3)
|
| | | if (repeatChatCount >= chatCenter.repeatCountLimit)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | else
|
| | | {
|
| | | repeatTime = DateTime.Now;
|
| | | SnxxzGame.Instance.StartCoroutine(Co_ClientBan());
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | repeatChatContent = _content;
|
| | | repeatChatCount = 1;
|
| | | repeatTime = DateTime.Now;
|
| | | repeatTime = TimeUtility.ServerNow;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | int maliceChatCount = 0;
|
| | | int maliceRecordCount = 0;
|
| | | private DateTime maliceChatTime = DateTime.Now;
|
| | | private void CheckMaliceChat(string _content)
|
| | | {
|
| | | if ((TimeUtility.ServerNow - maliceChatTime).TotalSeconds < chatCenter.banCheckSecond
|
| | | && maliceChatCount > 0 && maliceRecordCount < chatCenter.maliceCheckCount)
|
| | | {
|
| | | maliceRecordCount++;
|
| | | if (_content.Length == 1)
|
| | | {
|
| | | maliceChatCount++;
|
| | | }
|
| | | if (maliceChatCount >= chatCenter.maliceLimitCount)
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_ClientBan());
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (_content.Length == 1)
|
| | | {
|
| | | maliceChatCount = 1;
|
| | | maliceRecordCount = 1;
|
| | | maliceChatTime = TimeUtility.ServerNow;
|
| | | }
|
| | | else
|
| | | {
|
| | | maliceChatCount = 0;
|
| | | maliceRecordCount = 0;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_ClientBan()
|
| | | {
|
| | | yield return null;
|
| | | chatCenter.ChatClientBan();
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<ComposeTicketWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ComposeEquipWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ComposeToolsWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ComposeWingsWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ComposeDogzEquipWin>();
|
| | | var children = WindowConfig.Get().FindChildWindows("ComposeWin");
|
| | | foreach(var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnClickCloseBtn()
|
| | |
| | |
|
| | | void CloseChild()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<DogzActiveWin>())
|
| | | var children = WindowConfig.Get().FindChildWindows("DogzWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<DogzActiveWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.IsOpen<GodBeastReinforcementWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<GodBeastReinforcementWin>();
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | var dungeonId = model.GetDungeonId(dungeons[i]);
|
| | | var config = Config.Instance.Get<DungeonConfig>(dungeonId);
|
| | | var grade = model.GetGrade(dungeons[i]);
|
| | | if (playerLevel >= config.LVLimitMin && grade > 0)
|
| | |
|
| | | var challengable = false;
|
| | | if (playerLevel >= config.LVLimitMin)
|
| | | {
|
| | | challengable = i == 0 || model.GetGrade(dungeons[i - 1]) > 0;
|
| | | }
|
| | |
|
| | | if (challengable)
|
| | | {
|
| | | model.selectedKylinDungeon = dungeons[i];
|
| | | break;
|
| | |
| | |
|
| | | private void CloseChildWin()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<CeremonyRechargeGiftWin>())
|
| | | var children = WindowConfig.Get().FindChildWindows("FairylandCeremonyWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<CeremonyRechargeGiftWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.IsOpen<CeremonyFirepartyWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<CeremonyFirepartyWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.IsOpen<CeremonyPeopleToHiWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<CeremonyPeopleToHiWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.IsOpen<CeremonyOutOfPrintWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<CeremonyOutOfPrintWin>();
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | void CloseChild()
|
| | | {
|
| | | friendTipsObj.SetActive(false);
|
| | | WindowCenter.Instance.CloseImmediately<TeamChatWin>();
|
| | | WindowCenter.Instance.CloseImmediately<FairyChatWin>();
|
| | | var children = WindowConfig.Get().FindChildWindows("SocialWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<BestXBWin>();
|
| | | WindowCenter.Instance.CloseImmediately<XBStoreWin>();
|
| | | WindowCenter.Instance.CloseImmediately<XBWarehouseWin>();
|
| | | WindowCenter.Instance.CloseImmediately<RuneXBWin>();
|
| | | var children = WindowConfig.Get().FindChildWindows("HappyXBWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | |
|
| | | private void CloseWin()
|
| | |
| | | /// <summary>
|
| | | /// 设置强化数据
|
| | | /// </summary>
|
| | | private ItemPlusConfig itemPlus;
|
| | | private ItemPlusConfig.ItemPlusData itemPlus;
|
| | | public int StrengthLV { get; private set; }
|
| | | public void SetStrengthData(int lv, int type)
|
| | | {
|
| | |
| | | if (lv <= 0) return;
|
| | |
|
| | | strengthDataDict = new Dictionary<int, int>();
|
| | | itemPlus = ItemPlusConfig.GetTypeAndGrade(type,lv);
|
| | | itemPlus = ItemPlusConfig.GetItemPlusData(type,lv);
|
| | | if (itemPlus != null)
|
| | | {
|
| | | int[] attrIDs = ConfigParse.GetMultipleStr<int>(itemPlus.attType);
|
| | | int[] attrValues = ConfigParse.GetMultipleStr<int>(itemPlus.attValue);
|
| | | int[] attrIDs = itemPlus.attrIds;
|
| | | int[] attrValues = itemPlus.attrValues;
|
| | | int i = 0;
|
| | | for (i = 0; i < attrIDs.Length; i++)
|
| | | {
|
| | |
| | |
|
| | | public ItemSuitAttrData(int groupType,int suitType,int suitLv,int equipJob)
|
| | | {
|
| | | this.suitAttrConfig = EquipSuitAttrConfig.GetSuitAttrConfig(groupType,suitType,suitLv,equipJob);
|
| | | if (suitAttrConfig != null)
|
| | | var suitAttrData = EquipSuitAttrConfig.GetSuitAttrData(groupType, suitType, suitLv, equipJob);
|
| | | if (suitAttrData != null)
|
| | | {
|
| | | this.firstSuitAttrs = ConfigParse.GetMultipleStr<int>(this.suitAttrConfig.propList1);
|
| | | this.firstSuitAttrValues = ConfigParse.GetMultipleStr<int>(this.suitAttrConfig.propValueList1);
|
| | | this.secondSuitAttrs = ConfigParse.GetMultipleStr<int>(this.suitAttrConfig.propList2);
|
| | | this.secondSuitAttrValues = ConfigParse.GetMultipleStr<int>(this.suitAttrConfig.propValueList2);
|
| | | this.thirdSuitAttrs = ConfigParse.GetMultipleStr<int>(this.suitAttrConfig.propList3);
|
| | | this.thirdSuitAttrValues = ConfigParse.GetMultipleStr<int>(this.suitAttrConfig.propValueList3);
|
| | | this.suitAttrConfig = suitAttrData.attrConfig;
|
| | | this.firstSuitAttrs = suitAttrData.attr1Ids;
|
| | | this.firstSuitAttrValues = suitAttrData.attr1Values;
|
| | | this.secondSuitAttrs = suitAttrData.attr2Ids;
|
| | | this.secondSuitAttrValues = suitAttrData.attr2Values;
|
| | | this.thirdSuitAttrs = suitAttrData.attr3Ids;
|
| | | this.thirdSuitAttrValues = suitAttrData.attr3Values;
|
| | | }
|
| | | else
|
| | | {
|
| | | this.suitAttrConfig = null;
|
| | | this.firstSuitAttrs = null;
|
| | | this.firstSuitAttrValues = null;
|
| | | this.secondSuitAttrs = null;
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | FuncConfigConfig addPointFunc = Config.Instance.Get<FuncConfigConfig>("LVUPAddPoint");
|
| | | int[] rankValue = ConfigParse.GetMultipleStr<int>(addPointFunc.Numerical1);
|
| | | if (addPointFunc != null)
|
| | | {
|
| | | double needUpgradLV = System.Math.Ceiling((sumOffsetPoint - PlayerDatas.Instance.baseData.FreePoint) / rankValue[jobRank - 1]);
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("KnapS134", upgradConditionStr.ToString(), needUpgradLV.ToString()));
|
| | | }
|
| | | }
|
| | | //else
|
| | | //{
|
| | | // FuncConfigConfig addPointFunc = Config.Instance.Get<FuncConfigConfig>("LVUPAddPoint");
|
| | | // int[] rankValue = ConfigParse.GetMultipleStr<int>(addPointFunc.Numerical1);
|
| | | // if (addPointFunc != null)
|
| | | // {
|
| | | // double needUpgradLV = System.Math.Ceiling((sumOffsetPoint - PlayerDatas.Instance.baseData.FreePoint) / rankValue[jobRank - 1]);
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("KnapS134", upgradConditionStr.ToString(), needUpgradLV.ToString()));
|
| | | // }
|
| | | //}
|
| | |
|
| | | return false;
|
| | | }
|
| | |
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | var children = WindowConfig.Get().FindChildWindows("KnapSackWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | WindowCenter.Instance.CloseImmediately<BagWin>();
|
| | | WindowCenter.Instance.CloseImmediately<DepotWin>();
|
| | | WindowCenter.Instance.CloseImmediately<BagStoreWin>();
|
| | | WindowCenter.Instance.CloseImmediately<RoleEquipWin>();
|
| | | WindowCenter.Instance.CloseImmediately<EquipDevourWin>();
|
| | | }
|
| | |
|
| | | private void OnHidePanel()
|
| | |
| | | public int rebornTiredNum = 0;
|
| | | private int playerCoins = 0;
|
| | | private FuncConfigConfig _tagfuncModel;
|
| | | private int[] RebornConditions;
|
| | | public int[] RebornConditions { get; private set; }
|
| | | private MapConfig _tagMapModel;
|
| | | public bool isBossKill = false;
|
| | | public float duplicatesRebornTime = 0;
|
| | |
| | | |
| | | private void CreatePreviewCell() |
| | | { |
| | | Dictionary<string, EquipSuitAttrConfig> suitAttrDict = EquipSuitAttrConfig.GetSuitAttrDict(); |
| | | Dictionary<string,EquipSuitAttrConfig.EquipSuitAttrData> suitAttrDict = EquipSuitAttrConfig.GetSuitAttrDict(); |
| | | foreach(var suitID in suitAttrDict.Keys) |
| | | { |
| | | PreviewCell cell = Instantiate(previewCell); |
| | |
| | | public Dictionary<string, ActivateSuitData> activateAttrDict { get; private set; }
|
| | | public void GetActivateSuitModel()
|
| | | {
|
| | | Dictionary<string, EquipSuitAttrConfig> suitAttrDict = EquipSuitAttrConfig.GetSuitAttrDict();
|
| | | Dictionary<string, EquipSuitAttrConfig.EquipSuitAttrData> suitAttrDict = EquipSuitAttrConfig.GetSuitAttrDict();
|
| | | activateAttrDict = new Dictionary<string, ActivateSuitData>();
|
| | | foreach (var suitID in suitAttrDict.Keys)
|
| | | {
|
| | | EquipSuitAttrConfig attrConfig = suitAttrDict[suitID];
|
| | | var attrData = suitAttrDict[suitID];
|
| | | EquipSuitAttrConfig attrConfig = attrData.attrConfig;
|
| | | List<int> equipPlacelist = null;
|
| | | int suitCnt = GetSameSuitCnt((SuitType)attrConfig.suiteType, GetEquipPlaceByGroupType(attrConfig.groupType)[0], attrConfig.suiteLV, out equipPlacelist, attrConfig.job);
|
| | | if (suitCnt >= attrConfig.count1)
|
| | | {
|
| | | if (!activateAttrDict.ContainsKey(suitID))
|
| | | {
|
| | | ActivateSuitData suitData = new ActivateSuitData(suitCnt, suitAttrDict[suitID], equipPlacelist);
|
| | | ActivateSuitData suitData = new ActivateSuitData(suitCnt,attrData, equipPlacelist);
|
| | | activateAttrDict.Add(suitID, suitData);
|
| | | }
|
| | | }
|
| | |
| | | ActivateSuitData suitData = activateAttrDict[key];
|
| | | int[] attrIds = null;
|
| | | int[] attrValues = null;
|
| | | if (suitData.suitCnt >= suitData.attrConfig.count1)
|
| | | if (suitData.suitCnt >= suitData.attrData.attrConfig.count1)
|
| | | {
|
| | | attrIds = ConfigParse.GetMultipleStr<int>(suitData.attrConfig.propList1);
|
| | | attrValues = ConfigParse.GetMultipleStr<int>(suitData.attrConfig.propValueList1);
|
| | | attrIds = suitData.attrData.attr1Ids;
|
| | | attrValues = suitData.attrData.attr1Values;
|
| | | SetActiveSuitAttr(attrIds,attrValues);
|
| | | }
|
| | |
|
| | | if(suitData.suitCnt >= suitData.attrConfig.count2)
|
| | | if(suitData.suitCnt >= suitData.attrData.attrConfig.count2)
|
| | | {
|
| | | attrIds = ConfigParse.GetMultipleStr<int>(suitData.attrConfig.propList2);
|
| | | attrValues = ConfigParse.GetMultipleStr<int>(suitData.attrConfig.propValueList2);
|
| | | attrIds = suitData.attrData.attr2Ids;
|
| | | attrValues = suitData.attrData.attr2Values;
|
| | | SetActiveSuitAttr(attrIds, attrValues);
|
| | | }
|
| | |
|
| | | if (suitData.suitCnt >= suitData.attrConfig.count3)
|
| | | if (suitData.suitCnt >= suitData.attrData.attrConfig.count3)
|
| | | {
|
| | | attrIds = ConfigParse.GetMultipleStr<int>(suitData.attrConfig.propList3);
|
| | | attrValues = ConfigParse.GetMultipleStr<int>(suitData.attrConfig.propValueList3);
|
| | | attrIds = suitData.attrData.attr3Ids;
|
| | | attrValues = suitData.attrData.attr3Values;
|
| | | SetActiveSuitAttr(attrIds, attrValues);
|
| | | }
|
| | | }
|
| | |
| | | EquipSuitCompoundConfig matConfig = EquipSuitCompoundConfig.GetMakerEquipSuitMatModel((int)suitType,
|
| | | equipPlace, suitLv + 1, GetEquipJob(itemModel.itemId));
|
| | |
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrConfig(groupType
|
| | | , (int)suitType, 1, GetEquipJob(itemModel.itemId));
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrData(groupType
|
| | | , (int)suitType, 1, GetEquipJob(itemModel.itemId)).attrConfig;
|
| | |
|
| | | bool isUpgrad = IsUpgradSuitLv(equipPlace,(int)suitType,suitLv);
|
| | | if (isUpgrad)
|
| | |
| | | if (itemModel != null)
|
| | | {
|
| | | bool isUpgrad = IsUpgradSuitLv(partlist[i], (int)suitType, suitLv);
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrConfig(groupType
|
| | | , (int)suitType, 1, GetEquipJob(itemModel.itemId));
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrData(groupType
|
| | | , (int)suitType, 1, GetEquipJob(itemModel.itemId)).attrConfig;
|
| | | EquipSuitCompoundConfig matConfig = EquipSuitCompoundConfig.GetMakerEquipSuitMatModel((int)suitType,
|
| | | partlist[i], suitLv + 1, GetEquipJob(itemModel.itemId));
|
| | |
|
| | |
| | | if(upgradEquipPlaceDict[type].Count > 0)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, upgradEquipPlaceDict[type][0]);
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrConfig(type
|
| | | , (int)suitType, 1, GetEquipJob(itemModel.itemId));
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrData(type
|
| | | , (int)suitType, 1, GetEquipJob(itemModel.itemId)).attrConfig;
|
| | |
|
| | | if (upgradEquipPlaceDict[type].Count >= attrConfig.count1)
|
| | | {
|
| | |
| | | public struct ActivateSuitData
|
| | | {
|
| | | public int suitCnt;
|
| | | public EquipSuitAttrConfig attrConfig;
|
| | | public EquipSuitAttrConfig.EquipSuitAttrData attrData;
|
| | | public List<int> equipPlacelist;
|
| | | public ActivateSuitData(int cnt, EquipSuitAttrConfig config, List<int> list)
|
| | | public ActivateSuitData(int cnt, EquipSuitAttrConfig.EquipSuitAttrData data, List<int> list)
|
| | | {
|
| | | suitCnt = cnt;
|
| | | attrConfig = config;
|
| | | attrData = data;
|
| | | equipPlacelist = list;
|
| | | }
|
| | | }
|
| | |
| | | public void InitUI(string suitID)
|
| | | {
|
| | | this.suitId = suitID;
|
| | | suitAttrConfig = EquipSuitAttrConfig.GetSuitAttrConfigBySuitID(suitID);
|
| | | suitAttrConfig = EquipSuitAttrConfig.GetSuitAttrDataBySuitID(suitID).attrConfig;
|
| | | if (suitAttrConfig == null) return;
|
| | | partNameDict.Clear();
|
| | | suitAttrDict.Clear();
|
| | |
| | | if(!suitData.Equals(default(ActivateSuitData)))
|
| | | {
|
| | | DebugEx.Log("RefreshUI:" + suitID);
|
| | | string suitName = StringUtility.Contact(suitData.attrConfig.name, "(", suitData.suitCnt,"/", suitData.attrConfig.count3, ")");
|
| | | string suitName = StringUtility.Contact(suitData.attrData.attrConfig.name, "(", suitData.suitCnt,"/", suitData.attrData.attrConfig.count3, ")");
|
| | | suitNameText.text = suitName;
|
| | | if(suitData.attrConfig.suiteType == 1)
|
| | | if(suitData.attrData.attrConfig.suiteType == 1)
|
| | | {
|
| | | suitNameText.color = lowSuitColor;
|
| | | }
|
| | | else if(suitData.attrConfig.suiteType == 2)
|
| | | else if(suitData.attrData.attrConfig.suiteType == 2)
|
| | | {
|
| | | suitNameText.color = highSuitColor;
|
| | | }
|
| | |
| | |
|
| | | private void CreateSuitAttr()
|
| | | {
|
| | | int[] firstProlist = ConfigParse.GetMultipleStr<int>(suitAttrConfig.propList1);
|
| | | int[] firstProValuelist = ConfigParse.GetMultipleStr<int>(suitAttrConfig.propValueList1);
|
| | | int[] secondProlist = ConfigParse.GetMultipleStr<int>(suitAttrConfig.propList2);
|
| | | int[] secondProValuelist = ConfigParse.GetMultipleStr<int>(suitAttrConfig.propValueList2);
|
| | | int[] thirdProlist = ConfigParse.GetMultipleStr<int>(suitAttrConfig.propList3);
|
| | | int[] thirdProValuelist = ConfigParse.GetMultipleStr<int>(suitAttrConfig.propValueList3);
|
| | | var suitAttrData = EquipSuitAttrConfig.GetSuitAttrDataBySuitID(this.suitId);
|
| | | int[] firstProlist = suitAttrData.attr1Ids;
|
| | | int[] firstProValuelist = suitAttrData.attr1Values;
|
| | | int[] secondProlist = suitAttrData.attr2Ids;
|
| | | int[] secondProValuelist = suitAttrData.attr2Values;
|
| | | int[] thirdProlist = suitAttrData.attr3Ids;
|
| | | int[] thirdProValuelist = suitAttrData.attr3Values;
|
| | |
|
| | | int sumLength = firstProlist.Length + secondProlist.Length + thirdProlist.Length;
|
| | | int length1 = firstProlist.Length;
|
| | |
| | | haveCondiText.gameObject.SetActive(false);
|
| | | if (itemModel != null)
|
| | | {
|
| | | EquipSuitAttrConfig suitAttrConfig = EquipSuitAttrConfig.GetSuitAttrConfig(SuitModel.GetGroupType(equipPlace), (int)suitType, suitLv, SuitModel.GetEquipJob(itemModel.itemId));
|
| | | EquipSuitAttrConfig suitAttrConfig = EquipSuitAttrConfig.GetSuitAttrData(SuitModel.GetGroupType(equipPlace), |
| | | (int)suitType, suitLv, SuitModel.GetEquipJob(itemModel.itemId)).attrConfig;
|
| | | itemCell.gameObject.SetActive(true);
|
| | | itemCell.Init(itemModel);
|
| | | bool isMaker = SuitModel.IsMakerSuit(suitType, itemModel.chinItemModel.ItemColor, itemModel.chinItemModel.StarLevel);
|
| | |
| | | previewSuitLv += 1;
|
| | | }
|
| | | curSuitNum = SuitModel.GetSameSuitCnt(E_SuitType, equipPlace, previewSuitLv, out equipPlacelist);
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrConfig(SuitModel.GetGroupType(equipPlace)
|
| | | , (int)E_SuitType, previewSuitLv, SuitModel.GetEquipJob(itemModel.itemId));
|
| | | EquipSuitAttrConfig attrConfig = EquipSuitAttrConfig.GetSuitAttrData(SuitModel.GetGroupType(equipPlace)
|
| | | , (int)E_SuitType, previewSuitLv, SuitModel.GetEquipJob(itemModel.itemId)).attrConfig;
|
| | | if(attrConfig != null)
|
| | | {
|
| | | _makerSuitName.text = StringUtility.Contact(Language.Get("KnapS143"),":");
|
| | |
| | | return;
|
| | |
|
| | | _equipSuitProModel = attrConfig;
|
| | | firstProlist = ConfigParse.GetMultipleStr<int>(attrConfig.propList1);
|
| | | firstProValuelist = ConfigParse.GetMultipleStr<int>(attrConfig.propValueList1);
|
| | | secondProlist = ConfigParse.GetMultipleStr<int>(attrConfig.propList2);
|
| | | secondProValuelist = ConfigParse.GetMultipleStr<int>(attrConfig.propValueList2);
|
| | | thirdProlist = ConfigParse.GetMultipleStr<int>(attrConfig.propList3);
|
| | | thirdProValuelist = ConfigParse.GetMultipleStr<int>(attrConfig.propValueList3);
|
| | | string key = StringUtility.Contact(attrConfig.groupType, attrConfig.suiteType, attrConfig.suiteLV,attrConfig.job);
|
| | | var attrData = EquipSuitAttrConfig.GetSuitAttrDataBySuitID(key);
|
| | | firstProlist = attrData.attr1Ids;
|
| | | firstProValuelist = attrData.attr1Values;
|
| | | secondProlist = attrData.attr2Ids;
|
| | | secondProValuelist = attrData.attr2Values;
|
| | | thirdProlist = attrData.attr3Ids;
|
| | | thirdProValuelist = attrData.attr3Values;
|
| | | CreateSuitProCell();
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void SetMasterGroupRaiseRecord(int curGroupLv, int type, string groupRaise)
|
| | | {
|
| | | List<EquipWashSpecConfig> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
| | | List<EquipWashSpecConfig.EquipWashSpecData> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
| | | for(int i = 0; i < tagSpecModellist.Count; i++)
|
| | | {
|
| | | if(curGroupLv < tagSpecModellist[i].levelNeed)
|
| | | var washSpecData = tagSpecModellist[i];
|
| | | var lastWashSpecData = tagSpecModellist[tagSpecModellist.Count - 1];
|
| | | if (curGroupLv < washSpecData.specConfig.levelNeed)
|
| | | {
|
| | | if(i == 0)
|
| | | {
|
| | | LocalSave.SetInt(groupRaise, tagSpecModellist[i].levelNeed);
|
| | | LocalSave.SetInt(groupRaise, washSpecData.specConfig.levelNeed);
|
| | | }
|
| | | else
|
| | | {
|
| | | var preWashSpecData = tagSpecModellist[i - 1];
|
| | | if (!PlayerPrefs.HasKey(groupRaise))
|
| | | {
|
| | | LocalSave.SetInt(groupRaise, tagSpecModellist[i-1].levelNeed);
|
| | | LocalSave.SetInt(groupRaise, preWashSpecData.specConfig.levelNeed);
|
| | | }
|
| | | else
|
| | | {
|
| | | int groupLv = LocalSave.GetInt(groupRaise);
|
| | | if (tagSpecModellist[i - 1].levelNeed > groupLv)
|
| | | if (preWashSpecData.specConfig.levelNeed > groupLv)
|
| | | {
|
| | | MasterWashState = 2;
|
| | | SetWashMasterModel(type, curGroupLv);
|
| | | WindowCenter.Instance.Open<WashMasterActiveWin>();
|
| | | LocalSave.SetInt(groupRaise, tagSpecModellist[i - 1].levelNeed);
|
| | | LocalSave.SetInt(groupRaise, preWashSpecData.specConfig.levelNeed);
|
| | | }
|
| | | }
|
| | | }
|
| | | return;
|
| | | }
|
| | | else if(curGroupLv >= tagSpecModellist[tagSpecModellist.Count -1].levelNeed)
|
| | | else if(curGroupLv >= lastWashSpecData.specConfig.levelNeed)
|
| | | {
|
| | | if (!PlayerPrefs.HasKey(groupRaise))
|
| | | {
|
| | | LocalSave.SetInt(groupRaise, tagSpecModellist[tagSpecModellist.Count - 1].levelNeed);
|
| | | LocalSave.SetInt(groupRaise, lastWashSpecData.specConfig.levelNeed);
|
| | | }
|
| | | else
|
| | | {
|
| | | int groupLv = LocalSave.GetInt(groupRaise);
|
| | | if (tagSpecModellist[tagSpecModellist.Count - 1].levelNeed > groupLv)
|
| | | if (lastWashSpecData.specConfig.levelNeed > groupLv)
|
| | | {
|
| | | MasterWashState = 2;
|
| | | SetWashMasterModel(type, curGroupLv);
|
| | | WindowCenter.Instance.Open<WashMasterActiveWin>();
|
| | | LocalSave.SetInt(groupRaise, tagSpecModellist[tagSpecModellist.Count - 1].levelNeed);
|
| | | LocalSave.SetInt(groupRaise, lastWashSpecData.specConfig.levelNeed);
|
| | | }
|
| | | }
|
| | | return;
|
| | |
| | |
|
| | | public void SetMasterGroupActiveRecord(int curGroupLv,int type,string groupActive)
|
| | | {
|
| | | List<EquipWashSpecConfig> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
| | | if (curGroupLv >= tagSpecModellist[0].levelNeed)
|
| | | List<EquipWashSpecConfig.EquipWashSpecData> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
| | | var washSpecData = tagSpecModellist[0];
|
| | | if (curGroupLv >= washSpecData.specConfig.levelNeed)
|
| | | {
|
| | | if (!PlayerPrefs.HasKey(groupActive))
|
| | | {
|
| | |
| | | [SerializeField] GameObject raiseAttrCell;
|
| | | [SerializeField] CalculateLayout raiseLayout;
|
| | |
|
| | | private List<EquipWashSpecConfig> washSpeclist = null;
|
| | | private List<EquipWashSpecConfig.EquipWashSpecData> washSpeclist = null;
|
| | | List<GameObject> tempCelllist = new List<GameObject>();
|
| | | EquipWashModel equipWashModel { get{ return ModelCenter.Instance.GetModel<EquipWashModel>();}}
|
| | |
|
| | |
| | | preAttrDict.Clear();
|
| | | for (int i = 0; i < washSpeclist.Count; i++)
|
| | | {
|
| | | if (washSpeclist[i].levelNeed == equipWashModel.washLv)
|
| | | var washSpecData = washSpeclist[i];
|
| | | if (washSpecData.specConfig.levelNeed == equipWashModel.washLv)
|
| | | {
|
| | | EquipWashSpecConfig curSpecConfig = washSpeclist[i];
|
| | | int[] attrIds = ConfigParse.GetMultipleStr<int>(curSpecConfig.attByLevel);
|
| | | int[] curAttrValues = ConfigParse.GetMultipleStr<int>(curSpecConfig.attByLevelValue);
|
| | | int[] attrIds = washSpecData.activeIds;
|
| | | int[] curAttrValues = washSpecData.activeValues;
|
| | | for (int j = 0; j < attrIds.Length; j++)
|
| | | {
|
| | | curAttrDict.Add(attrIds[j], curAttrValues[j]);
|
| | |
| | | {
|
| | | activeAttrObj.SetActive(false);
|
| | | raiseLvAttrObj.SetActive(true);
|
| | | EquipWashSpecConfig preSpecConfig = washSpeclist[i - 1];
|
| | | int[] preAttrValues = ConfigParse.GetMultipleStr<int>(preSpecConfig.attByLevelValue);
|
| | | var preWashSpecData = washSpeclist[i - 1];
|
| | | int[] preAttrValues = preWashSpecData.activeValues;
|
| | | for (int j = 0; j < attrIds.Length; j++)
|
| | | {
|
| | | preAttrDict.Add(attrIds[j], preAttrValues[j]);
|
| | | }
|
| | | preFightNum = UIHelper.GetFightPower(preAttrDict);
|
| | | preLvText.text = preSpecConfig.MasterLV.ToString();
|
| | | curLvText.text = washSpeclist[i].MasterLV.ToString();
|
| | | CreateRaiseCell(preSpecConfig, washSpeclist[i]);
|
| | | preLvText.text = preWashSpecData.specConfig.MasterLV.ToString();
|
| | | curLvText.text = washSpecData.specConfig.MasterLV.ToString();
|
| | | CreateRaiseCell(preWashSpecData,washSpecData);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void CreateActiveCell(EquipWashSpecConfig specConfig)
|
| | | private void CreateActiveCell(EquipWashSpecConfig.EquipWashSpecData specConfig)
|
| | | {
|
| | | int[] attrIds = ConfigParse.GetMultipleStr<int>(specConfig.attByLevel);
|
| | | int[] attrValues = ConfigParse.GetMultipleStr<int>(specConfig.attByLevelValue);
|
| | | int[] attrIds = specConfig.activeIds;
|
| | | int[] attrValues = specConfig.activeValues;
|
| | | activeAttrCell.SetActive(false);
|
| | | for (int i = 0; i < attrIds.Length; i++)
|
| | | {
|
| | |
| | | activeLayout.Init(tempCelllist,true);
|
| | | }
|
| | |
|
| | | private void CreateRaiseCell(EquipWashSpecConfig preSpecConfig, EquipWashSpecConfig curSpecConfig)
|
| | | private void CreateRaiseCell(EquipWashSpecConfig.EquipWashSpecData preSpecConfig, EquipWashSpecConfig.EquipWashSpecData curSpecConfig)
|
| | | {
|
| | | int[] preAttrIds = ConfigParse.GetMultipleStr<int>(preSpecConfig.attByLevel);
|
| | | int[] preAttrValues = ConfigParse.GetMultipleStr<int>(preSpecConfig.attByLevelValue);
|
| | | int[] curAttrIds = ConfigParse.GetMultipleStr<int>(curSpecConfig.attByLevel);
|
| | | int[] curAttrValues = ConfigParse.GetMultipleStr<int>(curSpecConfig.attByLevelValue);
|
| | | int[] preAttrIds = preSpecConfig.activeIds;
|
| | | int[] preAttrValues = preSpecConfig.activeValues;
|
| | | int[] curAttrIds = curSpecConfig.activeIds;
|
| | | int[] curAttrValues = curSpecConfig.activeValues;
|
| | | raiseAttrCell.SetActive(false);
|
| | |
|
| | | tempCelllist.Add(GetRaiseGo(Language.Get("L1056"),preFightNum.ToString(),(curFightNum-preFightNum).ToString()));
|
| | |
| | | [SerializeField] CanvasGroup canvas;
|
| | | [SerializeField] Text washMasterCondText;
|
| | |
|
| | | protected List<EquipWashSpecConfig> p_washSpeclist = null;
|
| | | private EquipWashSpecConfig p_currentSpecModel = null;
|
| | | private EquipWashSpecConfig p_nextSpecModel = null;
|
| | | protected List<EquipWashSpecConfig.EquipWashSpecData> p_washSpeclist = null;
|
| | | private EquipWashSpecConfig.EquipWashSpecData p_currentSpecModel = null;
|
| | | private EquipWashSpecConfig.EquipWashSpecData p_nextSpecModel = null;
|
| | | private int p_preIndex = -1;
|
| | | private int p_nextIndex = -1;
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void GetOpenWashPro(string needShowPro, EquipWashSpecConfig model)
|
| | | private void GetOpenWashPro(string needShowPro, EquipWashSpecConfig.EquipWashSpecData model)
|
| | | {
|
| | |
|
| | | int[] openPro = ConfigParse.GetMultipleStr<int>(model.attByLevel);
|
| | | int[] openProValue = ConfigParse.GetMultipleStr<int>(model.attByLevelValue);
|
| | | int[] openPro = model.activeIds;
|
| | | int[] openProValue = model.activeValues;
|
| | | List<PlayerPropertyConfig> proModellist = new List<PlayerPropertyConfig>();
|
| | | List<string> proValuelist = new List<string>();
|
| | | for (int i = 0; i < openPro.Length; i++)
|
| | |
| | |
|
| | | if (needShowPro == "current")
|
| | | {
|
| | | var preWashSpec = this.p_washSpeclist[p_preIndex].specConfig;
|
| | | switch (equipWashModel.washType)
|
| | | {
|
| | | case 1:
|
| | | targetNowText.text = Language.Get("EquipWash112", this.p_washSpeclist[p_preIndex].levelNeed.ToString());
|
| | | targetNowText.text = Language.Get("EquipWash112", preWashSpec.levelNeed.ToString());
|
| | | break;
|
| | | case 2:
|
| | | targetNowText.text = Language.Get("EquipWashMaster_2", this.p_washSpeclist[p_preIndex].levelNeed.ToString());
|
| | | targetNowText.text = Language.Get("EquipWashMaster_2", preWashSpec.levelNeed.ToString());
|
| | | break;
|
| | | case 3:
|
| | | targetNowText.text = Language.Get("EquipWashMaster_3", this.p_washSpeclist[p_preIndex].levelNeed.ToString());
|
| | | targetNowText.text = Language.Get("EquipWashMaster_3", preWashSpec.levelNeed.ToString());
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else if (needShowPro == "next")
|
| | | {
|
| | | var nextWashSpec = this.p_washSpeclist[p_nextIndex].specConfig;
|
| | | switch (equipWashModel.washType)
|
| | | {
|
| | | case 1:
|
| | | targetNextText.text = Language.Get("EquipWash112", this.p_washSpeclist[p_nextIndex].levelNeed.ToString());
|
| | | targetNextText.text = Language.Get("EquipWash112", nextWashSpec.levelNeed.ToString());
|
| | | break;
|
| | | case 2:
|
| | | targetNextText.text = Language.Get("EquipWashMaster_2", this.p_washSpeclist[p_nextIndex].levelNeed.ToString());
|
| | | targetNextText.text = Language.Get("EquipWashMaster_2", nextWashSpec.levelNeed.ToString());
|
| | | break;
|
| | | case 3:
|
| | | targetNextText.text = Language.Get("EquipWashMaster_3", this.p_washSpeclist[p_nextIndex].levelNeed.ToString());
|
| | | targetNextText.text = Language.Get("EquipWashMaster_3", nextWashSpec.levelNeed.ToString());
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void GetOpenHaveOneWashEffect(EquipWashSpecConfig model)
|
| | | private void GetOpenHaveOneWashEffect(EquipWashSpecConfig.EquipWashSpecData model)
|
| | | {
|
| | |
|
| | | int[] openPro = ConfigParse.GetMultipleStr<int>(model.attByLevel);
|
| | | int[] openProValue = ConfigParse.GetMultipleStr<int>(model.attByLevelValue);
|
| | | int[] openPro = model.activeIds;
|
| | | int[] openProValue = model.activeValues;
|
| | | List<PlayerPropertyConfig> proModellist = new List<PlayerPropertyConfig>();
|
| | | List<string> proValuelist = new List<string>();
|
| | | for (int i = 0; i < openPro.Length; i++)
|
| | |
| | |
|
| | | }
|
| | | int index = p_preIndex == -1 ? p_nextIndex : p_preIndex;
|
| | | var washSpecData = this.p_washSpeclist[index];
|
| | | switch (equipWashModel.washType)
|
| | | {
|
| | | case 1:
|
| | | unTargetText.text = Language.Get("EquipWash112", this.p_washSpeclist[index].levelNeed.ToString());
|
| | | unTargetText.text = Language.Get("EquipWash112", washSpecData.specConfig.levelNeed.ToString());
|
| | | break;
|
| | | case 2:
|
| | | unTargetText.text = Language.Get("EquipWashMaster_2", this.p_washSpeclist[index].levelNeed.ToString());
|
| | | unTargetText.text = Language.Get("EquipWashMaster_2", washSpecData.specConfig.levelNeed.ToString());
|
| | | break;
|
| | | case 3:
|
| | | unTargetText.text = Language.Get("EquipWashMaster_3", this.p_washSpeclist[index].levelNeed.ToString());
|
| | | unTargetText.text = Language.Get("EquipWashMaster_3", washSpecData.specConfig.levelNeed.ToString());
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | case 1:
|
| | | weaponObj.SetActive(true);
|
| | | GetWashGroupIncludeName("EquipWashGroup1");
|
| | | GetWashGroupIncludeName(equipWashModel.washGroups1);
|
| | | titleText.text = Language.Get("EquipWash116");
|
| | | if(p_nextIndex != -1)
|
| | | {
|
| | | for(int i = 0; i < equipWashModel.washGroup1.Count; i++)
|
| | | {
|
| | | if(equipWashModel.washGroup1[i].XLAttrLV >= p_nextSpecModel.levelNeed)
|
| | | if(equipWashModel.washGroup1[i].XLAttrLV >= p_nextSpecModel.specConfig.levelNeed)
|
| | | {
|
| | | curMasterCnt += 1;
|
| | | }
|
| | | }
|
| | | if (curMasterCnt >= 2)
|
| | | {
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Green, curMasterCnt.ToString()), "/", 2);
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.specConfig.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Green, curMasterCnt.ToString()), "/", 2);
|
| | | }
|
| | | else
|
| | | {
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Red, curMasterCnt.ToString()), "/", 2);
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.specConfig.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Red, curMasterCnt.ToString()), "/", 2);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | |
|
| | | if (p_nextSpecModel != null)
|
| | | {
|
| | | weaponCelllist[i].SetModel(p_nextSpecModel.levelNeed);
|
| | | weaponCelllist[i].SetModel(p_nextSpecModel.specConfig.levelNeed);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | break;
|
| | | case 2:
|
| | | defenceObj.SetActive(true);
|
| | | GetWashGroupIncludeName("EquipWashGroup2");
|
| | | GetWashGroupIncludeName(equipWashModel.washGroups2);
|
| | | titleText.text = Language.Get("EquipWash117");
|
| | | if (p_nextIndex != -1)
|
| | | {
|
| | | for (int i = 0; i < equipWashModel.washGroup2.Count; i++)
|
| | | {
|
| | | if (equipWashModel.washGroup2[i].XLAttrLV >= p_nextSpecModel.levelNeed)
|
| | | if (equipWashModel.washGroup2[i].XLAttrLV >= p_nextSpecModel.specConfig.levelNeed)
|
| | | {
|
| | | curMasterCnt += 1;
|
| | | }
|
| | | }
|
| | | if (curMasterCnt >= 5)
|
| | | {
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Green, curMasterCnt.ToString()), "/", 5);
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.specConfig.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Green, curMasterCnt.ToString()), "/", 5);
|
| | | }
|
| | | else
|
| | | {
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Red, curMasterCnt.ToString()), "/", 5);
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.specConfig.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Red, curMasterCnt.ToString()), "/", 5);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | if (p_nextSpecModel != null)
|
| | | {
|
| | | defenceCelllist[i].SetModel(p_nextSpecModel.levelNeed);
|
| | | defenceCelllist[i].SetModel(p_nextSpecModel.specConfig.levelNeed);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | break;
|
| | | case 3:
|
| | | fairyObj.SetActive(true);
|
| | | GetWashGroupIncludeName("EquipWashGroup3");
|
| | | GetWashGroupIncludeName(equipWashModel.washGroups3);
|
| | | titleText.text = Language.Get("EquipWash118");
|
| | | if (p_nextIndex != -1)
|
| | | {
|
| | | for (int i = 0; i < equipWashModel.washGroup3.Count; i++)
|
| | | {
|
| | | if (equipWashModel.washGroup3[i].XLAttrLV >= p_nextSpecModel.levelNeed)
|
| | | if (equipWashModel.washGroup3[i].XLAttrLV >= p_nextSpecModel.specConfig.levelNeed)
|
| | | {
|
| | | curMasterCnt += 1;
|
| | | }
|
| | | }
|
| | | if(curMasterCnt >= 3)
|
| | | {
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Green,curMasterCnt.ToString()), "/", 3);
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.specConfig.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Green,curMasterCnt.ToString()), "/", 3);
|
| | | }
|
| | | else
|
| | | {
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Red, curMasterCnt.ToString()), "/", 3);
|
| | | washMasterCondText.text = StringUtility.Contact(Language.Get("EquipWash112", p_nextSpecModel.specConfig.levelNeed), ":", UIHelper.GetTextColorByItemColor(TextColType.Red, curMasterCnt.ToString()), "/", 3);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | if(p_nextSpecModel != null)
|
| | | {
|
| | | fairyCelllist[i].SetModel(p_nextSpecModel.levelNeed);
|
| | | fairyCelllist[i].SetModel(p_nextSpecModel.specConfig.levelNeed);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void GetWashGroupIncludeName(string key)
|
| | | private void GetWashGroupIncludeName(int[] groups)
|
| | | {
|
| | | if (groups == null) return;
|
| | |
|
| | | FuncConfigConfig washGroupMode = Config.Instance.Get<FuncConfigConfig>(key);
|
| | | int[] grouplist = ConfigParse.GetMultipleStr<int>(washGroupMode.Numerical1);
|
| | | areaText.text = Language.Get("EquipWash111");
|
| | | if (grouplist.Length > 0)
|
| | | if (groups.Length > 0)
|
| | | {
|
| | | for (int i = 0; i < grouplist.Length; i++)
|
| | | for (int i = 0; i < groups.Length; i++)
|
| | | {
|
| | | if (i < grouplist.Length - 1)
|
| | | if (i < groups.Length - 1)
|
| | | {
|
| | | areaText.text = areaText.text + UIHelper.GetEquipAreaName(grouplist[i]) + "、";
|
| | | areaText.text = areaText.text + UIHelper.GetEquipAreaName(groups[i]) + "、";
|
| | | }
|
| | | else
|
| | | {
|
| | | areaText.text = areaText.text + UIHelper.GetEquipAreaName(grouplist[i]);
|
| | | areaText.text = areaText.text + UIHelper.GetEquipAreaName(groups[i]);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | p_preIndex = -1;
|
| | | p_nextIndex = -1;
|
| | | int minWashLevel = p_washSpeclist[minIndex].levelNeed;
|
| | | int maxWashLevel = p_washSpeclist[maxIndex].levelNeed;
|
| | | int minWashLevel = p_washSpeclist[minIndex].specConfig.levelNeed;
|
| | | int maxWashLevel = p_washSpeclist[maxIndex].specConfig.levelNeed;
|
| | | int sum = minWashLevel + maxWashLevel;
|
| | | int adjacentIndex = 0;
|
| | | if (sum != 0)
|
| | |
| | | {
|
| | | for (int i = adjacentIndex; i > -1; i--)
|
| | | {
|
| | | if (p_washSpeclist[i].levelNeed <= currentLevel)
|
| | | if (p_washSpeclist[i].specConfig.levelNeed <= currentLevel)
|
| | | {
|
| | | p_preIndex = i;
|
| | | break;
|
| | |
| | | {
|
| | | for (int i = adjacentIndex; i < p_washSpeclist.Count; i++)
|
| | | {
|
| | | if (p_washSpeclist[i].levelNeed >= currentLevel)
|
| | | if (p_washSpeclist[i].specConfig.levelNeed >= currentLevel)
|
| | | {
|
| | | if (adjacentIndex != p_washSpeclist.Count - 1)
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | List<EquipWashSpecConfig> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
| | | if (curTypeLv < tagSpecModellist[0].levelNeed)
|
| | | List<EquipWashSpecConfig.EquipWashSpecData> tagSpecModellist = EquipWashSpecConfig.GetWashSpecModel(type);
|
| | | if (curTypeLv < tagSpecModellist[0].specConfig.levelNeed)
|
| | | {
|
| | | _specWashOpenCondition.gameObject.SetActive(true);
|
| | | _openSpecWashPro.SetActive(false);
|
| | |
| | | int i = 0;
|
| | | for (i = tagSpecModellist.Count - 1; i > -1; i--)
|
| | | {
|
| | | if (curTypeLv >= tagSpecModellist[i].levelNeed)
|
| | | var washSpecData = tagSpecModellist[i];
|
| | | if (curTypeLv >= washSpecData.specConfig.levelNeed)
|
| | | {
|
| | | int[] specAttrsID = ConfigParse.GetMultipleStr<int>(tagSpecModellist[i].attByLevel);
|
| | | int[] specAttrsValue = ConfigParse.GetMultipleStr<int>(tagSpecModellist[i].attByLevelValue);
|
| | | int[] specAttrsID = washSpecData.activeIds;
|
| | | int[] specAttrsValue = washSpecData.activeValues;
|
| | | int j = 0;
|
| | | for (j = 0; j < specAttrNameText.Count; j++)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if(curTypeLv >= tagSpecModellist[tagSpecModellist.Count - 1].levelNeed)
|
| | | if(curTypeLv >= tagSpecModellist[tagSpecModellist.Count - 1].specConfig.levelNeed)
|
| | | {
|
| | | _specWashFullText.gameObject.SetActive(true);
|
| | | }
|
| | |
| | |
|
| | | public void Begin()
|
| | | {
|
| | | _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("AutoBuyDrug");
|
| | | shopIdlist = ConfigParse.GetMultipleStr<int>(_tagFuncModel.Numerical1);
|
| | | isStartDecompose = false;
|
| | | isStartOneKeySell = false;
|
| | | }
|
| | |
| | | if (singlePack == null)
|
| | | return;
|
| | |
|
| | | _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("AutoBuyDrug");
|
| | | shopIdlist = ConfigParse.GetMultipleStr<int>(_tagFuncModel.Numerical1);
|
| | | int i = 0;
|
| | | int length = shopIdlist.Length;
|
| | | for (i = length - 1; i > -1; i--)
|
| | |
| | | || !DeadModel.IsCanReborn || IsDungeon())
|
| | | return;
|
| | |
|
| | | _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("RebornArguments");
|
| | | RebornConditions = ConfigParse.GetMultipleStr<int>(_tagFuncModel.Numerical1);
|
| | | RebornConditions = DeadModel.RebornConditions;
|
| | | rebornPrice = RebornConditions[2];
|
| | | StartCoroutine(PlayerReborn(5));
|
| | | }
|
| | |
| | | private FuncConfigConfig funcOpenBagItem = null;
|
| | | public WindowJumpMgr()
|
| | | {
|
| | | ParseWindowSearchConfig();
|
| | | IsJumpState = false;
|
| | | funcOpenBagItem = Config.Instance.Get<FuncConfigConfig>("OpenBagItem");
|
| | | StageManager.Instance.onStartStageLoadingEvent += ClearCurRecord;
|
| | |
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | | MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | |
|
| | | #region 解析本地数据
|
| | | public Dictionary<int, WindowSearchData> windowSearchDataDict { get; private set;}
|
| | | private void ParseWindowSearchConfig()
|
| | | {
|
| | | windowSearchDataDict = new Dictionary<int, WindowSearchData>();
|
| | | List<WindowSearchConfig> searchConfigs = Config.Instance.GetAllValues<WindowSearchConfig>();
|
| | | for(int i = 0; i < searchConfigs.Count; i++)
|
| | | {
|
| | | var searchConfig = searchConfigs[i];
|
| | | WindowSearchData searchData = new WindowSearchData();
|
| | | searchData.id = searchConfig.ID;
|
| | | searchData.searchConfig = searchConfig;
|
| | | searchData.conditions = ConfigParse.GetMultipleStr<int>(searchConfig.SelectActive);
|
| | | if(!windowSearchDataDict.ContainsKey(searchConfig.ID))
|
| | | {
|
| | | windowSearchDataDict.Add(searchConfig.ID,searchData);
|
| | | }
|
| | | }
|
| | | }
|
| | | public WindowSearchData GetSearchData(int id)
|
| | | {
|
| | | WindowSearchData searchData = null;
|
| | | windowSearchDataDict.TryGetValue(id,out searchData);
|
| | | return searchData;
|
| | | }
|
| | |
|
| | | public class WindowSearchData
|
| | | {
|
| | | public int id;
|
| | | public WindowSearchConfig searchConfig;
|
| | | public int[] conditions;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public bool IsJumpState { get; private set; }
|
| | | public int jumpPhase { get; private set;}
|
| | |
| | | case JumpUIType.EquipCompose2:
|
| | | case JumpUIType.EquipCompose3:
|
| | | case JumpUIType.EquipCompose4:
|
| | | int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | if(types.Length > 0)
|
| | | {
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1,types[0],types[1]);
|
| | |
| | | case JumpUIType.ComposeTicketFairy:
|
| | | case JumpUIType.ComposeTicketGod:
|
| | | case JumpUIType.ComposeTicketIce:
|
| | | int[] composeTypelist = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | int[] composeTypelist = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1, composeTypelist[0], composeTypelist[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | |
| | | case JumpUIType.TrialDungeonSelect1:
|
| | | case JumpUIType.TrialDungeonSelect2:
|
| | | case JumpUIType.TrialDungeonSelect3:
|
| | | int[] dungeonInfos = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | int[] dungeonInfos = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | Dungeon dungeon = new Dungeon(dungeonInfos[0], dungeonInfos[1]);
|
| | | dungeonModel.selectedTrialDungeon = dungeon;
|
| | | SetJumpLogic<TrialDungeonEntranceWin>(_tagWinSearchModel.TABID);
|
| | |
| | | case JumpUIType.ComposeTicketFairy:
|
| | | case JumpUIType.ComposeTicketGod:
|
| | | case JumpUIType.ComposeTicketIce:
|
| | | int[] types = ConfigParse.GetMultipleStr<int>(_tagWinSearchModel.SelectActive);
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | if (types.Length > 0)
|
| | | {
|
| | | if (!composeModel.CheckIsComposeByType(_tagWinSearchModel.TABID + 1, types[0], types[1]))
|
| | |
| | | |
| | | public static void GetAllDirectoryFileInfos(string _path, List<FileInfo> _fileInfos)
|
| | | {
|
| | | UnityEngine.Debug.Log("GetAllDirectoryFileInfos path is :" + _path);
|
| | |
|
| | | var directoryInfo = new DirectoryInfo(_path);
|
| | | var allFileSystemInfos = directoryInfo.GetFileSystemInfos();
|
| | |
|
| | |
| | | int channel = 0;
|
| | | var chatCenter = ModelCenter.Instance.GetModel<ChatCenter>();
|
| | | if (!requireVerify || !GetChannel(channelType, out channel) || PlayerDatas.Instance.baseData.VIPLv >= 4
|
| | | || IsFairyFeast(channelType) || chatCenter.IsChatBanned || IsSystemChat(content))
|
| | | || IsFairyFeast(channelType) || chatCenter.IsChatBanned || IsSystemChat(content)
|
| | | || chatCenter.clientBanned)
|
| | | {
|
| | | if (callback != null)
|
| | | {
|