Merge branch 'master' into Cross_Server
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, November 28, 2018
|
| | | // [ Date ]: Monday, December 10, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | |
| | | public string Material_Fight_Suit { get ; private set; }
|
| | | public string Material_UI_Normal { get ; private set; }
|
| | | public string Material_UI_Suit { get ; private set; }
|
| | | public string boneNameList { get ; private set; } |
| | | public string EffFileName { get ; private set; }
|
| | | public Vector3 UIOffset { get ; private set; }
|
| | | public Vector3 UIRotation { get ; private set; }
|
| | |
| | |
|
| | | Material_UI_Suit = rawContents[8].Trim();
|
| | |
|
| | | EffFileName = rawContents[9].Trim();
|
| | | boneNameList = rawContents[9].Trim();
|
| | |
|
| | | UIOffset=rawContents[10].Vector3Parse();
|
| | | EffFileName = rawContents[10].Trim();
|
| | |
|
| | | UIRotation=rawContents[11].Vector3Parse();
|
| | | UIOffset=rawContents[11].Vector3Parse();
|
| | |
|
| | | UIScale=rawContents[12].Vector3Parse();
|
| | | UIRotation=rawContents[12].Vector3Parse();
|
| | |
|
| | | Scale=rawContents[13].Vector3Parse();
|
| | | UIScale=rawContents[13].Vector3Parse();
|
| | | |
| | | Scale=rawContents[14].Vector3Parse();
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 290b3d02a826d6b4daabb2e80dfaa3ab |
| | | timeCreated: 1543388296 |
| | | timeCreated: 1544430338 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | } |
| | | } |
| | | |
| | | public int petEffectLimit |
| | | { |
| | | get |
| | | { |
| | | if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High) |
| | | { |
| | | return GeneralDefine.highQualityPetEffectCount; |
| | | } |
| | | else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium) |
| | | { |
| | | return GeneralDefine.medQualityPetEffectCount; |
| | | } |
| | | else |
| | | { |
| | | return GeneralDefine.lowQualityPetEffectCount; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public int horseEffectLimit |
| | | { |
| | | get |
| | | { |
| | | if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High) |
| | | { |
| | | return GeneralDefine.highQualityHorseEffectCount; |
| | | } |
| | | else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium) |
| | | { |
| | | return GeneralDefine.medQualityHorseEffectCount; |
| | | } |
| | | else |
| | | { |
| | | return GeneralDefine.lowQualityHorseEffectCount; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public float timeEscape; |
| | | |
| | | private void SortList() |
| | |
| | | if (_player == null || !_player.ShowOrHide)
|
| | | {
|
| | | _pet.ShowOrHideModel(false);
|
| | | _pet.HideEffect();
|
| | | //Debug.LogFormat("宠物: {0} 的拥有者: {1} 不可见, 这里隐藏.", _pet.ServerInstID, _parentID);
|
| | | continue;
|
| | | }
|
| | |
| | | _pet.ShowOrHideModel(false);
|
| | | //Debug.LogFormat("宠物: {0} 的拥有者: {1} 在列表中且位于: {2}, 大于限制数量: {3}", _pet.ServerInstID, _parentID, _index, BattleEffectPlayRule.Instance.petLimit);
|
| | | }
|
| | |
|
| | | if (_index != -1 && _index < BattleEffectPlayRule.Instance.petEffectLimit)
|
| | | {
|
| | | _pet.ShowEffect();
|
| | | }
|
| | | else
|
| | | {
|
| | | _pet.HideEffect();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (_chkPlayer == null || !_chkPlayer.ShowOrHide)
|
| | | {
|
| | | _player.SwitchGuard(0);
|
| | | _player.HideHorseEffect();
|
| | | //Debug.LogFormat("_list: {0} 的拥有者: {1} 不可见, 这里隐藏.", _chkPlayer.ServerInstID, _player.ServerInstID);
|
| | | continue;
|
| | | }
|
| | |
| | | else
|
| | | {
|
| | | _player.SwitchGuard(0);
|
| | | //Debug.LogFormat("_list: {0} 的拥有者: {1} 在列表中且位于: {2}, 大于限制数量: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
|
| | | }
|
| | |
|
| | | if (_index != -1 && _index < BattleEffectPlayRule.Instance.horseEffectLimit)
|
| | | {
|
| | | _player.ShowHorseEffect();
|
| | | //Debug.LogFormat("_list: {0} 的拥有者: {1} 在列表中且位于: {2}, 小于限制数量: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
|
| | | }
|
| | | else
|
| | | {
|
| | | _player.HideHorseEffect();
|
| | | //Debug.LogFormat("_list: {0} 的拥有者: {1} 在列表中且位于: {2}, 大于限制数量: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
|
| | | }
|
| | | }
|
| | |
| | | else if (_type == typeof(GA_NpcFightZZPlayer))
|
| | | {
|
| | | return (byte)E_ActorClassType.PlayerZZ;
|
| | | }else if(_type == typeof(GA_NpcFightSgzcZZ))
|
| | | }
|
| | | else if (_type == typeof(GA_NpcFightSgzcZZ))
|
| | | {
|
| | | return (byte)E_ActorClassType.PlayerSgzcRobot;
|
| | | }
|
| | |
| | |
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | using UnityEngine;
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public sealed override void ShowEffect()
|
| | | {
|
| | | HideEffect();
|
| | |
|
| | | string _modelName = NpcConfig.MODE;
|
| | | var _config = TableConfig.ModelResConfig.GetPetConfig(_modelName);
|
| | | if (_config != null)
|
| | | {
|
| | | var _dict = TableConfig.ModelResConfig.GetEffectDict(_modelName);
|
| | | if (_dict != null)
|
| | | {
|
| | | foreach (var _bone in _dict.Keys)
|
| | | {
|
| | | var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_dict[_bone], m_Model.transform.GetChildTransformDeeply(_bone));
|
| | | m_EffectList.Add(_ctrl);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnMainModelLoaded()
|
| | | {
|
| | | base.OnMainModelLoaded();
|
| | |
|
| | | uint _parentSID = ServerInstID / 10;
|
| | |
|
| | | if (_parentSID != PlayerDatas.Instance.PlayerId)
|
| | | {
|
| | | GA_Player _player = GAMgr.Instance.GetBySID(_parentSID) as GA_Player;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | protected sealed override void OnUnit()
|
| | | public sealed override void ShowOrHideModel(bool showOrHide)
|
| | | {
|
| | | base.OnUnit();
|
| | | base.ShowOrHideModel(showOrHide);
|
| | |
|
| | | if (showOrHide)
|
| | | {
|
| | | ShowEffect();
|
| | | }
|
| | | else
|
| | | {
|
| | | HideEffect();
|
| | | }
|
| | | }
|
| | |
|
| | | public sealed override void RequestLifeBar() { }
|
| | |
| | | using Snxxz.UI;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | using UnityEngine;
|
| | | using UnityEngine.AI;
|
| | | using UnityEngine.Events;
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | protected List<SFXController> m_EffectList = new List<SFXController>();
|
| | |
|
| | | public abstract void ShowOrHideModel(bool showOrHide);
|
| | | public abstract void ShowEffect();
|
| | | public virtual void HideEffect()
|
| | | {
|
| | | foreach (var _ctrl in m_EffectList)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(_ctrl);
|
| | | }
|
| | | m_EffectList.Clear();
|
| | | }
|
| | |
|
| | | protected Vector3 MP_Name_Pos;
|
| | |
|
| | |
| | |
|
| | | protected override void OnUnit()
|
| | | {
|
| | | HideEffect();
|
| | |
|
| | | m_StartedFlash = false;
|
| | | m_FlashLastTime = 0;
|
| | | SelectTarget = null;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public override void ShowEffect() { }
|
| | |
|
| | | public abstract override void Destroy();
|
| | |
|
| | | /// <summary>
|
| | |
| | |
|
| | | protected override void OnUnit()
|
| | | {
|
| | | HideEffect();
|
| | |
|
| | | StatusMgr.Instance.ReleaseActor(ServerInstID);
|
| | |
|
| | | if (!ShowOrHide)
|
| | |
| | | /// 显示或者隐藏表现层
|
| | | /// </summary>
|
| | | /// <param name="showOrHide">显示: true, 隐藏: false</param>
|
| | | public sealed override void ShowOrHideModel(bool showOrHide)
|
| | | public override void ShowOrHideModel(bool showOrHide)
|
| | | {
|
| | | if (ShowOrHide == showOrHide)
|
| | | {
|
| | |
| | | InstanceResourcesLoader.AsyncLoadNpc(NpcConfig.NPCID, OnPrefabLoadFinished);
|
| | | }
|
| | |
|
| | | public override void ShowEffect() { }
|
| | |
|
| | | protected virtual void HandleNpcConfig(int npcID)
|
| | | {
|
| | | NpcConfig = Config.Instance.Get<NPCConfig>(npcID);
|
| | |
| | |
|
| | | protected override void OnUnit()
|
| | | {
|
| | | HideEffect();
|
| | |
|
| | | if (m_LoadDefaultRes)
|
| | | {
|
| | | GameObjectPoolManager.Instance.ReleaseDefaultFuncNPC(m_Model);
|
| | |
| | |
|
| | | GameObject _prefab = null;
|
| | |
|
| | | HideHorseEffect();
|
| | |
|
| | | if (m_HorseModel)
|
| | | {
|
| | | HorseConfig _horseConfig = Config.Instance.Get<HorseConfig>((int)HorseID);
|
| | |
| | |
|
| | | if (_newHorseID <= 0)
|
| | | {
|
| | | HideHorseEffect();
|
| | |
|
| | | if (MovingState != E_MovingState.Ride)
|
| | | {
|
| | | return;
|
| | |
| | | }
|
| | |
|
| | | HorseID = _newHorseID;
|
| | |
|
| | | if (ShowOrHide)
|
| | | {
|
| | | ShowHorseEffect();
|
| | | }
|
| | | }
|
| | |
|
| | | private List<SFXController> m_HorseEffectList = new List<SFXController>();
|
| | |
|
| | | public void HideHorseEffect()
|
| | | {
|
| | | foreach (var _ctrl in m_HorseEffectList)
|
| | | {
|
| | | SFXPlayUtility.Instance.Release(_ctrl);
|
| | | }
|
| | | m_HorseEffectList.Clear();
|
| | | }
|
| | |
|
| | | public void ShowHorseEffect()
|
| | | {
|
| | | HideHorseEffect();
|
| | | var _horseConfig = Config.Instance.Get<HorseConfig>((int)HorseID);
|
| | | var _config = Config.Instance.Get<ModelResConfig>(_horseConfig.Model);
|
| | | if (_config == null)
|
| | | {
|
| | | Debug.LogError("找不到配置: " + HorseID);
|
| | | return;
|
| | | }
|
| | | var _dict = ModelResConfig.GetEffectDict(_config.ResourcesName);
|
| | | if (_dict != null)
|
| | | {
|
| | | foreach (var _bone in _dict.Keys)
|
| | | {
|
| | | var _ctrl = SFXPlayUtility.Instance.PlayBattleEffect(_dict[_bone], m_HorseModel.transform.GetChildTransformDeeply(_bone));
|
| | | m_HorseEffectList.Add(_ctrl);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public abstract void ChangeEquip(EquipInfo equipInfo);
|
| | |
| | | return 12600 + index;
|
| | | }
|
| | | }
|
| | | else if(this is GA_NpcFightSgzcZZ)
|
| | | else if (this is GA_NpcFightSgzcZZ)
|
| | | {
|
| | | switch (JobSetup.Job)
|
| | | {
|
| | |
| | | { |
| | | public partial class ModelResConfig : ConfigBase, IConfigPostProcess |
| | | { |
| | | private static readonly Dictionary<string, ModelResConfig> dict = new Dictionary<string, ModelResConfig>(); |
| | | private static readonly Dictionary<string, ModelResConfig> suitDict = new Dictionary<string, ModelResConfig>(); |
| | | private static readonly Dictionary<string, ModelResConfig> petDict = new Dictionary<string, ModelResConfig>(); |
| | | private static readonly Dictionary<string, ModelResConfig> horseDict = new Dictionary<string, ModelResConfig>(); |
| | | private static readonly Dictionary<string, Dictionary<string, int>> effectDict = new Dictionary<string, Dictionary<string, int>>(); |
| | | |
| | | public void OnConfigParseCompleted() |
| | | { |
| | |
| | | { |
| | | _name = _name.Substring(_index + 1); |
| | | } |
| | | dict[_name] = this; |
| | | suitDict[_name] = this; |
| | | } |
| | | else if (Type == (int)E_ModelResType.Horse) |
| | | { |
| | | horseDict[ResourcesName] = this; |
| | | } |
| | | else if (Type == (int)E_ModelResType.Pet) |
| | | { |
| | | petDict[ResourcesName] = this; |
| | | } |
| | | |
| | | if (Type == (int)E_ModelResType.Horse |
| | | || Type == (int)E_ModelResType.Pet) |
| | | { |
| | | if (!string.IsNullOrEmpty(boneNameList)) |
| | | { |
| | | var _bones = boneNameList.Split('|'); |
| | | var _effects = EffFileName.Split('|'); |
| | | |
| | | if (_bones.Length != _effects.Length) |
| | | { |
| | | Debug.LogWarningFormat("{0} 绑定骨骼的数量和特效的数量无法对应 {1} != {2}", ID, _bones.Length, _effects.Length); |
| | | } |
| | | |
| | | var _dict = new Dictionary<string, int>(); |
| | | |
| | | for (int i = 0; i < _bones.Length && i < _effects.Length; ++i) |
| | | { |
| | | _dict[_bones[i]] = int.Parse(_effects[i]); |
| | | |
| | | // Debug.LogFormat("设置特效配置: {0} => {1}", _bones[i], _dict[_bones[i]]); |
| | | } |
| | | |
| | | effectDict[ResourcesName] = _dict; |
| | | } |
| | | } |
| | | } |
| | | |
| | | public static Dictionary<string, int> GetEffectDict(string name) |
| | | { |
| | | if (effectDict.ContainsKey(name)) |
| | | { |
| | | return effectDict[name]; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static ModelResConfig GetClothesConfig(string name) |
| | | { |
| | | if(dict.ContainsKey(name)) |
| | | if (suitDict.ContainsKey(name)) |
| | | { |
| | | return dict[name]; |
| | | return suitDict[name]; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static ModelResConfig GetHorseConfig(string name) |
| | | { |
| | | if (horseDict.ContainsKey(name)) |
| | | { |
| | | return horseDict[name]; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static ModelResConfig GetPetConfig(string name) |
| | | { |
| | | if (petDict.ContainsKey(name)) |
| | | { |
| | | return petDict[name]; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | public static int lowQualityGuardCount { get; private set; } |
| | | public static int medQualityGuardCount { get; private set; } |
| | | public static int highQualityGuardCount { get; private set; } |
| | | public static int lowQualityPetEffectCount { get; private set; } |
| | | public static int medQualityPetEffectCount { get; private set; } |
| | | public static int highQualityPetEffectCount { get; private set; } |
| | | public static int lowQualityHorseEffectCount { get; private set; } |
| | | public static int medQualityHorseEffectCount { get; private set; } |
| | | public static int highQualityHorseEffectCount { get; private set; } |
| | | |
| | | public static int fairyLandBuffCondition { get; private set; } |
| | | public static int fairyLandBuffId { get; private set; } |
| | |
| | | lowQualityGuardCount = int.Parse(func.Numerical1); |
| | | medQualityGuardCount = int.Parse(func.Numerical2); |
| | | highQualityGuardCount = int.Parse(func.Numerical3); |
| | | |
| | | func = Config.Instance.Get<FuncConfigConfig>("QualityPetEffectCount"); |
| | | lowQualityPetEffectCount = int.Parse(func.Numerical1); |
| | | medQualityPetEffectCount = int.Parse(func.Numerical2); |
| | | highQualityPetEffectCount = int.Parse(func.Numerical3); |
| | | |
| | | func = Config.Instance.Get<FuncConfigConfig>("QualityHorseEffectCount"); |
| | | lowQualityHorseEffectCount = int.Parse(func.Numerical1); |
| | | medQualityHorseEffectCount = int.Parse(func.Numerical2); |
| | | highQualityHorseEffectCount = int.Parse(func.Numerical3); |
| | | |
| | | fairyLandBuffCondition = GetInt("XjmjAddHarm", 1); |
| | | fairyLandBuffId = GetInt("XjmjAddHarm", 2); |
| | |
| | | realmLv = (int)data.value1;
|
| | | break;
|
| | | }
|
| | | if (realmLv > 0)
|
| | | RealmConfig presentCfg = Config.Instance.Get<RealmConfig>(realmLv);
|
| | | if (presentCfg != null)
|
| | | {
|
| | | RealmConfig presentCfg = Config.Instance.Get<RealmConfig>(realmLv);
|
| | | if (presentCfg != null)
|
| | | {
|
| | | realmImg.gameObject.SetActive(data.type != (int)PlayerRankData.RankType.Realm);
|
| | | m_CompareImg.gameObject.SetActive(data.type == (int)PlayerRankData.RankType.Realm);
|
| | | realmImg.SetSprite(presentCfg.Img);
|
| | | m_CompareImg.SetSprite(presentCfg.Img);
|
| | | }
|
| | | realmImg.gameObject.SetActive(data.type != (int)PlayerRankData.RankType.Realm);
|
| | | m_CompareImg.gameObject.SetActive(data.type == (int)PlayerRankData.RankType.Realm);
|
| | | realmImg.SetSprite(presentCfg.Img);
|
| | | m_CompareImg.SetSprite(presentCfg.Img);
|
| | | }
|
| | |
|
| | | bool isSelf = data.ID == PlayerDatas.Instance.PlayerId;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public static void GodWeaponStage(int _type, int _level, int _beforeLevel)
|
| | | public static void GodWeaponStage(int _type, int _level, int _beforeLevel,int stage)
|
| | | {
|
| | | activateType = ActivateFunc.GodWeaponEffect;
|
| | | currentLv = _level;
|
| | |
| | | fightPower += skillConfig.FightPower;
|
| | | }
|
| | | }
|
| | | var dict = _model.GetEffectPropertyUpper(_type, stage);
|
| | | fightPower += UIHelper.GetFightPower(dict);
|
| | | var requireLevel = _model.GetGodWeaponStageRequireLevel(_type, stage);
|
| | | fightPower += _model.TryGetEffectFightPower(_type, stage);
|
| | |
|
| | | titleIconKey = "GodWeaponEffectTitle";
|
| | |
|
| | |
| | | [SerializeField] Button[] m_SelectStages;
|
| | | [SerializeField] Image m_Select;
|
| | | [SerializeField] RawImage m_RawModel;
|
| | | [SerializeField] PropertyBehaviour[] m_Propertys;
|
| | | [SerializeField] Text m_FightPower;
|
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | int selectStage = 1;
|
| | |
| | | DisplayModel();
|
| | | DisplayStage();
|
| | | DisplayRequireLevel();
|
| | | DisplayProperty();
|
| | | DisplayFightPower();
|
| | | }
|
| | |
|
| | | private void DisplayStage()
|
| | |
| | | m_RequireLevel.text = Language.Get("GodWeaponStageRequireLevel", config.Name, requireLevel);
|
| | | }
|
| | |
|
| | | private void DisplayFightPower()
|
| | | {
|
| | | var fightPower = 0;
|
| | | var dict = model.GetEffectPropertyUpper(selectGodWeaponType, selectStage);
|
| | | fightPower += model.TryGetEffectFightPower(selectGodWeaponType, selectStage);
|
| | | if (dict != null)
|
| | | {
|
| | | fightPower += UIHelper.GetFightPower(dict);
|
| | | }
|
| | | m_FightPower.text = StringUtility.Contact("+", fightPower);
|
| | | }
|
| | |
|
| | | private void DisplayProperty()
|
| | | {
|
| | | var dict = model.GetEffectPropertyUpper(selectGodWeaponType, selectStage);
|
| | | var index = 0;
|
| | | foreach (var key in dict.Keys)
|
| | | {
|
| | | if (index < m_Propertys.Length)
|
| | | {
|
| | | m_Propertys[index].gameObject.SetActive(true);
|
| | | m_Propertys[index].DisplayUpper(key, dict[key]);
|
| | | }
|
| | | index++;
|
| | | }
|
| | | for (int i = index; i < m_Propertys.Length; i++)
|
| | | {
|
| | | m_Propertys[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayModel()
|
| | | {
|
| | | m_RawModel.gameObject.SetActive(true);
|
| | |
| | | Dictionary<int, int> exteriorPowerDict = new Dictionary<int, int>();
|
| | | Dictionary<int, int> godWeaponSkillEffect = new Dictionary<int, int>();
|
| | | Dictionary<int, int> singleHarmmerExp = new Dictionary<int, int>();
|
| | | Dictionary<int, List<GodWeaponEffectProperty>> effectPropertyDict =
|
| | | new Dictionary<int, List<GodWeaponEffectProperty>>();
|
| | | Dictionary<int, Dictionary<int, int>> effectFightPower = new Dictionary<int, Dictionary<int, int>>();
|
| | | int[] autoHammerExpArea { get; set; }
|
| | | int[] autoHammerCount { get; set; }
|
| | |
|
| | |
| | | godWeaponStageDict.Add(config.type, stages);
|
| | | }
|
| | | stages.Add(config.level);
|
| | | List<GodWeaponEffectProperty> list;
|
| | | if (!effectPropertyDict.TryGetValue(config.type, out list))
|
| | | {
|
| | | list = new List<GodWeaponEffectProperty>();
|
| | | effectPropertyDict.Add(config.type, list);
|
| | | }
|
| | | list.Add(new GodWeaponEffectProperty()
|
| | | {
|
| | | level = config.level,
|
| | | propertyDict = ConfigParse.GetDic<int, int>(config.attr),
|
| | | });
|
| | | Dictionary<int, int> dict;
|
| | | if (!effectFightPower.TryGetValue(config.type, out dict))
|
| | | {
|
| | | dict = new Dictionary<int, int>();
|
| | | effectFightPower.Add(config.type, dict);
|
| | | }
|
| | | dict.Add(config.level, config.fightPower);
|
| | | }
|
| | |
|
| | | funcConfig = Config.Instance.Get<FuncConfigConfig>("MagicExterior");
|
| | |
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<HowToPlayWin>();
|
| | | }
|
| | | ActivateShow.GodWeaponStage(_type, _nowLv, _beforeLv);
|
| | | ActivateShow.GodWeaponStage(_type, _nowLv, _beforeLv, stage);
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | return godWeaponSkillEffect.TryGetValue(skillId, out effect);
|
| | | }
|
| | |
|
| | | public bool TryGetEffectProperty(int type, int level, out Dictionary<int, int> dict)
|
| | | {
|
| | | dict = null;
|
| | | if (effectPropertyDict.ContainsKey(type))
|
| | | {
|
| | | var effectProperty = effectPropertyDict[type].Find((x) =>
|
| | | {
|
| | | return x.level == level;
|
| | | });
|
| | | if (!effectProperty.Equals(default(GodWeaponEffectProperty)))
|
| | | {
|
| | | dict = effectProperty.propertyDict;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public int TryGetEffectFightPower(int type, int stage)
|
| | | {
|
| | | var previousFightPower = 0;
|
| | | if (stage - 1 > 0)
|
| | | {
|
| | | var previousLevel = GetGodWeaponStageRequireLevel(type, stage - 1);
|
| | | if (effectFightPower.ContainsKey(type)
|
| | | && effectFightPower[type].ContainsKey(previousLevel))
|
| | | {
|
| | | previousFightPower = effectFightPower[type][previousLevel];
|
| | | }
|
| | | }
|
| | | var level = GetGodWeaponStageRequireLevel(type, stage);
|
| | | if (effectFightPower.ContainsKey(type)
|
| | | && effectFightPower[type].ContainsKey(level))
|
| | | {
|
| | | return effectFightPower[type][level] - previousFightPower;
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | Dictionary<int, int> propertyCacheDict = new Dictionary<int, int>();
|
| | | public Dictionary<int, int> GetEffectPropertyUpper(int type, int stage)
|
| | | {
|
| | | propertyCacheDict.Clear();
|
| | | Dictionary<int, int> previousPropertyDict = null;
|
| | | if (stage - 1 > 0)
|
| | | {
|
| | | var level = GetGodWeaponStageRequireLevel(type, stage - 1);
|
| | | TryGetEffectProperty(type, level, out previousPropertyDict);
|
| | | }
|
| | | var requireLevel = GetGodWeaponStageRequireLevel(type, stage);
|
| | | Dictionary<int, int> dict;
|
| | | if (TryGetEffectProperty(type, requireLevel, out dict))
|
| | | {
|
| | | foreach (var key in dict.Keys)
|
| | | {
|
| | | if (previousPropertyDict != null && previousPropertyDict.ContainsKey(key))
|
| | | {
|
| | | propertyCacheDict.Add(key, dict[key] - previousPropertyDict[key]);
|
| | | }
|
| | | else
|
| | | {
|
| | | propertyCacheDict.Add(key, dict[key]);
|
| | | }
|
| | | }
|
| | | }
|
| | | return propertyCacheDict;
|
| | | }
|
| | | }
|
| | |
|
| | | public class GodWeaponInfo
|
| | |
| | | public int cost;
|
| | | public int exp;
|
| | | }
|
| | |
|
| | | public struct GodWeaponEffectProperty
|
| | | {
|
| | | public int level;
|
| | | public Dictionary<int, int> propertyDict;
|
| | | }
|
| | | }
|
| | |
|