| System/ClientVersion/VersionConfig.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/ActivateShow.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Realm/RealmPropertyUpWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Treasure/TreasureCollectBriefInfoBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Treasure/TreasureSoulModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/ClientVersion/VersionConfig.cs
@@ -1,30 +1,30 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; #if UNITY_EDITOR using UnityEditor; #endif [CreateAssetMenu(menuName = "Config/VersionConfig")] public class VersionConfig : ScriptableObject { public const string VERSION_ALTERNATIVE = "1.0.15"; using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; [SerializeField] public string m_AppId = string.Empty; #if UNITY_EDITOR using UnityEditor; #endif [CreateAssetMenu(menuName = "Config/VersionConfig")] public class VersionConfig : ScriptableObject { public const string VERSION_ALTERNATIVE = "0.0.0"; [SerializeField] public string m_AppId = string.Empty; public string appId { get { return m_AppId; } } [SerializeField] VersionAuthority m_VersionAuthority; public VersionAuthority versionAuthority { get { return m_VersionAuthority; } } [SerializeField] public string m_Version; [SerializeField] VersionAuthority m_VersionAuthority; public VersionAuthority versionAuthority { get { return m_VersionAuthority; } } [SerializeField] public string m_Version; public string version { get { return VersionCompare(m_Version, VERSION_ALTERNATIVE); } } [SerializeField] string m_ClientPackageFlag; public string clientPackageFlag { get { return m_ClientPackageFlag; } } [SerializeField] int m_Branch = 0; public string clientPackageFlag { get { return m_ClientPackageFlag; } } [SerializeField] int m_Branch = 0; public int branch { get { if (DebugUtility.Instance.debugAccount && DebugUtility.Instance.debugBranch >= 0) @@ -36,59 +36,59 @@ return m_Branch; } } } } [SerializeField] InstalledAsset m_AssetAccess = InstalledAsset.IngoreDownLoad; public InstalledAsset assetAccess { get { return m_AssetAccess; } set { m_AssetAccess = value; } } public InstalledAsset assetAccess { get { return m_AssetAccess; } set { m_AssetAccess = value; } } [SerializeField] bool m_PartAssetPackage = false; public bool partAssetPackage { get { return m_PartAssetPackage; } set { m_PartAssetPackage = value; } } [SerializeField] string m_ProductName = string.Empty; public string productName { get { return m_ProductName; } } [SerializeField] string m_BundleIdentifier = string.Empty; public string bundleIdentifier { get { return m_BundleIdentifier; } } [SerializeField] string m_KeystoreFileName; public bool partAssetPackage { get { return m_PartAssetPackage; } set { m_PartAssetPackage = value; } } [SerializeField] string m_ProductName = string.Empty; public string productName { get { return m_ProductName; } } [SerializeField] string m_BundleIdentifier = string.Empty; public string bundleIdentifier { get { return m_BundleIdentifier; } } [SerializeField] string m_KeystoreFileName; public string keystoreFileName { get { return m_KeystoreFileName; } } [SerializeField] string m_KeystorePassword; public string keystorePassword { get { return m_KeystorePassword; } } [SerializeField] string m_KeystoreAlias; [SerializeField] string m_KeystorePassword; public string keystorePassword { get { return m_KeystorePassword; } } [SerializeField] string m_KeystoreAlias; public string keystoreAlias { get { return m_KeystoreAlias; } } [SerializeField] string m_KeystoreAliasPassword; public string keystoreAliasPassword { get { return m_KeystoreAliasPassword; } } [SerializeField] string m_KeystoreAliasPassword; public string keystoreAliasPassword { get { return m_KeystoreAliasPassword; } } [SerializeField] string m_AppleDeveloperTeamID; public string appleDeveloperTeamID { get { return m_AppleDeveloperTeamID; } } [SerializeField] bool m_DebugVersion = false; [SerializeField] bool m_DebugVersion = false; public bool debugVersion { get { return m_DebugVersion; } set { m_DebugVersion = value; } } [SerializeField] bool m_IsBanShu = false; [SerializeField] bool m_IsBanShu = false; public bool isBanShu { get { return m_IsBanShu; } set { m_IsBanShu = value; } } [SerializeField] string m_BuildTime; } [SerializeField] string m_BuildTime; public string buildTime { get { return m_BuildTime; } set { m_BuildTime = value; } } [SerializeField] int m_BuildIndex; [SerializeField] int m_BuildIndex; public int buildIndex { get { return m_BuildIndex; } set { m_BuildIndex = value; } } } [SerializeField] Vector2 m_LogoPosition; public Vector2 logoPosition { get { return m_LogoPosition; } } @@ -114,8 +114,8 @@ m_LogoPosition = dataStrings[18].Vector3Parse(); } #if UNITY_EDITOR [ContextMenu("Apply")] #if UNITY_EDITOR [ContextMenu("Apply")] public void Apply() { var newVersionConfigPath = StringUtility.Contact("Assets/Resources/ScriptableObject/Config/VersionConfig", ".asset"); @@ -131,10 +131,10 @@ AssetDatabase.CreateAsset(newVersionConfig, newVersionConfigPath); EditorUtility.SetDirty(newVersionConfig); AssetDatabase.SaveAssets(); } #endif static VersionConfig config = null; } #endif static VersionConfig config = null; public static VersionConfig Get() { if (config == null) @@ -143,8 +143,8 @@ } return config; } } public static void Copy(VersionConfig _from, VersionConfig _to) { _to.m_VersionAuthority = _from.m_VersionAuthority; @@ -165,14 +165,14 @@ _to.m_IsBanShu = _from.m_IsBanShu; _to.m_ClientPackageFlag = _from.m_ClientPackageFlag; _to.m_LogoPosition = _from.m_LogoPosition; } } /// <summary> /// 比较两个版本,返回更大的那个 /// </summary> /// <param name="_lhs"></param> /// <param name="_rhs"></param> /// <returns></returns> /// <returns></returns> static string VersionCompare(string _lhs, string _rhs) { var lhsStrings = _lhs.Split('.'); @@ -209,6 +209,6 @@ return version1 > version2 ? _lhs : _rhs; } } } } } System/FindPrecious/FindPreciousBossBriefInfoBehaviour.cs
@@ -92,18 +92,11 @@ if (m_Realm != null) { if (_realm > 0) m_Realm.gameObject.SetActive(true); var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm); if (realmConfig != null) { m_Realm.gameObject.SetActive(true); var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(_realm); if (realmConfig != null) { m_Realm.SetSprite(realmConfig.Img); } } else { m_Realm.gameObject.SetActive(false); m_Realm.SetSprite(realmConfig.Img); } } } System/Realm/ActivateShow.cs
@@ -14,6 +14,7 @@ public static int currentLv { get; private set; } public static int beforeLv { get; private set; } public static int godWeaponType { get; private set; } public static int treasureSoulId { get; private set; } private static Dictionary<int, int> propertyUpDict = new Dictionary<int, int>(); @@ -177,6 +178,90 @@ } public static void TreasureSoulGetReward(int id, int _beforeLevel, int _currentLevel) { activateType = ActivateFunc.TreasureSoul; treasureSoulId = id; propertyCompares.Clear(); propertyUpDict.Clear(); var model = ModelCenter.Instance.GetModel<TreasureSoulModel>(); TreasureSpecialData special; if (model.TryGetTreasureSoul(treasureSoulId, out special)) { switch (special.type) { case TreasurePrivilege.StrengthenAdd: var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>(); var before = -1; var present = 0; for (int i = 0; i < configs.Count; i++) { if (_beforeLevel >= configs[i].countNeed) { before = i; } if (_currentLevel >= configs[i].countNeed) { present = i; } } ItemPlusSumAttrConfig _beforeConfig = null; if (before >= 0 && before < configs.Count) { _beforeConfig = configs[before]; } List<int> _beforeProperties = new List<int>(); if (_beforeConfig != null) { _beforeProperties.AddRange(_beforeConfig.attType); } var config = (present < 0 || present >= configs.Count) ? null : configs[present]; if (config == null) { return; } for (int i = 0; i < config.attType.Length; i++) { var _index = _beforeProperties.IndexOf(config.attType[i]); if (_index == -1 || config.attValue[i] > _beforeConfig.attValue[_index]) { propertyUpDict.Add(config.attType[i], config.attValue[i] - (_index == -1 ? 0 : _beforeConfig.attValue[_index])); propertyCompares.Add(new PropertyCompare() { key = config.attType[i], beforeValue = _index == -1 ? 0 : _beforeConfig.attValue[_index], currentValue = config.attValue[i] }); } } break; case TreasurePrivilege.DemonJarAtk: case TreasurePrivilege.MountAtk: case TreasurePrivilege.PetHp: case TreasurePrivilege.Sp: foreach (var _key in special.propertyDict.Keys) { var beforeValue = special.propertyDict[_key] * _beforeLevel / special.progress; var nowValue = special.propertyDict[_key] * _currentLevel / special.progress; propertyUpDict.Add(_key, nowValue - beforeValue); propertyCompares.Add(new PropertyCompare() { key = _key, beforeValue = beforeValue, currentValue = nowValue }); } break; } fightPower = UIHelper.GetFightPower(propertyUpDict); if (!WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()) { WindowCenter.Instance.Open<RealmPropertyUpWin>(); } } } public static void PrepareSkillFly() { if (prepareFlySkillEvent != null) @@ -198,6 +283,7 @@ Realm, GodWeapon, Stove, //炼丹炉升级 TreasureSoul,//法宝魂领取属性 } public struct PropertyCompare System/Realm/RealmPropertyUpWin.cs
@@ -39,6 +39,10 @@ [SerializeField] RectTransform m_ContainerNewGotFly; [SerializeField] RectTransform m_ContainerTreasureSoul; [SerializeField] Image m_TreasureSoulIcon; [SerializeField] Text m_TreasureSoulName; FunctionUnlockFlyObject flyObject; DateTime openTime = DateTime.Now; @@ -55,12 +59,13 @@ protected override void OnPreOpen() { m_ModelRawImage.gameObject.SetActive(true); m_ModelRawImage.gameObject.SetActive(false); m_ContainerSkill.gameObject.SetActive(false); m_ContainerProperty.gameObject.SetActive(false); m_ContainerLv.gameObject.SetActive(false); m_ContainerNewGotSkill.gameObject.SetActive(false); m_ContainerRealm.gameObject.SetActive(false); m_ContainerTreasureSoul.gameObject.SetActive(false); m_DisplayAlphaTween.SetStartState(); flying = false; startFly = false; @@ -141,6 +146,11 @@ DisplayNewGotSkill(); } break; case ActivateShow.ActivateFunc.TreasureSoul: DisplayTreasureSoul(); DisplayFightPower(); DisplayProperty(); break; } } @@ -184,6 +194,7 @@ m_Properties[i].gameObject.SetActive(true); switch (ActivateShow.activateType) { case ActivateShow.ActivateFunc.TreasureSoul: case ActivateShow.ActivateFunc.Realm: m_Properties[i].Display(ActivateShow.propertyCompares[i].key , ActivateShow.propertyCompares[i].beforeValue, ActivateShow.propertyCompares[i].currentValue); @@ -235,10 +246,12 @@ switch (ActivateShow.activateType) { case ActivateShow.ActivateFunc.Realm: m_ModelRawImage.gameObject.SetActive(true); m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510); UI3DModelExhibition.Instance.BeginShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.retWing); break; case ActivateShow.ActivateFunc.GodWeapon: m_ModelRawImage.gameObject.SetActive(true); m_ModelRawImage.rectTransform.sizeDelta = new Vector2(600, 600); UI3DTreasureExhibition.Instance.BeginShowGodWeapon(ActivateShow.godWeaponType, m_ModelRawImage); break; @@ -256,6 +269,17 @@ PrepareFly(ActivateShow.skills[0]); } void DisplayTreasureSoul() { var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(ActivateShow.treasureSoulId); if (config != null) { m_ContainerTreasureSoul.gameObject.SetActive(true); m_TreasureSoulIcon.SetSprite(config.Icon); m_TreasureSoulName.text = config.Name; } } void PrepareFly(int _skillId) { ActivateShow.PrepareSkillFly(); System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -189,45 +189,13 @@ return; } if (FuncOpen.Instance.IsFuncOpen(126)) treasureId = GetNextChallengeTreasure(); if (treasureId != 0) { treasureId = GetTreasureSoulTreasure(); if (treasureId != 0) { this.displayTreasureId = treasureId; displayState = DisplayState.TreasureSoul; effectState = 0; return; } treasureId = GetNextChallengeTreasure(); if (treasureId != 0) { this.displayTreasureId = treasureId; displayState = DisplayState.WaitUnLock; effectState = 0; return; } } else { treasureId = GetNextChallengeTreasure(); if (treasureId != 0) { this.displayTreasureId = treasureId; displayState = DisplayState.WaitUnLock; effectState = 0; return; } treasureId = GetTreasureSoulTreasure(); if (treasureId != 0) { this.displayTreasureId = treasureId; displayState = DisplayState.TreasureSoul; effectState = 0; return; } this.displayTreasureId = treasureId; displayState = DisplayState.WaitUnLock; effectState = 0; return; } } @@ -332,21 +300,6 @@ } m_Description.text = Language.Get("FabaoState_Text_4", Mathf.RoundToInt(progress * 100f)); break; case DisplayState.TreasureSoul: if (treasure != null) { var privilege = treasure.unLockPrivilege; if (privilege != 0) { var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(privilege); m_Description.text = Language.Get("FabaoState_Text_8", privilegeConfig.Name); } else { m_Description.text = Language.Get("FabaoState_Text_8", config.Name); } } break; case DisplayState.WaitUnLock: Achievement achievement = null; @@ -484,24 +437,6 @@ ); } private int GetTreasureSoulTreasure() { return humanTreasures.Find((x) => { Treasure treasure; if (model.TryGetTreasure(x, out treasure)) { var humanTreasure = treasure as HumanTreasure; return humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul; } else { return false; } } ); } private int GetNextChallengeTreasure() { for (int i = 0; i < humanTreasures.Count; i++) @@ -606,7 +541,6 @@ AwakenAble,//可觉醒 CollectSoul,//可集魂 AwakenUnderway,//觉醒进行中 TreasureSoul,//法宝魂觉醒中 WaitUnLock,//等待解封 PotentialUp,//潜力提升进行中 PotentialUpAble,//潜力可提升 System/Treasure/TreasureSoulModel.cs
@@ -268,6 +268,9 @@ } continue; } int beforeFinishCount = special.presentFinishCount; special.presentFinishCount = (int)_data.GotValue; special.presentGetCount = (int)_data.CurValue; special.itemGet = _data.ItemAwardState == 1; @@ -276,6 +279,14 @@ if (treasureSoulEvent != null) { treasureSoulEvent((int)_data.PriID); } if (beforeFinishCount < special.presentFinishCount && serverInited && special.active && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && WindowCenter.Instance.CheckOpen<TreasureSoulWin>() && !WindowCenter.Instance.CheckOpen<RealmPropertyUpWin>()) { ActivateShow.TreasureSoulGetReward((int)_data.PriID, beforeFinishCount, special.presentFinishCount); } } } @@ -290,13 +301,23 @@ if (treasureSoulDict.ContainsKey((int)TreasurePrivilege.StrengthenAdd)) { var _specialData = treasureSoulDict[(int)TreasurePrivilege.StrengthenAdd]; int beforeFinishCount = _specialData.presentFinishCount; _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>()) { ActivateShow.TreasureSoulGetReward((int)TreasurePrivilege.StrengthenAdd, beforeFinishCount, _specialData.presentFinishCount); } } if (treasureSoulEvent != null) { treasureSoulEvent((int)TreasurePrivilege.StrengthenAdd); } } } }