From 41f2e6da67fb92e18e9d054276de78718c64c5f4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期一, 04 八月 2025 19:37:13 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/ItemTip/ItemTipUtility.cs | 3816 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 1,901 insertions(+), 1,915 deletions(-)
diff --git a/Main/System/ItemTip/ItemTipUtility.cs b/Main/System/ItemTip/ItemTipUtility.cs
index 80fab85..f5a71c6 100644
--- a/Main/System/ItemTip/ItemTipUtility.cs
+++ b/Main/System/ItemTip/ItemTipUtility.cs
@@ -8,324 +8,455 @@
using System.Collections.Generic;
using System.Linq;
- public class ItemTipUtility
+public class ItemTipUtility
+{
+ public enum TipType
{
- public enum TipType
+ Item,
+ Equip,
+ Dogz,
+ GatherSoul, //搴熷純
+ KingTreasure, //鐜嬭�呮硶瀹漷ip
+ PetMount,
+ SpiritWeapon,
+ PeerlessChest,
+ TreasureShow, //鍏朵粬娉曞疂tip
+ BoxItem, //瀹濈鐗╁搧
+ TreasurePavilion, //鍙ゅ疂鐗╁搧锛堢鐗囷級
+ }
+
+ public class TipData
+ {
+ public string guid;
+ public int itemId;
+ public int goodId;
+ public int exchangeItemId;
+
+ public BaseInfo baseInfo;
+ public BaseProperty baseProperty;
+ public BaseProperty petMountBaseProperty;
+ public SpiritWeaponProperty spiritWeaponProperty;
+ public ShenProperty shenProperty;
+ public LegendProperty legendProperty;
+ public SkillInfo skillInfo;
+ public SuitInfo suitInfo;
+ public StarInfo starInfo;
+ public StrengthenProperty strengthenProperty;
+ public GemInfo gemInfo;
+ public TrainProperty trainProperty;
+ public List<ItemOperateType> operates;
+ public WingRefineMaterials refineMaterials;
+ public GetWay getWay;
+ }
+
+ public struct BaseInfo
+ {
+ public int itemId;
+ public int count;
+ public bool isAuction;
+ public bool isEquiped;
+ public bool isPreview;
+
+ public int star;
+ public int strengthenLevel;
+ public int score;
+ public bool isOverdue;
+ public int auctionSurplusTime;
+ public int overdueSurplusTime;
+ public int levelLimit;
+ public int moneyLimit;
+ public int evolveLevel;
+ }
+
+ public struct BaseProperty
+ {
+ public List<Int2> baseProperties;
+ public int star;
+ public List<Int2> starProperties;
+ }
+
+ public struct SpiritWeaponProperty
+ {
+ public int itemId;
+ public List<Int3> properties;
+ }
+
+ public struct LegendProperty
+ {
+ public bool isPreview;
+ public int itemId;
+ public int trueCount;
+ public List<Int2> properties;
+ public int score;
+ }
+
+ //绁炶灞炴��
+ public struct ShenProperty
+ {
+ public bool isPreview;
+ public int itemId;
+ public List<Int3> properties;
+ }
+
+ public struct SuitInfo
+ {
+ public int job;
+ public string name;
+ public int level;
+ public int maxSuitLevel;
+ public List<int> places;
+ public Dictionary<int, int> placeStars;
+ // public Dictionary<int, EquipSuitPropertyEntry> twoSuitProperties;
+ // public Dictionary<int, EquipSuitPropertyEntry> fiveSuitProperties;
+ public Dictionary<int, bool> eightSuits;
+ }
+
+ public struct StarInfo
+ {
+ public Int2 equipPosition;
+ public int starLevel;
+ public int maxLevel;
+ }
+
+ public struct StrengthenProperty
+ {
+ public int strengthenLevel;
+ public List<Int2> properties;
+ public int evolveLevel;
+ public int equipPlace;
+ }
+
+ public struct GemInfo
+ {
+ public Dictionary<int, bool> activeStates;
+ public Dictionary<int, int> gems;
+ }
+
+ public struct TrainProperty
+ {
+ public int level;
+ public List<Int2> properties;
+ }
+
+ public struct SkillInfo
+ {
+ public List<int> skills;
+ }
+
+ public struct WingRefineMaterials
+ {
+ public List<Int2> materials;
+ }
+
+ public struct GetWay
+ {
+ public bool defaultUnfold;
+ public int itemId;
+ public List<int> ways;
+ }
+
+
+
+ public struct CustomEquipInfo
+ {
+ public int job;
+ public int itemId;
+ public int score;
+ public bool isEquiped;
+ public List<Int2> legendProperties;
+ public List<int> suitPlaces;
+ public Dictionary<int, int> placeStars;
+ // public Dictionary<EquipSuitType, int> suitLevels;
+ public int strengthenLevel;
+ public int starLevel;
+ public List<Int2> trainProperties;
+ public Dictionary<int, bool> gemHoleActiveStates;
+ public Dictionary<int, int> gems;
+ public List<int> equipSkillList;
+ public int evolveLevel;
+ }
+
+ public struct CustomItemPlus
+ {
+ public int ItemID;
+ public int count;
+ public int Equipped;
+ public int Preview;
+ public int Star;
+ public int PlusLV;
+ public int EvolveLV;
+ public string UserData;
+ public int[] Stone;
+ public CustomEquipWash Wash;
+ public int[][] Equips;
+ public int[] suitPlaces;
+ public int[] suitLevels;
+ public int[] placeStars;
+ }
+
+ public struct CustomEquipWash
+ {
+ public int LV;
+ public int[] Value;
+ }
+
+ public struct ItemViewInfo
+ {
+ public int itemId;
+ public bool compare;
+ public bool unfoldGetWay;
+ public bool isAuctionEquip;
+ public LegendProperty legendProperty;
+ public int score;
+ }
+
+ // static PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
+ // static EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
+ // static EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
+ // static EquipGemModel gemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
+ // static EquipTrainModel trainModel { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } }
+ // static EquipStrengthModel strengthenModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
+ // static MountModel mountModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } }
+ // static PetModel petModel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
+ // static ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
+ // static StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
+ // static VirtualPackModel virtualPackModel { get { return ModelCenter.Instance.GetModel<VirtualPackModel>(); } }
+ // static ItemOverdueModel itemOverdueModel { get { return ModelCenter.Instance.GetModel<ItemOverdueModel>(); } }
+ // static BoxGetItemModel boxGetItemModel { get { return ModelCenter.Instance.GetModel<BoxGetItemModel>(); } }
+
+ public static TipData mainTipData { get; private set; }
+ public static TipData secondaryData { get; private set; }
+
+ public static void Show(int itemId)
+ {
+ if (!ItemConfig.HasKey(itemId))
{
- Item,
- Equip,
- Dogz,
- GatherSoul, //搴熷純
- KingTreasure, //鐜嬭�呮硶瀹漷ip
- PetMount,
- SpiritWeapon,
- PeerlessChest,
- TreasureShow, //鍏朵粬娉曞疂tip
- BoxItem, //瀹濈鐗╁搧
- TreasurePavilion, //鍙ゅ疂鐗╁搧锛堢鐗囷級
+ Debug.LogErrorFormat("鏌ユ棤姝ょ墿鍝侊細{0}", itemId);
+ return;
}
- public class TipData
+ Show(new ItemViewInfo()
{
- public string guid;
- public int itemId;
- public int goodId;
- public int exchangeItemId;
+ itemId = itemId,
+ });
+ }
- public BaseInfo baseInfo;
- public BaseProperty baseProperty;
- public BaseProperty petMountBaseProperty;
- public SpiritWeaponProperty spiritWeaponProperty;
- public ShenProperty shenProperty;
- public LegendProperty legendProperty;
- public SkillInfo skillInfo;
- public SuitInfo suitInfo;
- public StarInfo starInfo;
- public StrengthenProperty strengthenProperty;
- public GemInfo gemInfo;
- public TrainProperty trainProperty;
- public List<ItemOperateType> operates;
- public WingRefineMaterials refineMaterials;
- public GetWay getWay;
+ public static void Show(ItemViewInfo item)
+ {
+ var itemId = item.itemId;
+ if (!ItemConfig.HasKey(itemId))
+ {
+ Debug.LogErrorFormat("鏌ユ棤姝ょ墿鍝侊細{0}", itemId);
+ return;
}
- public struct BaseInfo
- {
- public int itemId;
- public int count;
- public bool isAuction;
- public bool isEquiped;
- public bool isPreview;
+ // secondaryData = null;
- public int star;
- public int strengthenLevel;
- public int score;
- public bool isOverdue;
- public int auctionSurplusTime;
- public int overdueSurplusTime;
- public int levelLimit;
- public int realmLimit;
- public int moneyLimit;
- public int evolveLevel;
+ // var config = ItemConfig.Get(itemId);
+ // PrintItemBrief(itemId);
+
+ // var tipType = GetTipType(itemId);
+ // switch (tipType)
+ // {
+ // case TipType.Equip:
+ // mainTipData = CreateNormalEquipData(itemId);
+ // if (item.isAuctionEquip && !item.legendProperty.Equals(default(LegendProperty)))
+ // {
+ // mainTipData.legendProperty = item.legendProperty;
+ // mainTipData.baseInfo.score = item.score;
+ // mainTipData.baseInfo.isPreview = false;
+ // }
+
+ // if (item.compare)
+ // {
+ // if (ItemLogicUtility.Instance.IsJobCompatibleItem(itemId))
+ // {
+ // var equipedGuid = equipModel.GetEquip(new Int2(config.LV, config.EquipPlace));
+ // if (equipedGuid != string.Empty)
+ // {
+ // secondaryData = CreateNormalEquipData(equipedGuid, false);
+ // }
+ // }
+ // }
+ // break;
+ // case TipType.Dogz:
+ // mainTipData = CreateDogzEquipData(itemId);
+ // break;
+ // case TipType.PeerlessChest:
+ // mainTipData = CreateItemData(itemId);
+ // mainTipData.getWay = default(GetWay);
+ // Dictionary<int, int> selectItems;
+ // if (boxGetItemModel.IsSelectItemByID(itemId, out selectItems))
+ // {
+ // secondaryData = CreateNormalEquipData(selectItems.Keys.First());
+ // secondaryData.getWay = default(GetWay);
+ // }
+ // break;
+ // default:
+ // mainTipData = CreateItemData(itemId);
+ // break;
+ // }
+
+ // mainTipData.getWay.defaultUnfold = item.unfoldGetWay;
+ // switch (tipType)
+ // {
+ // case TipType.Equip:
+ // WindowCenter.Instance.Open<EquipTipWin>();
+ // break;
+ // case TipType.Dogz:
+ // WindowCenter.Instance.Open<EquipTipWin>();
+ // break;
+ // case TipType.KingTreasure:
+ // var kingTreasureShow = ModelCenter.Instance.GetModel<KingTreasureShowModel>();
+ // kingTreasureShow.SetInitData(itemId);
+ // break;
+ // case TipType.PetMount:
+ // WindowCenter.Instance.Open<PetMountTipWin>();
+ // break;
+ // case TipType.SpiritWeapon:
+ // WindowCenter.Instance.Open<SpiritWeaponTipWin>();
+ // break;
+ // case TipType.PeerlessChest:
+ // WindowCenter.Instance.Open<PeerlessChestTipWin>();
+ // break;
+ // case TipType.TreasureShow:
+ // TreasureEffectModel effectModel = ModelCenter.Instance.GetModel<TreasureEffectModel>();
+ // if (config.Effect1 == 232)
+ // {
+ // effectModel.SetTreasureID(config.EffectValueA1, 0);
+ // }
+ // break;
+ // case TipType.BoxItem:
+ // if (WindowCenter.Instance.IsOpen<ItemBoxTipWin>())
+ // {
+ // WindowCenter.Instance.Open<ItemTipWin>();
+ // }
+ // else
+ // {
+ // WindowCenter.Instance.Open<ItemBoxTipWin>();
+ // }
+ // break;
+ // case TipType.TreasurePavilion:
+ // TreasurePavilionModel.Instance.selectGubao = config.EffectValueA1;
+ // TreasurePavilionModel.Instance.showTipFromPiece = config.ID;
+ // WindowCenter.Instance.OpenIL<TreasurePavilionTipWin>();
+ // break;
+ // default:
+ // WindowCenter.Instance.Open<ItemTipWin>();
+ // break;
+ // }
+ }
+
+ public static void Show(string guid, bool operatable = true)
+ {
+ var item = PackManager.Instance.GetItemByGuid(guid);
+ if (item == null)
+ {
+ return;
+ }
+ PrintItemBrief(item.itemId, item);
+
+ secondaryData = null;
+ var tipType = GetTipType(item.itemId);
+ switch (tipType)
+ {
+ case TipType.Equip:
+ var packType = item.packType;
+ switch (packType)
+ {
+ case PackType.Equip:
+ // mainTipData = CreateNormalEquipData(guid, operatable);
+ break;
+ default:
+ // if (item.isAuction)
+ // {
+ // mainTipData = CreateEquipAuctionData(guid, operatable);
+
+ // if (ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId))
+ // {
+ // var equipedGuid = equipModel.GetEquip(new Int2(item.config.LV, item.config.EquipPlace));
+ // if (equipedGuid != string.Empty)
+ // {
+ // secondaryData = CreateNormalEquipData(equipedGuid, false);
+ // }
+ // }
+ // }
+ // else
+ // {
+ // mainTipData = CreateNormalEquipData(guid, operatable);
+ // var equipedGuid = equipModel.GetEquip(new Int2(item.config.LV, item.config.EquipPlace));
+ // if (equipedGuid != guid)
+ // {
+ // secondaryData = CreateNormalEquipData(equipedGuid, false);
+ // }
+ // }
+ break;
+ }
+ break;
+
+ default:
+ mainTipData = CreateItemData(guid, operatable);
+ break;
}
- public struct BaseProperty
+ switch (tipType)
{
- public List<Int2> baseProperties;
- public int star;
- public List<Int2> starProperties;
+ // case TipType.Equip:
+ // WindowCenter.Instance.Open<EquipTipWin>();
+ // break;
+ // case TipType.PetMount:
+ // WindowCenter.Instance.Open<PetMountTipWin>();
+ // break;
+ // case TipType.BoxItem:
+ // if (WindowCenter.Instance.IsOpen<ItemBoxTipWin>())
+ // {
+ // WindowCenter.Instance.Open<ItemTipWin>();
+ // }
+ // else
+ // {
+ // WindowCenter.Instance.Open<ItemBoxTipWin>();
+ // }
+ // break;
+ // case TipType.TreasurePavilion:
+ // TreasurePavilionModel.Instance.selectGubao = item.config.EffectValueA1;
+ // TreasurePavilionModel.Instance.showTipFromPiece = item.itemId;
+ // WindowCenter.Instance.OpenIL<TreasurePavilionTipWin>();
+ // break;
+ default:
+ UIManager.Instance.OpenWindow<ItemTipWin>();
+ break;
}
- public struct SpiritWeaponProperty
+ }
+
+ public static void ShowGood(int goodId, int itemId)
+ {
+ secondaryData = null;
+
+ var isEquip = ItemLogicUtility.Instance.IsRealmEquip(itemId);
+ if (isEquip)
{
- public int itemId;
- public List<Int3> properties;
+ mainTipData = CreateGoodEquipData(itemId, goodId);
+ }
+ else
+ {
+ mainTipData = CreateGoodItemData(itemId, goodId);
}
- public struct LegendProperty
+ BuyItemController.Instance.SetGood(goodId);
+ var itemConfig = ItemConfig.Get(itemId);
+ if (isEquip)
{
- public bool isPreview;
- public int itemId;
- public int trueCount;
- public List<Int2> properties;
- public int score;
+ // WindowCenter.Instance.Open<EquipTipWin>();
}
-
- //绁炶灞炴��
- public struct ShenProperty
+ else
{
- public bool isPreview;
- public int itemId;
- public List<Int3> properties;
- }
+ var tipType = GetTipType(itemId);
- public struct SuitInfo
- {
- public int job;
- public string name;
- public int level;
- public int maxSuitLevel;
- public List<int> places;
- public Dictionary<int, int> placeStars;
- // public Dictionary<int, EquipSuitPropertyEntry> twoSuitProperties;
- // public Dictionary<int, EquipSuitPropertyEntry> fiveSuitProperties;
- public Dictionary<int, bool> eightSuits;
- }
-
- public struct StarInfo
- {
- public Int2 equipPosition;
- public int starLevel;
- public int maxLevel;
- }
-
- public struct StrengthenProperty
- {
- public int strengthenLevel;
- public List<Int2> properties;
- public int evolveLevel;
- public int equipPlace;
- }
-
- public struct GemInfo
- {
- public Dictionary<int, bool> activeStates;
- public Dictionary<int, int> gems;
- }
-
- public struct TrainProperty
- {
- public int level;
- public List<Int2> properties;
- }
-
- public struct SkillInfo
- {
- public List<int> skills;
- }
-
- public struct WingRefineMaterials
- {
- public List<Int2> materials;
- }
-
- public struct GetWay
- {
- public bool defaultUnfold;
- public int itemId;
- public List<int> ways;
- }
-
-
-
- public struct CustomEquipInfo
- {
- public int job;
- public int itemId;
- public int score;
- public bool isEquiped;
- public List<Int2> legendProperties;
- public List<int> suitPlaces;
- public Dictionary<int, int> placeStars;
- // public Dictionary<EquipSuitType, int> suitLevels;
- public int strengthenLevel;
- public int starLevel;
- public List<Int2> trainProperties;
- public Dictionary<int, bool> gemHoleActiveStates;
- public Dictionary<int, int> gems;
- public List<int> equipSkillList;
- public int evolveLevel;
- }
-
- public struct CustomItemPlus
- {
- public int ItemID;
- public int count;
- public int Equipped;
- public int Preview;
- public int Star;
- public int PlusLV;
- public int EvolveLV;
- public string UserData;
- public int[] Stone;
- public CustomEquipWash Wash;
- public int[][] Equips;
- public int[] suitPlaces;
- public int[] suitLevels;
- public int[] placeStars;
- }
-
- public struct CustomEquipWash
- {
- public int LV;
- public int[] Value;
- }
-
- public struct ItemViewInfo
- {
- public int itemId;
- public bool compare;
- public bool unfoldGetWay;
- public bool isAuctionEquip;
- public LegendProperty legendProperty;
- public int score;
- }
-
- // static PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
- // static EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
- // static EquipStarModel starModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
- // static EquipGemModel gemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
- // static EquipTrainModel trainModel { get { return ModelCenter.Instance.GetModel<EquipTrainModel>(); } }
- // static EquipStrengthModel strengthenModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
- // static MountModel mountModel { get { return ModelCenter.Instance.GetModel<MountModel>(); } }
- // static PetModel petModel { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
- // static ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
- // static StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
- // static VirtualPackModel virtualPackModel { get { return ModelCenter.Instance.GetModel<VirtualPackModel>(); } }
- // static ItemOverdueModel itemOverdueModel { get { return ModelCenter.Instance.GetModel<ItemOverdueModel>(); } }
- // static BoxGetItemModel boxGetItemModel { get { return ModelCenter.Instance.GetModel<BoxGetItemModel>(); } }
-
- public static TipData mainTipData { get; private set; }
- public static TipData secondaryData { get; private set; }
-
- public static void Show(int itemId)
- {
- if (!ItemConfig.HasKey(itemId))
- {
- Debug.LogErrorFormat("鏌ユ棤姝ょ墿鍝侊細{0}", itemId);
- return;
- }
-
- Show(new ItemViewInfo()
- {
- itemId = itemId,
- });
- }
-
- public static void Show(ItemViewInfo item)
- {
- var itemId = item.itemId;
- if (!ItemConfig.HasKey(itemId))
- {
- Debug.LogErrorFormat("鏌ユ棤姝ょ墿鍝侊細{0}", itemId);
- return;
- }
-
- // secondaryData = null;
-
- // var config = ItemConfig.Get(itemId);
- // PrintItemBrief(itemId);
-
- // var tipType = GetTipType(itemId);
// switch (tipType)
// {
- // case TipType.Equip:
- // mainTipData = CreateNormalEquipData(itemId);
- // if (item.isAuctionEquip && !item.legendProperty.Equals(default(LegendProperty)))
- // {
- // mainTipData.legendProperty = item.legendProperty;
- // mainTipData.baseInfo.score = item.score;
- // mainTipData.baseInfo.isPreview = false;
- // }
-
- // if (item.compare)
- // {
- // if (ItemLogicUtility.Instance.IsJobCompatibleItem(itemId))
- // {
- // var equipedGuid = equipModel.GetEquip(new Int2(config.LV, config.EquipPlace));
- // if (equipedGuid != string.Empty)
- // {
- // secondaryData = CreateNormalEquipData(equipedGuid, false);
- // }
- // }
- // }
- // break;
- // case TipType.Dogz:
- // mainTipData = CreateDogzEquipData(itemId);
- // break;
- // case TipType.PeerlessChest:
- // mainTipData = CreateItemData(itemId);
- // mainTipData.getWay = default(GetWay);
- // Dictionary<int, int> selectItems;
- // if (boxGetItemModel.IsSelectItemByID(itemId, out selectItems))
- // {
- // secondaryData = CreateNormalEquipData(selectItems.Keys.First());
- // secondaryData.getWay = default(GetWay);
- // }
- // break;
- // default:
- // mainTipData = CreateItemData(itemId);
- // break;
- // }
-
- // mainTipData.getWay.defaultUnfold = item.unfoldGetWay;
- // switch (tipType)
- // {
- // case TipType.Equip:
- // WindowCenter.Instance.Open<EquipTipWin>();
- // break;
- // case TipType.Dogz:
- // WindowCenter.Instance.Open<EquipTipWin>();
- // break;
- // case TipType.KingTreasure:
- // var kingTreasureShow = ModelCenter.Instance.GetModel<KingTreasureShowModel>();
- // kingTreasureShow.SetInitData(itemId);
- // break;
// case TipType.PetMount:
// WindowCenter.Instance.Open<PetMountTipWin>();
- // break;
- // case TipType.SpiritWeapon:
- // WindowCenter.Instance.Open<SpiritWeaponTipWin>();
- // break;
- // case TipType.PeerlessChest:
- // WindowCenter.Instance.Open<PeerlessChestTipWin>();
- // break;
- // case TipType.TreasureShow:
- // TreasureEffectModel effectModel = ModelCenter.Instance.GetModel<TreasureEffectModel>();
- // if (config.Effect1 == 232)
- // {
- // effectModel.SetTreasureID(config.EffectValueA1, 0);
- // }
// break;
// case TipType.BoxItem:
// if (WindowCenter.Instance.IsOpen<ItemBoxTipWin>())
@@ -333,1679 +464,1534 @@
// WindowCenter.Instance.Open<ItemTipWin>();
// }
// else
- // {
+ // {
// WindowCenter.Instance.Open<ItemBoxTipWin>();
// }
- // break;
- // case TipType.TreasurePavilion:
- // TreasurePavilionModel.Instance.selectGubao = config.EffectValueA1;
- // TreasurePavilionModel.Instance.showTipFromPiece = config.ID;
- // WindowCenter.Instance.OpenIL<TreasurePavilionTipWin>();
// break;
// default:
// WindowCenter.Instance.Open<ItemTipWin>();
// break;
// }
}
+ }
- // public static void Show(string guid, bool operatable = true)
+ // public static void ShowCustomEquip(CustomEquipInfo info)
+ // {
+ // secondaryData = null;
+ // mainTipData = CreateCustomEquipData(info);
+ // WindowCenter.Instance.Open<EquipTipWin>();
+ // }
+
+
+
+ // static TipData CreateNormalEquipData(string guid, bool operatable)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(TipData);
+ // }
+
+ // return new TipData()
+ // {
+ // itemId = item.itemId,
+ // guid = guid,
+
+ // baseInfo = GetBaseInfo(guid),
+ // baseProperty = GetBaseProperty(guid),
+ // spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
+ // legendProperty = GetLegendProperty(guid),
+ // skillInfo = GetSkillInfo(item.itemId, guid),
+ // suitInfo = GetSuitInfo(guid),
+ // starInfo = GetStarInfo(guid),
+ // strengthenProperty = GetStrengthenProperty(guid),
+ // gemInfo = GetGemInfo(guid),
+ // trainProperty = GetTrainProperty(guid),
+ // operates = operatable ? GetOperates(guid) : null,
+ // shenProperty = GetShenProperty(item.itemId)
+ // };
+ // }
+
+ // static TipData CreateNormalEquipData(int itemId)
+ // {
+ // return new TipData()
+ // {
+ // itemId = itemId,
+ // guid = string.Empty,
+
+ // baseInfo = GetBaseInfo(itemId),
+ // baseProperty = GetBaseProperty(itemId),
+ // legendProperty = GetLegendProperty(itemId),
+ // spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
+ // skillInfo = GetSkillInfo(itemId),
+ // suitInfo = GetSuitInfo(itemId),
+ // gemInfo = GetGemInfo(itemId),
+ // starInfo = GetStarInfo(itemId),
+ // getWay = GetGetWay(itemId),
+ // shenProperty = GetShenProperty(itemId)
+ // };
+ // }
+
+ // static TipData CreateDogzEquipData(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(TipData);
+ // }
+
+ // return new TipData()
+ // {
+ // itemId = item.itemId,
+ // guid = guid,
+
+ // baseInfo = GetBaseInfo(guid),
+ // baseProperty = GetBaseProperty(guid),
+ // legendProperty = GetLegendProperty(guid),
+ // operates = GetOperates(guid),
+ // };
+ // }
+
+ // static TipData CreateDogzEquipData(int itemId)
+ // {
+ // return new TipData()
+ // {
+ // itemId = itemId,
+ // guid = string.Empty,
+
+ // baseInfo = GetBaseInfo(itemId),
+ // baseProperty = GetBaseProperty(itemId),
+ // legendProperty = GetLegendProperty(itemId),
+ // getWay = GetGetWay(itemId)
+ // };
+ // }
+
+ // static TipData CreateCustomEquipData(CustomEquipInfo info)
+ // {
+ // var config = ItemConfig.Get(info.itemId);
+ // if (config == null)
+ // {
+ // return default(TipData);
+ // }
+
+ // var baseInfo = new BaseInfo()
+ // {
+ // itemId = info.itemId,
+ // star = info.starLevel,
+ // strengthenLevel = info.strengthenLevel,
+ // score = info.score,
+ // isEquiped = info.isEquiped,
+ // evolveLevel = info.evolveLevel,
+ // };
+
+ // var baseProperty = GetBaseProperty(info.itemId);
+ // if (info.starLevel > 0)
+ // {
+ // var starProperties = new List<Int2>();
+ // baseProperty.star = info.starLevel;
+ // var starConfig = EquipStarConfig.Get(config.LV, config.EquipPlace, info.starLevel);
+ // starProperties.AddRange(starConfig.BaseAttrInfo);
+ // baseProperty.starProperties = starProperties;
+ // }
+
+ // var legendProperty = new LegendProperty()
+ // {
+ // properties = info.legendProperties,
+ // };
+
+ // var skillInfo = GetSkillInfo(info.itemId, info);
+ // var suitInfo = default(SuitInfo);
+ // if (ItemLogicUtility.Instance.IsSuitEquip(info.itemId))
+ // {
+ // var job = config.JobLimit;
+ // var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit);
+ // var name = twoConfigs[0].name;
+ // var level = config.LV;
+ // var maxSuitLevel = EquipStarModel.GetMaxStarLevel(level);
+
+ // var twoSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
+ // var fiveSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
+ // var eightSuits = new Dictionary<int, bool>();
+ // var eightSuitLevel = info.suitLevels[EquipSuitType.EightSuit];
+
+ // for (var i = 0; i <= 9; i++, i++, i++)
+ // {
+ // var configs = EquipSuitConfig.GetConfigs(job, level, EquipSuitType.TwoSuit);
+ // var actived = info.suitLevels[EquipSuitType.TwoSuit] >= i;
+ // var properties = new List<Int2>();
+ // foreach (var item in configs)
+ // {
+ // if (item.star == i)
+ // {
+ // properties.AddRange(item.attr);
+ // break;
+ // }
+ // }
+
+ // twoSuitProperties[i] = new EquipSuitPropertyEntry()
+ // {
+ // type = EquipSuitType.TwoSuit,
+ // actived = actived,
+ // properties = properties,
+ // };
+
+ // configs = EquipSuitConfig.GetConfigs(job, level, EquipSuitType.FiveSuit);
+ // actived = info.suitLevels[EquipSuitType.FiveSuit] >= i;
+ // properties = new List<Int2>();
+ // foreach (var item in configs)
+ // {
+ // if (item.star == i)
+ // {
+ // properties.AddRange(item.attr);
+ // break;
+ // }
+ // }
+
+ // fiveSuitProperties[i] = new EquipSuitPropertyEntry()
+ // {
+ // type = EquipSuitType.TwoSuit,
+ // actived = actived,
+ // properties = properties,
+ // };
+
+ // eightSuits[i] = eightSuitLevel >= i;
+ // }
+
+ // suitInfo = new SuitInfo()
+ // {
+ // name = name,
+ // level = level,
+ // job = job,
+ // maxSuitLevel = maxSuitLevel,
+ // places = info.suitPlaces,
+ // placeStars = info.placeStars,
+ // twoSuitProperties = twoSuitProperties,
+ // fiveSuitProperties = fiveSuitProperties,
+ // eightSuits = eightSuits
+ // };
+ // }
+
+ // var starInfo = new StarInfo()
+ // {
+ // equipPosition = new Int2(config.LV, config.EquipPlace),
+ // starLevel = info.starLevel,
+ // maxLevel = config.LV == 0 ? 0 : EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV),
+ // };
+
+ // var type = EquipStrengthModel.GetEquipStrengthType(config.EquipPlace);
+ // var strengthenConfig = ItemPlusConfig.GetTypeAndLevel(type, info.strengthenLevel);
+ // var strengthenProperties = new List<Int2>();
+ // for (int i = 0; i < strengthenConfig.attType.Length; i++)
+ // {
+ // strengthenProperties.Add(new Int2(strengthenConfig.attType[i], strengthenConfig.attValue[i]));
+ // }
+ // var strengthenProperty = new StrengthenProperty()
+ // {
+ // strengthenLevel = info.strengthenLevel,
+ // properties = strengthenProperties,
+ // equipPlace = config.EquipPlace,
+ // evolveLevel = info.evolveLevel,
+ // };
+
+ // var gemInfo = new GemInfo()
+ // {
+ // activeStates = info.gemHoleActiveStates,
+ // gems = info.gems,
+ // };
+
+ // var trainProperty = new TrainProperty()
+ // {
+ // properties = info.trainProperties,
+ // };
+
+ // return new TipData()
+ // {
+ // itemId = info.itemId,
+ // baseInfo = baseInfo,
+ // baseProperty = baseProperty,
+ // legendProperty = legendProperty,
+ // skillInfo = skillInfo,
+ // suitInfo = suitInfo,
+ // starInfo = starInfo,
+ // strengthenProperty = strengthenProperty,
+ // gemInfo = gemInfo,
+ // trainProperty = trainProperty,
+ // shenProperty = GetShenProperty(info.itemId)
+ // };
+ // }
+
+ static TipData CreateGoodEquipData(int itemId, int goodId)
+ {
+ return new TipData()
+ {
+ itemId = itemId,
+ guid = string.Empty,
+ goodId = goodId,
+
+ baseInfo = GetBaseInfo(itemId),
+ baseProperty = GetBaseProperty(itemId),
+ //spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
+ //legendProperty = GetLegendProperty(itemId),
+ skillInfo = GetSkillInfo(itemId),
+ //suitInfo = GetSuitInfo(itemId),
+ //gemInfo = GetGemInfo(itemId),
+ //starInfo = GetStarInfo(itemId),
+ operates = GetGoodOperates(goodId),
+ //shenProperty = GetShenProperty(itemId)
+ };
+ }
+
+ // static TipData CreateEquipAuctionData(string guid, bool operatable)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(TipData);
+ // }
+
+ // var legendProperty = GetLegendProperty(guid);
+ // if (legendProperty.properties.IsNullOrEmpty())
+ // {
+ // legendProperty = GetLegendProperty(item.itemId);
+ // }
+
+ // return new TipData()
+ // {
+ // itemId = item.itemId,
+ // guid = guid,
+
+ // baseInfo = GetBaseInfo(guid),
+ // baseProperty = GetBaseProperty(item.itemId),
+ // spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
+ // legendProperty = legendProperty,
+ // skillInfo = GetSkillInfo(item.itemId, guid),
+ // suitInfo = GetSuitInfo(item.itemId),
+ // operates = operatable ? GetOperates(guid) : null,
+
+ // starInfo = GetStarInfo(guid),
+ // gemInfo = GetGemInfo(guid),
+ // shenProperty = GetShenProperty(item.itemId)
+ // };
+ // }
+
+ static TipData CreateItemData(string guid, bool operatable)
+ {
+ var item = PackManager.Instance.GetItemByGuid(guid);
+ if (item == null)
+ {
+ return default(TipData);
+ }
+
+ return new TipData()
+ {
+ itemId = item.itemId,
+ guid = guid,
+
+ baseInfo = GetBaseInfo(guid),
+ baseProperty = GetBaseProperty(item.itemId),
+ // spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
+ // legendProperty = GetLegendProperty(guid),
+ // petMountBaseProperty = GetPetMountBaseProperty(item.itemId),
+ // operates = operatable ? GetOperates(guid) : null,
+ // refineMaterials = GetWingRefineMaterials(guid),
+ // shenProperty = GetShenProperty(item.itemId)
+ };
+ }
+
+ // static TipData CreateItemData(int itemId)
+ // {
+ // return new TipData()
+ // {
+ // itemId = itemId,
+ // baseInfo = GetBaseInfo(itemId),
+ // baseProperty = GetBaseProperty(itemId),
+ // exchangeItemId = itemId,
+ // spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
+ // legendProperty = GetLegendProperty(itemId),
+ // petMountBaseProperty = GetPetMountBaseProperty(itemId),
+ // getWay = GetGetWay(itemId),
+ // shenProperty = GetShenProperty(itemId)
+ // };
+ // }
+
+ static TipData CreateGoodItemData(int itemId, int goodId)
+ {
+ return new TipData()
+ {
+ itemId = itemId,
+ goodId = goodId,
+ baseInfo = GetBaseInfo(itemId),
+ baseProperty = GetBaseProperty(itemId),
+ // legendProperty = GetLegendProperty(itemId),
+ // spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
+ // petMountBaseProperty = GetPetMountBaseProperty(itemId),
+ operates = GetGoodOperates(goodId),
+ // shenProperty = GetShenProperty(itemId)
+ };
+ }
+
+
+
+ // public static void Operate(ItemOperateType type, string guid)
+ // {
+ // switch (type)
+ // {
+ // case ItemOperateType.putOn:
+ // ItemOperateUtility.Instance.PutOnItem(guid);
+ // break;
+ // case ItemOperateType.gotoPuton:
+ // ItemOperateUtility.Instance.PutOnItem(guid);
+ // break;
+ // case ItemOperateType.putOff:
+ // ItemOperateUtility.Instance.PutOffEquip(guid);
+ // break;
+ // case ItemOperateType.putAway:
+ // ItemOperateUtility.Instance.PutAway(guid);
+ // break;
+ // case ItemOperateType.putIn:
+ // ItemOperateUtility.Instance.PutInWareHouse(guid);
+ // break;
+ // case ItemOperateType.putOut:
+ // ItemOperateUtility.Instance.TakeOutFromWarehouse(guid);
+ // break;
+ // case ItemOperateType.sell:
+ // ItemOperateUtility.Instance.SellItem(guid);
+ // break;
+ // case ItemOperateType.strength:
+ // ItemOperateUtility.Instance.GotoStrengthen(guid);
+ // break;
+ // case ItemOperateType.star:
+ // ItemOperateUtility.Instance.GotoStarUpgrade(guid);
+ // break;
+ // case ItemOperateType.inlay:
+ // ItemOperateUtility.Instance.GotoInlayItem(guid);
+ // break;
+ // case ItemOperateType.train:
+ // ItemOperateUtility.Instance.GotoTrain(guid);
+ // break;
+ // case ItemOperateType.makeUse:
+ // ItemOperateUtility.Instance.GotoUseItem(guid);
+ // break;
+ // case ItemOperateType.split:
+ // ItemOperateUtility.Instance.OnClickSplitBtn(guid);
+ // break;
+ // case ItemOperateType.compose:
+ // var wannaComposeItem = packModel.GetItemByGuid(guid);
+ // var jumpId = 0;
+ // var isUnlock = composeModel.CheckComposeItemById(wannaComposeItem.itemId, out jumpId);
+ // if (isUnlock)
+ // {
+ // ItemOperateUtility.Instance.GotoComposeItem(jumpId);
+ // }
+ // break;
+ // case ItemOperateType.renewal:
+ // ItemOperateUtility.Instance.RenewalItem(guid);
+ // break;
+ // case ItemOperateType.exchange:
+ // WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.ExchangeActiveToken);
+ // break;
+ // case ItemOperateType.lsExchange:
+ // WindowCenter.Instance.Open<LingShiChange>();
+ // break;
+ // case ItemOperateType.default1:
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // break;
+ // }
+
+ // EquipEvolveModel.Instance.EquipJump(item.config.LV, item.config.EquipPlace);
+ // WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)2013);
+ // break;
+ // }
+ // }
+
+ // public static void GoodOperate(ItemOperateType type, int goodId, int count)
+ // {
+ // var config = StoreConfig.Get(goodId);
+ // storeModel.SendBuyShopItem(config, count);
+ // }
+
+
+ private static BaseInfo GetBaseInfo(int itemId)
+ {
+ var config = ItemConfig.Get(itemId);
+ var money = 0;
+ if (config.Type == 81)
+ {
+ var chestConfig = ChestsConfig.Get(itemId);
+ money = chestConfig.OpenMoney;
+ }
+
+ var baseInfo = new BaseInfo()
+ {
+ itemId = itemId,
+ isAuction = false,
+ isEquiped = false,
+ isPreview = true,
+ //score = ItemLogicUtility.Instance.GetEquipScore(itemId, null, true),
+ auctionSurplusTime = 0,
+ levelLimit = config.UseLV,
+ moneyLimit = money,
+ };
+
+ return baseInfo;
+ }
+
+ private static BaseInfo GetBaseInfo(string guid)
+ {
+ var item = PackManager.Instance.GetItemByGuid(guid);
+
+ var level = item.config.LV;
+ var place = item.config.EquipPlace;
+
+ var isEquiped = false;// equipModel.GetEquip(new Int2(level, place)) == guid;
+
+ // var type = EquipStrengthModel.GetEquipStrengthType(place);
+ var star = 0; //starModel.GetEquipStarLevel(new Int2(level, place));
+ var maxStrengthenLevel = 0; //strengthenModel.GetEquipLevelMax(type, level);
+ var placeStrengthenLevel = 0; //strengthenModel.GetStrengthLevel(level, place);
+
+ var money = 0;
+ // if (item.config.Type == 81)
// {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return;
- // }
- // PrintItemBrief(item.itemId, guid);
-
- // secondaryData = null;
- // var tipType = GetTipType(item.itemId);
- // switch (tipType)
- // {
- // case TipType.Equip:
- // var packType = item.packType;
- // switch (packType)
- // {
- // case PackType.Equip:
- // mainTipData = CreateNormalEquipData(guid, operatable);
- // break;
- // default:
- // if (item.isAuction)
- // {
- // mainTipData = CreateEquipAuctionData(guid, operatable);
-
- // if (ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId))
- // {
- // var equipedGuid = equipModel.GetEquip(new Int2(item.config.LV, item.config.EquipPlace));
- // if (equipedGuid != string.Empty)
- // {
- // secondaryData = CreateNormalEquipData(equipedGuid, false);
- // }
- // }
- // }
- // else
- // {
- // mainTipData = CreateNormalEquipData(guid, operatable);
- // var equipedGuid = equipModel.GetEquip(new Int2(item.config.LV, item.config.EquipPlace));
- // if (equipedGuid != guid)
- // {
- // secondaryData = CreateNormalEquipData(equipedGuid, false);
- // }
- // }
- // break;
- // }
- // break;
- // case TipType.Dogz:
- // mainTipData = CreateDogzEquipData(guid);
- // break;
- // default:
- // mainTipData = CreateItemData(guid, operatable);
- // break;
- // }
-
- // switch (tipType)
- // {
- // case TipType.Equip:
- // WindowCenter.Instance.Open<EquipTipWin>();
- // break;
- // case TipType.Dogz:
- // WindowCenter.Instance.Open<EquipTipWin>();
- // break;
- // case TipType.KingTreasure:
- // var kingTreasureShow = ModelCenter.Instance.GetModel<KingTreasureShowModel>();
- // kingTreasureShow.SetInitData(item.itemId);
- // break;
- // case TipType.PetMount:
- // WindowCenter.Instance.Open<PetMountTipWin>();
- // break;
- // case TipType.SpiritWeapon:
- // WindowCenter.Instance.Open<SpiritWeaponTipWin>();
- // break;
- // case TipType.BoxItem:
- // if (WindowCenter.Instance.IsOpen<ItemBoxTipWin>())
- // {
- // WindowCenter.Instance.Open<ItemTipWin>();
- // }
- // else
- // {
- // WindowCenter.Instance.Open<ItemBoxTipWin>();
- // }
- // break;
- // case TipType.TreasurePavilion:
- // TreasurePavilionModel.Instance.selectGubao = item.config.EffectValueA1;
- // TreasurePavilionModel.Instance.showTipFromPiece = item.itemId;
- // WindowCenter.Instance.OpenIL<TreasurePavilionTipWin>();
- // break;
- // default:
- // WindowCenter.Instance.Open<ItemTipWin>();
- // break;
- // }
-
+ // var chestConfig = ChestsConfig.Get(item.itemId);
+ // money = chestConfig.OpenMoney;
// }
- public static void ShowGood(int goodId, int itemId)
+ var baseInfo = new BaseInfo()
{
- secondaryData = null;
+ itemId = item.itemId,
+ count = item.count,
+ isAuction = item.isAuction,
+ isEquiped = isEquiped,
+ isPreview = false,
+ score = item.score,
+ isOverdue = ItemLogicUtility.Instance.IsOverdue(guid),
+ auctionSurplusTime = item.isAuction ? item.auctionSurplusTime : 0,
+ overdueSurplusTime = item.overdueSurplusTime,
+ levelLimit = item.isAuction ? 0 : item.config.UseLV,
+ star = isEquiped ? star : -1,
+ strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0,
+ moneyLimit = money,
+ };
- var isEquip = ItemLogicUtility.Instance.IsRealmEquip(itemId);
- if (isEquip)
- {
- mainTipData = CreateGoodEquipData(itemId, goodId);
- }
- else
- {
- mainTipData = CreateGoodItemData(itemId, goodId);
- }
+ return baseInfo;
+ }
- BuyItemController.Instance.SetGood(goodId);
- var itemConfig = ItemConfig.Get(itemId);
- if (isEquip)
- {
- // WindowCenter.Instance.Open<EquipTipWin>();
- }
- else
- {
- var tipType = GetTipType(itemId);
+ private static BaseProperty GetBaseProperty(int itemId)
+ {
+ var baseProperties = new List<Int2>();
+ var config = ItemConfig.Get(itemId);
- // switch (tipType)
- // {
- // case TipType.PetMount:
- // WindowCenter.Instance.Open<PetMountTipWin>();
- // break;
- // case TipType.BoxItem:
- // if (WindowCenter.Instance.IsOpen<ItemBoxTipWin>())
- // {
- // WindowCenter.Instance.Open<ItemTipWin>();
- // }
- // else
- // {
- // WindowCenter.Instance.Open<ItemBoxTipWin>();
- // }
- // break;
- // default:
- // WindowCenter.Instance.Open<ItemTipWin>();
- // break;
- // }
+ if (config.Effect1 == 220)
+ {
+ return GetBaseProperty(config.EffectValueA1);
+ }
+
+ if (!ItemLogicUtility.Instance.IsDogzEquip(itemId))
+ {
+ if (config.Effect1 != 0)
+ {
+ baseProperties.Add(new Int2(config.Effect1, config.EffectValueA1));
}
}
- // public static void ShowCustomEquip(CustomEquipInfo info)
- // {
- // secondaryData = null;
- // mainTipData = CreateCustomEquipData(info);
- // WindowCenter.Instance.Open<EquipTipWin>();
- // }
-
-
-
- // static TipData CreateNormalEquipData(string guid, bool operatable)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(TipData);
- // }
-
- // return new TipData()
- // {
- // itemId = item.itemId,
- // guid = guid,
-
- // baseInfo = GetBaseInfo(guid),
- // baseProperty = GetBaseProperty(guid),
- // spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
- // legendProperty = GetLegendProperty(guid),
- // skillInfo = GetSkillInfo(item.itemId, guid),
- // suitInfo = GetSuitInfo(guid),
- // starInfo = GetStarInfo(guid),
- // strengthenProperty = GetStrengthenProperty(guid),
- // gemInfo = GetGemInfo(guid),
- // trainProperty = GetTrainProperty(guid),
- // operates = operatable ? GetOperates(guid) : null,
- // shenProperty = GetShenProperty(item.itemId)
- // };
- // }
-
- // static TipData CreateNormalEquipData(int itemId)
- // {
- // return new TipData()
- // {
- // itemId = itemId,
- // guid = string.Empty,
-
- // baseInfo = GetBaseInfo(itemId),
- // baseProperty = GetBaseProperty(itemId),
- // legendProperty = GetLegendProperty(itemId),
- // spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
- // skillInfo = GetSkillInfo(itemId),
- // suitInfo = GetSuitInfo(itemId),
- // gemInfo = GetGemInfo(itemId),
- // starInfo = GetStarInfo(itemId),
- // getWay = GetGetWay(itemId),
- // shenProperty = GetShenProperty(itemId)
- // };
- // }
-
- // static TipData CreateDogzEquipData(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(TipData);
- // }
-
- // return new TipData()
- // {
- // itemId = item.itemId,
- // guid = guid,
-
- // baseInfo = GetBaseInfo(guid),
- // baseProperty = GetBaseProperty(guid),
- // legendProperty = GetLegendProperty(guid),
- // operates = GetOperates(guid),
- // };
- // }
-
- // static TipData CreateDogzEquipData(int itemId)
- // {
- // return new TipData()
- // {
- // itemId = itemId,
- // guid = string.Empty,
-
- // baseInfo = GetBaseInfo(itemId),
- // baseProperty = GetBaseProperty(itemId),
- // legendProperty = GetLegendProperty(itemId),
- // getWay = GetGetWay(itemId)
- // };
- // }
-
- // static TipData CreateCustomEquipData(CustomEquipInfo info)
- // {
- // var config = ItemConfig.Get(info.itemId);
- // if (config == null)
- // {
- // return default(TipData);
- // }
-
- // var baseInfo = new BaseInfo()
- // {
- // itemId = info.itemId,
- // star = info.starLevel,
- // strengthenLevel = info.strengthenLevel,
- // score = info.score,
- // isEquiped = info.isEquiped,
- // evolveLevel = info.evolveLevel,
- // };
-
- // var baseProperty = GetBaseProperty(info.itemId);
- // if (info.starLevel > 0)
- // {
- // var starProperties = new List<Int2>();
- // baseProperty.star = info.starLevel;
- // var starConfig = EquipStarConfig.Get(config.LV, config.EquipPlace, info.starLevel);
- // starProperties.AddRange(starConfig.BaseAttrInfo);
- // baseProperty.starProperties = starProperties;
- // }
-
- // var legendProperty = new LegendProperty()
- // {
- // properties = info.legendProperties,
- // };
-
- // var skillInfo = GetSkillInfo(info.itemId, info);
- // var suitInfo = default(SuitInfo);
- // if (ItemLogicUtility.Instance.IsSuitEquip(info.itemId))
- // {
- // var job = config.JobLimit;
- // var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit);
- // var name = twoConfigs[0].name;
- // var level = config.LV;
- // var maxSuitLevel = EquipStarModel.GetMaxStarLevel(level);
-
- // var twoSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
- // var fiveSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
- // var eightSuits = new Dictionary<int, bool>();
- // var eightSuitLevel = info.suitLevels[EquipSuitType.EightSuit];
-
- // for (var i = 0; i <= 9; i++, i++, i++)
- // {
- // var configs = EquipSuitConfig.GetConfigs(job, level, EquipSuitType.TwoSuit);
- // var actived = info.suitLevels[EquipSuitType.TwoSuit] >= i;
- // var properties = new List<Int2>();
- // foreach (var item in configs)
- // {
- // if (item.star == i)
- // {
- // properties.AddRange(item.attr);
- // break;
- // }
- // }
-
- // twoSuitProperties[i] = new EquipSuitPropertyEntry()
- // {
- // type = EquipSuitType.TwoSuit,
- // actived = actived,
- // properties = properties,
- // };
-
- // configs = EquipSuitConfig.GetConfigs(job, level, EquipSuitType.FiveSuit);
- // actived = info.suitLevels[EquipSuitType.FiveSuit] >= i;
- // properties = new List<Int2>();
- // foreach (var item in configs)
- // {
- // if (item.star == i)
- // {
- // properties.AddRange(item.attr);
- // break;
- // }
- // }
-
- // fiveSuitProperties[i] = new EquipSuitPropertyEntry()
- // {
- // type = EquipSuitType.TwoSuit,
- // actived = actived,
- // properties = properties,
- // };
-
- // eightSuits[i] = eightSuitLevel >= i;
- // }
-
- // suitInfo = new SuitInfo()
- // {
- // name = name,
- // level = level,
- // job = job,
- // maxSuitLevel = maxSuitLevel,
- // places = info.suitPlaces,
- // placeStars = info.placeStars,
- // twoSuitProperties = twoSuitProperties,
- // fiveSuitProperties = fiveSuitProperties,
- // eightSuits = eightSuits
- // };
- // }
-
- // var starInfo = new StarInfo()
- // {
- // equipPosition = new Int2(config.LV, config.EquipPlace),
- // starLevel = info.starLevel,
- // maxLevel = config.LV == 0 ? 0 : EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV),
- // };
-
- // var type = EquipStrengthModel.GetEquipStrengthType(config.EquipPlace);
- // var strengthenConfig = ItemPlusConfig.GetTypeAndLevel(type, info.strengthenLevel);
- // var strengthenProperties = new List<Int2>();
- // for (int i = 0; i < strengthenConfig.attType.Length; i++)
- // {
- // strengthenProperties.Add(new Int2(strengthenConfig.attType[i], strengthenConfig.attValue[i]));
- // }
- // var strengthenProperty = new StrengthenProperty()
- // {
- // strengthenLevel = info.strengthenLevel,
- // properties = strengthenProperties,
- // equipPlace = config.EquipPlace,
- // evolveLevel = info.evolveLevel,
- // };
-
- // var gemInfo = new GemInfo()
- // {
- // activeStates = info.gemHoleActiveStates,
- // gems = info.gems,
- // };
-
- // var trainProperty = new TrainProperty()
- // {
- // properties = info.trainProperties,
- // };
-
- // return new TipData()
- // {
- // itemId = info.itemId,
- // baseInfo = baseInfo,
- // baseProperty = baseProperty,
- // legendProperty = legendProperty,
- // skillInfo = skillInfo,
- // suitInfo = suitInfo,
- // starInfo = starInfo,
- // strengthenProperty = strengthenProperty,
- // gemInfo = gemInfo,
- // trainProperty = trainProperty,
- // shenProperty = GetShenProperty(info.itemId)
- // };
- // }
-
- static TipData CreateGoodEquipData(int itemId, int goodId)
+ if (config.Effect2 != 0)
{
- return new TipData()
- {
- itemId = itemId,
- guid = string.Empty,
- goodId = goodId,
-
- baseInfo = GetBaseInfo(itemId),
- baseProperty = GetBaseProperty(itemId),
- //spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
- //legendProperty = GetLegendProperty(itemId),
- skillInfo = GetSkillInfo(itemId),
- //suitInfo = GetSuitInfo(itemId),
- //gemInfo = GetGemInfo(itemId),
- //starInfo = GetStarInfo(itemId),
- operates = GetGoodOperates(goodId),
- //shenProperty = GetShenProperty(itemId)
- };
+ baseProperties.Add(new Int2(config.Effect2, config.EffectValueA2));
}
- // static TipData CreateEquipAuctionData(string guid, bool operatable)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(TipData);
- // }
-
- // var legendProperty = GetLegendProperty(guid);
- // if (legendProperty.properties.IsNullOrEmpty())
- // {
- // legendProperty = GetLegendProperty(item.itemId);
- // }
-
- // return new TipData()
- // {
- // itemId = item.itemId,
- // guid = guid,
-
- // baseInfo = GetBaseInfo(guid),
- // baseProperty = GetBaseProperty(item.itemId),
- // spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
- // legendProperty = legendProperty,
- // skillInfo = GetSkillInfo(item.itemId, guid),
- // suitInfo = GetSuitInfo(item.itemId),
- // operates = operatable ? GetOperates(guid) : null,
-
- // starInfo = GetStarInfo(guid),
- // gemInfo = GetGemInfo(guid),
- // shenProperty = GetShenProperty(item.itemId)
- // };
- // }
-
- // static TipData CreateItemData(string guid, bool operatable)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(TipData);
- // }
-
- // return new TipData()
- // {
- // itemId = item.itemId,
- // guid = guid,
-
- // baseInfo = GetBaseInfo(guid),
- // baseProperty = GetBaseProperty(item.itemId),
- // spiritWeaponProperty = GetSpiritWeaponProperty(item.itemId),
- // legendProperty = GetLegendProperty(guid),
- // petMountBaseProperty = GetPetMountBaseProperty(item.itemId),
- // operates = operatable ? GetOperates(guid) : null,
- // refineMaterials = GetWingRefineMaterials(guid),
- // shenProperty = GetShenProperty(item.itemId)
- // };
- // }
-
- // static TipData CreateItemData(int itemId)
- // {
- // return new TipData()
- // {
- // itemId = itemId,
- // baseInfo = GetBaseInfo(itemId),
- // baseProperty = GetBaseProperty(itemId),
- // exchangeItemId = itemId,
- // spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
- // legendProperty = GetLegendProperty(itemId),
- // petMountBaseProperty = GetPetMountBaseProperty(itemId),
- // getWay = GetGetWay(itemId),
- // shenProperty = GetShenProperty(itemId)
- // };
- // }
-
- static TipData CreateGoodItemData(int itemId, int goodId)
+ if (config.Effect3 != 0)
{
- return new TipData()
- {
- itemId = itemId,
- goodId = goodId,
- baseInfo = GetBaseInfo(itemId),
- baseProperty = GetBaseProperty(itemId),
- // legendProperty = GetLegendProperty(itemId),
- // spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
- // petMountBaseProperty = GetPetMountBaseProperty(itemId),
- operates = GetGoodOperates(goodId),
- // shenProperty = GetShenProperty(itemId)
- };
+ baseProperties.Add(new Int2(config.Effect3, config.EffectValueA3));
}
-
-
- // public static void Operate(ItemOperateType type, string guid)
- // {
- // switch (type)
- // {
- // case ItemOperateType.putOn:
- // ItemOperateUtility.Instance.PutOnItem(guid);
- // break;
- // case ItemOperateType.gotoPuton:
- // ItemOperateUtility.Instance.PutOnItem(guid);
- // break;
- // case ItemOperateType.putOff:
- // ItemOperateUtility.Instance.PutOffEquip(guid);
- // break;
- // case ItemOperateType.putAway:
- // ItemOperateUtility.Instance.PutAway(guid);
- // break;
- // case ItemOperateType.putIn:
- // ItemOperateUtility.Instance.PutInWareHouse(guid);
- // break;
- // case ItemOperateType.putOut:
- // ItemOperateUtility.Instance.TakeOutFromWarehouse(guid);
- // break;
- // case ItemOperateType.sell:
- // ItemOperateUtility.Instance.SellItem(guid);
- // break;
- // case ItemOperateType.strength:
- // ItemOperateUtility.Instance.GotoStrengthen(guid);
- // break;
- // case ItemOperateType.star:
- // ItemOperateUtility.Instance.GotoStarUpgrade(guid);
- // break;
- // case ItemOperateType.inlay:
- // ItemOperateUtility.Instance.GotoInlayItem(guid);
- // break;
- // case ItemOperateType.train:
- // ItemOperateUtility.Instance.GotoTrain(guid);
- // break;
- // case ItemOperateType.makeUse:
- // ItemOperateUtility.Instance.GotoUseItem(guid);
- // break;
- // case ItemOperateType.split:
- // ItemOperateUtility.Instance.OnClickSplitBtn(guid);
- // break;
- // case ItemOperateType.compose:
- // var wannaComposeItem = packModel.GetItemByGuid(guid);
- // var jumpId = 0;
- // var isUnlock = composeModel.CheckComposeItemById(wannaComposeItem.itemId, out jumpId);
- // if (isUnlock)
- // {
- // ItemOperateUtility.Instance.GotoComposeItem(jumpId);
- // }
- // break;
- // case ItemOperateType.renewal:
- // ItemOperateUtility.Instance.RenewalItem(guid);
- // break;
- // case ItemOperateType.exchange:
- // WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.ExchangeActiveToken);
- // break;
- // case ItemOperateType.lsExchange:
- // WindowCenter.Instance.Open<LingShiChange>();
- // break;
- // case ItemOperateType.default1:
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // break;
- // }
-
- // EquipEvolveModel.Instance.EquipJump(item.config.LV, item.config.EquipPlace);
- // WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)2013);
- // break;
- // }
- // }
-
- // public static void GoodOperate(ItemOperateType type, int goodId, int count)
- // {
- // var config = StoreConfig.Get(goodId);
- // storeModel.SendBuyShopItem(config, count);
- // }
-
-
- private static BaseInfo GetBaseInfo(int itemId)
+ if (config.Effect4 != 0)
{
- var config = ItemConfig.Get(itemId);
- var money = 0;
- if (config.Type == 81)
- {
- var chestConfig = ChestsConfig.Get(itemId);
- money = chestConfig.OpenMoney;
- }
-
- var baseInfo = new BaseInfo()
- {
- itemId = itemId,
- isAuction = false,
- isEquiped = false,
- isPreview = true,
- //score = ItemLogicUtility.Instance.GetEquipScore(itemId, null, true),
- auctionSurplusTime = 0,
- levelLimit = config.UseLV,
- realmLimit = config.RealmLimit,
- moneyLimit = money,
- };
-
- return baseInfo;
+ baseProperties.Add(new Int2(config.Effect4, config.EffectValueA4));
}
- // private static BaseInfo GetBaseInfo(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
-
- // var level = item.config.LV;
- // var place = item.config.EquipPlace;
-
- // var isEquiped = equipModel.GetEquip(new Int2(level, place)) == guid;
-
- // var type = EquipStrengthModel.GetEquipStrengthType(place);
- // var star = starModel.GetEquipStarLevel(new Int2(level, place));
- // var maxStrengthenLevel = strengthenModel.GetEquipLevelMax(type, level);
- // var placeStrengthenLevel = strengthenModel.GetStrengthLevel(level, place);
-
- // var money = 0;
- // if (item.config.Type == 81)
- // {
- // var chestConfig = ChestsConfig.Get(item.itemId);
- // money = chestConfig.OpenMoney;
- // }
-
- // var baseInfo = new BaseInfo()
- // {
- // itemId = item.itemId,
- // count = item.count,
- // isAuction = item.isAuction,
- // isEquiped = isEquiped,
- // isPreview = false,
- // score = item.score,
- // isOverdue = ItemLogicUtility.Instance.IsOverdue(guid),
- // auctionSurplusTime = item.isAuction ? item.auctionSurplusTime : 0,
- // overdueSurplusTime = item.overdueSurplusTime,
- // levelLimit = item.isAuction ? 0 : item.config.UseLV,
- // realmLimit = item.isAuction ? 0 : item.config.RealmLimit,
- // star = isEquiped ? star : -1,
- // strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0,
- // moneyLimit = money,
- // };
-
- // return baseInfo;
- // }
-
- private static BaseProperty GetBaseProperty(int itemId)
+ if (config.Effect5 != 0)
{
- var baseProperties = new List<Int2>();
- var config = ItemConfig.Get(itemId);
-
- if (config.Effect1 == 220)
- {
- return GetBaseProperty(config.EffectValueA1);
- }
-
- if (!ItemLogicUtility.Instance.IsDogzEquip(itemId))
- {
- if (config.Effect1 != 0)
- {
- baseProperties.Add(new Int2(config.Effect1, config.EffectValueA1));
- }
- }
-
- if (config.Effect2 != 0)
- {
- baseProperties.Add(new Int2(config.Effect2, config.EffectValueA2));
- }
-
- if (config.Effect3 != 0)
- {
- baseProperties.Add(new Int2(config.Effect3, config.EffectValueA3));
- }
-
- if (config.Effect4 != 0)
- {
- baseProperties.Add(new Int2(config.Effect4, config.EffectValueA4));
- }
-
- if (config.Effect5 != 0)
- {
- baseProperties.Add(new Int2(config.Effect5, config.EffectValueA5));
- }
-
- var baseProperty = new BaseProperty()
- {
- baseProperties = baseProperties,
- };
-
- return baseProperty;
+ baseProperties.Add(new Int2(config.Effect5, config.EffectValueA5));
}
- private static BaseProperty GetBaseProperty(string guid)
+ var baseProperty = new BaseProperty()
{
- var item = PackManager.Instance.GetItemByGuid(guid);
- var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
- var equiped = true;//equipModel.GetEquip(equipPosition) == guid;
+ baseProperties = baseProperties,
+ };
- var baseProperty = GetBaseProperty(item.itemId);
+ return baseProperty;
+ }
- if (equiped)
- {
- var starProperties = new List<Int2>();
- // var currentStar = starModel.GetEquipStarLevel(equipPosition);
- // var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
- // var star = Mathf.Min(currentStar, maxStar);
- // if (star > 0)
- // {
- // baseProperty.star = star;
- // var starConfig = EquipStarConfig.Get(item.config.LV, item.config.EquipPlace, star);
- // starProperties.AddRange(starConfig.BaseAttrInfo);
- // }
+ private static BaseProperty GetBaseProperty(string guid)
+ {
+ var item = PackManager.Instance.GetItemByGuid(guid);
+ var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
+ var equiped = true;//equipModel.GetEquip(equipPosition) == guid;
- baseProperty.starProperties = starProperties;
- }
+ var baseProperty = GetBaseProperty(item.itemId);
- return baseProperty;
- }
-
- // private static BaseProperty GetPetMountBaseProperty(int itemId)
- // {
- // var config = ItemConfig.Get(itemId);
- // var baseProperty = new BaseProperty();
- // Dictionary<int, int> properties = null;
- // switch (config.Type)
- // {
- // case 26:
- // var petId = PetInfoConfig.GetItemUnLockPet(itemId);
- // properties = petModel.GetPetAttrAddDict(petId);
- // break;
- // case 41:
- // case 42:
- // var horseId = HorseConfig.GetItemUnLockHorse(itemId);
- // properties = mountModel.GetMountAttrAddDict(horseId);
- // break;
- // default:
- // break;
- // }
-
- // if (properties != null)
- // {
- // baseProperty.baseProperties = new List<Int2>();
- // foreach (var property in properties)
- // {
- // baseProperty.baseProperties.Add(new Int2(property.Key, property.Value));
- // }
- // }
-
- // return baseProperty;
- // }
-
- // //绁炶灞炴��
- // private static ShenProperty GetShenProperty(int itemId)
- // {
- // var data = new ShenProperty();
- // data.isPreview = true;
- // data.itemId = itemId;
-
- // var config = ItemConfig.Get(itemId);
-
- // data.properties = ShenPropertyUtility.GetEquipShenProperties(itemId);
-
-
- // return data;
- // }
-
-
- // private static LegendProperty GetLegendProperty(int itemId)
- // {
- // var data = new LegendProperty();
- // data.isPreview = true;
- // data.itemId = itemId;
-
- // var config = ItemConfig.Get(itemId);
- // if (config.Effect1 == 220)
- // {
- // data.isPreview = false;
- // var appConfig = AppointItemConfig.Get(itemId);
- // data.trueCount = 0;
-
- // data.properties = new List<Int2>();
- // for (var i = 0; i < appConfig.LegendAttrID.Length; i++)
- // {
- // data.properties.Add(new Int2(appConfig.LegendAttrID[i], appConfig.LegendAttrValue[i]));
- // }
- // }
- // else
- // {
- // data.properties = LegendPropertyUtility.GetLegendProFromEquipShen(itemId);
- // if (data.properties != null)
- // {
- // data.trueCount = 0;
- // data.isPreview = false;
- // }
- // else
- // {
- // data.trueCount = LegendPropertyUtility.GetEquipPropertyCount(itemId);
- // data.properties = LegendPropertyUtility.GetEquipProperties(itemId);
- // }
- // }
-
- // return data;
- // }
-
- // private static SpiritWeaponProperty GetSpiritWeaponProperty(int itemId)
- // {
- // var config = SpiritWeaponConfig.Get(itemId);
- // if (config == null)
- // {
- // return default(SpiritWeaponProperty);
- // }
-
- // var properties = new List<Int3>();
- // for (var i = 0; i < config.AttrIDList.Length; i++)
- // {
- // properties.Add(new Int3(config.AttrIDList[i], config.AttrValueList[i], config.AttrColorList[i]));
- // }
-
- // var spiritWeaponProperty = new SpiritWeaponProperty();
- // spiritWeaponProperty.itemId = itemId;
- // spiritWeaponProperty.properties = properties;
- // return spiritWeaponProperty;
- // }
-
- // private static LegendProperty GetLegendProperty(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(LegendProperty);
- // }
-
- // var data = new LegendProperty();
- // data.isPreview = false;
- // data.itemId = item.itemId;
-
- // var ids = item.GetUseData((int)ItemUseDataKey.legendAttrID);
- // var values = item.GetUseData((int)ItemUseDataKey.legendAttrValue);
- // if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
- // {
- // var properties = new List<Int2>();
- // var count = Mathf.Min(ids.Count, values.Count);
- // for (int i = 0; i < count; i++)
- // {
- // properties.Add(new Int2(ids[i], values[i]));
- // }
-
- // data.properties = properties;
- // }
-
- // return data;
- // }
-
- public static LegendProperty GetLegendProperty(int itemId, Dictionary<int, List<int>> userData)
+ if (equiped)
{
- var data = new LegendProperty();
- data.isPreview = false;
- data.itemId = itemId;
-
- List<int> ids = null;
- List<int> values = null;
- if (userData != null)
- {
- userData.TryGetValue((int)ItemUseDataKey.legendAttrID, out ids);
- userData.TryGetValue((int)ItemUseDataKey.legendAttrValue, out values);
- }
- if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
- {
- var properties = new List<Int2>();
- var count = Mathf.Min(ids.Count, values.Count);
- for (int i = 0; i < count; i++)
- {
- properties.Add(new Int2(ids[i], values[i]));
- }
-
- data.properties = properties;
- }
-
- return data;
- }
-
- // public static SuitInfo GetSuitInfo(int itemId)
- // {
- // var config = ItemConfig.Get(itemId);
- // if (config == null || config.SuiteiD <= 0)
- // {
- // return default(SuitInfo);
- // }
-
- // var job = config.JobLimit;
- // var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit);
-
- // var name = twoConfigs[0].name;
- // var level = config.LV;
- // var places = new List<int>();
- // places.Add(config.EquipPlace);
- // //var suitInfo = new SuitInfo()
- // //{
- // // name = name,
- // // level = level,
- // // job = job,
- // // places = places,
- // //};
- // var maxSuitLevel = EquipStarModel.GetMaxStarLevel(level);
-
- // var placeStars = new Dictionary<int, int>();
- // for (int i = 1; i <= 8; i++)
- // {
- // var equip = packModel.GetItemByGuid(equipModel.GetEquip(new Int2(level, i)));
- // var hasSuit = equip != null && equip.config.SuiteiD > 0;
- // if (hasSuit)
- // {
- // placeStars[i] = starModel.GetEquipStarLevel(new Int2(level, i));
- // }
- // }
-
- // var twoSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
- // var fiveSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
- // var eightSuits = new Dictionary<int, bool>();
- // var eightSuitLevel = equipModel.GetSuitLevel(config.LV, EquipSuitType.EightSuit);
-
- // var twoSuitProperties0 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.TwoSuit);
- // var fiveSuitProperties0 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.FiveSuit);
-
-
- // twoSuitProperties[0] = twoSuitProperties0;
- // fiveSuitProperties[0] = fiveSuitProperties0;
- // eightSuits[0] = eightSuitLevel >= 0;
-
- // if (maxSuitLevel >= 3)
- // {
- // twoSuitProperties[3] = equipModel.GetEquipSuitEntry(config.LV, 3, EquipSuitType.TwoSuit);
- // fiveSuitProperties[3] = equipModel.GetEquipSuitEntry(config.LV, 3, EquipSuitType.FiveSuit);
- // eightSuits[3] = eightSuitLevel >= 3;
- // }
-
- // if (maxSuitLevel >= 6)
- // {
- // twoSuitProperties[6] = equipModel.GetEquipSuitEntry(config.LV, 6, EquipSuitType.TwoSuit);
- // fiveSuitProperties[6] = equipModel.GetEquipSuitEntry(config.LV, 6, EquipSuitType.FiveSuit);
- // eightSuits[6] = eightSuitLevel >= 3;
- // }
-
- // if (maxSuitLevel >= 9)
- // {
- // twoSuitProperties[9] = equipModel.GetEquipSuitEntry(config.LV, 9, EquipSuitType.TwoSuit);
- // fiveSuitProperties[9] = equipModel.GetEquipSuitEntry(config.LV, 9, EquipSuitType.FiveSuit);
- // eightSuits[9] = eightSuitLevel >= 9;
- // }
-
- // var suitInfo = new SuitInfo()
- // {
- // name = name,
- // level = level,
- // job = job,
- // maxSuitLevel = maxSuitLevel,
- // places = places,
- // placeStars = placeStars,
- // twoSuitProperties = twoSuitProperties,
- // fiveSuitProperties = fiveSuitProperties,
- // eightSuits = eightSuits
- // };
- // return suitInfo;
- // }
-
- // private static SuitInfo GetSuitInfo(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(SuitInfo);
- // }
-
- // var config = ItemConfig.Get(item.itemId);
- // if (config == null || config.SuiteiD <= 0)
- // {
- // return default(SuitInfo);
- // }
-
- // var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
- // var equiped = equipModel.GetEquip(equipPosition) == guid;
-
- // var job = config.JobLimit;
- // var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit);
- // var name = twoConfigs[0].name;
-
- // var level = config.LV;
- // var maxSuitLevel = equiped ? EquipStarModel.GetMaxStarLevel(level) : -1;
-
- // var places = new List<int>();
- // var placeStars = new Dictionary<int, int>();
- // if (equiped)
- // {
- // for (int i = 1; i <= 8; i++)
- // {
- // var equip = packModel.GetItemByGuid(equipModel.GetEquip(new Int2(level, i)));
- // var hasSuit = equip != null && equip.config.SuiteiD > 0;
- // if (hasSuit)
- // {
- // places.Add(i);
- // placeStars[i] = starModel.GetEquipStarLevel(new Int2(level, i));
- // }
- // }
- // }
-
- // var twoSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
- // var fiveSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
- // var eightSuits = new Dictionary<int, bool>();
- // var eightSuitLevel = equiped ? equipModel.GetSuitLevel(config.LV, EquipSuitType.EightSuit) : -1;
-
- // if (!equiped)
- // {
- // var suit2 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.TwoSuit);
- // suit2.actived = false;
- // var suit5 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.FiveSuit);
- // suit5.actived = false;
- // twoSuitProperties[0] = suit2;
- // fiveSuitProperties[0] = suit5;
- // eightSuits[0] = eightSuitLevel >= 0;
- // }
- // else
- // {
- // foreach (var star in EquipStarModel.StarList)
- // {
- // if (maxSuitLevel >= star)
- // {
- // twoSuitProperties[star] = equipModel.GetEquipSuitEntry(config.LV, star, EquipSuitType.TwoSuit);
- // fiveSuitProperties[star] = equipModel.GetEquipSuitEntry(config.LV, star, EquipSuitType.FiveSuit);
- // eightSuits[star] = eightSuitLevel >= star;
- // }
- // }
- // }
-
-
-
-
- // var suitInfo = new SuitInfo()
- // {
- // name = name,
- // level = level,
- // job = job,
- // maxSuitLevel = maxSuitLevel,
- // places = places,
- // placeStars = placeStars,
- // twoSuitProperties = twoSuitProperties,
- // fiveSuitProperties = fiveSuitProperties,
- // eightSuits = eightSuits
- // };
-
- // return suitInfo;
- // }
-
- // private static StarInfo GetStarInfo(int itemId)
- // {
- // var config = ItemConfig.Get(itemId);
- // if (!EquipModel.IsRealmEquip(config.EquipPlace))
- // {
- // return default(StarInfo);
- // }
-
- // var starInfo = new StarInfo();
- // starInfo.equipPosition = new Int2(config.LV, config.EquipPlace);
- // starInfo.maxLevel = EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV);
- // starInfo.starLevel = 0;
-
- // return starInfo;
- // }
-
- // private static StarInfo GetStarInfo(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(StarInfo);
- // }
-
- // if (!EquipModel.IsRealmEquip(item.config.EquipPlace))
- // {
- // return default(StarInfo);
- // }
-
- // var starInfo = new StarInfo();
- // var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
- // var equiped = equipModel.GetEquip(equipPosition) == guid;
- // starInfo.equipPosition = equipPosition;
- // starInfo.maxLevel = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
- // starInfo.starLevel = equiped ? starModel.GetStarLevel(equipPosition) : 0;
-
- // return starInfo;
- // }
-
- // private static StrengthenProperty GetStrengthenProperty(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(StrengthenProperty);
- // }
-
- // var level = item.config.LV;
- // var place = item.config.EquipPlace;
- // var equiped = equipModel.GetEquip(new Int2(level, place)) == guid;
- // if (!equiped)
- // {
- // return default(StrengthenProperty);
- // }
-
- // var data = new StrengthenProperty();
-
- // var strengthenLevel = strengthenModel.GetStrengthLevel(level, place);
-
- // var type = EquipStrengthModel.GetEquipStrengthType(place);
- // var maxStrengthenLevel = strengthenModel.GetEquipLevelMax(type, level);
-
- // data.strengthenLevel = Mathf.Min(strengthenLevel, maxStrengthenLevel);
- // data.evolveLevel = strengthenModel.GetStrengthEvolveLevel(level, place);
- // data.equipPlace = place;
-
- // data.properties = new List<Int2>();
- // var config = ItemPlusConfig.GetTypeAndLevel(type, data.strengthenLevel);
- // for (int i = 0; i < config.attType.Length; i++)
- // {
- // data.properties.Add(new Int2(config.attType[i], config.attValue[i]));
- // }
-
- // return data;
- // }
-
- // private static GemInfo GetGemInfo(int itemId)
- // {
- // var config = ItemConfig.Get(itemId);
- // var level = config.LV;
- // var place = config.EquipPlace;
-
- // var gemInfo = new GemInfo();
- // var maxStar = EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV);
- // gemInfo.activeStates = new Dictionary<int, bool>();
- // for (int i = 0; i < 4; i++)
- // {
- // gemInfo.activeStates[i] = IsEquipGemHoleOpen(new Int2(level, place), maxStar, i);
- // }
-
- // return gemInfo;
- // }
-
- // private static GemInfo GetGemInfo(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(GemInfo);
- // }
-
- // var level = item.config.LV;
- // var place = item.config.EquipPlace;
-
- // var gemInfo = new GemInfo();
- // var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
- // gemInfo.activeStates = new Dictionary<int, bool>();
- // for (int i = 0; i < 4; i++)
- // {
- // gemInfo.activeStates[i] = IsEquipGemHoleOpen(new Int2(level, place), maxStar, i);
- // }
-
- // gemInfo.gems = new Dictionary<int, int>();
- // if (item.packType == PackType.Equip)
- // {
- // int[] gems;
- // if (gemModel.TryGetEquipGems(item.config.LV, item.config.EquipPlace, out gems))
- // {
- // for (int i = 0; i < gems.Length; i++)
- // {
- // gemInfo.gems[i] = gems[i];
- // }
- // }
- // }
-
- // return gemInfo;
- // }
-
- // private static TrainProperty GetTrainProperty(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(TrainProperty);
- // }
-
- // var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
- // var equiped = equipModel.GetEquip(equipPosition) == guid;
- // if (!equiped)
- // {
- // return default(TrainProperty);
- // }
-
- // var trainProperty = new TrainProperty();
- // var star = Mathf.Min(EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV), starModel.GetEquipStarLevel(equipPosition));
- // var type = EquipTrainModel.GetTrainType(equipPosition.y);
- // var maxConfig = WashLevelMaxConfig.Get(type, star);
- // var maxLevel = maxConfig == null ? 1 : maxConfig.levelMax;
- // var trainLevel = Mathf.Min(maxLevel, trainModel.GetTrainLevel(equipPosition));
- // trainProperty.level = trainLevel;
-
- // var trainConfig = EquipWashConfig.Get(type, trainLevel);
- // trainProperty.properties = new List<Int2>();
-
- // if (trainConfig == null)
- // {
- // var trainConfigLevel1 = EquipWashConfig.Get(type, 1);
- // trainProperty.properties.Add(new Int2(trainConfigLevel1.config.attType1, 0));
- // trainProperty.properties.Add(new Int2(trainConfigLevel1.config.attType2, 0));
- // //trainProperty.properties.Add(new Int2(trainConfigLevel1.config.attType3, 0));
- // }
- // else
- // {
- // var trainedProperties = trainModel.GetTrainedProperties(equipPosition);
- // trainProperty.properties.Add(new Int2(trainConfig.config.attType1, Mathf.Min(trainedProperties.x, trainConfig.config.attMax1)));
- // trainProperty.properties.Add(new Int2(trainConfig.config.attType2, Mathf.Min(trainedProperties.y, trainConfig.config.attMax2)));
- // //trainProperty.properties.Add(new Int2(trainConfig.config.attType3, Mathf.Min(trainedProperties.z, trainConfig.config.attMax3)));
- // }
-
- // return trainProperty;
- // }
-
- private static SkillInfo GetSkillInfo(int itemId)
- {
- var config = ItemConfig.Get(itemId);
- if (config == null)
- {
- return default(SkillInfo);
- }
-
- var skillInfo = new SkillInfo();
- skillInfo.skills = new List<int>();
-
- if (config.AddSkill1 != 0)
- {
- skillInfo.skills.Add(config.AddSkill1);
- }
-
- if (config.AddSkill2 != 0)
- {
- skillInfo.skills.Add(config.AddSkill2);
- }
-
- return skillInfo;
- }
-
-
- private static SkillInfo GetSkillInfo(int itemId, CustomEquipInfo info)
- {
- var skillInfo = new SkillInfo();
- skillInfo.skills = new List<int>();
- if (!info.equipSkillList.IsNullOrEmpty())
- {
- skillInfo.skills = info.equipSkillList;
- }
- else
- {
- return GetSkillInfo(itemId);
- }
- return skillInfo;
- }
-
- // private static SkillInfo GetSkillInfo(int itemId, string guid)
- // {
-
- // var skillInfo = new SkillInfo();
- // skillInfo.skills = new List<int>();
-
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return GetSkillInfo(itemId);
- // }
-
- // var values = item.GetUseData((int)ItemUseDataKey.equipSkills);
- // if (!values.IsNullOrEmpty())
- // {
- // skillInfo.skills = values;
- // }
- // else
- // {
- // return GetSkillInfo(itemId);
- // }
-
- // return skillInfo;
- // }
-
- // private static WingRefineMaterials GetWingRefineMaterials(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return default(WingRefineMaterials);
- // }
-
- // if (item.config.Type != 113)
- // {
- // return default(WingRefineMaterials);
- // }
-
- // var refineMaterials = new WingRefineMaterials();
- // refineMaterials.materials = new List<Int2>();
-
- // var ids = item.GetUseData((int)ItemUseDataKey.wingMaterialItemID);
- // var values = item.GetUseData((int)ItemUseDataKey.wingMaterialItemCount);
- // if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
- // {
- // var min = Mathf.Min(ids.Count, values.Count);
- // for (int i = 0; i < min; i++)
- // {
- // refineMaterials.materials.Add(new Int2(ids[i], values[i]));
- // }
- // }
-
- // return refineMaterials;
- // }
-
- // private static GetWay GetGetWay(int itemId)
- // {
- // var config = ItemConfig.Get(itemId);
- // if (config == null)
- // {
- // return default(GetWay);
- // }
-
- // var getWay = new GetWay();
- // getWay.itemId = itemId;
- // getWay.ways = new List<int>();
- // foreach (var way in config.GetWay)
- // {
- // var wayConfig = GetItemWaysConfig.Get(way);
- // if (wayConfig.FuncOpenId == 0 || FuncOpen.Instance.IsFuncOpen(wayConfig.FuncOpenId))
- // {
- // int activityType = 0; // 娲诲姩妯℃澘 鍙傝�僌penServerActivityCenter.ActivityType
- // if (wayConfig.customize == 2)
- // {
- // activityType = (int)OpenServerActivityCenter.ActivityType.AT_JRZF;
- // }
- // else if (wayConfig.customize == 3)
- // {
- // activityType = (int)OpenServerActivityCenter.ActivityType.AT_HFHD;
- // }
- // if (wayConfig.ActiveType == -1 || OpenServerActivityCenter.Instance.IsActivityOpen(wayConfig.ActiveType, activityType))
- // {
- // getWay.ways.Add(way);
- // }
- // }
- // }
-
- // return getWay;
- // }
-
- // private static List<ItemOperateType> GetOperates(int itemId, int itemCount = 0)
- // {
- // var config = ItemConfig.Get(itemId);
- // var operates = new List<ItemOperateType>();
- // var lsItemID = 150;
- // if (config.CanSell == 1 && itemId != lsItemID)
- // {
- // operates.Add(ItemOperateType.sell);
- // }
-
- // // if (itemCount > 1 && itemId != lsItemID)
- // // {
- // // operates.Add(ItemOperateType.split);
- // // }
-
- // if (config.UseTag == 1)
- // {
- // if (itemId != lsItemID)
- // operates.Add(ItemOperateType.makeUse);
- // else
- // operates.Add(ItemOperateType.lsExchange);
- // }
-
- // if (config.Type == 25 || config.Effect1 == 225)
- // {
- // operates.Add(ItemOperateType.inlay);
- // }
-
- // if (!config.JumpComposeCondi.IsNullOrEmpty())
- // {
- // var jumpId = 0;
- // if (composeModel.CheckComposeItemById(itemId, out jumpId))
- // {
- // operates.Add(ItemOperateType.compose);
- // }
- // }
-
- // return operates;
- // }
-
-
- // private static List<ItemOperateType> GetOperates(string guid)
- // {
- // var item = packModel.GetItemByGuid(guid);
- // if (item == null)
- // {
- // return null;
- // }
-
- // var operates = new List<ItemOperateType>();
-
- // var packType = item.packType;
- // if (WindowCenter.Instance.IsOpen("DepotWin"))
- // {
- // switch (packType)
- // {
- // case PackType.Warehouse:
- // operates.Add(ItemOperateType.putOut);
- // break;
- // default:
- // operates.Add(ItemOperateType.putIn);
- // break;
- // }
-
- // return operates;
- // }
-
- // if (packType == PackType.Equip)
- // {
- // if (WindowCenter.Instance.IsOpen("RealmEquipWin"))
- // {
- // operates.Add(ItemOperateType.putOff);
-
- // if (FuncOpen.Instance.IsFuncOpen(1))
- // {
- // operates.Add(ItemOperateType.strength);
- // }
-
- // if (FuncOpen.Instance.IsFuncOpen(172))
- // {
- // operates.Add(ItemOperateType.star);
- // }
-
- // if (FuncOpen.Instance.IsFuncOpen(2))
- // {
- // operates.Add(ItemOperateType.inlay);
- // }
-
- // if (FuncOpen.Instance.IsFuncOpen(91))
- // {
- // int limitLevel = 0;
- // if (equipModel.EquipLevelFuncID != null)
- // limitLevel = equipModel.EquipLevelFuncID[91];
- // if (item.config.LV >= limitLevel)
- // operates.Add(ItemOperateType.train);
- // }
-
- // if (EquipEvolveModel.Instance.IsShowEvolveBtn(item.itemId))
- // {
- // operates.Add(ItemOperateType.default1);
- // }
- // return operates;
- // }
-
- // if (ItemLogicUtility.Instance.IsRealmEquip(item.itemId) && WindowCenter.Instance.IsOpen("RoleEquipWin"))
- // {
- // operates.Add(ItemOperateType.putOff);
- // return operates;
- // }
-
- // if (ItemLogicUtility.Instance.IsSpiritWeapon(item.itemId) && WindowCenter.Instance.IsOpen("SpiritEquipBagWin"))
- // {
- // operates.Add(ItemOperateType.putOff);
- // return operates;
- // }
- // }
-
- // if (packType == PackType.Warehouse)
- // {
- // operates.Add(ItemOperateType.putOut);
- // return operates;
- // }
-
- // if (item.isAuction)
- // {
- // operates.Add(ItemOperateType.putAway);
- // }
-
- // var isEquip = ItemLogicUtility.Instance.IsRealmEquip(item.itemId);
- // var isSpiritWeapon = ItemLogicUtility.Instance.IsSpiritWeapon(item.itemId);
- // if (isEquip || isSpiritWeapon)
- // {
- // var isOverdue = ItemLogicUtility.Instance.IsOverdue(guid);
- // if (item.config.CanSell == 1)
- // {
- // operates.Add(ItemOperateType.sell);
- // }
-
- // if (item.config.ExpireTime > 0 && isOverdue && itemOverdueModel.CanRenewal(item.itemId))
- // {
- // operates.Add(ItemOperateType.renewal);
- // }
-
- // if (!isOverdue)
- // {
- // if (ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId))
- // {
- // if (isEquip)
- // {
- // operates.Add(ItemOperateType.putOn);
-
- // if (!item.config.JumpComposeCondi.IsNullOrEmpty())
- // {
- // var jumpId = 0;
- // if (composeModel.CheckComposeItemById(item.itemId, out jumpId))
- // {
- // operates.Add(ItemOperateType.compose);
- // }
- // }
- // }
-
- // if (isSpiritWeapon)
- // {
- // if (WindowCenter.Instance.IsOpen<RoleEquipWin>())
- // {
- // operates.Add(ItemOperateType.putOn);
- // }
- // else if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() || WindowCenter.Instance.IsOpen("SpiritEquipBagWin"))
- // {
- // operates.Add(ItemOperateType.putOn);
- // }
- // }
- // }
- // //else
- // //{
- // // if (item.config.ItemColor > 3)
- // // {
- // // operates.Add(ItemOperateType.exchange);
- // // }
- // //}
- // }
-
- // return operates;
- // }
- // if (ItemLogicUtility.Instance.IsDogzEquip(item.itemId))
- // {
- // if (packType == PackType.DogzItem)
- // {
- // if (item.config.ItemColor > 2 && item.config.ItemColor < 6)
- // {
- // operates.Add(ItemOperateType.compose);
- // }
- // operates.Add(ItemOperateType.putOn);
- // }
- // else if (packType == PackType.DogzEquip)
- // {
- // operates.Add(ItemOperateType.putOff);
- // }
- // return operates;
- // }
-
- // operates.AddRange(GetOperates(item.itemId, item.count));
-
- // return operates;
- // }
-
-
-
- private static List<ItemOperateType> GetGoodOperates(int goodId)
- {
- var operates = new List<ItemOperateType>();
- var countLimit = BuyItemController.Instance.GetBuyCountLimit(goodId, PlayerDatas.Instance.baseData.VIPLv);
- if (countLimit == -1 || countLimit > 0)
- {
- var config = StoreConfig.Get(goodId);
- int curVipIndex = -1;
- int nextVipIndex = -1;
- bool isVipBuy = BuyItemController.Instance.CheckIsVipBuy(config, out curVipIndex, out nextVipIndex);
-
- if ((isVipBuy && curVipIndex == -1) || PlayerDatas.Instance.baseData.LV < config.LV)
- {
- return operates;
- }
- operates.Add(ItemOperateType.buy);
- }
-
- return operates;
- }
-
- // private static bool IsEquipGemHoleOpen(Int2 equipPosition, int maxStar, int hole)
- // {
- // GemHoleCondition condition;
- // if (gemModel.TryGetGemHoleCondition(hole, out condition))
- // {
- // var star = starModel.GetStarLevel(equipPosition);
- // if (Mathf.Min(star, maxStar) < condition.equipStar)
- // {
- // return false;
- // }
-
- // var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
- // if (vipLevel < condition.vipLevel)
- // {
- // return false;
- // }
- // }
-
- // return true;
- // }
-
- private static TipType GetTipType(int itemId)
- {
- if (GeneralDefine.chestDisplayItems.Contains(itemId))
- {
- return TipType.PeerlessChest;
- }
-
- // if (ChestsAwardConfig.IsBox(itemId))
+ var starProperties = new List<Int2>();
+ // var currentStar = starModel.GetEquipStarLevel(equipPosition);
+ // var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
+ // var star = Mathf.Min(currentStar, maxStar);
+ // if (star > 0)
// {
- // return TipType.BoxItem;
+ // baseProperty.star = star;
+ // var starConfig = EquipStarConfig.Get(item.config.LV, item.config.EquipPlace, star);
+ // starProperties.AddRange(starConfig.BaseAttrInfo);
// }
- var config = ItemConfig.Get(itemId);
- switch (config.Type)
+ baseProperty.starProperties = starProperties;
+ }
+
+ return baseProperty;
+ }
+
+ // private static BaseProperty GetPetMountBaseProperty(int itemId)
+ // {
+ // var config = ItemConfig.Get(itemId);
+ // var baseProperty = new BaseProperty();
+ // Dictionary<int, int> properties = null;
+ // switch (config.Type)
+ // {
+ // case 26:
+ // var petId = PetInfoConfig.GetItemUnLockPet(itemId);
+ // properties = petModel.GetPetAttrAddDict(petId);
+ // break;
+ // case 41:
+ // case 42:
+ // var horseId = HorseConfig.GetItemUnLockHorse(itemId);
+ // properties = mountModel.GetMountAttrAddDict(horseId);
+ // break;
+ // default:
+ // break;
+ // }
+
+ // if (properties != null)
+ // {
+ // baseProperty.baseProperties = new List<Int2>();
+ // foreach (var property in properties)
+ // {
+ // baseProperty.baseProperties.Add(new Int2(property.Key, property.Value));
+ // }
+ // }
+
+ // return baseProperty;
+ // }
+
+ // //绁炶灞炴��
+ // private static ShenProperty GetShenProperty(int itemId)
+ // {
+ // var data = new ShenProperty();
+ // data.isPreview = true;
+ // data.itemId = itemId;
+
+ // var config = ItemConfig.Get(itemId);
+
+ // data.properties = ShenPropertyUtility.GetEquipShenProperties(itemId);
+
+
+ // return data;
+ // }
+
+
+ // private static LegendProperty GetLegendProperty(int itemId)
+ // {
+ // var data = new LegendProperty();
+ // data.isPreview = true;
+ // data.itemId = itemId;
+
+ // var config = ItemConfig.Get(itemId);
+ // if (config.Effect1 == 220)
+ // {
+ // data.isPreview = false;
+ // var appConfig = AppointItemConfig.Get(itemId);
+ // data.trueCount = 0;
+
+ // data.properties = new List<Int2>();
+ // for (var i = 0; i < appConfig.LegendAttrID.Length; i++)
+ // {
+ // data.properties.Add(new Int2(appConfig.LegendAttrID[i], appConfig.LegendAttrValue[i]));
+ // }
+ // }
+ // else
+ // {
+ // data.properties = LegendPropertyUtility.GetLegendProFromEquipShen(itemId);
+ // if (data.properties != null)
+ // {
+ // data.trueCount = 0;
+ // data.isPreview = false;
+ // }
+ // else
+ // {
+ // data.trueCount = LegendPropertyUtility.GetEquipPropertyCount(itemId);
+ // data.properties = LegendPropertyUtility.GetEquipProperties(itemId);
+ // }
+ // }
+
+ // return data;
+ // }
+
+ // private static SpiritWeaponProperty GetSpiritWeaponProperty(int itemId)
+ // {
+ // var config = SpiritWeaponConfig.Get(itemId);
+ // if (config == null)
+ // {
+ // return default(SpiritWeaponProperty);
+ // }
+
+ // var properties = new List<Int3>();
+ // for (var i = 0; i < config.AttrIDList.Length; i++)
+ // {
+ // properties.Add(new Int3(config.AttrIDList[i], config.AttrValueList[i], config.AttrColorList[i]));
+ // }
+
+ // var spiritWeaponProperty = new SpiritWeaponProperty();
+ // spiritWeaponProperty.itemId = itemId;
+ // spiritWeaponProperty.properties = properties;
+ // return spiritWeaponProperty;
+ // }
+
+ // private static LegendProperty GetLegendProperty(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(LegendProperty);
+ // }
+
+ // var data = new LegendProperty();
+ // data.isPreview = false;
+ // data.itemId = item.itemId;
+
+ // var ids = item.GetUseData((int)ItemUseDataKey.legendAttrID);
+ // var values = item.GetUseData((int)ItemUseDataKey.legendAttrValue);
+ // if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
+ // {
+ // var properties = new List<Int2>();
+ // var count = Mathf.Min(ids.Count, values.Count);
+ // for (int i = 0; i < count; i++)
+ // {
+ // properties.Add(new Int2(ids[i], values[i]));
+ // }
+
+ // data.properties = properties;
+ // }
+
+ // return data;
+ // }
+
+ public static LegendProperty GetLegendProperty(int itemId, Dictionary<int, List<int>> userData)
+ {
+ var data = new LegendProperty();
+ data.isPreview = false;
+ data.itemId = itemId;
+
+ List<int> ids = null;
+ List<int> values = null;
+ if (userData != null)
+ {
+ userData.TryGetValue((int)ItemUseDataKey.legendAttrID, out ids);
+ userData.TryGetValue((int)ItemUseDataKey.legendAttrValue, out values);
+ }
+ if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
+ {
+ var properties = new List<Int2>();
+ var count = Mathf.Min(ids.Count, values.Count);
+ for (int i = 0; i < count; i++)
{
- case 101:
- case 102:
- case 103:
- case 104:
- case 105:
- case 106:
- case 107:
- case 108:
- case 109:
- case 110:
- case 111:
- case 112:
- return TipType.Equip;
- case 26:
- case 41:
- case 42:
- return TipType.PetMount;
- case 147:
- return TipType.TreasurePavilion;
- default:
- return TipType.Item;
+ properties.Add(new Int2(ids[i], values[i]));
}
+ data.properties = properties;
}
- [System.Diagnostics.Conditional("UNITY_EDITOR")]
- private static void PrintItemBrief(int itemId)
+ return data;
+ }
+
+ // public static SuitInfo GetSuitInfo(int itemId)
+ // {
+ // var config = ItemConfig.Get(itemId);
+ // if (config == null || config.SuiteiD <= 0)
+ // {
+ // return default(SuitInfo);
+ // }
+
+ // var job = config.JobLimit;
+ // var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit);
+
+ // var name = twoConfigs[0].name;
+ // var level = config.LV;
+ // var places = new List<int>();
+ // places.Add(config.EquipPlace);
+ // //var suitInfo = new SuitInfo()
+ // //{
+ // // name = name,
+ // // level = level,
+ // // job = job,
+ // // places = places,
+ // //};
+ // var maxSuitLevel = EquipStarModel.GetMaxStarLevel(level);
+
+ // var placeStars = new Dictionary<int, int>();
+ // for (int i = 1; i <= 8; i++)
+ // {
+ // var equip = packModel.GetItemByGuid(equipModel.GetEquip(new Int2(level, i)));
+ // var hasSuit = equip != null && equip.config.SuiteiD > 0;
+ // if (hasSuit)
+ // {
+ // placeStars[i] = starModel.GetEquipStarLevel(new Int2(level, i));
+ // }
+ // }
+
+ // var twoSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
+ // var fiveSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
+ // var eightSuits = new Dictionary<int, bool>();
+ // var eightSuitLevel = equipModel.GetSuitLevel(config.LV, EquipSuitType.EightSuit);
+
+ // var twoSuitProperties0 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.TwoSuit);
+ // var fiveSuitProperties0 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.FiveSuit);
+
+
+ // twoSuitProperties[0] = twoSuitProperties0;
+ // fiveSuitProperties[0] = fiveSuitProperties0;
+ // eightSuits[0] = eightSuitLevel >= 0;
+
+ // if (maxSuitLevel >= 3)
+ // {
+ // twoSuitProperties[3] = equipModel.GetEquipSuitEntry(config.LV, 3, EquipSuitType.TwoSuit);
+ // fiveSuitProperties[3] = equipModel.GetEquipSuitEntry(config.LV, 3, EquipSuitType.FiveSuit);
+ // eightSuits[3] = eightSuitLevel >= 3;
+ // }
+
+ // if (maxSuitLevel >= 6)
+ // {
+ // twoSuitProperties[6] = equipModel.GetEquipSuitEntry(config.LV, 6, EquipSuitType.TwoSuit);
+ // fiveSuitProperties[6] = equipModel.GetEquipSuitEntry(config.LV, 6, EquipSuitType.FiveSuit);
+ // eightSuits[6] = eightSuitLevel >= 3;
+ // }
+
+ // if (maxSuitLevel >= 9)
+ // {
+ // twoSuitProperties[9] = equipModel.GetEquipSuitEntry(config.LV, 9, EquipSuitType.TwoSuit);
+ // fiveSuitProperties[9] = equipModel.GetEquipSuitEntry(config.LV, 9, EquipSuitType.FiveSuit);
+ // eightSuits[9] = eightSuitLevel >= 9;
+ // }
+
+ // var suitInfo = new SuitInfo()
+ // {
+ // name = name,
+ // level = level,
+ // job = job,
+ // maxSuitLevel = maxSuitLevel,
+ // places = places,
+ // placeStars = placeStars,
+ // twoSuitProperties = twoSuitProperties,
+ // fiveSuitProperties = fiveSuitProperties,
+ // eightSuits = eightSuits
+ // };
+ // return suitInfo;
+ // }
+
+ // private static SuitInfo GetSuitInfo(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(SuitInfo);
+ // }
+
+ // var config = ItemConfig.Get(item.itemId);
+ // if (config == null || config.SuiteiD <= 0)
+ // {
+ // return default(SuitInfo);
+ // }
+
+ // var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
+ // var equiped = equipModel.GetEquip(equipPosition) == guid;
+
+ // var job = config.JobLimit;
+ // var twoConfigs = EquipSuitConfig.GetConfigs(job, config.LV, EquipSuitType.TwoSuit);
+ // var name = twoConfigs[0].name;
+
+ // var level = config.LV;
+ // var maxSuitLevel = equiped ? EquipStarModel.GetMaxStarLevel(level) : -1;
+
+ // var places = new List<int>();
+ // var placeStars = new Dictionary<int, int>();
+ // if (equiped)
+ // {
+ // for (int i = 1; i <= 8; i++)
+ // {
+ // var equip = packModel.GetItemByGuid(equipModel.GetEquip(new Int2(level, i)));
+ // var hasSuit = equip != null && equip.config.SuiteiD > 0;
+ // if (hasSuit)
+ // {
+ // places.Add(i);
+ // placeStars[i] = starModel.GetEquipStarLevel(new Int2(level, i));
+ // }
+ // }
+ // }
+
+ // var twoSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
+ // var fiveSuitProperties = new Dictionary<int, EquipSuitPropertyEntry>();
+ // var eightSuits = new Dictionary<int, bool>();
+ // var eightSuitLevel = equiped ? equipModel.GetSuitLevel(config.LV, EquipSuitType.EightSuit) : -1;
+
+ // if (!equiped)
+ // {
+ // var suit2 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.TwoSuit);
+ // suit2.actived = false;
+ // var suit5 = equipModel.GetEquipSuitEntry(config.LV, 0, EquipSuitType.FiveSuit);
+ // suit5.actived = false;
+ // twoSuitProperties[0] = suit2;
+ // fiveSuitProperties[0] = suit5;
+ // eightSuits[0] = eightSuitLevel >= 0;
+ // }
+ // else
+ // {
+ // foreach (var star in EquipStarModel.StarList)
+ // {
+ // if (maxSuitLevel >= star)
+ // {
+ // twoSuitProperties[star] = equipModel.GetEquipSuitEntry(config.LV, star, EquipSuitType.TwoSuit);
+ // fiveSuitProperties[star] = equipModel.GetEquipSuitEntry(config.LV, star, EquipSuitType.FiveSuit);
+ // eightSuits[star] = eightSuitLevel >= star;
+ // }
+ // }
+ // }
+
+
+
+
+ // var suitInfo = new SuitInfo()
+ // {
+ // name = name,
+ // level = level,
+ // job = job,
+ // maxSuitLevel = maxSuitLevel,
+ // places = places,
+ // placeStars = placeStars,
+ // twoSuitProperties = twoSuitProperties,
+ // fiveSuitProperties = fiveSuitProperties,
+ // eightSuits = eightSuits
+ // };
+
+ // return suitInfo;
+ // }
+
+ // private static StarInfo GetStarInfo(int itemId)
+ // {
+ // var config = ItemConfig.Get(itemId);
+ // if (!EquipModel.IsRealmEquip(config.EquipPlace))
+ // {
+ // return default(StarInfo);
+ // }
+
+ // var starInfo = new StarInfo();
+ // starInfo.equipPosition = new Int2(config.LV, config.EquipPlace);
+ // starInfo.maxLevel = EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV);
+ // starInfo.starLevel = 0;
+
+ // return starInfo;
+ // }
+
+ // private static StarInfo GetStarInfo(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(StarInfo);
+ // }
+
+ // if (!EquipModel.IsRealmEquip(item.config.EquipPlace))
+ // {
+ // return default(StarInfo);
+ // }
+
+ // var starInfo = new StarInfo();
+ // var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
+ // var equiped = equipModel.GetEquip(equipPosition) == guid;
+ // starInfo.equipPosition = equipPosition;
+ // starInfo.maxLevel = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
+ // starInfo.starLevel = equiped ? starModel.GetStarLevel(equipPosition) : 0;
+
+ // return starInfo;
+ // }
+
+ // private static StrengthenProperty GetStrengthenProperty(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(StrengthenProperty);
+ // }
+
+ // var level = item.config.LV;
+ // var place = item.config.EquipPlace;
+ // var equiped = equipModel.GetEquip(new Int2(level, place)) == guid;
+ // if (!equiped)
+ // {
+ // return default(StrengthenProperty);
+ // }
+
+ // var data = new StrengthenProperty();
+
+ // var strengthenLevel = strengthenModel.GetStrengthLevel(level, place);
+
+ // var type = EquipStrengthModel.GetEquipStrengthType(place);
+ // var maxStrengthenLevel = strengthenModel.GetEquipLevelMax(type, level);
+
+ // data.strengthenLevel = Mathf.Min(strengthenLevel, maxStrengthenLevel);
+ // data.evolveLevel = strengthenModel.GetStrengthEvolveLevel(level, place);
+ // data.equipPlace = place;
+
+ // data.properties = new List<Int2>();
+ // var config = ItemPlusConfig.GetTypeAndLevel(type, data.strengthenLevel);
+ // for (int i = 0; i < config.attType.Length; i++)
+ // {
+ // data.properties.Add(new Int2(config.attType[i], config.attValue[i]));
+ // }
+
+ // return data;
+ // }
+
+ // private static GemInfo GetGemInfo(int itemId)
+ // {
+ // var config = ItemConfig.Get(itemId);
+ // var level = config.LV;
+ // var place = config.EquipPlace;
+
+ // var gemInfo = new GemInfo();
+ // var maxStar = EquipStarModel.GetMaxStarLevel(config.ItemColor, config.LV);
+ // gemInfo.activeStates = new Dictionary<int, bool>();
+ // for (int i = 0; i < 4; i++)
+ // {
+ // gemInfo.activeStates[i] = IsEquipGemHoleOpen(new Int2(level, place), maxStar, i);
+ // }
+
+ // return gemInfo;
+ // }
+
+ // private static GemInfo GetGemInfo(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(GemInfo);
+ // }
+
+ // var level = item.config.LV;
+ // var place = item.config.EquipPlace;
+
+ // var gemInfo = new GemInfo();
+ // var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV);
+ // gemInfo.activeStates = new Dictionary<int, bool>();
+ // for (int i = 0; i < 4; i++)
+ // {
+ // gemInfo.activeStates[i] = IsEquipGemHoleOpen(new Int2(level, place), maxStar, i);
+ // }
+
+ // gemInfo.gems = new Dictionary<int, int>();
+ // if (item.packType == PackType.Equip)
+ // {
+ // int[] gems;
+ // if (gemModel.TryGetEquipGems(item.config.LV, item.config.EquipPlace, out gems))
+ // {
+ // for (int i = 0; i < gems.Length; i++)
+ // {
+ // gemInfo.gems[i] = gems[i];
+ // }
+ // }
+ // }
+
+ // return gemInfo;
+ // }
+
+ // private static TrainProperty GetTrainProperty(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(TrainProperty);
+ // }
+
+ // var equipPosition = new Int2(item.config.LV, item.config.EquipPlace);
+ // var equiped = equipModel.GetEquip(equipPosition) == guid;
+ // if (!equiped)
+ // {
+ // return default(TrainProperty);
+ // }
+
+ // var trainProperty = new TrainProperty();
+ // var star = Mathf.Min(EquipStarModel.GetMaxStarLevel(item.config.ItemColor, item.config.LV), starModel.GetEquipStarLevel(equipPosition));
+ // var type = EquipTrainModel.GetTrainType(equipPosition.y);
+ // var maxConfig = WashLevelMaxConfig.Get(type, star);
+ // var maxLevel = maxConfig == null ? 1 : maxConfig.levelMax;
+ // var trainLevel = Mathf.Min(maxLevel, trainModel.GetTrainLevel(equipPosition));
+ // trainProperty.level = trainLevel;
+
+ // var trainConfig = EquipWashConfig.Get(type, trainLevel);
+ // trainProperty.properties = new List<Int2>();
+
+ // if (trainConfig == null)
+ // {
+ // var trainConfigLevel1 = EquipWashConfig.Get(type, 1);
+ // trainProperty.properties.Add(new Int2(trainConfigLevel1.config.attType1, 0));
+ // trainProperty.properties.Add(new Int2(trainConfigLevel1.config.attType2, 0));
+ // //trainProperty.properties.Add(new Int2(trainConfigLevel1.config.attType3, 0));
+ // }
+ // else
+ // {
+ // var trainedProperties = trainModel.GetTrainedProperties(equipPosition);
+ // trainProperty.properties.Add(new Int2(trainConfig.config.attType1, Mathf.Min(trainedProperties.x, trainConfig.config.attMax1)));
+ // trainProperty.properties.Add(new Int2(trainConfig.config.attType2, Mathf.Min(trainedProperties.y, trainConfig.config.attMax2)));
+ // //trainProperty.properties.Add(new Int2(trainConfig.config.attType3, Mathf.Min(trainedProperties.z, trainConfig.config.attMax3)));
+ // }
+
+ // return trainProperty;
+ // }
+
+ private static SkillInfo GetSkillInfo(int itemId)
+ {
+ var config = ItemConfig.Get(itemId);
+ if (config == null)
{
- var config = ItemConfig.Get(itemId);
- Debug.LogFormat("浣犳煡鐪嬬殑鐗╁搧鏄細itemId->{0} ;name->{1}", itemId, config.ItemName);
+ return default(SkillInfo);
}
- [System.Diagnostics.Conditional("UNITY_EDITOR")]
- private static void PrintItemBrief(int itemId, string guid)
+ var skillInfo = new SkillInfo();
+ skillInfo.skills = new List<int>();
+
+ if (config.AddSkill1 != 0)
{
- var config = ItemConfig.Get(itemId);
- Debug.LogFormat("浣犳煡鐪嬬殑鐗╁搧鏄細itemId->{0};name->{1};guid->{2};", itemId, config.ItemName, string.IsNullOrEmpty(guid) ? "" : guid);
+ skillInfo.skills.Add(config.AddSkill1);
+ }
+
+ if (config.AddSkill2 != 0)
+ {
+ skillInfo.skills.Add(config.AddSkill2);
+ }
+
+ return skillInfo;
+ }
+
+
+ private static SkillInfo GetSkillInfo(int itemId, CustomEquipInfo info)
+ {
+ var skillInfo = new SkillInfo();
+ skillInfo.skills = new List<int>();
+ if (!info.equipSkillList.IsNullOrEmpty())
+ {
+ skillInfo.skills = info.equipSkillList;
+ }
+ else
+ {
+ return GetSkillInfo(itemId);
+ }
+ return skillInfo;
+ }
+
+ // private static SkillInfo GetSkillInfo(int itemId, string guid)
+ // {
+
+ // var skillInfo = new SkillInfo();
+ // skillInfo.skills = new List<int>();
+
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return GetSkillInfo(itemId);
+ // }
+
+ // var values = item.GetUseData((int)ItemUseDataKey.equipSkills);
+ // if (!values.IsNullOrEmpty())
+ // {
+ // skillInfo.skills = values;
+ // }
+ // else
+ // {
+ // return GetSkillInfo(itemId);
+ // }
+
+ // return skillInfo;
+ // }
+
+ // private static WingRefineMaterials GetWingRefineMaterials(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return default(WingRefineMaterials);
+ // }
+
+ // if (item.config.Type != 113)
+ // {
+ // return default(WingRefineMaterials);
+ // }
+
+ // var refineMaterials = new WingRefineMaterials();
+ // refineMaterials.materials = new List<Int2>();
+
+ // var ids = item.GetUseData((int)ItemUseDataKey.wingMaterialItemID);
+ // var values = item.GetUseData((int)ItemUseDataKey.wingMaterialItemCount);
+ // if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
+ // {
+ // var min = Mathf.Min(ids.Count, values.Count);
+ // for (int i = 0; i < min; i++)
+ // {
+ // refineMaterials.materials.Add(new Int2(ids[i], values[i]));
+ // }
+ // }
+
+ // return refineMaterials;
+ // }
+
+ // private static GetWay GetGetWay(int itemId)
+ // {
+ // var config = ItemConfig.Get(itemId);
+ // if (config == null)
+ // {
+ // return default(GetWay);
+ // }
+
+ // var getWay = new GetWay();
+ // getWay.itemId = itemId;
+ // getWay.ways = new List<int>();
+ // foreach (var way in config.GetWay)
+ // {
+ // var wayConfig = GetItemWaysConfig.Get(way);
+ // if (wayConfig.FuncOpenId == 0 || FuncOpen.Instance.IsFuncOpen(wayConfig.FuncOpenId))
+ // {
+ // int activityType = 0; // 娲诲姩妯℃澘 鍙傝�僌penServerActivityCenter.ActivityType
+ // if (wayConfig.customize == 2)
+ // {
+ // activityType = (int)OpenServerActivityCenter.ActivityType.AT_JRZF;
+ // }
+ // else if (wayConfig.customize == 3)
+ // {
+ // activityType = (int)OpenServerActivityCenter.ActivityType.AT_HFHD;
+ // }
+ // if (wayConfig.ActiveType == -1 || OpenServerActivityCenter.Instance.IsActivityOpen(wayConfig.ActiveType, activityType))
+ // {
+ // getWay.ways.Add(way);
+ // }
+ // }
+ // }
+
+ // return getWay;
+ // }
+
+ // private static List<ItemOperateType> GetOperates(int itemId, int itemCount = 0)
+ // {
+ // var config = ItemConfig.Get(itemId);
+ // var operates = new List<ItemOperateType>();
+ // var lsItemID = 150;
+ // if (config.CanSell == 1 && itemId != lsItemID)
+ // {
+ // operates.Add(ItemOperateType.sell);
+ // }
+
+ // // if (itemCount > 1 && itemId != lsItemID)
+ // // {
+ // // operates.Add(ItemOperateType.split);
+ // // }
+
+ // if (config.UseTag == 1)
+ // {
+ // if (itemId != lsItemID)
+ // operates.Add(ItemOperateType.makeUse);
+ // else
+ // operates.Add(ItemOperateType.lsExchange);
+ // }
+
+ // if (config.Type == 25 || config.Effect1 == 225)
+ // {
+ // operates.Add(ItemOperateType.inlay);
+ // }
+
+ // if (!config.JumpComposeCondi.IsNullOrEmpty())
+ // {
+ // var jumpId = 0;
+ // if (composeModel.CheckComposeItemById(itemId, out jumpId))
+ // {
+ // operates.Add(ItemOperateType.compose);
+ // }
+ // }
+
+ // return operates;
+ // }
+
+
+ // private static List<ItemOperateType> GetOperates(string guid)
+ // {
+ // var item = packModel.GetItemByGuid(guid);
+ // if (item == null)
+ // {
+ // return null;
+ // }
+
+ // var operates = new List<ItemOperateType>();
+
+ // var packType = item.packType;
+ // if (WindowCenter.Instance.IsOpen("DepotWin"))
+ // {
+ // switch (packType)
+ // {
+ // case PackType.Warehouse:
+ // operates.Add(ItemOperateType.putOut);
+ // break;
+ // default:
+ // operates.Add(ItemOperateType.putIn);
+ // break;
+ // }
+
+ // return operates;
+ // }
+
+ // if (packType == PackType.Equip)
+ // {
+ // if (WindowCenter.Instance.IsOpen("RealmEquipWin"))
+ // {
+ // operates.Add(ItemOperateType.putOff);
+
+ // if (FuncOpen.Instance.IsFuncOpen(1))
+ // {
+ // operates.Add(ItemOperateType.strength);
+ // }
+
+ // if (FuncOpen.Instance.IsFuncOpen(172))
+ // {
+ // operates.Add(ItemOperateType.star);
+ // }
+
+ // if (FuncOpen.Instance.IsFuncOpen(2))
+ // {
+ // operates.Add(ItemOperateType.inlay);
+ // }
+
+ // if (FuncOpen.Instance.IsFuncOpen(91))
+ // {
+ // int limitLevel = 0;
+ // if (equipModel.EquipLevelFuncID != null)
+ // limitLevel = equipModel.EquipLevelFuncID[91];
+ // if (item.config.LV >= limitLevel)
+ // operates.Add(ItemOperateType.train);
+ // }
+
+ // if (EquipEvolveModel.Instance.IsShowEvolveBtn(item.itemId))
+ // {
+ // operates.Add(ItemOperateType.default1);
+ // }
+ // return operates;
+ // }
+
+ // if (ItemLogicUtility.Instance.IsRealmEquip(item.itemId) && WindowCenter.Instance.IsOpen("RoleEquipWin"))
+ // {
+ // operates.Add(ItemOperateType.putOff);
+ // return operates;
+ // }
+
+ // if (ItemLogicUtility.Instance.IsSpiritWeapon(item.itemId) && WindowCenter.Instance.IsOpen("SpiritEquipBagWin"))
+ // {
+ // operates.Add(ItemOperateType.putOff);
+ // return operates;
+ // }
+ // }
+
+ // if (packType == PackType.Warehouse)
+ // {
+ // operates.Add(ItemOperateType.putOut);
+ // return operates;
+ // }
+
+ // if (item.isAuction)
+ // {
+ // operates.Add(ItemOperateType.putAway);
+ // }
+
+ // var isEquip = ItemLogicUtility.Instance.IsRealmEquip(item.itemId);
+ // var isSpiritWeapon = ItemLogicUtility.Instance.IsSpiritWeapon(item.itemId);
+ // if (isEquip || isSpiritWeapon)
+ // {
+ // var isOverdue = ItemLogicUtility.Instance.IsOverdue(guid);
+ // if (item.config.CanSell == 1)
+ // {
+ // operates.Add(ItemOperateType.sell);
+ // }
+
+ // if (item.config.ExpireTime > 0 && isOverdue && itemOverdueModel.CanRenewal(item.itemId))
+ // {
+ // operates.Add(ItemOperateType.renewal);
+ // }
+
+ // if (!isOverdue)
+ // {
+ // if (ItemLogicUtility.Instance.IsJobCompatibleItem(item.itemId))
+ // {
+ // if (isEquip)
+ // {
+ // operates.Add(ItemOperateType.putOn);
+
+ // if (!item.config.JumpComposeCondi.IsNullOrEmpty())
+ // {
+ // var jumpId = 0;
+ // if (composeModel.CheckComposeItemById(item.itemId, out jumpId))
+ // {
+ // operates.Add(ItemOperateType.compose);
+ // }
+ // }
+ // }
+
+ // if (isSpiritWeapon)
+ // {
+ // if (WindowCenter.Instance.IsOpen<RoleEquipWin>())
+ // {
+ // operates.Add(ItemOperateType.putOn);
+ // }
+ // else if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() || WindowCenter.Instance.IsOpen("SpiritEquipBagWin"))
+ // {
+ // operates.Add(ItemOperateType.putOn);
+ // }
+ // }
+ // }
+ // //else
+ // //{
+ // // if (item.config.ItemColor > 3)
+ // // {
+ // // operates.Add(ItemOperateType.exchange);
+ // // }
+ // //}
+ // }
+
+ // return operates;
+ // }
+ // if (ItemLogicUtility.Instance.IsDogzEquip(item.itemId))
+ // {
+ // if (packType == PackType.DogzItem)
+ // {
+ // if (item.config.ItemColor > 2 && item.config.ItemColor < 6)
+ // {
+ // operates.Add(ItemOperateType.compose);
+ // }
+ // operates.Add(ItemOperateType.putOn);
+ // }
+ // else if (packType == PackType.DogzEquip)
+ // {
+ // operates.Add(ItemOperateType.putOff);
+ // }
+ // return operates;
+ // }
+
+ // operates.AddRange(GetOperates(item.itemId, item.count));
+
+ // return operates;
+ // }
+
+
+
+ private static List<ItemOperateType> GetGoodOperates(int goodId)
+ {
+ var operates = new List<ItemOperateType>();
+ var countLimit = BuyItemController.Instance.GetBuyCountLimit(goodId, PlayerDatas.Instance.baseData.VIPLv);
+ if (countLimit == -1 || countLimit > 0)
+ {
+ var config = StoreConfig.Get(goodId);
+ int curVipIndex = -1;
+ int nextVipIndex = -1;
+ bool isVipBuy = BuyItemController.Instance.CheckIsVipBuy(config, out curVipIndex, out nextVipIndex);
+
+ if ((isVipBuy && curVipIndex == -1) || PlayerDatas.Instance.baseData.LV < config.LV)
+ {
+ return operates;
+ }
+ operates.Add(ItemOperateType.buy);
+ }
+
+ return operates;
+ }
+
+ // private static bool IsEquipGemHoleOpen(Int2 equipPosition, int maxStar, int hole)
+ // {
+ // GemHoleCondition condition;
+ // if (gemModel.TryGetGemHoleCondition(hole, out condition))
+ // {
+ // var star = starModel.GetStarLevel(equipPosition);
+ // if (Mathf.Min(star, maxStar) < condition.equipStar)
+ // {
+ // return false;
+ // }
+
+ // var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
+ // if (vipLevel < condition.vipLevel)
+ // {
+ // return false;
+ // }
+ // }
+
+ // return true;
+ // }
+
+ private static TipType GetTipType(int itemId)
+ {
+ if (GeneralDefine.chestDisplayItems.Contains(itemId))
+ {
+ return TipType.PeerlessChest;
+ }
+
+ // if (ChestsAwardConfig.IsBox(itemId))
+ // {
+ // return TipType.BoxItem;
+ // }
+
+ var config = ItemConfig.Get(itemId);
+ switch (config.Type)
+ {
+ case 101:
+ case 102:
+ case 103:
+ case 104:
+ case 105:
+ case 106:
+ case 107:
+ case 108:
+ case 109:
+ case 110:
+ case 111:
+ case 112:
+ return TipType.Equip;
+ case 26:
+ case 41:
+ case 42:
+ return TipType.PetMount;
+ case 147:
+ return TipType.TreasurePavilion;
+ default:
+ return TipType.Item;
}
}
+ [System.Diagnostics.Conditional("UNITY_EDITOR")]
+ private static void PrintItemBrief(int itemId)
+ {
+ var config = ItemConfig.Get(itemId);
+ Debug.LogFormat("鏌ョ湅鐗╁搧锛歩temId->{0} ;name->{1}", itemId, config.ItemName);
+ }
+
+ [System.Diagnostics.Conditional("UNITY_EDITOR")]
+ private static void PrintItemBrief(int itemId, ItemModel item)
+ {
+ var config = ItemConfig.Get(itemId);
+ Debug.LogFormat("鏌ョ湅鐗╁搧锛歩temId->{0};name->{1};鏈嶅姟绔储寮�->{3};guid->{2}",
+ itemId, config.ItemName, item.guid, item.gridIndex);
+ }
+
+}
+
--
Gitblit v1.8.0