| | |
| | | public int auctionSurplusTime; |
| | | public int overdueSurplusTime; |
| | | public int levelLimit; |
| | | public int realmLimit; |
| | | public int moneyLimit; |
| | | public int evolveLevel; |
| | | } |
| | |
| | | // } |
| | | } |
| | | |
| | | // public static void Show(string guid, bool operatable = true) |
| | | // { |
| | | // var item = packModel.GetItemByGuid(guid); |
| | | // if (item == null) |
| | | // { |
| | | // return; |
| | | // } |
| | | // PrintItemBrief(item.itemId, guid); |
| | | 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: |
| | | 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: |
| | | break; |
| | | default: |
| | | // if (item.isAuction) |
| | | // { |
| | | // mainTipData = CreateEquipAuctionData(guid, operatable); |
| | |
| | | // secondaryData = CreateNormalEquipData(equipedGuid, false); |
| | | // } |
| | | // } |
| | | // break; |
| | | // } |
| | | // break; |
| | | // case TipType.Dogz: |
| | | // mainTipData = CreateDogzEquipData(guid); |
| | | // break; |
| | | // default: |
| | | // mainTipData = CreateItemData(guid, operatable); |
| | | // break; |
| | | // } |
| | | break; |
| | | } |
| | | break; |
| | | |
| | | // switch (tipType) |
| | | // { |
| | | 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>()) |
| | |
| | | // TreasurePavilionModel.Instance.showTipFromPiece = item.itemId; |
| | | // WindowCenter.Instance.OpenIL<TreasurePavilionTipWin>(); |
| | | // break; |
| | | // default: |
| | | // WindowCenter.Instance.Open<ItemTipWin>(); |
| | | // break; |
| | | // } |
| | | default: |
| | | UIManager.Instance.OpenWindow<ItemTipWin>(); |
| | | break; |
| | | } |
| | | |
| | | // } |
| | | } |
| | | |
| | | public static void ShowGood(int goodId, int itemId) |
| | | { |
| | |
| | | // }; |
| | | // } |
| | | |
| | | // static TipData CreateItemData(string guid, bool operatable) |
| | | // { |
| | | // var item = packModel.GetItemByGuid(guid); |
| | | // if (item == null) |
| | | // { |
| | | // return default(TipData); |
| | | // } |
| | | 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, |
| | | return new TipData() |
| | | { |
| | | itemId = item.itemId, |
| | | guid = guid, |
| | | |
| | | // baseInfo = GetBaseInfo(guid), |
| | | // baseProperty = GetBaseProperty(item.itemId), |
| | | 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) |
| | | // { |
| | |
| | | //score = ItemLogicUtility.Instance.GetEquipScore(itemId, null, true), |
| | | auctionSurplusTime = 0, |
| | | levelLimit = config.UseLV, |
| | | realmLimit = config.RealmLimit, |
| | | moneyLimit = money, |
| | | }; |
| | | |
| | | return baseInfo; |
| | | } |
| | | |
| | | // private static BaseInfo GetBaseInfo(string guid) |
| | | // { |
| | | // var item = packModel.GetItemByGuid(guid); |
| | | private static BaseInfo GetBaseInfo(string guid) |
| | | { |
| | | var item = PackManager.Instance.GetItemByGuid(guid); |
| | | |
| | | // var level = item.config.LV; |
| | | // var place = item.config.EquipPlace; |
| | | var level = item.config.LV; |
| | | var place = item.config.EquipPlace; |
| | | |
| | | // var isEquiped = equipModel.GetEquip(new Int2(level, place)) == guid; |
| | | var isEquiped = false;// 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 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; |
| | | 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, |
| | | // }; |
| | | 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, |
| | | star = isEquiped ? star : -1, |
| | | strengthenLevel = isEquiped ? Mathf.Min(placeStrengthenLevel, maxStrengthenLevel) : 0, |
| | | moneyLimit = money, |
| | | }; |
| | | |
| | | // return baseInfo; |
| | | // } |
| | | return baseInfo; |
| | | } |
| | | |
| | | private static BaseProperty GetBaseProperty(int itemId) |
| | | { |
| | |
| | | private static void PrintItemBrief(int itemId) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | Debug.LogFormat("你查看的物品是:itemId->{0} ;name->{1}", itemId, config.ItemName); |
| | | Debug.LogFormat("查看物品:itemId->{0} ;name->{1}", itemId, config.ItemName); |
| | | } |
| | | |
| | | [System.Diagnostics.Conditional("UNITY_EDITOR")] |
| | | private static void PrintItemBrief(int itemId, string guid) |
| | | private static void PrintItemBrief(int itemId, ItemModel item) |
| | | { |
| | | var config = ItemConfig.Get(itemId); |
| | | Debug.LogFormat("你查看的物品是:itemId->{0};name->{1};guid->{2};", itemId, config.ItemName, string.IsNullOrEmpty(guid) ? "" : guid); |
| | | Debug.LogFormat("查看物品:itemId->{0};name->{1};服务端索引->{3};guid->{2}", |
| | | itemId, config.ItemName, item.guid, item.gridIndex); |
| | | } |
| | | |
| | | } |