| Core/GameEngine/DataToCtl/PackageRegedit.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/Backpack/BackpackData.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/CommonGetItemCell.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/CommonGetItemWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/PackModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -600,6 +600,7 @@ Register(typeof(HB118_tagMCFacePicInfo), typeof(DTCB118_tagMCFacePicInfo)); Register(typeof(HA721_tagMCEmojiPackInfo), typeof(DTCA721_tagMCEmojiPackInfo)); Register(typeof(HA512_tagMCFamilyZhenbaogeInfo), typeof(DTCA512_tagMCFamilyZhenbaogeInfo)); Register(typeof(HA801_tagMCGiveAwardInfo), typeof(DTCA801_tagMCGiveAwardInfo)); } System/Backpack/BackpackData.cs
@@ -11,9 +11,39 @@ public struct Item { public int id; public int count; public int count; //兼容旧代码保留 public ulong countEx; //兼容旧代码count,当数量超过了32位无法表示时使用 public int quality; public int bind; public Item(int _id, ulong _count) { this.id = _id; this.count = (int)_count; this.quality = 0; this.bind = 0; this.countEx = _count; } public Item(int _id, ulong _count, int _quality) { this.id = _id; this.count = (int)_count; this.quality = _quality; this.bind = 0; this.countEx = _count; } public Item(int _id, ulong _count, int _bind = 0, int _quality = 0) { this.id = _id; this.count = (int)_count; this.quality = _quality; this.bind = _bind; this.countEx = _count; } #region 旧代码兼容 显示无法超过32位 public Item(int _id, int _count) { @@ -21,6 +51,7 @@ this.count = _count; this.quality = 0; this.bind = 0; this.countEx = (ulong)_count; } public Item(int _id, int _count, int _quality) @@ -29,7 +60,9 @@ this.count = _count; this.quality = _quality; this.bind = 0; this.countEx = (ulong)_count; } public Item(int _id, int _count, int _bind = 0, int _quality = 0) { @@ -37,7 +70,9 @@ this.count = _count; this.quality = _quality; this.bind = _bind; this.countEx = (ulong)_count; } #endregion } } System/KnapSack/Logic/CommonGetItemCell.cs
@@ -12,7 +12,7 @@ { txtItemName.SetActive(ItemLogicUtility.Instance.isNameShow); int itemID = ItemLogicUtility.Instance.getItems[index].id; itemCell.Init(new ItemCellModel(itemID, false, (ulong)ItemLogicUtility.Instance.getItems[index].count)); itemCell.Init(new ItemCellModel(itemID, false, (ulong)ItemLogicUtility.Instance.getItems[index].countEx)); txtItemName.text = ItemConfig.Get(itemID).ItemName; itemCell.button.SetListener(() => { ItemTipUtility.Show(itemID); System/KnapSack/Logic/CommonGetItemWin.cs
@@ -31,6 +31,7 @@ protected override void OnPreOpen() { scroller.OnRefreshCell += OnRefreshCell; desc.SetActive(!string.IsNullOrEmpty(ItemLogicUtility.Instance.getItemInfo)); desc.text = ItemLogicUtility.Instance.getItemInfo; sureText.text = ItemLogicUtility.Instance.getItemBtnText; CreateScroller(); System/KnapSack/Logic/PackModel.cs
@@ -27,7 +27,8 @@ ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } public int lsItemID = 150; //可兑换的灵石物品ID int lsItemCnt = int.Parse(FuncConfigConfig.Get("LingshiShowCount").Numerical1); int lsItemCnt = 0; List<string> commonShowAwardEvents = new List<string>(); public int[] autoUseItemIDs; UIEffect lingshiEffect; //灵石特效 @@ -609,6 +610,11 @@ } } } lsItemCnt = int.Parse(FuncConfigConfig.Get("LingshiShowCount").Numerical1); var config = FuncConfigConfig.Get("CommonShowAwards"); commonShowAwardEvents = JsonMapper.ToObject<List<string>>(config.Numerical1); } public int GetRoleEquipPathId(int equipPlace) @@ -1805,5 +1811,48 @@ } return guid; } public void ReceiveAwardNotify(HA801_tagMCGiveAwardInfo netPack) { var eventName = UIHelper.ServerStringTrim(netPack.EventName); if (!commonShowAwardEvents.Contains(eventName)) return; List<Item> items = new List<Item>(); if (netPack.Exp != 0 || netPack.ExpPoint != 0) { ulong expValue = netPack.Exp + netPack.ExpPoint * (ulong)Constants.ExpPointValue; items.Add(new Item(GeneralDefine.expDisplayId, expValue)); } if (netPack.MoneyList.Length != 0) { for (int i = 0; i < netPack.MoneyLen; i++) { var moneyType = netPack.MoneyList[i].MoneyType; if (GeneralDefine.moneyDisplayIds.ContainsKey(moneyType)) { items.Add(new Item(GeneralDefine.moneyDisplayIds[moneyType], netPack.MoneyList[i].MoneyValue)); } } } if (netPack.ItemList.Length != 0) { for (int i = 0; i < netPack.ItemLen; i++) { items.Add(new Item((int)netPack.ItemList[i].ItemID, netPack.ItemList[i].Count, netPack.ItemList[i].IsBind)); } } string info = string.Empty; if (LanguageConfig.Has("commonShowAwardEvents_" + eventName)) info = Language.Get("commonShowAwardEvents_" + eventName); ItemLogicUtility.Instance.ShowGetItem(items, info, 0); } } }