| System/KnapSack/Logic/ItemLogicUtility.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/ItemModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| System/KnapSack/Logic/ItemOperateUtility.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -859,21 +859,22 @@ Dictionary<int, ItemModel> pairs = singlePack.GetAllItems(); foreach (var model in pairs.Values) { var equipServerIndex = EquipSet.ClientPlaceToServerPlace(new Int2(model.config.LV, model.config.EquipPlace)); if (model.config.EquipPlace > 0 && model.config.EquipPlace != (int)RoleEquipType.Guard && model.config.RealmLimit <= realmLv && !IsOverdue(model.guid) && IsFightUp(model.itemId, model.score) == 1) { if (!RealmBetterDict.ContainsKey(model.equipPlace)) if (!RealmBetterDict.ContainsKey(equipServerIndex)) { RealmBetterDict.Add(model.equipPlace, model); RealmBetterDict.Add(equipServerIndex, model); } else { if (model.score > RealmBetterDict[model.equipPlace].score) if (model.score > RealmBetterDict[equipServerIndex].score) { RealmBetterDict[model.equipPlace] = model; RealmBetterDict[equipServerIndex] = model; } } } System/KnapSack/Logic/ItemModel.cs
@@ -14,23 +14,6 @@ public int score { get; private set; } public Dictionary<int, List<int>> useDataDict { get; private set; } public int equipPlace { get { if (ItemLogicUtility.Instance.IsRealmEquip(itemId)) { return EquipSet.ClientPlaceToServerPlace(new Int2(config.LV, config.EquipPlace)); } else if (config.Type >= 113 && config.Type <= 117) { return EquipSet.ClientPlaceToServerPlace(new Int2(0, config.EquipPlace)); } else { return 0; } } } public string guid { get { return itemInfo == null ? string.Empty : itemInfo.guid; } } public int itemId { get { return itemInfo == null ? 0 : itemInfo.itemId; } } public int count { get { return itemInfo == null ? 0 : itemInfo.count; } } System/KnapSack/Logic/ItemOperateUtility.cs
@@ -38,19 +38,20 @@ { SysNotifyMgr.Instance.ShowTip("GeRen_lhs_31379"); return; } } var equipServerIndex = EquipSet.ClientPlaceToServerPlace(new Int2(item.config.LV, item.config.EquipPlace)); var putOnLimits = item.GetUseData((int)ItemUseDataKey.cancelUseLimit); if (putOnLimits != null && putOnLimits[0] == 1) { PutOnEquip(item.equipPlace, item.guid); PutOnEquip(equipServerIndex, item.guid); return; } var wearable = IsWearable(itemId); if (wearable) { PutOnEquip(item.equipPlace, item.guid); PutOnEquip(equipServerIndex, item.guid); } } @@ -420,7 +421,8 @@ if (ItemLogicUtility.Instance.IsSpiritWeapon(useItemModel.itemId)) { PutOnEquip(useItemModel.equipPlace, guid); var serverIndex = EquipSet.ClientPlaceToServerPlace(new Int2(useItemModel.config.LV, useItemModel.config.EquipPlace)); PutOnEquip(serverIndex, guid); return; } @@ -1009,7 +1011,7 @@ { var isOverdue = ItemLogicUtility.Instance.IsOverdue(guid); var isLimit = ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId) ? true : false; var equipedItem = packModel.GetItemByIndex(PackType.Equip, item.equipPlace); var equipedItem = packModel.GetItemByIndex(PackType.Equip, item.gridIndex); if (!isLimit || isOverdue || (equipedItem != null && item.score < equipedItem.score)) {