| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemByGuid", _m_GetItemByGuid); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemByIndex", _m_GetItemByIndex); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemsById", _m_GetItemsById); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemsByType", _m_GetItemsByType); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItems", _m_GetItems); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemGUIDByID", _m_GetItemGUIDByID); |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetItemCountByID", _m_GetItemCountByID); |
| | |
| | | int _id = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | System.Collections.Generic.List<Snxxz.UI.ItemModel> gen_ret = gen_to_be_invoked.GetItemsById( _type, _id ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _m_GetItemsByType(RealStatePtr L) |
| | | { |
| | | try { |
| | | |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | |
| | | Snxxz.UI.PackModel gen_to_be_invoked = (Snxxz.UI.PackModel)translator.FastGetCSObj(L, 1); |
| | | |
| | | |
| | | |
| | | { |
| | | PackType _packType;translator.Get(L, 2, out _packType); |
| | | int _itemType = LuaAPI.xlua_tointeger(L, 3); |
| | | |
| | | System.Collections.Generic.List<Snxxz.UI.ItemModel> gen_ret = gen_to_be_invoked.GetItemsByType( _packType, _itemType ); |
| | | translator.Push(L, gen_ret); |
| | | |
| | | |
| | |
| | | description = description,
|
| | | itemType = itemType,
|
| | | shopId = shopDict.ContainsKey(i) ? shopDict[i] : 0,
|
| | | composeCount = composeCount
|
| | | composeCount = composeCount,
|
| | | filterParams = new SinglePack.FilterParams()
|
| | | {
|
| | | itemTypes = new List<int>() { itemType },
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | return m_EquipGemRedpoints.TryGetValue(packIndex, out redpoint);
|
| | | }
|
| | |
|
| | | public bool TryGetRedpoint(int level,out Redpoint redpoint)
|
| | | public bool TryGetRedpoint(int level, out Redpoint redpoint)
|
| | | {
|
| | | return m_EquipSetRedpoints.TryGetValue(level, out redpoint);
|
| | | }
|
| | |
|
| | | public bool IsEquipGemHoleOpen(int level, int place, int hole)
|
| | | {
|
| | | var equipPosition = new Int2( level ,place);
|
| | | var equipPosition = new Int2(level, place);
|
| | | var equipGuid = equipModel.GetEquip(equipPosition);
|
| | | if (string.IsNullOrEmpty(equipGuid))
|
| | | {
|
| | |
| | | foreach (var type in types)
|
| | | {
|
| | | var gemType = m_GemTypes[type];
|
| | | var itemModels = packModel.GetItemsByType(PackType.Item, gemType.itemType);
|
| | | var itemModels = packModel.GetItems(PackType.Item, gemType.filterParams);
|
| | | if (itemModels != null)
|
| | | {
|
| | | foreach (var itemModel in itemModels)
|
| | |
| | | GemType gemType;
|
| | | TryGetGemType(type, out gemType);
|
| | | var count = 0;
|
| | | var items = packModel.GetItemsByType(PackType.Item, gemType.itemType);
|
| | | var items = packModel.GetItems(PackType.Item, gemType.filterParams);
|
| | | if (items == null)
|
| | | {
|
| | | return 0;
|
| | |
| | | GemType gemType;
|
| | | TryGetGemType(type, out gemType);
|
| | | var count = 0;
|
| | | var items = packModel.GetItemsByType(PackType.Item, gemType.itemType);
|
| | | var items = packModel.GetItems(PackType.Item, gemType.filterParams);
|
| | | if (items == null)
|
| | | {
|
| | | return 0;
|
| | |
| | | GemType gemType;
|
| | | TryGetGemType(type, out gemType);
|
| | | var count = 0;
|
| | | var items = packModel.GetItemsByType(PackType.Item, gemType.itemType);
|
| | | var items = packModel.GetItems(PackType.Item, gemType.filterParams);
|
| | | if (items == null)
|
| | | {
|
| | | return 0;
|
| | |
| | | public int itemType;
|
| | | public int shopId;
|
| | | public int composeCount;
|
| | | public SinglePack.FilterParams filterParams;
|
| | | }
|
| | |
|
| | | public class EquipGemRedpoint
|
| | |
| | | PackModel playerPack { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | RoleParticularModel roleParticularModel { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
|
| | | FairyFeastModel model { get { return ModelCenter.Instance.GetModel<FairyFeastModel>(); } }
|
| | | EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
|
| | |
|
| | | public event Action<ulong> popUpExpEvent;
|
| | | public event Action onComplete;
|
| | |
| | |
|
| | | void DisplayPlayer()
|
| | | {
|
| | | var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemId;
|
| | | var appearance = equipModel.GetAppearance();
|
| | |
|
| | | var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemId;
|
| | |
|
| | | var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemId;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
|
| | | var clothesId = appearance.clothes;
|
| | | var wingsId = appearance.wings;
|
| | | var secondaryId = appearance.secondary;
|
| | | var fashionClothesId = appearance.fashionClothes;
|
| | | var fashionSecondaryId = appearance.fashionSecondary;
|
| | |
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | |
| | | if (fashionTypeMapPlaceDict.ContainsKey(type)
|
| | | && fashionDressTypeDict.ContainsKey(type))
|
| | | {
|
| | | var equipPlace = fashionTypeMapPlaceDict[type];
|
| | | var equipType = fashionTypeMapPlaceDict[type];
|
| | | var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, equipType);
|
| | | var itemModel = packModel.GetItemByIndex(PackType.Equip, (int)equipPlace);
|
| | | var list = fashionDressTypeDict[type];
|
| | | if (itemModel != null)
|
| | |
| | |
|
| | | var playerPack = ModelCenter.Instance.GetModel<PackModel>();
|
| | |
|
| | | var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemId;
|
| | | var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | var weapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemId;
|
| | |
|
| | | var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemId;
|
| | |
|
| | | var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemId;
|
| | | var clothesId = appearance.clothes;
|
| | | var wingsId = appearance.wings;
|
| | | var secondaryId = appearance.secondary;
|
| | | var weaponId = appearance.weapon;
|
| | |
|
| | | var fashionDressClothesId = 0;
|
| | | var fashionDressWeaponId = 0;
|
| | |
| | | private void CheckFairyLandGuard()
|
| | | {
|
| | | fairyLandGuard = false;
|
| | | var itemModel = pack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Guard1);
|
| | | var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Guard1);
|
| | | var itemModel = pack.GetItemByIndex(PackType.Equip, equipPlace);
|
| | | if (itemModel == null || !fairyLandGuardItems.Contains(itemModel.itemId))
|
| | | {
|
| | | for (int i = 0; i < fairyLandGuardItems.Count; i++)
|
| | |
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | |
|
| | | var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemId;
|
| | | var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | var weapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemId;
|
| | | var clothesId = appearance.clothes;
|
| | | var weaponId = appearance.weapon;
|
| | | var wingsId = appearance.wings;
|
| | | var secondaryId = appearance.secondary;
|
| | |
|
| | | var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemId;
|
| | |
|
| | | var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemId;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemId;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
|
| | | var fashionClothesId = appearance.fashionClothes;
|
| | | var fashionWeaponId = appearance.fashionWeapon;
|
| | | var fashionSecondaryId = appearance.fashionWeapon;
|
| | |
|
| | | int _suitLevel = 0;
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | |
| | | } |
| | | } |
| | | |
| | | public List<ItemModel> GetItemsByType(PackType packType, int itemType) |
| | | { |
| | | if (playerPackDict.ContainsKey(packType)) |
| | | { |
| | | var singlePack = playerPackDict[packType]; |
| | | return singlePack.GetItemsByType(itemType); |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public List<ItemModel> GetItems( PackType packType, SinglePack.FilterParams param) |
| | | { |
| | | if (playerPackDict.ContainsKey(packType)) |
| | |
| | | {
|
| | | var _job = PlayerDatas.Instance.baseData.Job;
|
| | | #region 装备
|
| | | var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemId;
|
| | | var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemId;
|
| | | var _clothesId = appearance.clothes;
|
| | | var _secondaryId = appearance.secondary;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
|
| | | var fashionClothesId = appearance.fashionClothes;
|
| | | var fashionSecondaryId = appearance.fashionSecondary;
|
| | | #endregion
|
| | |
|
| | | showPoint = m_HeroStage;
|
| | |
| | | {
|
| | | targetCompareTxt.text = string.Format(viewRoleFuncModel.compareTip, Language.Get("RoleParticularWin_7"));
|
| | | }
|
| | | ItemModel itemModel = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Wing);
|
| | | var itemModel = playerPack.GetItemByIndex(PackType.Equip, equipPlace);
|
| | | if (itemModel != null)
|
| | | {
|
| | | ItemConfig _tagChinItemModel = ItemConfig.Get((int)itemModel.itemId);
|
| | |
| | | break;
|
| | | case TreasurePrivilege.Wing:
|
| | | var percentWing = (float)special.propertyDict[86] / 10000;
|
| | | var itemModel = pack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Wing);
|
| | | var itemModel = pack.GetItemByIndex(PackType.Equip, equipPlace);
|
| | | m_ContainerHas.gameObject.SetActive(itemModel != null);
|
| | | m_ContainerNone.gameObject.SetActive(itemModel == null);
|
| | | if (itemModel != null)
|
| | |
| | | break;
|
| | | case TreasurePrivilege.Wing:
|
| | | var percentWing = (float)special.propertyDict[86] / 10000;
|
| | | var itemModel = pack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var equipPlace = EquipPlaceMapConfig.GetServerPlace(0, (int)RoleEquipType.Wing);
|
| | | var itemModel = pack.GetItemByIndex(PackType.Equip, equipPlace);
|
| | | m_ContainerPreview.gameObject.SetActive(itemModel != null);
|
| | | if (itemModel != null)
|
| | | {
|
| | |
| | | var _job = PlayerDatas.Instance.baseData.Job;
|
| | |
|
| | | #region 装备
|
| | | var clothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemId;
|
| | | var appearance = ModelCenter.Instance.GetModel<EquipModel>().GetAppearance();
|
| | |
|
| | | var weapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var _weaponId = weapon == null ? 0 : (int)weapon.itemId;
|
| | |
|
| | | var wings = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var _wingsId = wings == null ? 0 : (int)wings.itemId;
|
| | |
|
| | | var secondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemId;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemId;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemId;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemId;
|
| | | var _clothesId = appearance.clothes;
|
| | | var _wingsId = appearance.wings;
|
| | | var _secondaryId = appearance.secondary;
|
| | | var _weaponId = appearance.weapon;
|
| | | var fashionClothesId = appearance.fashionClothes;
|
| | | var fashionWeaponId = appearance.fashionWeapon;
|
| | | var fashionSecondaryId = appearance.fashionSecondary;
|
| | |
|
| | | int _suitLevel = 0;
|
| | | #endregion
|