| System/KnapSack/Logic/PackModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/SinglePack.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Treasure/FunctionUnlockFlyObject.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Treasure/TreasureChapterWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Treasure/TreasureCollectBriefInfoBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/KnapSack/Logic/PackModel.cs
@@ -653,12 +653,12 @@ return itemModel; } public List<ItemModel> GetItemsById(PackType type, int id) public List<ItemModel> GetItemsById(PackType type, int id, bool includeAuction = false) { if (playerPackDict.ContainsKey(type)) { var singlePack = playerPackDict[type]; return singlePack.GetItemsById(id); return singlePack.GetItemsById(id, includeAuction); } else { @@ -678,11 +678,16 @@ } } public string GetItemGUIDByID(int itemId) public string GetItemGUIDByID(int itemId, bool includeAuction = false) { string guid = string.Empty; foreach (var key in itemGUIDDict.Keys) { { if (!includeAuction && itemGUIDDict[key].isAuction) { continue; } if (itemGUIDDict[key].itemId == itemId) { guid = key; @@ -699,13 +704,13 @@ /// <param name="type"></param> /// <param name="id"></param> /// <returns></returns> public int GetItemCountByID(PackType type, int id) public int GetItemCountByID(PackType type, int id, bool includeAuction = false) { int count = 0; var singlePack = GetSinglePack(type); if (singlePack != null) { count = singlePack.GetCountById(id); count = singlePack.GetCountById(id, includeAuction); } return count; System/KnapSack/Logic/SinglePack.cs
@@ -57,25 +57,35 @@ return items; } public List<ItemModel> GetItemsById(int itemId) public List<ItemModel> GetItemsById(int itemId, bool includeAuction = false) { var list = new List<ItemModel>(); foreach (var model in items.Values) foreach (var item in items.Values) { if (model.itemId == itemId) if (!includeAuction && item.isAuction) { list.Add(model); continue; } if (item.itemId == itemId) { list.Add(item); } } return list; } public int GetCountById(int itemId) public int GetCountById(int itemId, bool includeAuction = false) { var count = 0; foreach (var item in items.Values) { if (!includeAuction && item.isAuction) { continue; } if (item.itemId == itemId) { count += item.count; @@ -127,11 +137,16 @@ /// <param name="needCount"></param> /// <param name="type"></param> /// <returns></returns> public List<int> GetItemIndexsAppointedCount(int itemId, int needCount) public List<int> GetItemIndexsAppointedCount(int itemId, int needCount, bool includeAuction = false) { var goalItems = new List<ItemModel>(); foreach (var item in this.items.Values) { if (!includeAuction && item.isAuction) { continue; } if (item.itemId == itemId) { goalItems.Add(item); System/Treasure/FunctionUnlockFlyObject.cs
@@ -69,7 +69,7 @@ originalScale = 9f; break; case FunctionUnlockType.TreasureChapter: originalScale = 1f; originalScale = 2f; var treasureConfig = TreasureConfig.Get(m_Id); m_FunctionIcon.SetSprite(treasureConfig.Icon); break; System/Treasure/TreasureChapterWin.cs
@@ -14,6 +14,7 @@ public class TreasureChapterWin : Window { [SerializeField] RawImage m_GaussianMask; [SerializeField] UIAlphaTween m_AlphaTween; [SerializeField] Text m_ChapterName; [SerializeField] Image m_ChapterIcon; @@ -54,21 +55,23 @@ flying = false; m_CloseRemind.gameObject.SetActive(false); m_GaussianMask.gameObject.SetActive(false); m_AlphaTween.from = 0f; m_AlphaTween.to = 1f; m_AlphaTween.SetStartState(); m_CloseRemind.gameObject.SetActive(false); PlayerDatas.Instance.hero.StopAll(); Display(); m_AlphaTween.SetStartState(); } protected override void OnActived() { base.OnActived(); m_AlphaTween.Play(); CameraUtility.ScreenShotCut(m_GaussianMask, DoPrepare, true); } protected override void OnAfterOpen() @@ -97,12 +100,19 @@ } #endregion private void DoPrepare() { m_GaussianMask.gameObject.SetActive(true); m_AlphaTween.Play(); } void Display() { var instance = UIUtility.CreateWidget("TreasureChapterFlyObject", "TreasureChapterFlyObject"); instance.transform.SetParentEx(m_ContainerFly, Vector3.zero, Quaternion.identity, Vector3.one); flyObject = instance.GetComponent<FunctionUnlockFlyObject>(); flyObject.SetContent(FunctionUnlockType.TreasureChapter, model.treasureChapterId); flyObject.SetSpeed(6f); flyObject.gameObject.SetActive(true); var config = TreasureConfig.Get(model.treasureChapterId); @@ -117,7 +127,7 @@ { m_ChapterIcon.SetSprite(chapterConfig.taskTitle); m_ChapterName.text = Language.Get("TreasureChapterName", Language.Get("Num_CHS_" + chapterConfig.chapterIndex)); m_Description.text = chapterConfig.description; m_Description.text = UIHelper.ReplaceNewLine(chapterConfig.description); } } @@ -127,6 +137,7 @@ { return; } m_GaussianMask.gameObject.SetActive(false); flying = true; m_AlphaTween.from = 1f; m_AlphaTween.to = 0f; System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -72,7 +72,6 @@ { if (id == displayId) { DisplayProgress(); m_ProgressEffect.Play(); if (m_CacheCoroutine != null) { @@ -87,6 +86,7 @@ { yield return WaitingForSecondConst.WaitMS1500; m_ProgressEffect.StopImediatly(); DisplayProgress(); } void DisplayBase()