3610 【前端】法宝之魂改为由各个法宝单独觉醒,取消激活条件
3605 【前端】潜力0级时增加战力
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, June 29, 2018 |
| | | // [ Date ]: Tuesday, September 18, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int LineId { get ; private set ; }
|
| | | public int ChallengeLevel { get ; private set ; }
|
| | | public int[] Potentials;
|
| | | public int[] SkillPower;
|
| | | public string NeedItem { get ; private set; }
|
| | | public int EffectID { get ; private set ; }
|
| | | public string[] Verse;
|
| | |
| | | int.TryParse(PotentialsStringArray[i],out Potentials[i]); |
| | | }
|
| | |
|
| | | NeedItem = rawContents[18].Trim();
|
| | | string[] SkillPowerStringArray = rawContents[18].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | SkillPower = new int[SkillPowerStringArray.Length]; |
| | | for (int i=0;i<SkillPowerStringArray.Length;i++) |
| | | { |
| | | int.TryParse(SkillPowerStringArray[i],out SkillPower[i]); |
| | | }
|
| | |
|
| | | EffectID=IsNumeric(rawContents[19]) ? int.Parse(rawContents[19]):0; |
| | | NeedItem = rawContents[19].Trim();
|
| | |
|
| | | Verse = rawContents[20].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | | EffectID=IsNumeric(rawContents[20]) ? int.Parse(rawContents[20]):0; |
| | |
|
| | | ShowNetGotEffect=IsNumeric(rawContents[21]) ? int.Parse(rawContents[21]):0; |
| | | Verse = rawContents[21].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | PreferredStage=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0; |
| | | ShowNetGotEffect=IsNumeric(rawContents[22]) ? int.Parse(rawContents[22]):0; |
| | | |
| | | PreferredStage=IsNumeric(rawContents[23]) ? int.Parse(rawContents[23]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 607f2341c6f1e3e468b7eb233bc91ff2 |
| | | timeCreated: 1530238289 |
| | | timeCreated: 1537237950 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, September 03, 2018
|
| | | // [ Date ]: Tuesday, September 18, 2018 |
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | |
| | | public int UnLockFuncID { get ; private set ; }
|
| | | public int ActiveMWID { get ; private set ; }
|
| | | public string ItemAward { get ; private set; }
|
| | | public int SoulID { get ; private set ; }
|
| | | public string DescriptionMainWin { get ; private set; }
|
| | |
|
| | | public override string getKey()
|
| | |
| | |
|
| | | ItemAward = rawContents[8].Trim();
|
| | |
|
| | | DescriptionMainWin = rawContents[9].Trim();
|
| | | SoulID=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; |
| | | |
| | | DescriptionMainWin = rawContents[10].Trim(); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 882666fd713678849aebb360643bfe19 |
| | | timeCreated: 1535946483 |
| | | timeCreated: 1537237919 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | public void PowerAdd(int power)
|
| | | {
|
| | | if (ModelCenter.Instance.GetModel<TreasureModel>().inPotentialModifyPower)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (prowBool)
|
| | | {
|
| | | prowNum = power;
|
| | |
| | | WindowCenter.Instance.Open<PowerAddWin>();
|
| | | }
|
| | |
|
| | | public void FabaoPowerAdd(int power)
|
| | | {
|
| | | ProwNumAdd = power;
|
| | | if (WindowCenter.Instance.CheckOpen<PowerAddWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<PowerAddWin>();
|
| | | }
|
| | | WindowCenter.Instance.Open<PowerAddWin>();
|
| | | }
|
| | | public void KissMonsterExperience(int _source, int _ExpPoint, int _Exp)//(1.单位经验亿点,2.经验单位点)
|
| | | {
|
| | | if (Event_Experience != null)
|
| | |
| | | unlockType = TreasureStageUnlock.Treasure;
|
| | | treasure = _config.ActiveMWID;
|
| | | }
|
| | | else if (_config.SoulID != 0)
|
| | | {
|
| | | unlockType = TreasureStageUnlock.TreasureSoul;
|
| | | treasureSoul = _config.SoulID;
|
| | | }
|
| | | else if (!string.IsNullOrEmpty(_config.ItemAward))
|
| | | {
|
| | | unlockType = TreasureStageUnlock.Item;
|
| | |
| | |
|
| | | private void WindowAfterCloseEvent(Window _win)
|
| | | {
|
| | | if (_win is TreasureNewStageWin)
|
| | | if (_win is TreasureNewStageWin || _win is TreasureSoulActiveWin)
|
| | | {
|
| | | if (m_Treasure.IsHighestStage && FuncOpen.Instance.IsFuncOpen(82))
|
| | | {
|
| | |
| | | m_Icon.SetSprite(treasureSoulConfig.Icon);
|
| | | m_Descs[0].text = treasureSoulConfig.Name;
|
| | | m_Icon.SetNativeSize();
|
| | | var sizeDelta = m_Icon.rectTransform.sizeDelta;
|
| | | m_Icon.rectTransform.sizeDelta = new Vector2(86, (sizeDelta.y / sizeDelta.x) * 86);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | List<int> m_CacheGotAchievements = new List<int>();
|
| | | Dictionary<int, int> treasureStageShowDict = new Dictionary<int, int>();
|
| | | List<int> treasureUnOpens = new List<int>();//版本未开放法宝
|
| | | Dictionary<int, int[]> potentialInitialPowers = new Dictionary<int, int[]>();
|
| | |
|
| | | public Dictionary<int, int> fairyTreasureGetDict { get; private set; }
|
| | |
|
| | |
| | | public bool openFromTreasureUnlockShow { get; set; }
|
| | | public bool openFromTreasureCollect { get; set; }
|
| | | public bool openFromTreasureList { get; set; }
|
| | | public bool inPotentialModifyPower { get; set; }
|
| | | public int openFromTaskId = 0;
|
| | |
|
| | | public List<int> castSoulGuideTaskIds { get; private set; }
|
| | |
| | | {
|
| | | var caseSoulRedpoint = new Redpoint(CATEGORY_REDPOINTIDS[config.Category - 1], TREASURE_REDPOINTBASE + redpointIndex++);
|
| | | treasure = new HumanTreasure(config.ID, config.Potentials, skillLevelUpRedpoint, achievementRedpoint, caseSoulRedpoint);
|
| | | potentialInitialPowers.Add(config.ID, config.SkillPower);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public int GetPotentialInitialPower(int treasureId, int index)
|
| | | {
|
| | | if (potentialInitialPowers.ContainsKey(treasureId))
|
| | | {
|
| | | var powerArray = potentialInitialPowers[treasureId];
|
| | | if (powerArray != null && index < powerArray.Length && index >= 0)
|
| | | {
|
| | | return powerArray[index];
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | m_TreasureAnimation.OnPotentialLineAnimComplete -= OnPotentialLineAnimComplete;
|
| | |
|
| | | m_SelectedPotential = 0;
|
| | |
|
| | | model.inPotentialModifyPower = false;
|
| | | }
|
| | |
|
| | | private void RedpointValueChangeEvent(int _id)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ModifyPowerUp(int treasureId, int index, int fightPower)
|
| | | {
|
| | | var power = model.GetPotentialInitialPower(treasureId, index);
|
| | | if (power != 0)
|
| | | {
|
| | | ModelCenter.Instance.GetModel<PlayerMainDate>().FabaoPowerAdd(fightPower);
|
| | | model.inPotentialModifyPower = true;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnUnlockPotentialComplete(int _index)
|
| | | {
|
| | | selectedPotential = m_Treasure.potentials[_index].id;
|
| | | m_TreasureAnimation.DisplayPotentialLine(_index);
|
| | | HandleAchievement();
|
| | |
|
| | | if (model.inPotentialModifyPower)
|
| | | {
|
| | | var power = model.GetPotentialInitialPower(m_Treasure.id, _index);
|
| | | model.inPotentialModifyPower = false;
|
| | | ModelCenter.Instance.GetModel<PlayerMainDate>().FabaoPowerAdd(power);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnPotentialLineAnimComplete(int _index)
|
| | |
| | | DisplayPotentialEffect();
|
| | | }
|
| | | var potential = m_Treasure.GetPotential(_potentialId);
|
| | | if (potential != null)
|
| | | if (potential != null && model.serverInited)
|
| | | {
|
| | | PotentialLevelUpAnimation(_potentialId, potential.level);
|
| | | var nextPotential = GetNextPotential(potential.id);
|
| | | if (nextPotential != 0)
|
| | | {
|
| | | var config = Config.Instance.Get<SkillConfig>(nextPotential);
|
| | | if (potential.level == config.LearnSkillLV && potentialBriefInfos != null)
|
| | | {
|
| | | for (int i = 0; i < potentialBriefInfos.Length; i++)
|
| | | {
|
| | | if (potentialBriefInfos[i].potential.id == nextPotential)
|
| | | {
|
| | | var current = Config.Instance.Get<SkillConfig>(potential.id + potential.level - 1);
|
| | | var before = Config.Instance.Get<SkillConfig>(potential.id + potential.level - 2);
|
| | | ModifyPowerUp(m_Treasure.id, i, current.FightPower - before.FightPower);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | var levelUpConfig = GetPotentialLevelUpConfig();
|
| | | if (levelUpConfig.own < levelUpConfig.need)
|
| | |
| | | }
|
| | |
|
| | | if (beforeFinishCount < special.presentFinishCount && serverInited && special.active
|
| | | && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
|
| | | && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
|
| | | && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()
|
| | | && !NewBieCenter.Instance.inGuiding)
|
| | |
| | | _specialData.presentFinishCount = (int)_data.Cnt;
|
| | | UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
|
| | | if (beforeFinishCount < _specialData.presentFinishCount && serverInited && _specialData.active
|
| | | && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>()
|
| | | && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
|
| | | && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>())
|
| | | {
|
| | |
| | | }
|
| | | break;
|
| | | case TreasureStageUnlock.TreasureSoul:
|
| | | var treasureSoulConfig = Config.Instance.Get<TreasureConfig>(treasureStage.treasureSoul);
|
| | | var treasureSoulConfig = Config.Instance.Get<TreasurePrivilegeConfig>(treasureStage.treasureSoul);
|
| | | if (treasureSoulConfig != null)
|
| | | {
|
| | | m_Icon.SetSprite(treasureSoulConfig.Icon);
|