2 文件已重命名
95个文件已修改
9个文件已删除
| | |
| | | { |
| | | equipSuitID = -1; |
| | | |
| | | int _start = (int)RoleEquipType.retHat; |
| | | int _end = (int)RoleEquipType.retShoes; |
| | | int _start = (int)RoleEquipType.Hat; |
| | | int _end = (int)RoleEquipType.Shoes; |
| | | |
| | | H0309_tagPlayerLoginInfo.tagLoginInfoEquip _equip; |
| | | ItemConfig _item; |
| | |
| | | continue; |
| | | } |
| | | |
| | | if (_equip.ItemPlace == (int)RoleEquipType.retClothes) |
| | | if (_equip.ItemPlace == (int)RoleEquipType.Clothes) |
| | | { |
| | | _clothesLevel = _item.LV; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.retClothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retHat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retShoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retTrousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retBelt) |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.Clothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Hat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Shoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Trousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Belt) |
| | | { |
| | | _player.ChangeEquip(_equipInfo); |
| | | } |
| | | |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.retWeapon) |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.Weapon) |
| | | { |
| | | _player.SwitchWeapon(vNetData.EquipID, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retClothes) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.Clothes) |
| | | { |
| | | _player.SwitchClothes(vNetData.EquipID, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retWing) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.Wing) |
| | | { |
| | | _player.SwitchWing(vNetData.EquipID); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retSpiritAnimal) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.SpiritAnimal) |
| | | { |
| | | _player.SwitchGuard(vNetData.EquipID); |
| | | var _p = _player as GA_Player; |
| | |
| | | _p.serverGuardId = (int)vNetData.EquipID; |
| | | } |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retWeapon2) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.Weapon2) |
| | | { |
| | | _player.SwitchSecondary(vNetData.EquipID, vNetData.EquipIndex); |
| | | } |
| | |
| | | _player.OnHorse(1); |
| | | } |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retFashionClothes) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.FashionClothes) |
| | | { |
| | | _player.SwitchClothes(vNetData.EquipID, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retFashionWeapon) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.FashionWeapon) |
| | | { |
| | | _player.SwitchWeapon(vNetData.EquipID, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retFashionWeapon2) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.FashionWeapon2) |
| | | { |
| | | _player.SwitchSecondary(vNetData.EquipID, vNetData.EquipIndex); |
| | | } |
| | | |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.retClothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retHat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retShoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retTrousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retBelt) |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.Clothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Hat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Shoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Trousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Belt) |
| | | { |
| | | _player.SyncSuitEffect(); |
| | | } |
| | |
| | | |
| | | if (_player != null) |
| | | { |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.retClothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retHat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retShoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retTrousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retBelt) |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.Clothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Hat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Shoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Trousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Belt) |
| | | { |
| | | var _equipInfo = new GActorPlayerBase.EquipInfo |
| | | { |
| | |
| | | _player.ChangeEquip(_equipInfo); |
| | | } |
| | | |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.retWeapon) |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.Weapon) |
| | | { |
| | | _player.SwitchWeapon(0, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retClothes) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.Clothes) |
| | | { |
| | | _player.SwitchClothes(0, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retWing) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.Wing) |
| | | { |
| | | _player.SwitchWing(0); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retWeapon2) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.Weapon2) |
| | | { |
| | | _player.SwitchSecondary(0, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retSpiritAnimal) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.SpiritAnimal) |
| | | { |
| | | _player.SwitchGuard(0); |
| | | var _p = _player as GA_Player; |
| | |
| | | _p.serverGuardId = 0; |
| | | } |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retFashionClothes) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.FashionClothes) |
| | | { |
| | | _player.SwitchClothes(0, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retFashionWeapon) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.FashionWeapon) |
| | | { |
| | | _player.SwitchWeapon(0, vNetData.EquipIndex); |
| | | } |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.retFashionWeapon2) |
| | | else if (vNetData.EquipIndex == (int)RoleEquipType.FashionWeapon2) |
| | | { |
| | | _player.SwitchSecondary(0, vNetData.EquipIndex); |
| | | } |
| | | |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.retClothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retHat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retShoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retTrousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.retBelt) |
| | | if (vNetData.EquipIndex == (int)RoleEquipType.Clothes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Hat |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Shoes |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Trousers |
| | | || vNetData.EquipIndex == (int)RoleEquipType.Belt) |
| | | { |
| | | _player.SyncSuitEffect(); |
| | | } |
| | |
| | | }
|
| | |
|
| | | _target.itemDatas[0].id = (int)_jsonData[0];
|
| | | _target.itemDatas[0].place = (int)RoleEquipType.retClothes;
|
| | | _target.itemDatas[0].place = (int)RoleEquipType.Clothes;
|
| | |
|
| | | _target.itemDatas[1].id = (int)_jsonData[1];
|
| | | _target.itemDatas[1].place = (int)RoleEquipType.retWeapon;
|
| | | _target.itemDatas[1].place = (int)RoleEquipType.Weapon;
|
| | |
|
| | | _target.itemDatas[2].id = (int)_jsonData[2];
|
| | | _target.itemDatas[2].place = (int)RoleEquipType.retWeapon2;
|
| | | _target.itemDatas[2].place = (int)RoleEquipType.Weapon2;
|
| | |
|
| | | _target.itemDatas[3].id = (int)_jsonData[3];
|
| | | _target.itemDatas[3].place = (int)RoleEquipType.retWing;
|
| | | _target.itemDatas[3].place = (int)RoleEquipType.Wing;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (_singleModel != null)
|
| | | {
|
| | | // 如果有守护
|
| | | var _itemModel = _singleModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal);
|
| | | var _itemModel = _singleModel.GetItemModelByIndex((int)RoleEquipType.SpiritAnimal);
|
| | | if (_itemModel != null // 有守护
|
| | | && GeneralDefine.GuardianPickUpID.Contains(_itemModel.itemId))// 守护有拾取功能
|
| | | {
|
| | |
| | | if (_singleModel != null)
|
| | | {
|
| | | // 如果有守护
|
| | | var _itemModel = _singleModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal);
|
| | | var _itemModel = _singleModel.GetItemModelByIndex((int)RoleEquipType.SpiritAnimal);
|
| | | if (_itemModel != null // 有守护
|
| | | && GeneralDefine.GuardianPickUpID.Contains(_itemModel.itemId))// 守护有拾取功能
|
| | | {
|
| | |
| | |
|
| | | var _suitCount = 0;
|
| | |
|
| | | int _start = (int)RoleEquipType.retHat;
|
| | | int _end = (int)RoleEquipType.retShoes;
|
| | | int _start = (int)RoleEquipType.Hat;
|
| | | int _end = (int)RoleEquipType.Shoes;
|
| | | int _rank = 0;
|
| | |
|
| | | ItemModel _itemModel = null;
|
| | |
|
| | | // 先取得衣服的阶数
|
| | | _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes);
|
| | | _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.Clothes);
|
| | | if (_itemModel == null)
|
| | | {
|
| | | return;
|
| | |
| | | |
| | | RoleParticularModel.ItemData _item = null; |
| | | |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.retClothes, out _item)) |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.Clothes, out _item)) |
| | | { |
| | | _clothesId = _item.ItemID; |
| | | } |
| | | |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.retWeapon, out _item)) |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.Weapon, out _item)) |
| | | { |
| | | _weaponId = _item.ItemID; |
| | | } |
| | | |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.retWeapon2, out _item)) |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.Weapon2, out _item)) |
| | | { |
| | | _secondaryId = _item.ItemID; |
| | | } |
| | | |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.retWing, out _item)) |
| | | if (m_ViewPlayerData.roleEquipDataDic.TryGetValue(RoleEquipType.Wing, out _item)) |
| | | { |
| | | _wingId = _item.ItemID; |
| | | } |
| | |
| | | { |
| | | _itemInfo = info.itemDatas[i]; |
| | | |
| | | if (_itemInfo.place == (int)RoleEquipType.retClothes) |
| | | if (_itemInfo.place == (int)RoleEquipType.Clothes) |
| | | { |
| | | SwitchClothes((uint)_itemInfo.id); |
| | | break; |
| | |
| | | { |
| | | _itemInfo = info.itemDatas[i]; |
| | | |
| | | if (_itemInfo.place == (int)RoleEquipType.retWeapon) |
| | | if (_itemInfo.place == (int)RoleEquipType.Weapon) |
| | | { |
| | | SwitchWeapon((uint)_itemInfo.id); |
| | | } |
| | | else if (_itemInfo.place == (int)RoleEquipType.retWeapon2) |
| | | else if (_itemInfo.place == (int)RoleEquipType.Weapon2) |
| | | { |
| | | SwitchSecondary((uint)_itemInfo.id); |
| | | } |
| | | else if (_itemInfo.place == (int)RoleEquipType.retWing) |
| | | else if (_itemInfo.place == (int)RoleEquipType.Wing) |
| | | { |
| | | SwitchWing((uint)_itemInfo.id); |
| | | } |
| | |
| | | }
|
| | | m_EquipDict[_equipInfo.Place] = _info;
|
| | |
|
| | | if (_equipInfo.Place == (byte)RoleEquipType.retFashionClothes)
|
| | | if (_equipInfo.Place == (byte)RoleEquipType.FashionClothes)
|
| | | {
|
| | | SwitchClothes(_equipInfo.ItemID, _equipInfo.Place);
|
| | | }
|
| | | else if (_equipInfo.Place == (byte)RoleEquipType.retClothes)
|
| | | else if (_equipInfo.Place == (byte)RoleEquipType.Clothes)
|
| | | {
|
| | | SwitchClothes(_equipInfo.ItemID);
|
| | | }
|
| | |
| | | for (int i = 0; i < m_H0434.EquipCount; ++i)
|
| | | {
|
| | | _equipInfo = m_H0434.EquipInfo[i];
|
| | | if (_equipInfo.Place == (int)RoleEquipType.retFashionWeapon)
|
| | | if (_equipInfo.Place == (int)RoleEquipType.FashionWeapon)
|
| | | {
|
| | | SwitchWeapon(_equipInfo.ItemID, _equipInfo.Place);
|
| | | continue;
|
| | | }
|
| | | else if (_equipInfo.Place == (int)RoleEquipType.retWeapon)
|
| | | else if (_equipInfo.Place == (int)RoleEquipType.Weapon)
|
| | | {
|
| | | SwitchWeapon(_equipInfo.ItemID);
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (_equipInfo.Place == (int)RoleEquipType.retFashionWeapon2)
|
| | | if (_equipInfo.Place == (int)RoleEquipType.FashionWeapon2)
|
| | | {
|
| | | SwitchSecondary(_equipInfo.ItemID, _equipInfo.Place);
|
| | | continue;
|
| | | }
|
| | | else if (_equipInfo.Place == (int)RoleEquipType.retWeapon2)
|
| | | else if (_equipInfo.Place == (int)RoleEquipType.Weapon2)
|
| | | {
|
| | | SwitchSecondary(_equipInfo.ItemID);
|
| | | continue;
|
| | | }
|
| | |
|
| | | if (_equipInfo.Place == (int)RoleEquipType.retWing)
|
| | | if (_equipInfo.Place == (int)RoleEquipType.Wing)
|
| | | {
|
| | | SwitchWing(_equipInfo.ItemID);
|
| | | }
|
| | | else if (_equipInfo.Place == (int)RoleEquipType.retSpiritAnimal)
|
| | | else if (_equipInfo.Place == (int)RoleEquipType.SpiritAnimal)
|
| | | {
|
| | | var _index = BattleEffectPlayRule.Instance.GetIndex(ServerInstID);
|
| | | if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
|
| | |
| | | {
|
| | | var _suitCount = 0;
|
| | |
|
| | | int _start = (int)RoleEquipType.retHat;
|
| | | int _end = (int)RoleEquipType.retShoes;
|
| | | int _start = (int)RoleEquipType.Hat;
|
| | | int _end = (int)RoleEquipType.Shoes;
|
| | | int _rank = 0;
|
| | |
|
| | | EquipInfo _equipInfo;
|
| | |
|
| | | // 先取得衣服的阶数
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.retClothes, out _equipInfo))
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.Clothes, out _equipInfo))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | _itemInfo = m_PlayerInfo.itemDatas[i];
|
| | |
|
| | | if (_itemInfo.place == (int)RoleEquipType.retClothes)
|
| | | if (_itemInfo.place == (int)RoleEquipType.Clothes)
|
| | | {
|
| | | //m_SuitLevel = 0;
|
| | | //if (_itemInfo.isSuit == 1)
|
| | |
| | | {
|
| | | _itemInfo = m_PlayerInfo.itemDatas[i];
|
| | |
|
| | | if (_itemInfo.place == (int)RoleEquipType.retWeapon)
|
| | | if (_itemInfo.place == (int)RoleEquipType.Weapon)
|
| | | {
|
| | | SwitchWeapon((uint)_itemInfo.id);
|
| | | }
|
| | | else if (_itemInfo.place == (int)RoleEquipType.retWeapon2)
|
| | | else if (_itemInfo.place == (int)RoleEquipType.Weapon2)
|
| | | {
|
| | | SwitchSecondary((uint)_itemInfo.id);
|
| | | }
|
| | | else if (_itemInfo.place == (int)RoleEquipType.retWing)
|
| | | else if (_itemInfo.place == (int)RoleEquipType.Wing)
|
| | | {
|
| | | SwitchWing((uint)_itemInfo.id);
|
| | | }
|
| | | else if (_itemInfo.place == (int)RoleEquipType.retSpiritAnimal)
|
| | | else if (_itemInfo.place == (int)RoleEquipType.SpiritAnimal)
|
| | | {
|
| | | SwitchGuard((uint)_itemInfo.id);
|
| | | }
|
| | |
| | | {
|
| | | _itemInfo = _info.itemDatas[i];
|
| | |
|
| | | if (_itemInfo.place == (int)RoleEquipType.retClothes)
|
| | | if (_itemInfo.place == (int)RoleEquipType.Clothes)
|
| | | {
|
| | | //m_SuitLevel = 0;
|
| | | //if (_itemInfo.isSuit == 1)
|
| | |
| | | {
|
| | | _itemInfo = _info.itemDatas[i];
|
| | |
|
| | | if (_itemInfo.place == (int)RoleEquipType.retWeapon)
|
| | | if (_itemInfo.place == (int)RoleEquipType.Weapon)
|
| | | {
|
| | | SwitchWeapon((uint)_itemInfo.id);
|
| | | }
|
| | | else if (_itemInfo.place == (int)RoleEquipType.retWeapon2)
|
| | | else if (_itemInfo.place == (int)RoleEquipType.Weapon2)
|
| | | {
|
| | | SwitchSecondary((uint)_itemInfo.id);
|
| | | }
|
| | | else if (_itemInfo.place == (int)RoleEquipType.retWing)
|
| | | else if (_itemInfo.place == (int)RoleEquipType.Wing)
|
| | | {
|
| | | SwitchWing((uint)_itemInfo.id);
|
| | | }
|
| | | else if (_itemInfo.place == (int)RoleEquipType.retSpiritAnimal)
|
| | | else if (_itemInfo.place == (int)RoleEquipType.SpiritAnimal)
|
| | | {
|
| | | SwitchGuard((uint)_itemInfo.id);
|
| | | }
|
| | |
| | | m_HeadUpName.SetGrayName(on);
|
| | | }
|
| | |
|
| | | public void SwitchWeapon(uint itemID, int index = (int)RoleEquipType.retWeapon)
|
| | | public void SwitchWeapon(uint itemID, int index = (int)RoleEquipType.Weapon)
|
| | | {
|
| | | // 相同的装备, 不做处理
|
| | | if (itemID == WeaponItemID)
|
| | |
| | | EquipInfo _equipInfo;
|
| | |
|
| | | // 如果是套装位置
|
| | | if (index == (int)RoleEquipType.retFashionWeapon)
|
| | | if (index == (int)RoleEquipType.FashionWeapon)
|
| | | {
|
| | | // 脱下套装
|
| | | if (itemID == 0)
|
| | | {
|
| | | // 寻找原身上装备, 如果有的话就重置此次要换装的道具id
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.retWeapon, out _equipInfo))
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.Weapon, out _equipInfo))
|
| | | {
|
| | | itemID = _equipInfo.itemID;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == (int)RoleEquipType.retWeapon)
|
| | | else if (index == (int)RoleEquipType.Weapon)
|
| | | {
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon))
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | ShowWeaponEffect();
|
| | | }
|
| | |
|
| | | public void SwitchSecondary(uint itemID, int index = (int)RoleEquipType.retWeapon2)
|
| | | public void SwitchSecondary(uint itemID, int index = (int)RoleEquipType.Weapon2)
|
| | | {
|
| | | // 相同的装备, 不做处理
|
| | | if (itemID == SecondaryID)
|
| | |
| | | EquipInfo _equipInfo;
|
| | |
|
| | | // 如果是套装位置
|
| | | if (index == (int)RoleEquipType.retFashionWeapon2)
|
| | | if (index == (int)RoleEquipType.FashionWeapon2)
|
| | | {
|
| | | // 脱下套装
|
| | | if (itemID == 0)
|
| | | {
|
| | | // 寻找原身上装备, 如果有的话就重置此次要换装的道具id
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.retWeapon2, out _equipInfo))
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.Weapon2, out _equipInfo))
|
| | | {
|
| | | itemID = _equipInfo.itemID;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == (int)RoleEquipType.retWeapon2)
|
| | | else if (index == (int)RoleEquipType.Weapon2)
|
| | | {
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon2))
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon2))
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
|
| | | {
|
| | | SwitchHand(true);
|
| | | }
|
| | |
| | | WingItemID = itemID;
|
| | | }
|
| | |
|
| | | public void SwitchClothes(uint itemID, int index = (int)RoleEquipType.retClothes)
|
| | | public void SwitchClothes(uint itemID, int index = (int)RoleEquipType.Clothes)
|
| | | {
|
| | | // 相同的装备, 不做处理
|
| | | if (itemID == ClothesItemID)
|
| | |
| | | int _resID = JobSetup.BaseEquip[0];
|
| | |
|
| | | // 如果是套装位置
|
| | | if (index == (int)RoleEquipType.retFashionClothes)
|
| | | if (index == (int)RoleEquipType.FashionClothes)
|
| | | {
|
| | | // 脱下套装
|
| | | if (itemID == 0)
|
| | | {
|
| | | // 寻找原身上装备, 如果有的话就重置此次要换装的道具id
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.retClothes, out _equipInfo))
|
| | | if (m_EquipDict.TryGetValue((int)RoleEquipType.Clothes, out _equipInfo))
|
| | | {
|
| | | itemID = _equipInfo.itemID;
|
| | | }
|
| | | }
|
| | | }
|
| | | else if (index == (int)RoleEquipType.retClothes)
|
| | | else if (index == (int)RoleEquipType.Clothes)
|
| | | {
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionClothes))
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionClothes))
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | // 决定副手逻辑
|
| | | // 如果当前是时装副手, 则装备时装手臂
|
| | | // 如果当前是普通副手, 则卸下手臂
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.retFashionWeapon2))
|
| | | if (m_EquipDict.ContainsKey((int)RoleEquipType.FashionWeapon2))
|
| | | {
|
| | | SwitchHand(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!m_EquipDict.ContainsKey((int)RoleEquipType.retWeapon2))
|
| | | if (!m_EquipDict.ContainsKey((int)RoleEquipType.Weapon2))
|
| | | {
|
| | | SwitchHand(true);
|
| | | }
|
| | |
| | | EquipInfo _equipInfo;
|
| | | int _itemID = 7000;
|
| | |
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.retFashionClothes, out _equipInfo))
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.FashionClothes, out _equipInfo))
|
| | | {
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.retClothes, out _equipInfo))
|
| | | if (!m_EquipDict.TryGetValue((int)RoleEquipType.Clothes, out _equipInfo))
|
| | | {
|
| | | _itemID = 7000;
|
| | | }
|
| | |
| | | var packModel = ModelCenter.Instance.GetModel<PlayerPackModel>(); |
| | | var equipModel = packModel.GetSinglePackModel(PackType.Equip); |
| | | |
| | | var itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes); |
| | | var fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.retFashionClothes); |
| | | var itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.Clothes); |
| | | var fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.FashionClothes); |
| | | m_InitHeroStep = 4; |
| | | if (fashion != null) |
| | | { |
| | | hero.SwitchClothes((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionClothes); |
| | | hero.SwitchClothes((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.FashionClothes); |
| | | } |
| | | else if (itemModel != null) |
| | | { |
| | |
| | | |
| | | m_InitHeroStep = 5; |
| | | |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retWeapon); |
| | | fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.retFashionWeapon); |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.Weapon); |
| | | fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.FashionWeapon); |
| | | |
| | | if (fashion != null) |
| | | { |
| | | hero.SwitchWeapon((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionWeapon); |
| | | hero.SwitchWeapon((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.FashionWeapon); |
| | | } |
| | | else if (itemModel != null) |
| | | { |
| | |
| | | } |
| | | |
| | | m_InitHeroStep = 6; |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retWeapon2); |
| | | fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.retFashionWeapon2); |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.Weapon2); |
| | | fashion = equipModel.GetItemModelByIndex((int)RoleEquipType.FashionWeapon2); |
| | | |
| | | if (fashion != null) |
| | | { |
| | | hero.SwitchSecondary((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.retFashionWeapon2); |
| | | hero.SwitchSecondary((uint)fashion.itemInfo.ItemID, (int)RoleEquipType.FashionWeapon2); |
| | | } |
| | | else if (itemModel != null) |
| | | { |
| | |
| | | |
| | | m_InitHeroStep = 7; |
| | | |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retWing); |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.Wing); |
| | | if (itemModel != null) |
| | | { |
| | | hero.SwitchWing((uint)itemModel.itemInfo.ItemID); |
| | |
| | | |
| | | m_InitHeroStep = 9; |
| | | |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal); |
| | | itemModel = equipModel.GetItemModelByIndex((int)RoleEquipType.SpiritAnimal); |
| | | if (itemModel != null) |
| | | { |
| | | hero.SwitchGuard((uint)itemModel.itemInfo.ItemID); |
| | |
| | | #endif |
| | | } |
| | | |
| | | public void __Gen_Delegate_Imp151(object p0, ItemWinBtnType p1, object p2) |
| | | public void __Gen_Delegate_Imp151(object p0, ItemOperateType p1, object p2) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | |
| | | |
| | | { |
| | | ItemWinBtnType _type;translator.Get(L, 2, out _type); |
| | | ItemOperateType _type;translator.Get(L, 2, out _type); |
| | | Snxxz.UI.GatherSoulItem _item = (Snxxz.UI.GatherSoulItem)translator.GetObject(L, 3, typeof(Snxxz.UI.GatherSoulItem)); |
| | | |
| | | gen_to_be_invoked.HandleSoulTipFunc( _type, _item ); |
| | |
| | | { |
| | | int _place = LuaAPI.xlua_tointeger(L, 1); |
| | | |
| | | string gen_ret = UIHelper.GetEquipAreaName( _place ); |
| | | string gen_ret = UIHelper.GetEquipPlaceName( _place ); |
| | | LuaAPI.lua_pushstring(L, gen_ret); |
| | | |
| | | |
| | |
| | | if(isCoolEnd)
|
| | | {
|
| | | DebugEx.Log("UpdateCoolTime:" + _equip.itemId);
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putOn,guid);
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putOn,guid);
|
| | | ReportConfirmBetterEquip(guid);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (itemModel == null
|
| | | || itemModel.config.EquipPlace > 12
|
| | | || itemModel.config.EquipPlace == (int)RoleEquipType.retWing
|
| | | || itemModel.config.EquipPlace == (int)RoleEquipType.retSpiritAnimal) return false;
|
| | | || itemModel.config.EquipPlace == (int)RoleEquipType.Wing
|
| | | || itemModel.config.EquipPlace == (int)RoleEquipType.SpiritAnimal) return false;
|
| | |
|
| | | int playerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (playerLv > autoEquipLvLimit) return false;
|
| | |
| | | int[] gemOpenLvs = packType == PackType.JadeDynastyItem ? itemTipsModel.jadeDynastyGemOpenLvs : itemTipsModel.gemOpenLvs;
|
| | | switch ((RoleEquipType)itemAttrData.itemConfig.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retWeapon:
|
| | | case RoleEquipType.retWeapon2:
|
| | | case RoleEquipType.retHat:
|
| | | case RoleEquipType.retClothes:
|
| | | case RoleEquipType.retBelt:
|
| | | case RoleEquipType.retTrousers:
|
| | | case RoleEquipType.retShoes:
|
| | | case RoleEquipType.retNeck:
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.retFairyCan2:
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.Weapon:
|
| | | case RoleEquipType.Weapon2:
|
| | | case RoleEquipType.Hat:
|
| | | case RoleEquipType.Clothes:
|
| | | case RoleEquipType.Belt:
|
| | | case RoleEquipType.Trousers:
|
| | | case RoleEquipType.Shoes:
|
| | | case RoleEquipType.Neck:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.FairyCan2:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | case RoleEquipType.JadeDynasty_Cloak:
|
| | | case RoleEquipType.JadeDynasty_FaceMask:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | |
| | | return;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | gemAttr.SetActive(false);
|
| | | return;
|
| | | }
|
| | |
| | | ItemInfo _itemInfo = new ItemInfo();
|
| | | _itemInfo.ItemID = flauntGemId;
|
| | | _itemInfo.IsBind = flauntGemBind ? 1 : 0;
|
| | | _item.SetItemModel(_itemInfo);
|
| | | _item.itemId = flauntGemId;
|
| | | _item.SetItemInfo(_itemInfo);
|
| | | var itemInfo = string.Format("[{0}]", config.ItemName);
|
| | | itemPlaceList.Add(_item);
|
| | | return Language.Get("GemLookTalk", itemInfo);
|
| | |
| | | {
|
| | | foreach (var _equip in equipBodyDict.Values)
|
| | | {
|
| | | if (_equip.itemInfo.ItemPlace <= (int)RoleEquipType.retSpiritAnimal)
|
| | | if (_equip.itemInfo.ItemPlace <= (int)RoleEquipType.SpiritAnimal)
|
| | | {
|
| | | m_DisplayItems.Add(_equip);
|
| | | }
|
| | |
| | | private bool TryGetRemainTime(ItemModel model,out int seconds)
|
| | | {
|
| | | seconds = 0;
|
| | | if (model.config.EquipPlace != (int)RoleEquipType.retSpiritAnimal
|
| | | if (model.config.EquipPlace != (int)RoleEquipType.SpiritAnimal
|
| | | || model.config.ExpireTime <= 0) return false;
|
| | |
|
| | | ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(model.itemInfo.ItemGUID);
|
| | |
| | | ItemConfig itemConfig = ItemConfig.Get(compoundModel.makeID[0]);
|
| | | switch((RoleEquipType)itemConfig.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | if (!composeWinModel.IsEnoughUnfixedMat(compoundModel))
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("Compose101"));
|
| | |
| | | private void UpdateRemainTime()
|
| | | {
|
| | | remainTimeText.gameObject.SetActive(false);
|
| | | if (itemModel == null || itemModel.config.EquipPlace != (int)RoleEquipType.retSpiritAnimal) return;
|
| | | if (itemModel == null || itemModel.config.EquipPlace != (int)RoleEquipType.SpiritAnimal) return;
|
| | |
|
| | | ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(itemModel.itemInfo.ItemGUID);
|
| | | bool isShow = itemModel.config.ExpireTime > 0;
|
| | |
| | | private bool TryGetRemainTime(ItemModel model, out int seconds)
|
| | | {
|
| | | seconds = 0;
|
| | | if (model.config.EquipPlace != (int)RoleEquipType.retSpiritAnimal
|
| | | if (model.config.EquipPlace != (int)RoleEquipType.SpiritAnimal
|
| | | || model.config.ExpireTime <= 0) return false;
|
| | |
|
| | | ItemCDCool cool = KnapsackTimeCDMgr.Instance.GetItemCoolById(model.itemInfo.ItemGUID);
|
| | |
| | | {
|
| | | switch((RoleEquipType)itemModel.config.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | bool isOverdue = modelInterface.IsOverdue(itemModel.itemInfo.ItemGUID, itemModel.itemId, itemModel.useDataDict);
|
| | | if(isOverdue)
|
| | | {
|
| | |
| | | {
|
| | | switch ((RoleEquipType)itemModel.config.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | bool isOverdue = modelInterface.IsOverdue(itemModel.itemInfo.ItemGUID, itemModel.itemId, itemModel.useDataDict);
|
| | | if (isOverdue)
|
| | | {
|
| | |
| | | itemInfo.IsSuite = serverItem.IsSuite;
|
| | | itemInfo.UserData = serverItem.UserData;
|
| | |
|
| | | itemModel.SetItemModel(itemInfo);
|
| | | itemModel.SetItemInfo(itemInfo);
|
| | | items.Add(itemModel);
|
| | | }
|
| | | // items.Sort(Compare);
|
| | |
| | | itemInfo.IsSuite = serverItem.IsSuite;
|
| | | itemInfo.UserData = serverItem.UserData;
|
| | |
|
| | | itemModel.SetItemModel(itemInfo);
|
| | | itemModel.SetItemInfo(itemInfo);
|
| | | items.Add(itemModel);
|
| | | }
|
| | |
|
| | |
| | | var itemConfig = ItemConfig.Get(model.GetExchangeItemByJob(config));
|
| | | ItemAttrData itemAttrData = new ItemAttrData(itemConfig.ID, true, (ulong)config.exchangeItemCount, -1, config.exchangeItemIsBind);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData, false);
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().curAttrData.SetTipsFuncBtn(ItemWinBtnType.exchange,
|
| | | (ItemWinBtnType btnType, string value) =>
|
| | | ModelCenter.Instance.GetModel<ItemTipsModel>().curAttrData.SetTipsFuncBtn(ItemOperateType.exchange,
|
| | | (ItemOperateType btnType, string value) =>
|
| | | {
|
| | | if (btnType == ItemWinBtnType.exchange)
|
| | | if (btnType == ItemOperateType.exchange)
|
| | | {
|
| | | if (!model.TrialSendExchange(trialExchangeId, out error))
|
| | | {
|
| | |
| | | { |
| | | _BagIndex = _index; |
| | | itemTipsModel.SetItemTipsModel(PackType.Item, model.itemInfo.ItemGUID, false, true, ItemTipChildType.UnionWarehouseDonation); |
| | | itemTipsModel.curAttrData.SetTipsFuncBtn(ItemWinBtnType.donate, Donation); |
| | | itemTipsModel.curAttrData.SetTipsFuncBtn(ItemOperateType.donate, Donation); |
| | | itemTipsModel.ShowUICtrl(); |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | void Donation(ItemWinBtnType type, string s)//捐献 |
| | | void Donation(ItemOperateType type, string s)//捐献 |
| | | { |
| | | switch (type) |
| | | { |
| | | case ItemWinBtnType.donate: |
| | | case ItemOperateType.donate: |
| | | ////像服务端捐献发包 |
| | | if (playerFairyAuTreasureData._DicfamilyStoreItem.Count >= MaxDonationAmount) |
| | | { |
| | |
| | |
|
| | | void DisplayPlayer()
|
| | | {
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | var data = new UI3DPlayerExhibitionData
|
| | |
| | | if (viewPlayerData != null)
|
| | | {
|
| | | clothesId = 0;
|
| | | var itemData = roleParticularModel.GetItemData(RoleEquipType.retClothes);
|
| | | var itemData = roleParticularModel.GetItemData(RoleEquipType.Clothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | clothesId = itemData.ItemID;
|
| | | }
|
| | | fashionClothesId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionClothes);
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.FashionClothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionClothesId = itemData.ItemID;
|
| | | }
|
| | | wingsId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retWing);
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.Wing);
|
| | | if (itemData != null)
|
| | | {
|
| | | wingsId = itemData.ItemID;
|
| | | }
|
| | | secondaryId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retWeapon2);
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.Weapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | secondaryId = itemData.ItemID;
|
| | | }
|
| | | fashionSecondaryId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionWeapon2);
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.FashionWeapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionSecondaryId = itemData.ItemID;
|
| | |
| | | int _suitEffect = 0;
|
| | | var _leaderData = model.kingFairyData.leaderData;
|
| | | RoleParticularModel.ItemData itemData;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retClothes))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.Clothes))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retClothes];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.Clothes];
|
| | | clothes = itemData.ItemID;
|
| | | _suitEffect = _leaderData.GetEquipSuitLevel();
|
| | | }
|
| | | int weapon = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retWeapon))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.Weapon))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retWeapon];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.Weapon];
|
| | | weapon = itemData.ItemID;
|
| | | }
|
| | | int wing = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retWing))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.Wing))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retWing];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.Wing];
|
| | | wing = itemData.ItemID;
|
| | | }
|
| | | int weapon2 = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retWeapon2))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.Weapon2))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retWeapon2];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.Weapon2];
|
| | | weapon2 = itemData.ItemID;
|
| | | }
|
| | | int fashionClothes = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionClothes))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.FashionClothes))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionClothes];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.FashionClothes];
|
| | | fashionClothes = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionWeapon))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.FashionWeapon))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionWeapon];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.FashionWeapon];
|
| | | fashionWeapon = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon2 = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionWeapon2))
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.FashionWeapon2))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionWeapon2];
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.FashionWeapon2];
|
| | | fashionWeapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | |
| | | ntegralGain = tagPet.integrate;
|
| | | ItemAttrData attrData = new ItemAttrData(playerFairyAuTreasureData._DicfamilyStoreItem[_Index].ItemID, false, 1, -1, 0, true, PackType.Deleted
|
| | | , "", playerFairyAuTreasureData._DicfamilyStoreItem[_Index]._UserData, ItemTipChildType.UnionWarehouseExchange);
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.exchange, Exchange);
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.exchange, Exchange);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int ntegralGain = 0;//装备积分获取
|
| | | void Exchange(ItemWinBtnType type, string s)
|
| | | void Exchange(ItemOperateType type, string s)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.Item);
|
| | | if (singlePack == null) return;
|
| | |
| | | }
|
| | | if (packType == PackType.Equip)
|
| | | {
|
| | | if (index == (int)RoleEquipType.retFashionClothes
|
| | | || index == (int)RoleEquipType.retFashionWeapon
|
| | | || index == (int)RoleEquipType.retFashionWeapon2)
|
| | | if (index == (int)RoleEquipType.FashionClothes
|
| | | || index == (int)RoleEquipType.FashionWeapon
|
| | | || index == (int)RoleEquipType.FashionWeapon2)
|
| | | {
|
| | | m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | |
|
| | |
| | |
|
| | | var playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>();
|
| | |
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionDressClothesId = 0;
|
| | |
| | | var index = model.fashionTypeMapPlaceDict[type];
|
| | | switch ((RoleEquipType)index)
|
| | | {
|
| | | case RoleEquipType.retFashionWeapon:
|
| | | case RoleEquipType.FashionWeapon:
|
| | | fashionDressWeaponId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | case RoleEquipType.retFashionClothes:
|
| | | case RoleEquipType.FashionClothes:
|
| | | fashionDressClothesId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon2:
|
| | | case RoleEquipType.FashionWeapon2:
|
| | | fashionDressSecondaryId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | }
|
| | |
| | | data.SetGatherSoul(item.level, hole);
|
| | | GatherSoulComposeModel.Compose compose;
|
| | | bool requireCompose = composeModel.ExistInComposeMat(item.id, out compose);
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.putOff, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.putOff, OnTipFunc);
|
| | | if (requireCompose)
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.compose, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.compose, OnTipFunc);
|
| | | }
|
| | | if (!model.IsGatherSoulMaxLevel(item.id, item.level))
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.LevelUp, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.LevelUp, OnTipFunc);
|
| | | }
|
| | | List<GatherSoulItem> list = new List<GatherSoulItem>();
|
| | | model.TryGetSatisfyReplaceSouls(hole, ref list);
|
| | | if (list.Count > 0)
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.Replace, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.Replace, OnTipFunc);
|
| | | list = null;
|
| | | }
|
| | | itemTipsModel.SetItemTipsModel(data);
|
| | |
| | | m_ContaienrRedpoint.gameObject.SetActive(requireRedpoint);
|
| | | }
|
| | |
|
| | | private void OnTipFunc(ItemWinBtnType funcType, string arg2)
|
| | | private void OnTipFunc(ItemOperateType funcType, string arg2)
|
| | | {
|
| | | switch (funcType)
|
| | | {
|
| | | case ItemWinBtnType.compose:
|
| | | case ItemOperateType.compose:
|
| | | {
|
| | | GatherSoulItem item;
|
| | | if (model.TryGetItem(hole, out item))
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case ItemWinBtnType.putOff:
|
| | | case ItemOperateType.putOff:
|
| | | {
|
| | | WindowCenter.Instance.Close<GatherSoulTipWin>();
|
| | | GatherSoulItem item;
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case ItemWinBtnType.LevelUp:
|
| | | case ItemOperateType.LevelUp:
|
| | | WindowCenter.Instance.Close<GatherSoulTipWin>();
|
| | | GatherSoulLevelUpWin.selectHole = hole;
|
| | | WindowCenter.Instance.Open<GatherSoulLevelUpWin>();
|
| | | break;
|
| | | case ItemWinBtnType.Replace:
|
| | | case ItemOperateType.Replace:
|
| | | WindowCenter.Instance.Close<GatherSoulTipWin>();
|
| | | GatherSoulEquipListWin.selectHole = hole;
|
| | | WindowCenter.Instance.Open<GatherSoulEquipListWin>();
|
| | |
| | | if (composeModel.TryGetCompose(item.id, out compose)
|
| | | && compose.requireItems.Count > 0)
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.dismantle, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.dismantle, OnTipFunc);
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.Resolve, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.Resolve, OnTipFunc);
|
| | | }
|
| | | GatherSoulComposeModel.Compose outCompose;
|
| | | bool requireCompose = composeModel.ExistInComposeMat(item.id, out outCompose);
|
| | | if (requireCompose)
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.compose, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.compose, OnTipFunc);
|
| | | }
|
| | | bool existSamePropertyHole = soulModel.IsSamePropertyCompareHoles(-1, item as GatherSoulItem) != -1;
|
| | | bool existCoreHoleItem = false;
|
| | |
| | | }
|
| | | if (item.itemType == GatheringSoulModel.GATHERSOUL_CORE_TYPE)
|
| | | {
|
| | | data.SetTipsFuncBtn(existCoreHoleItem ? ItemWinBtnType.Replace : ItemWinBtnType.Wear, OnTipFunc);
|
| | | data.SetTipsFuncBtn(existCoreHoleItem ? ItemOperateType.Replace : ItemOperateType.Wear, OnTipFunc);
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetTipsFuncBtn(existSamePropertyHole ? ItemWinBtnType.Replace : ItemWinBtnType.Wear, OnTipFunc);
|
| | | data.SetTipsFuncBtn(existSamePropertyHole ? ItemOperateType.Replace : ItemOperateType.Wear, OnTipFunc);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | data.SetTipsFuncBtn(ItemWinBtnType.Resolve, OnTipFunc);
|
| | | data.SetTipsFuncBtn(ItemOperateType.Resolve, OnTipFunc);
|
| | | }
|
| | | itemTipsModel.SetItemTipsModel(data);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void OnTipFunc(ItemWinBtnType type, string arg2)
|
| | | private void OnTipFunc(ItemOperateType type, string arg2)
|
| | | {
|
| | | if (displayItem.Equals(default(VirtualItem)))
|
| | | {
|
| | |
| | | m_FuncBtnDisplays[index].text = Language.Get(StringUtility.Contact("ItemHandle_", callBackType));
|
| | | m_Redpoints[index].gameObject.SetActive(false);
|
| | |
|
| | | if (callBackType == ItemWinBtnType.LevelUp)
|
| | | if (callBackType == ItemOperateType.LevelUp)
|
| | | {
|
| | | m_Redpoints[index].gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && model.levelUpRedpointHole == itemTipsModel.curAttrData.equipHole);
|
| | | }
|
| | | else if (callBackType == ItemWinBtnType.Replace)
|
| | | else if (callBackType == ItemOperateType.Replace)
|
| | | {
|
| | | m_Redpoints[index].gameObject.SetActive(model.replaceRedpoint.state == RedPointState.Simple
|
| | | && itemTipsModel.curAttrData.index == model.replaceRedpointIndex);
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | public void HandleSoulTipFunc(ItemWinBtnType type, GatherSoulItem item)
|
| | | public void HandleSoulTipFunc(ItemOperateType type, GatherSoulItem item)
|
| | | {
|
| | | switch (type)
|
| | | {
|
| | | case ItemWinBtnType.compose:
|
| | | case ItemOperateType.compose:
|
| | | if (!FuncOpen.Instance.IsFuncOpen(158))
|
| | | {
|
| | | FuncOpen.Instance.ProcessorFuncErrorTip(158);
|
| | |
| | | };
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.GatherSoul271);
|
| | | break;
|
| | | case ItemWinBtnType.dismantle:
|
| | | case ItemWinBtnType.Resolve:
|
| | | if (type == ItemWinBtnType.Resolve && item.itemType != GATHERSOUL_ESSENCE_TYPE
|
| | | case ItemOperateType.dismantle:
|
| | | case ItemOperateType.Resolve:
|
| | | if (type == ItemOperateType.Resolve && item.itemType != GATHERSOUL_ESSENCE_TYPE
|
| | | && IsBestSoul(item, item.placeType, item.index))
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BestGatherSoulResolveConfirm"), (bool isOk) =>
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case ItemWinBtnType.Wear:
|
| | | case ItemOperateType.Wear:
|
| | | List<int> emptyHoles;
|
| | | bool existEmptyHole = false;
|
| | | if (ExistEmptyHole(out emptyHoles))
|
| | |
| | | SysNotifyMgr.Instance.ShowTip("NoneOfAnyEmptySoulHole");
|
| | | }
|
| | | break;
|
| | | case ItemWinBtnType.Replace:
|
| | | case ItemOperateType.Replace:
|
| | | WindowCenter.Instance.Close<GatherSoulTipWin>();
|
| | | ExecuteReplaceSoul(item);
|
| | | break;
|
| | |
| | | {
|
| | | yield break;
|
| | | }
|
| | | var _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal);
|
| | | var _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.SpiritAnimal);
|
| | | if (_itemModel != null && _itemModel.itemInfo != null)
|
| | | {
|
| | | _hero.SwitchGuard((uint)_itemModel.itemInfo.ItemID);
|
| | |
| | | private void CheckFairyLandGuard()
|
| | | {
|
| | | fairyLandGuard = false;
|
| | | var itemModel = pack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retSpiritAnimal);
|
| | | var itemModel = pack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.SpiritAnimal);
|
| | | if (itemModel == null || !fairyLandGuardItems.Contains(itemModel.itemId))
|
| | | {
|
| | | for (int i = 0; i < fairyLandGuardItems.Count; i++)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putOn, model.currentEquipGuid);
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putOn, model.currentEquipGuid);
|
| | | model.ReportConfirmBetterEquip(model.currentEquipGuid);
|
| | | }
|
| | | }
|
| | |
| | | model.ReportConfirmUseItem(model.currentShowItem); |
| | | if (itemModel != null && itemModel.packType == PackType.Item) |
| | | { |
| | | ItemLogicUtility.Instance.UseItem(ItemWinBtnType.makeUse, itemModel.itemInfo.ItemPlace); |
| | | ItemLogicUtility.Instance.UseItem(ItemOperateType.makeUse, itemModel.itemInfo.ItemPlace); |
| | | } |
| | | } |
| | | } |
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemTipsModel.curAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemTipsModel.curAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemTipsModel.curAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | if(itemAttrData.guid == playerPack.lookItemGUID && playerPack.lookLineIndex != -1)
|
| | | {
|
| | | switch (key)
|
| | | {
|
| | | case ItemWinBtnType.putOn:
|
| | | case ItemOperateType.putOn:
|
| | | SuccessConfig successConfig = SuccessConfig.Get(AchievementGoto.guideAchievementId);
|
| | | if (successConfig != null
|
| | | && (successConfig.Type == 39
|
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemTipsModel.curAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemTipsModel.curAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemTipsModel.curAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| File was renamed from System/KnapSack/Logic/PackSendQuestMgr.cs |
| | |
| | | FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } }
|
| | | BoxGetItemModel BoxModel { get { return ModelCenter.Instance.GetModel<BoxGetItemModel>(); } }
|
| | | VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } }
|
| | | PlayerSuitModel SuitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
|
| | | PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } } |
| | | RolePointModel rolePointModel { get { return ModelCenter.Instance.GetModel<RolePointModel>(); } }
|
| | | DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
|
| | |
|
| | | #region 发送穿戴装备的请求
|
| | | |
| | | public ItemModel selectedItem { get; private set; } |
| | | ItemConfig sendItemConfig = null;
|
| | | public ItemModel sendItemModel = null;
|
| | | int itemIndex = -1;
|
| | | public void PutOnItem(ItemWinBtnType btnType, string guid)
|
| | | public void PutOnItem(ItemOperateType btnType, string guid) |
| | | {
|
| | | sendItemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (sendItemModel == null)
|
| | | selectedItem = playerPack.GetItemModelByGUID(guid); |
| | | if (selectedItem == null) |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var itemId = sendItemModel.itemInfo.ItemID;
|
| | | sendItemConfig = ItemConfig.Get(sendItemModel.itemInfo.ItemID);
|
| | | var itemId = selectedItem.itemInfo.ItemID; |
| | | sendItemConfig = ItemConfig.Get(selectedItem.itemInfo.ItemID); |
| | | if (sendItemConfig.JobLimit != 0 && sendItemConfig.JobLimit / 100 != PlayerDatas.Instance.baseData.Job)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_lhs_31379");
|
| | | return;
|
| | | }
|
| | |
|
| | | itemIndex = sendItemModel.itemInfo.ItemPlace;
|
| | | var putOnLimits = sendItemModel.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit);
|
| | | itemIndex = selectedItem.itemInfo.ItemPlace; |
| | | var putOnLimits = selectedItem.GetUseDataModel((int)ItemUseDataKey.cancelUseLimit); |
| | | if (putOnLimits != null)
|
| | | {
|
| | | if (putOnLimits[0] == 1)
|
| | |
| | | }
|
| | | break;
|
| | | case 1:
|
| | | wearable = CheckPutOnRealm(config);
|
| | | wearable = CheckPutOnRealm(itemId); |
| | | break;
|
| | | case 2:
|
| | | wearable = CheckPutOnNeed();
|
| | | wearable = CheckPutOnNeed(itemId); |
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | private Dictionary<AttrEnum, int> sumNeedlist = new Dictionary<AttrEnum, int>();
|
| | | private float sumOffsetPoint = 0;
|
| | | private int sumNeedPoint = 0;
|
| | | private bool CheckPutOnNeed()
|
| | | |
| | | private bool CheckPutOnNeed(int itemId) |
| | | {
|
| | | var config = ItemConfig.Get(itemId); |
| | | int playerJob = PlayerDatas.Instance.baseData.Job;
|
| | | if (playerJob != Math.Floor((double)sendItemConfig.JobLimit / 100) && sendItemConfig.JobLimit != 0)
|
| | | if (playerJob != Math.Floor((double)config.JobLimit / 100) && config.JobLimit != 0) |
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_lhs_31379");
|
| | | return false;
|
| | | }
|
| | |
|
| | | int jobRank = sendItemConfig.JobLimit % 10;
|
| | | int jobRank = config.JobLimit % 10; |
| | | offsetConditionStr.Length = 0;
|
| | | sumOffsetlist.Clear();
|
| | | sumNeedlist.Clear();
|
| | |
| | | needConditionStr.Length = 0;
|
| | | upgradConditionStr.Length = 0;
|
| | | float offset = 0;
|
| | | if (sendItemConfig.LimitSTR != 0)
|
| | | if (config.LimitSTR != 0) |
| | | {
|
| | | offset = sendItemConfig.LimitSTR - UIHelper.GetPropertyMapPlayerData(AttrEnum.POWER);
|
| | | offset = config.LimitSTR - UIHelper.GetPropertyMapPlayerData(AttrEnum.POWER); |
| | | if (offset > 0)
|
| | | {
|
| | | if (offsetConditionStr.Length > 0)
|
| | |
| | |
|
| | | if (upgradConditionStr.Length > 0)
|
| | | {
|
| | | upgradConditionStr.Append("\n" + Language.Get("KnapS141", Language.Get("KnapS136", sendItemConfig.LimitSTR), offset));
|
| | | upgradConditionStr.Append("\n" + Language.Get("KnapS141", Language.Get("KnapS136", config.LimitSTR), offset)); |
| | | }
|
| | | else
|
| | | {
|
| | | upgradConditionStr.Append(Language.Get("KnapS141", Language.Get("KnapS136", sendItemConfig.LimitSTR), offset));
|
| | | upgradConditionStr.Append(Language.Get("KnapS141", Language.Get("KnapS136", config.LimitSTR), offset)); |
| | | }
|
| | |
|
| | | sumOffsetPoint += offset;
|
| | | sumNeedPoint += sendItemConfig.LimitSTR;
|
| | | sumNeedPoint += config.LimitSTR; |
| | | sumOffsetlist.Add(AttrEnum.POWER, offset);
|
| | | }
|
| | | sumNeedlist.Add(AttrEnum.POWER, sendItemConfig.LimitSTR);
|
| | | sumNeedlist.Add(AttrEnum.POWER, config.LimitSTR); |
| | | if (needConditionStr.Length > 0)
|
| | | {
|
| | | needConditionStr.Append("\n" + Language.Get("KnapS136", sendItemConfig.LimitSTR));
|
| | | needConditionStr.Append("\n" + Language.Get("KnapS136", config.LimitSTR)); |
| | | }
|
| | | else
|
| | | {
|
| | | needConditionStr.Append(Language.Get("KnapS136", sendItemConfig.LimitSTR));
|
| | | needConditionStr.Append(Language.Get("KnapS136", config.LimitSTR)); |
| | | } |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | if (sendItemConfig.LimitPHY != 0)
|
| | | if (config.LimitPHY != 0) |
| | | {
|
| | | offset = sendItemConfig.LimitPHY - UIHelper.GetPropertyMapPlayerData(AttrEnum.AGILITY);
|
| | | offset = config.LimitPHY - UIHelper.GetPropertyMapPlayerData(AttrEnum.AGILITY); |
| | | if (offset > 0)
|
| | | {
|
| | | if (offsetConditionStr.Length > 0)
|
| | |
| | |
|
| | | if (upgradConditionStr.Length > 0)
|
| | | {
|
| | | upgradConditionStr.Append("\n" + Language.Get("KnapS141", Language.Get("KnapS135", sendItemConfig.LimitPHY), offset));
|
| | | upgradConditionStr.Append("\n" + Language.Get("KnapS141", Language.Get("KnapS135", config.LimitPHY), offset)); |
| | | }
|
| | | else
|
| | | {
|
| | | upgradConditionStr.Append(Language.Get("KnapS141", Language.Get("KnapS135", sendItemConfig.LimitPHY), offset));
|
| | | upgradConditionStr.Append(Language.Get("KnapS141", Language.Get("KnapS135", config.LimitPHY), offset)); |
| | | }
|
| | |
|
| | | sumOffsetPoint += offset;
|
| | | sumNeedPoint += sendItemConfig.LimitPHY;
|
| | | sumNeedPoint += config.LimitPHY; |
| | | sumOffsetlist.Add(AttrEnum.AGILITY, offset);
|
| | | }
|
| | | sumNeedlist.Add(AttrEnum.AGILITY, sendItemConfig.LimitPHY);
|
| | | sumNeedlist.Add(AttrEnum.AGILITY, config.LimitPHY); |
| | | if (needConditionStr.Length > 0)
|
| | | {
|
| | | needConditionStr.Append("\n" + Language.Get("KnapS135", sendItemConfig.LimitPHY));
|
| | | needConditionStr.Append("\n" + Language.Get("KnapS135", config.LimitPHY)); |
| | | }
|
| | | else
|
| | | {
|
| | | needConditionStr.Append(Language.Get("KnapS135", sendItemConfig.LimitPHY));
|
| | | needConditionStr.Append(Language.Get("KnapS135", config.LimitPHY)); |
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | if (sendItemConfig.LimitPNE != 0)
|
| | | if (config.LimitPNE != 0) |
| | | {
|
| | | offset = sendItemConfig.LimitPNE - UIHelper.GetPropertyMapPlayerData(AttrEnum.MENTALITY);
|
| | | offset = config.LimitPNE - UIHelper.GetPropertyMapPlayerData(AttrEnum.MENTALITY); |
| | | if (offset > 0)
|
| | | {
|
| | | if (offsetConditionStr.Length > 0)
|
| | |
| | |
|
| | | if (upgradConditionStr.Length > 0)
|
| | | {
|
| | | upgradConditionStr.Append("\n" + Language.Get("KnapS141", Language.Get("KnapS137", sendItemConfig.LimitPNE), offset));
|
| | | upgradConditionStr.Append("\n" + Language.Get("KnapS141", Language.Get("KnapS137", config.LimitPNE), offset)); |
| | | }
|
| | | else
|
| | | {
|
| | | upgradConditionStr.Append(Language.Get("KnapS141", Language.Get("KnapS137", sendItemConfig.LimitPNE), offset));
|
| | | upgradConditionStr.Append(Language.Get("KnapS141", Language.Get("KnapS137", config.LimitPNE), offset)); |
| | | }
|
| | |
|
| | | sumOffsetPoint += offset;
|
| | | sumOffsetlist.Add(AttrEnum.MENTALITY, offset);
|
| | | sumNeedPoint += sendItemConfig.LimitPNE;
|
| | | sumNeedPoint += config.LimitPNE; |
| | | }
|
| | | sumNeedlist.Add(AttrEnum.MENTALITY, sendItemConfig.LimitPNE);
|
| | | sumNeedlist.Add(AttrEnum.MENTALITY, config.LimitPNE); |
| | |
|
| | | if (needConditionStr.Length > 0)
|
| | | {
|
| | | needConditionStr.Append("\n" + Language.Get("KnapS137", sendItemConfig.LimitPNE));
|
| | | needConditionStr.Append("\n" + Language.Get("KnapS137", config.LimitPNE)); |
| | | }
|
| | | else
|
| | | {
|
| | | needConditionStr.Append(Language.Get("KnapS137", sendItemConfig.LimitPNE));
|
| | | needConditionStr.Append(Language.Get("KnapS137", config.LimitPNE)); |
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | private StringBuilder curRealmImgStr = new StringBuilder();
|
| | | private StringBuilder needRealmImgStr = new StringBuilder();
|
| | | private bool CheckPutOnRealm(ItemConfig config)
|
| | | private bool CheckPutOnRealm(int itemId) |
| | | {
|
| | | var config = ItemConfig.Get(itemId); |
| | | curRealmImgStr.Length = 0;
|
| | | needRealmImgStr.Length = 0;
|
| | | var _realmLv = config.RealmLimit;
|
| | |
| | | bool isSameEquip = false;
|
| | | switch ((RoleEquipType)sendItemConfig.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.FairyCan: |
| | | isSameEquip = true;
|
| | | putOnModel1 = playerPack.GetItemModelByIndex(PackType.Equip, sendItemConfig.EquipPlace);
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFairyCan2);
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FairyCan2); |
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | isSameEquip = true;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | CheckSuitReplaceInfo(sendItemConfig.EquipPlace, sendItemModel);
|
| | | CheckSuitReplaceInfo(sendItemConfig.EquipPlace, selectedItem); |
| | | }
|
| | |
|
| | | public void CheckSuitReplaceInfo(int equipPlace, ItemModel item)
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | var replaceDic = SuitModel.SetReplaceSuitModel(item.itemId, equipPlace);
|
| | | if (replaceDic[SuitType.LowSuit].isNoEffect && !replaceDic[SuitType.HighSuit].isNoEffect)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ReplaceSuitPrompt102", UIHelper.GetEquipAreaName(equipPlace), Language.Get("EquipSuitNormal2")),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | | else if (replaceDic[SuitType.LowSuit].isPerfect && replaceDic[SuitType.HighSuit].isNoEffect)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ReplaceSuitPrompt102", UIHelper.GetEquipAreaName(equipPlace), Language.Get("EquipSuitHigh")),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | | else if (replaceDic[SuitType.LowSuit].isNoEffect && replaceDic[SuitType.HighSuit].isNoEffect)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ReplaceSuitPrompt104", UIHelper.GetEquipAreaName(equipPlace)),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | | else if (replaceDic[SuitType.LowSuit].effectLv > 0 && replaceDic[SuitType.HighSuit].effectLv <= 0
|
| | | && !replaceDic[SuitType.HighSuit].isNoEffect)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ReplaceSuitPrompt101", UIHelper.GetEquipAreaName(equipPlace), Language.Get("EquipSuitNormal2"), replaceDic[SuitType.LowSuit].effectLv),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | | else if (replaceDic[SuitType.HighSuit].effectLv > 0 && replaceDic[SuitType.LowSuit].effectLv <= 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ReplaceSuitPrompt101", UIHelper.GetEquipAreaName(equipPlace), Language.Get("EquipSuitHigh"), replaceDic[SuitType.LowSuit].effectLv),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | | else if (replaceDic[SuitType.HighSuit].isNoEffect && replaceDic[SuitType.LowSuit].effectLv > 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("ReplaceSuitPrompt103", UIHelper.GetEquipAreaName(equipPlace), replaceDic[SuitType.LowSuit].effectLv),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | | else if (replaceDic[SuitType.LowSuit].effectLv > 0 && replaceDic[SuitType.HighSuit].effectLv > 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
|
| | | Language.Get("ReplaceSuitPrompt105", UIHelper.GetEquipAreaName(equipPlace), replaceDic[SuitType.HighSuit].effectLv, replaceDic[SuitType.LowSuit].effectLv),
|
| | | (bool isOK) =>
|
| | | {
|
| | | if (isOK)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | }
|
| | | );
|
| | | return;
|
| | | }
|
| | |
|
| | | if (item.packType == PackType.JadeDynastyItem)
|
| | | {
|
| | | if (equipPlace >= (int)RoleEquipType.JadeDynasty_Cloak
|
| | | && equipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | if (equipPlace >= (int)RoleEquipType.JadeDynasty_Cloak && equipPlace <= (int)RoleEquipType.JadeDynasty_Sword4) |
| | | {
|
| | | var jadeDynastyModel = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>();
|
| | | bool islock = jadeDynastyModel.IsLockEquipPlace(equipPlace);
|
| | |
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | if (item != null && item.config.BindType == 1)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("JadeDynastyEquip5"), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | }
|
| | | });
|
| | | |
| | | var replaceDic = suitModel.SetReplaceSuitModel(item.itemId, equipPlace); |
| | | var replaceTip = string.Empty; |
| | | var isReplace = false; |
| | | var equipPlaceName = UIHelper.GetEquipPlaceName(equipPlace); |
| | | var lowSuitResult = replaceDic[SuitType.LowSuit]; |
| | | var highSuitResult = replaceDic[SuitType.HighSuit]; |
| | | |
| | | if (lowSuitResult.isNoEffect && !highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt102", equipPlaceName, Language.Get("EquipSuitNormal2")); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.isPerfect && highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt102", equipPlaceName, Language.Get("EquipSuitHigh")); |
| | | isReplace = true; |
| | | return;
|
| | | }
|
| | | else if (lowSuitResult.isNoEffect && highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt104", equipPlaceName); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.effectLv > 0 && highSuitResult.effectLv <= 0 |
| | | && !highSuitResult.isNoEffect) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt101", equipPlaceName, Language.Get("EquipSuitNormal2"), lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (highSuitResult.effectLv > 0 && lowSuitResult.effectLv <= 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt101", equipPlaceName, Language.Get("EquipSuitHigh"), lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (highSuitResult.isNoEffect && lowSuitResult.effectLv > 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt103", equipPlaceName, lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | } |
| | | else if (lowSuitResult.effectLv > 0 && highSuitResult.effectLv > 0) |
| | | { |
| | | replaceTip = Language.Get("ReplaceSuitPrompt105", equipPlaceName, highSuitResult.effectLv, lowSuitResult.effectLv); |
| | | isReplace = true; |
| | | }
|
| | |
|
| | | if (item.packType == PackType.JadeDynastyItem) |
| | | { |
| | | if (item != null && item.config.BindType == 1) |
| | | { |
| | | replaceTip = Language.Get("JadeDynastyEquip5"); |
| | | isReplace = true; |
| | | } |
| | | } |
| | | |
| | | if (isReplace) |
| | | { |
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), replaceTip, |
| | | (bool ok) => |
| | | { |
| | | if (ok) |
| | | { |
| | | PutOnEquip(equipPlace, itemIndex, item);
|
| | | } |
| | | } |
| | | ); |
| | | } |
| | | else |
| | | { |
| | | PutOnEquip(equipPlace, itemIndex, item); |
| | | } |
| | | }
|
| | |
|
| | | public void PutOnEquip(int equipPlace, int itemIndex, ItemModel oldItem)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (SuitModel.IsPerfectGetSuitLv(sendItemConfig.ID, equipPlace))
|
| | | if (suitModel.IsPerfectGetSuitLv(sendItemConfig.ID, equipPlace)) |
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("SwitchEquip_SuitPanel");
|
| | | }
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送脱下装备的请求
|
| | | public void PutOffEquip(ItemWinBtnType btnType, string guid)
|
| | | public void PutOffEquip(ItemOperateType btnType, string guid) |
| | | {
|
| | | var item = playerPack.GetItemModelByGUID(guid);
|
| | | if (item == null)
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送放入仓库请求
|
| | | public void PutInWareHouse(ItemWinBtnType btnType, string guid)
|
| | | public void PutInWareHouse(ItemOperateType btnType, string guid) |
| | | {
|
| | | var itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel == null)
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送从仓库取出请求
|
| | | public void TakeOutFromWarehouse(ItemWinBtnType btnType, string guid)
|
| | | public void TakeOutFromWarehouse(ItemOperateType btnType, string guid) |
| | | {
|
| | | var itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel == null)
|
| | |
| | | #region 发送使用物品请求
|
| | |
|
| | | public ItemModel useItemModel { get; set; }
|
| | | public void UseItem(ItemWinBtnType btnType, int itemIndex)
|
| | | public void UseItem(ItemOperateType btnType, int itemIndex) |
| | | {
|
| | | var singlePack = playerPack.GetSinglePackModel(PackType.Item);
|
| | | if (singlePack == null)
|
| | |
| | | }
|
| | | if (playerPack.CheckIsDrugById(useItemModel.itemInfo.ItemID))
|
| | | {
|
| | | if (CheckItemUselimit(useItemModel.config))
|
| | | if (CheckItemUselimit(useItemModel.itemId)) |
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.MakeDrug);
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool CheckItemUselimit(ItemConfig config)
|
| | | public bool CheckItemUselimit(int itemId) |
| | | {
|
| | | var config = ItemConfig.Get(itemId); |
| | | int[] uselimits = config.UseCondiType;
|
| | | if (uselimits == null) return true;
|
| | |
|
| | |
| | | }
|
| | | break;
|
| | | case 1:
|
| | | return CheckPutOnRealm(config);
|
| | | return CheckPutOnRealm(itemId); |
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public bool CheckUseCondition(ItemModel itemModel)
|
| | | {
|
| | | if (!CheckItemUselimit(itemModel.config))
|
| | | if (!CheckItemUselimit(itemModel.itemId)) |
| | | {
|
| | | return false;
|
| | | }
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送拆分请求
|
| | | public void OnClickSplitBtn(ItemWinBtnType btnType, string guid)
|
| | | public void OnClickSplitBtn(ItemOperateType btnType, string guid) |
| | | {
|
| | | WindowCenter.Instance.Open<SplitWin>();
|
| | | }
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送上架请求
|
| | | public void PutAwayItem(ItemWinBtnType btnType, string guid)
|
| | | public void PutAwayItem(ItemOperateType btnType, string guid) |
| | | {
|
| | | var itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel == null || itemModel.packType != PackType.Item)
|
| | |
| | | #endregion
|
| | |
|
| | | #region 点击镶嵌按钮
|
| | | public void GotoInlayItem(ItemWinBtnType btnType, string guid)
|
| | | public void GotoInlayItem(ItemOperateType btnType, string guid) |
| | | {
|
| | | var model = playerPack.GetItemModelByGUID(guid);
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(model.config.Type);
|
| | |
| | | #endregion
|
| | |
|
| | | #region 点击合成按钮
|
| | | public void GotoComposeItem(ItemWinBtnType btnType, int jumpId)
|
| | | public void GotoComposeItem(ItemOperateType btnType, int jumpId) |
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)jumpId);
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 发送出售请求
|
| | | public void SellItem(ItemWinBtnType btnType, ItemAttrData attrData)
|
| | | public void SellItem(ItemOperateType btnType, ItemAttrData attrData) |
| | | {
|
| | | if (attrData.itemConfig.EquipPlace > 0 && attrData.itemConfig.EquipPlace <= (int)RoleEquipType.retSpiritAnimal)
|
| | | if (attrData.itemConfig.EquipPlace > 0 && attrData.itemConfig.EquipPlace <= (int)RoleEquipType.SpiritAnimal) |
| | | {
|
| | | bool isOverdue = modelInterface.IsOverdue(attrData.guid, attrData.itemConfig.ID, attrData.useDataDict);
|
| | | bool isLimit = Math.Floor((double)attrData.itemConfig.JobLimit / 100) == PlayerDatas.Instance.baseData.Job
|
| | | || attrData.itemConfig.JobLimit == 0 ? true : false;
|
| | | ItemModel putModel = playerPack.GetItemModelByIndex(PackType.Equip, attrData.itemConfig.EquipPlace);
|
| | | if (attrData.itemConfig.EquipPlace == (int)RoleEquipType.retFairyCan)
|
| | | if (attrData.itemConfig.EquipPlace == (int)RoleEquipType.FairyCan) |
| | | {
|
| | | ItemModel fairy2Model = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFairyCan2);
|
| | | ItemModel fairy2Model = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FairyCan2); |
| | | if (fairy2Model == null || putModel == null)
|
| | | {
|
| | | putModel = null;
|
| | |
| | | {
|
| | | if (putModel == null)
|
| | | {
|
| | | SetSellItemPrompt(attrData, "KnapS147", UIHelper.GetEquipAreaName(attrData.itemConfig.EquipPlace));
|
| | | SetSellItemPrompt(attrData, "KnapS147", UIHelper.GetEquipPlaceName(attrData.itemConfig.EquipPlace)); |
| | | }
|
| | | else
|
| | | {
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送拆解请求
|
| | | public void DismantleItem(ItemWinBtnType btnType, ItemAttrData attrData)
|
| | | public void DismantleItem(ItemOperateType btnType, ItemAttrData attrData) |
| | | {
|
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.itemDecompound);
|
| | | int needGridCnt = 0;
|
| | |
| | | #endregion
|
| | |
|
| | | #region 发送续费请求
|
| | | public void RenewalItem(ItemWinBtnType btnType, string guid)
|
| | | public void RenewalItem(ItemOperateType btnType, string guid) |
| | | {
|
| | | GuardOverdueWin.guid = guid;
|
| | | WindowCenter.Instance.Open<GuardOverdueWin>();
|
| | |
| | | #endregion
|
| | |
|
| | | #region 解锁背包格子数据
|
| | | public int OpenCount {
|
| | | public int OpenCount |
| | | { |
| | | get; private set;
|
| | | }
|
| | |
|
| | | public PackType packType {
|
| | | public PackType packType |
| | | { |
| | | get; private set;
|
| | | }
|
| | |
|
| | | public int Index {
|
| | | public int Index |
| | | { |
| | | get; private set;
|
| | | }
|
| | |
|
| File was renamed from System/KnapSack/Logic/PackSendQuestMgr.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a09f07a0bf099284fbddb480f3685e34 |
| | | timeCreated: 1514102348 |
| | | guid: b4b8b0d7d8bab8b459c9a9eaa347363c |
| | | timeCreated: 1550586262 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public interface IItemUseDate
|
| | | public class ItemModel
|
| | | {
|
| | | int itemId { get;set; }
|
| | | int EquipPlace { get; set; }
|
| | | Dictionary<int, List<int>> useDataDict { get; set; }
|
| | | }
|
| | | public readonly PackType packType;
|
| | |
|
| | | public class ItemModel : IItemUseDate
|
| | | {
|
| | | public ItemConfig config { get; private set; }
|
| | | public ItemInfo itemInfo { get; private set; }
|
| | | public PackType packType { get; private set; }
|
| | | public int equipScore { get; private set; }
|
| | | public Dictionary<int, List<int>> useDataDict { get; set; }
|
| | | public int EquipPlace { get; set; }
|
| | | public int itemId { get; set; }
|
| | | public Dictionary<int, List<int>> useDataDict { get; private set; }
|
| | |
|
| | | public int EquipPlace
|
| | | {
|
| | | get
|
| | | {
|
| | | if (packType != PackType.Equip)
|
| | | {
|
| | | return config == null ? 0 : config.EquipPlace;
|
| | | }
|
| | | else
|
| | | {
|
| | | return itemInfo == null ? 0 : itemInfo.ItemPlace;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public int itemId { get { return itemInfo == null ? 0 : itemInfo.ItemID; } }
|
| | | public int preItemCount{ get;private set; }
|
| | |
|
| | | PackModelInterface _modelInterface;
|
| | | PackModelInterface modelInterface
|
| | | {
|
| | | get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
|
| | | }
|
| | | PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
|
| | |
|
| | | public ItemModel(PackType type)
|
| | | {
|
| | | preItemCount = 0;
|
| | | packType = type;
|
| | | itemInfo = null;
|
| | | }
|
| | |
|
| | | public void SetItemModel(ItemInfo info)
|
| | | public void SetItemInfo(ItemInfo info)
|
| | | {
|
| | | if(itemInfo != null)
|
| | | {
|
| | | preItemCount = itemInfo.ItemCount;
|
| | | }
|
| | | itemInfo = info;
|
| | | itemId = info.ItemID;
|
| | | config = ItemConfig.Get(info.ItemID);
|
| | | if(packType != PackType.Equip)
|
| | | {
|
| | | this.EquipPlace = config.EquipPlace;
|
| | | }
|
| | | else
|
| | | {
|
| | | this.EquipPlace = info.ItemPlace;
|
| | | }
|
| | |
|
| | | itemInfo = info;
|
| | | config = ItemConfig.Get(info.ItemID);
|
| | | useDataDict = ConfigParse.Analysis(info.UserData);
|
| | | var serverSurplusTime = 0;
|
| | | if (useDataDict != null && useDataDict.ContainsKey(48) && useDataDict[48].Count > 0)
|
| | |
| | | {
|
| | | itemInfo.ItemCount = GetUseDataModel((int)ItemUseDataKey.itemCount)[0];
|
| | | }
|
| | | List<int> itemEffectTime = GetUseDataModel((int)ItemUseDataKey.createTime);
|
| | |
|
| | | var itemEffectTime = GetUseDataModel((int)ItemUseDataKey.createTime);
|
| | | if(itemEffectTime != null && itemEffectTime[0] != 0 && config.ExpireTime > 0)
|
| | | {
|
| | | DebugEx.Log("创建时间:" + itemEffectTime[0]);
|
| | |
| | | {
|
| | | preItemCount = itemInfo.ItemCount;
|
| | | }
|
| | |
|
| | | itemInfo.ItemCount = count;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | useDataDict.TryGetValue(key, out list);
|
| | | }
|
| | |
|
| | | return list;
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (type != PackType.Item && type != PackType.Warehouse) return;
|
| | | ItemConfig itemConfig = ItemConfig.Get(id);
|
| | | if (itemConfig == null || itemConfig.EquipPlace != (int)RoleEquipType.retSpiritAnimal) return;
|
| | | if (itemConfig == null || itemConfig.EquipPlace != (int)RoleEquipType.SpiritAnimal) return;
|
| | |
|
| | | bool isRemove = false;
|
| | | for(int i = 0; i < itemGuids.Count; i++)
|
| | |
| | | ItemModel fairyModel2 = null;
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | fairyModel2 = playerPack.GetItemModelByIndex(type, (int)RoleEquipType.retFairyCan2);
|
| | | case RoleEquipType.FairyCan:
|
| | | fairyModel2 = playerPack.GetItemModelByIndex(type, (int)RoleEquipType.FairyCan2);
|
| | | if (fairyModel2 != null)
|
| | | {
|
| | | if (itemModel != null)
|
| | |
| | | {
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | {
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | {
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | {
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | | }
|
| | | break;
|
| | | default:
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.itemDecompound);
|
| | | if (dismantleReturnlist != null && dismantleReturnlist.Count > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.dismantle, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.DismantleItem(ItemWinBtnType.dismantle, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.dismantle, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.DismantleItem(ItemOperateType.dismantle, attrData); });
|
| | | }
|
| | |
|
| | | if (!isOverdue)
|
| | | {
|
| | | if(attrData.itemConfig.JumpComposeCondi != null && attrData.itemConfig.JumpComposeCondi.Length > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.compose, (ItemWinBtnType, ItemAttrData) => {
|
| | | int jumpId = 0;
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId,out jumpId);
|
| | | if (isUnlock)
|
| | | {
|
| | | ItemLogicUtility.Instance.GotoComposeItem(ItemWinBtnType.compose,jumpId);
|
| | | ItemLogicUtility.Instance.GotoComposeItem(ItemOperateType.compose,jumpId);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.Type == 25 && attrData.itemConfig.Effect1 == 225)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.inlay, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.GotoInlayItem(ItemWinBtnType.inlay, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.inlay, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.GotoInlayItem(ItemOperateType.inlay, attrData.guid); });
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.CanTrade == 1 && attrData.isBind == 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putAway, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutAwayItem(ItemWinBtnType.putAway, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putAway, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutAwayItem(ItemOperateType.putAway, attrData.guid); });
|
| | | }
|
| | |
|
| | | if((ItemType)attrData.itemConfig.Type == ItemType.WingsMat)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.refine, (ItemWinBtnType, ItemAttrData) =>
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.refine, (ItemWinBtnType, ItemAttrData) =>
|
| | | {
|
| | | // BoxGetItemModel.Instance.SetModel(attrData.guid);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc3);
|
| | |
| | |
|
| | | if (attrData.count > 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.split, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.OnClickSplitBtn(ItemWinBtnType.split, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.split, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.OnClickSplitBtn(ItemOperateType.split, attrData.guid); });
|
| | | }
|
| | |
|
| | | if(!isOverdue)
|
| | |
| | | case ItemWinType.equipWin:
|
| | | case ItemWinType.wingsWin:
|
| | | case ItemWinType.guardWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putOn, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOn, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putOn, attrData.guid); });
|
| | | break;
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.UseTag == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.makeUse, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.UseItem(ItemWinBtnType.makeUse, attrData.index); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.makeUse, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.UseItem(ItemOperateType.makeUse, attrData.index); });
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if(isOverdue)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.RenewalItem(ItemWinBtnType.renewal, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.renewal, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.RenewalItem(ItemOperateType.renewal, attrData.guid); });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if(PlayerDatas.Instance.baseData.coinPointTotal <= 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FirstRecharge); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.renewal, (ItemWinBtnType, ItemAttrData) => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FirstRecharge); });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOut, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.TakeOutFromWarehouse(ItemWinBtnType.putOut,attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOut, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.TakeOutFromWarehouse(ItemOperateType.putOut,attrData.guid); });
|
| | |
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | |
|
| | | switch (attrData.winType)
|
| | | {
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOn, (ItemWinBtnType, ItemAttrData) => {
|
| | | if(dogzModel.CheckIsPutOn(attrData.itemId))
|
| | | {
|
| | | List<int> indexlist = new List<int>();
|
| | |
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOff, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOff, (ItemWinBtnType, ItemAttrData) => {
|
| | | dogzModel.CheckPutOff(dogzModel.GetDogzEquipPlaceByIndex(attrData.index));
|
| | | });
|
| | |
|
| | | if(dogzModel.TryGetAssistDogzState(dogzModel.presentSelectDogz))
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.strength, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.strength, (ItemWinBtnType, ItemAttrData) => {
|
| | | dogzModel.OpenDogzFuncEvent(1, attrData.index);
|
| | | });
|
| | | }
|
| | |
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putIn, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutInWareHouse(ItemWinBtnType.putIn, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putIn, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutInWareHouse(ItemOperateType.putIn, attrData.guid); });
|
| | |
|
| | | }
|
| | |
|
| | |
| | | if (attrData == null) return;
|
| | |
|
| | | RoleEquipType equipType = (RoleEquipType)attrData.itemConfig.EquipPlace;
|
| | | if(equipType == RoleEquipType.retWing)
|
| | | if(equipType == RoleEquipType.Wing)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.refine, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.refine, (ItemWinBtnType, ItemAttrData) => {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc3);
|
| | | });
|
| | | }
|
| | | else if(equipType != RoleEquipType.retSpiritAnimal)
|
| | | else if(equipType != RoleEquipType.SpiritAnimal)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.strength, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.strength, (ItemWinBtnType, ItemAttrData) => {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StrengthFunc1);
|
| | | });
|
| | | }
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOff,(ItemWinBtnType,ItemAttrData) => {
|
| | | ItemLogicUtility.Instance.PutOffEquip(ItemWinBtnType.putOff, attrData.guid);
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOff,(ItemWinBtnType,ItemAttrData) => {
|
| | | ItemLogicUtility.Instance.PutOffEquip(ItemOperateType.putOff, attrData.guid);
|
| | | });
|
| | |
|
| | | for (int i = 0; i < tryPutOnEquipIds.Length; i++)
|
| | |
| | | {
|
| | | if (PlayerDatas.Instance.baseData.coinPointTotal <= 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FirstRecharge); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.renewal, (ItemWinBtnType, ItemAttrData) => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FirstRecharge); });
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | bool isOverdue = modelInterface.IsOverdue(attrData.guid, attrData.itemId, attrData.useDataDict);
|
| | | if (attrData.itemConfig.CanSell == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemWinBtnType.sell, attrData); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.sell, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.SellItem(ItemOperateType.sell, attrData); });
|
| | | }
|
| | | //List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | //if (dismantleReturnlist != null && dismantleReturnlist.Count > 0)
|
| | |
| | | {
|
| | | if (attrData.itemConfig.JumpComposeCondi != null && attrData.itemConfig.JumpComposeCondi.Length > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) =>
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.compose, (ItemWinBtnType, ItemAttrData) =>
|
| | | {
|
| | | int jumpId = 0;
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId, out jumpId);
|
| | | if (isUnlock)
|
| | | {
|
| | | ItemLogicUtility.Instance.GotoComposeItem(ItemWinBtnType.compose, jumpId);
|
| | | ItemLogicUtility.Instance.GotoComposeItem(ItemOperateType.compose, jumpId);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.Effect1 == 225)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.inlay, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.GotoInlayItem(ItemWinBtnType.inlay, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.inlay, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.GotoInlayItem(ItemOperateType.inlay, attrData.guid); });
|
| | | }
|
| | |
|
| | | // if (attrData.itemConfig.CanTrade == 1 && attrData.isBind == 0)
|
| | |
| | | switch (attrData.winType)
|
| | | {
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putOn, attrData.guid); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOn, (ItemWinBtnType, ItemAttrData) => { ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putOn, attrData.guid); });
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | |
|
| | | RoleEquipType equipType = (RoleEquipType)attrData.itemConfig.EquipPlace;
|
| | |
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOff, (ItemWinBtnType, ItemAttrData) => {
|
| | | ItemLogicUtility.Instance.PutOffEquip(ItemWinBtnType.putOff, attrData.guid);
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.putOff, (ItemWinBtnType, ItemAttrData) => {
|
| | | ItemLogicUtility.Instance.PutOffEquip(ItemOperateType.putOff, attrData.guid);
|
| | | });
|
| | | }
|
| | | #endregion
|
| | |
| | | {
|
| | | switch ((RoleEquipType)attrData.itemConfig.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | return SetWingsBasicAttr(attrData);
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | return SetGuardBasicAttr(attrData);
|
| | | default:
|
| | | return SetEquipBasicAttr(attrData);
|
| | |
| | |
|
| | | private string SetAttrColor(string attrStr,int atkSpeed,int equipPlace)
|
| | | {
|
| | | if ((RoleEquipType)equipPlace != RoleEquipType.retFairyCan
|
| | | && (RoleEquipType)equipPlace != RoleEquipType.retFairyCan2)
|
| | | if ((RoleEquipType)equipPlace != RoleEquipType.FairyCan
|
| | | && (RoleEquipType)equipPlace != RoleEquipType.FairyCan2)
|
| | | {
|
| | | return attrStr;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.Wing)
|
| | | {
|
| | | if (isCustom || itemConfig.StarLevel >= 3)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.Wing)
|
| | | {
|
| | | if (isCustom || itemConfig.StarLevel >= 3)
|
| | | {
|
| | |
| | | public Dictionary<int, int> legendDataDict { get; private set; }
|
| | | public Dictionary<int, int> exhaustedMaxDataDict { get; private set; }
|
| | | public Dictionary<int, int> wingsRefineMatDict { get; private set; }
|
| | | public Dictionary<ItemWinBtnType,Action<ItemWinBtnType,string>> tipsFuncBtnDic { get; private set; }
|
| | | public Dictionary<ItemOperateType,Action<ItemOperateType,string>> tipsFuncBtnDic { get; private set; }
|
| | |
|
| | | public Dictionary<SuitType,ItemSuitAttrData> suitAttrDataDict { get; private set; }
|
| | | public Dictionary<SuitType, int> suitTypeCntDict { get; private set; }
|
| | |
| | | {
|
| | | this.packType = type;
|
| | | this.itemConfig = ItemConfig.Get(id);
|
| | | this.tipsFuncBtnDic = new Dictionary<ItemWinBtnType, Action<ItemWinBtnType,string>>();
|
| | | this.tipsFuncBtnDic = new Dictionary<ItemOperateType, Action<ItemOperateType,string>>();
|
| | | this.guid = guid;
|
| | | this.itemId = id;
|
| | | this.count = count;
|
| | |
| | | /// </summary>
|
| | | /// <param name="type"></param>
|
| | | /// <param name="func"></param>
|
| | | public void SetTipsFuncBtn(ItemWinBtnType type, Action<ItemWinBtnType,string> func)
|
| | | public void SetTipsFuncBtn(ItemOperateType type, Action<ItemOperateType,string> func)
|
| | | {
|
| | | tipsFuncBtnDic.Add(type,func);
|
| | | }
|
| | |
| | | singlePack.GetItemCountByID(itemId,out list);
|
| | | if(list.Count > 0)
|
| | | {
|
| | | if(ItemLogicUtility.Instance.CheckItemUselimit(list[0].config))
|
| | | if(ItemLogicUtility.Instance.CheckItemUselimit(itemId))
|
| | | {
|
| | | ItemLogicUtility.Instance.SendMakeUseQuest(list[0].itemInfo.ItemPlace);
|
| | | }
|
| | |
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | |
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
| | | {
|
| | | if (itemModel == null) return false;
|
| | |
|
| | | ItemModel putModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel putModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.Item);
|
| | | List<ItemModel> itemModels = null;
|
| | | if (singlePack != null)
|
| | |
| | | int equipPlace = model.config.EquipPlace;
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.retWeapon:
|
| | | case RoleEquipType.retWeapon2:
|
| | | case RoleEquipType.retHat:
|
| | | case RoleEquipType.retClothes:
|
| | | case RoleEquipType.retBelt:
|
| | | case RoleEquipType.retTrousers:
|
| | | case RoleEquipType.retShoes:
|
| | | case RoleEquipType.retNeck:
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.retFairyCan2:
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.Weapon:
|
| | | case RoleEquipType.Weapon2:
|
| | | case RoleEquipType.Hat:
|
| | | case RoleEquipType.Clothes:
|
| | | case RoleEquipType.Belt:
|
| | | case RoleEquipType.Trousers:
|
| | | case RoleEquipType.Shoes:
|
| | | case RoleEquipType.Neck:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.FairyCan2:
|
| | | case RoleEquipType.Wing:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | case RoleEquipType.JadeDynasty_Cloak:
|
| | | case RoleEquipType.JadeDynasty_FaceMask:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | |
| | | var equipItemModel = playerPack.GetItemModelByIndex(PackType.Equip, model.config.EquipPlace);
|
| | | if (PlayerDatas.Instance.baseData.LV >= 200)
|
| | | {
|
| | | if (model.EquipPlace > (int)RoleEquipType.retWeapon2 && model.EquipPlace < (int)RoleEquipType.retNeck)
|
| | | if (model.EquipPlace > (int)RoleEquipType.Weapon2 && model.EquipPlace < (int)RoleEquipType.Neck)
|
| | | {
|
| | | if (equipItemModel != null && equipItemModel.config.ItemColor > model.config.ItemColor)
|
| | | {
|
| | |
| | | foreach (var model in pairs.Values)
|
| | | {
|
| | | if (model.config.EquipPlace > 0
|
| | | && model.config.EquipPlace != (int)RoleEquipType.retSpiritAnimal
|
| | | && model.config.EquipPlace != (int)RoleEquipType.SpiritAnimal
|
| | | && model.config.RealmLimit <= realmLv
|
| | | && !IsOverdue(model.itemInfo.ItemGUID, model.itemId, model.useDataDict)
|
| | | && IsFightUp(model.itemId, model.equipScore) == 1)
|
| | |
| | | ItemModel putOnModel = null;
|
| | | switch((RoleEquipType)chinItemModel.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retClothes:
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.retBelt:
|
| | | case RoleEquipType.retHat:
|
| | | case RoleEquipType.retNeck:
|
| | | case RoleEquipType.retShoes:
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | case RoleEquipType.retTrousers:
|
| | | case RoleEquipType.retWeapon:
|
| | | case RoleEquipType.retWeapon2:
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Clothes:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.Belt:
|
| | | case RoleEquipType.Hat:
|
| | | case RoleEquipType.Neck:
|
| | | case RoleEquipType.Shoes:
|
| | | case RoleEquipType.SpiritAnimal:
|
| | | case RoleEquipType.Trousers:
|
| | | case RoleEquipType.Weapon:
|
| | | case RoleEquipType.Weapon2:
|
| | | case RoleEquipType.Wing:
|
| | | putOnModel = playerPack.GetItemModelByIndex(PackType.Equip, chinItemModel.EquipPlace);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Cloak:
|
| | |
| | | ItemModel putOnModel2 = null;
|
| | | switch((RoleEquipType)chinItemModel.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFairyCan2);
|
| | | case RoleEquipType.FairyCan:
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FairyCan2);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | |
| | |
|
| | | switch ((RoleEquipType)chinItemModel.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | if (putOnModel2 != null)
|
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (tipsModel.curAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in tipsModel.curAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in tipsModel.curAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| | |
| | | int playerJob = PlayerDatas.Instance.baseData.Job;
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.retFairyCan2:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.FairyCan2:
|
| | | return fairyGetPathId;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | if (wingsGetPathIdDict.ContainsKey(playerJob))
|
| | | {
|
| | | return wingsGetPathIdDict[playerJob];
|
| | |
| | | {
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.retFairyCan2:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.FairyCan2:
|
| | | if (PlayerDatas.Instance.baseData.LV >= fairyRedPointLvlimt)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | if (PlayerDatas.Instance.baseData.LV >= wingsRedpointLvlimt)
|
| | | {
|
| | | return true;
|
| | |
| | | ItemModel itemModel = GetItemModelByIndex(PackType.Equip, (int)equipType);
|
| | | switch (equipType)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.retFairyCan2:
|
| | | case RoleEquipType.FairyCan:
|
| | | case RoleEquipType.FairyCan2:
|
| | | if (PlayerDatas.Instance.baseData.LV >= fairyRedPointLvlimt && itemModel != null)
|
| | | {
|
| | | SetRoleEquipLocalSave((int)equipType);
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | if (PlayerDatas.Instance.baseData.LV >= wingsRedpointLvlimt && itemModel != null)
|
| | | {
|
| | | SetRoleEquipLocalSave((int)equipType);
|
| | |
| | | ItemModel itemModel = GetItemModelByIndex(PackType.Equip, key);
|
| | | switch ((RoleEquipType)key)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.FairyCan:
|
| | | if (PlayerDatas.Instance.baseData.LV >= fairyRedPointLvlimt && !TryGetRoleEquipLocalSave(key)
|
| | | && itemModel == null && roleEquipRedDict[(int)RoleEquipType.retFairyCan2].state == RedPointState.None)
|
| | | && itemModel == null && roleEquipRedDict[(int)RoleEquipType.FairyCan2].state == RedPointState.None)
|
| | | {
|
| | | roleEquipRedDict[key].state = RedPointState.Simple;
|
| | | }
|
| | |
| | | roleEquipRedDict[key].state = RedPointState.None;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retFairyCan2:
|
| | | case RoleEquipType.FairyCan2:
|
| | | if (PlayerDatas.Instance.baseData.LV >= fairyRedPointLvlimt && !TryGetRoleEquipLocalSave(key)
|
| | | && itemModel == null && roleEquipRedDict[(int)RoleEquipType.retFairyCan].state == RedPointState.None)
|
| | | && itemModel == null && roleEquipRedDict[(int)RoleEquipType.FairyCan].state == RedPointState.None)
|
| | | {
|
| | | roleEquipRedDict[key].state = RedPointState.Simple;
|
| | | }
|
| | |
| | | roleEquipRedDict[key].state = RedPointState.None;
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | if (PlayerDatas.Instance.baseData.LV >= wingsRedpointLvlimt && !TryGetRoleEquipLocalSave(key)
|
| | | && itemModel == null)
|
| | | {
|
| | |
| | | if (!packModelIndexDict.ContainsKey(itemInfo.ItemPlace)) |
| | | { |
| | | ItemModel itemModel = new ItemModel(packType); |
| | | itemModel.SetItemModel(itemInfo); |
| | | itemModel.SetItemInfo(itemInfo); |
| | | packModelIndexDict.Add(itemInfo.ItemPlace, itemModel); |
| | | } |
| | | else |
| | | { |
| | | packModelIndexDict[itemInfo.ItemPlace].SetItemModel(itemInfo); |
| | | packModelIndexDict[itemInfo.ItemPlace].SetItemInfo(itemInfo); |
| | | } |
| | | playerPack.SetItemGUIDDict(packModelIndexDict[itemInfo.ItemPlace]); |
| | | } |
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| | |
| | | };
|
| | | gridCell.itemCellBtn.m_OnDbClick = () =>
|
| | | {
|
| | | ItemLogicUtility.Instance.PutInWareHouse(ItemWinBtnType.putIn, itemModel.itemInfo.ItemGUID);
|
| | | ItemLogicUtility.Instance.PutInWareHouse(ItemOperateType.putIn, itemModel.itemInfo.ItemGUID);
|
| | | };
|
| | |
|
| | | }
|
| | |
| | | case PackType.Equip:
|
| | | switch ((RoleEquipType)equipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | fairy01 = playerPack.GetItemModelByIndex(type,(int)RoleEquipType.retFairyCan);
|
| | | fairy02 = playerPack.GetItemModelByIndex(type, (int)RoleEquipType.retFairyCan2);
|
| | | case RoleEquipType.FairyCan:
|
| | | fairy01 = playerPack.GetItemModelByIndex(type,(int)RoleEquipType.FairyCan);
|
| | | fairy02 = playerPack.GetItemModelByIndex(type, (int)RoleEquipType.FairyCan2);
|
| | | if(fairy01 == null || fairy02 == null)
|
| | | {
|
| | | return 0;
|
| | |
| | | };
|
| | | gridCell.itemCellBtn.m_OnDbClick = () =>
|
| | | {
|
| | | ItemLogicUtility.Instance.TakeOutFromWarehouse(ItemWinBtnType.putOut, itemModel.itemInfo.ItemGUID);
|
| | | ItemLogicUtility.Instance.TakeOutFromWarehouse(ItemOperateType.putOut, itemModel.itemInfo.ItemGUID);
|
| | | };
|
| | |
|
| | | }
|
| | |
| | | #region 成员变量
|
| | | [SerializeField] Image wear01Img;
|
| | | [SerializeField] Image wear02Img;
|
| | | private Button _closeBtn;
|
| | | private Button _wear01Btn;
|
| | | private Button _wear02Btn;
|
| | | private ItemCell _itemCell01;
|
| | | private ItemCell _itemCell02;
|
| | | private ItemModel _itemModel01 = null;
|
| | | private ItemModel _itemModel02 = null;
|
| | | private Text _wear01Text;
|
| | | private Text _wear02Text;
|
| | |
|
| | | private Button m_CloseBtn;
|
| | | private Button m_WearBtn01;
|
| | | private Button m_WearBtn02;
|
| | | private ItemCell m_ItemCell01;
|
| | | private ItemCell m_ItemCell02;
|
| | | private ItemModel m_ItemModel01 = null;
|
| | | private ItemModel m_ItemModel02 = null;
|
| | | private Text m_WearText01;
|
| | | private Text m_WearText02;
|
| | | #endregion
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
| | | }
|
| | |
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | ItemModel curItemModel;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | _closeBtn = transform.Find("CloseBtn").GetComponent<Button>();
|
| | | _wear01Btn = transform.Find("Fairy01/WearBtn").GetComponent<Button>();
|
| | | _wear02Btn = transform.Find("Fairy02/WearBtn").GetComponent<Button>();
|
| | | _itemCell01 = transform.Find("Fairy01/ItemCell").GetComponent<ItemCell>();
|
| | | _itemCell02 = transform.Find("Fairy02/ItemCell").GetComponent<ItemCell>();
|
| | | _wear01Text = transform.Find("Fairy01/WearBtn/BtnText").GetComponent<Text>();
|
| | | _wear02Text = transform.Find("Fairy02/WearBtn/BtnText").GetComponent<Text>();
|
| | | m_CloseBtn = transform.Find("CloseBtn").GetComponent<Button>();
|
| | | m_WearBtn01 = transform.Find("Fairy01/WearBtn").GetComponent<Button>();
|
| | | m_WearBtn02 = transform.Find("Fairy02/WearBtn").GetComponent<Button>();
|
| | | m_ItemCell01 = transform.Find("Fairy01/ItemCell").GetComponent<ItemCell>();
|
| | | m_ItemCell02 = transform.Find("Fairy02/ItemCell").GetComponent<ItemCell>();
|
| | | m_WearText01 = transform.Find("Fairy01/WearBtn/BtnText").GetComponent<Text>();
|
| | | m_WearText02 = transform.Find("Fairy02/WearBtn/BtnText").GetComponent<Text>();
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | _closeBtn.onClick.AddListener(OnClickCloseBtn);
|
| | | _wear01Btn.onClick.AddListener(OnClickWear01Btn);
|
| | | _wear02Btn.onClick.AddListener(OnClickWear02Btn);
|
| | | m_CloseBtn.SetListener(OnClickCloseBtn);
|
| | | m_WearBtn01.SetListener(WearEquip01);
|
| | | m_WearBtn02.SetListener(WearEquip02);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | curItemModel = ItemLogicUtility.Instance.sendItemModel;
|
| | | curItemModel = ItemLogicUtility.Instance.selectedItem;
|
| | | if (curItemModel != null)
|
| | | {
|
| | | wear01Img.SetSprite(StringUtility.Contact("EquipPlace_", curItemModel.config.EquipPlace));
|
| | |
| | | switch (curItemModel.packType)
|
| | | {
|
| | | case PackType.Item:
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFairyCan);
|
| | | _itemModel02 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFairyCan2);
|
| | | m_ItemModel01 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FairyCan);
|
| | | m_ItemModel02 = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FairyCan2);
|
| | | break;
|
| | | case PackType.JadeDynastyItem:
|
| | | if (curItemModel.config.EquipPlace == (int)RoleEquipType.JadeDynasty_Glove1)
|
| | | {
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove1);
|
| | | _itemModel02 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | | m_ItemModel01 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove1);
|
| | | m_ItemModel02 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Glove2);
|
| | | }
|
| | | else if (curItemModel.config.EquipPlace == (int)RoleEquipType.JadeDynasty_Ring1)
|
| | | {
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring1);
|
| | | _itemModel02 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | m_ItemModel01 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring1);
|
| | | m_ItemModel02 = playerPack.GetItemModelByIndex(PackType.JadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | public void InitPanel()
|
| | | void InitPanel()
|
| | | {
|
| | | if (_itemModel01 != null)
|
| | | if (m_ItemModel01 != null)
|
| | | {
|
| | | _itemCell01.gameObject.SetActive(true);
|
| | | if (ItemLogicUtility.Instance.sendItemModel != null)
|
| | | m_ItemCell01.gameObject.SetActive(true);
|
| | | if (curItemModel != null)
|
| | | {
|
| | | _itemCell01.Init(_itemModel01, false, ItemLogicUtility.Instance.sendItemModel.equipScore);
|
| | | m_ItemCell01.Init(m_ItemModel01, false, curItemModel.equipScore);
|
| | | }
|
| | | _itemCell01.cellBtn.RemoveAllListeners();
|
| | | _itemCell01.cellBtn.AddListener(() =>
|
| | | m_ItemCell01.cellBtn.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(_itemModel01.packType, _itemModel01.itemInfo.ItemGUID);
|
| | | itemTipsModel.SetItemTipsModel(m_ItemModel01.packType, m_ItemModel01.itemInfo.ItemGUID);
|
| | | });
|
| | | //pdr ToDo |
| | | _wear01Text.text = Language.Get("BagWin_BtnText_1");
|
| | | m_WearText01.text = Language.Get("BagWin_BtnText_1");
|
| | | }
|
| | | else
|
| | | {
|
| | | _itemCell01.gameObject.SetActive(false);
|
| | | _wear01Text.text = Language.Get("BagWin_BtnText_2");
|
| | | m_ItemCell01.gameObject.SetActive(false);
|
| | | m_WearText01.text = Language.Get("BagWin_BtnText_2");
|
| | | }
|
| | |
|
| | | if (_itemModel02 != null)
|
| | | if (m_ItemModel02 != null)
|
| | | {
|
| | | _itemCell02.gameObject.SetActive(true);
|
| | |
|
| | | //pdr ToDo
|
| | |
|
| | | _wear02Text.text = Language.Get("BagWin_BtnText_1");
|
| | | if (ItemLogicUtility.Instance.sendItemModel != null)
|
| | | m_ItemCell02.gameObject.SetActive(true);
|
| | | m_WearText02.text = Language.Get("BagWin_BtnText_1");
|
| | | if (curItemModel != null)
|
| | | {
|
| | | _itemCell02.Init(_itemModel02, false, ItemLogicUtility.Instance.sendItemModel.equipScore);
|
| | | m_ItemCell02.Init(m_ItemModel02, false, curItemModel.equipScore);
|
| | | }
|
| | | _itemCell02.cellBtn.RemoveAllListeners();
|
| | | _itemCell02.cellBtn.AddListener(() =>
|
| | | m_ItemCell02.cellBtn.SetListener(() =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(_itemModel02.packType, _itemModel02.itemInfo.ItemGUID);
|
| | | itemTipsModel.SetItemTipsModel(m_ItemModel02.packType, m_ItemModel02.itemInfo.ItemGUID);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | _itemCell02.gameObject.SetActive(false);
|
| | | _wear02Text.text = Language.Get("BagWin_BtnText_2");
|
| | | m_ItemCell02.gameObject.SetActive(false);
|
| | | m_WearText02.text = Language.Get("BagWin_BtnText_2");
|
| | | }
|
| | | }
|
| | |
|
| | | public void OnClickWear01Btn()
|
| | | void WearEquip01()
|
| | | {
|
| | | if (curItemModel == null) return;
|
| | | if (curItemModel == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | int equipType = curItemModel.config.EquipPlace;
|
| | | var item = ItemLogicUtility.Instance.sendItemModel;
|
| | | var equipType = curItemModel.config.EquipPlace;
|
| | | var item = curItemModel;
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo(equipType, item);
|
| | | Close();
|
| | | }
|
| | |
|
| | | public void OnClickWear02Btn()
|
| | | void WearEquip02()
|
| | | {
|
| | | if (curItemModel == null) return;
|
| | | if (curItemModel == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var item = ItemLogicUtility.Instance.sendItemModel;
|
| | | switch ((RoleEquipType)curItemModel.config.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retFairyCan:
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo((int)RoleEquipType.retFairyCan2, item);
|
| | | case RoleEquipType.FairyCan:
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo((int)RoleEquipType.FairyCan2, curItemModel);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo((int)RoleEquipType.JadeDynasty_Glove2, item);
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo((int)RoleEquipType.JadeDynasty_Glove2, curItemModel);
|
| | | break;
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo((int)RoleEquipType.JadeDynasty_Ring2, item);
|
| | | ItemLogicUtility.Instance.CheckSuitReplaceInfo((int)RoleEquipType.JadeDynasty_Ring2, curItemModel);
|
| | | break;
|
| | | }
|
| | |
|
| | | Close();
|
| | | }
|
| | |
|
| | |
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(itemModel.itemId, out jumpId);
|
| | | if (isUnlock)
|
| | | {
|
| | | ItemLogicUtility.Instance.GotoComposeItem(ItemWinBtnType.compose, jumpId);
|
| | | ItemLogicUtility.Instance.GotoComposeItem(ItemOperateType.compose, jumpId);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | ItemLogicUtility.Instance.UseItem(ItemWinBtnType.makeUse, itemModel.itemInfo.ItemPlace);
|
| | | ItemLogicUtility.Instance.UseItem(ItemOperateType.makeUse, itemModel.itemInfo.ItemPlace);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private void PutOnBetterEquip()
|
| | | {
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putOn, model.currentEquipGuid);
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putOn, model.currentEquipGuid);
|
| | | model.ReportConfirmBetterEquip(model.currentEquipGuid);
|
| | | }
|
| | |
|
| | |
| | | var equipInfo = equipInfos[i];
|
| | | switch ((RoleEquipType)equipInfo.ItemPlace)
|
| | | {
|
| | | case RoleEquipType.retFashionClothes:
|
| | | case RoleEquipType.FashionClothes:
|
| | | fashionClothes = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon:
|
| | | case RoleEquipType.FashionWeapon:
|
| | | fashionWeapon = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon2:
|
| | | case RoleEquipType.FashionWeapon2:
|
| | | fashionSecondary = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retWeapon:
|
| | | case RoleEquipType.Weapon:
|
| | | weaponItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retClothes:
|
| | | case RoleEquipType.Clothes:
|
| | | clothesItemId = (int)equipInfo.ItemID;
|
| | |
|
| | | if (equipInfo.IsSuite == 1)
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | wingsItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retWeapon2:
|
| | | case RoleEquipType.Weapon2:
|
| | | secondaryItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | | }
|
| | |
| | | {
|
| | | if (model.fairyLandItemModel != null)
|
| | | {
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putOn, model.fairyLandItemModel.itemInfo.ItemGUID);
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putOn, model.fairyLandItemModel.itemInfo.ItemGUID);
|
| | | OnClose();
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | var _singleModel = PlayerBackModel.GetSinglePackModel(PackType.Equip);
|
| | | // 如果有守护, 则不拾取
|
| | | var _itemModel = _singleModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal);
|
| | | var _itemModel = _singleModel.GetItemModelByIndex((int)RoleEquipType.SpiritAnimal);
|
| | | if (_itemModel == null || !GeneralDefine.GuardianPickUpID.Contains(_itemModel.itemId))
|
| | | {
|
| | | float _chkDistanceSqrt;
|
| | |
| | | return;
|
| | | }
|
| | | itemTipsModel.SetItemTipsModel(itemBag.packType, itemBag.itemInfo.ItemGUID, false);
|
| | | itemTipsModel.curAttrData.SetTipsFuncBtn(ItemWinBtnType.putAway, OnPutawayClick);
|
| | | itemTipsModel.curAttrData.SetTipsFuncBtn(ItemOperateType.putAway, OnPutawayClick);
|
| | | itemTipsModel.ShowUICtrl();
|
| | |
|
| | | PutawayData.Instance.Reset();
|
| | | PutawayData.Instance.itemModel = itemBag;
|
| | | }
|
| | |
|
| | | private void OnPutawayClick(ItemWinBtnType type, string s)
|
| | | private void OnPutawayClick(ItemOperateType type, string s)
|
| | | {
|
| | | KnapSackEventMgr.Instance.HideItemPopWin();
|
| | | switch (type)
|
| | | {
|
| | | case ItemWinBtnType.putAway:
|
| | | case ItemOperateType.putAway:
|
| | | {
|
| | | WindowCenter.Instance.Open<PutawayWin>();
|
| | | }
|
| | |
| | | ItemAttrData attrData = new ItemAttrData((int)data.ItemTypeID, false, data.Count, -1, 0, true, PackType.Deleted, "", data.UserData); |
| | | if (data.PlayerID != PlayerDatas.Instance.PlayerId) |
| | | { |
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.buy, ItemWinModelBtnClick); |
| | | attrData.SetTipsFuncBtn(ItemOperateType.buy, ItemWinModelBtnClick); |
| | | } |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | } |
| | | |
| | | private void ItemWinModelBtnClick(ItemWinBtnType type, string arg2) |
| | | private void ItemWinModelBtnClick(ItemOperateType type, string arg2) |
| | | { |
| | | switch (type) |
| | | { |
| | | case ItemWinBtnType.buy: |
| | | case ItemOperateType.buy: |
| | | PwdKeyboardWin.OnPwdWinClose -= OnPwdWinClose; |
| | | var _data = model.marketDealItems[m_Index]; |
| | | if (UIHelper.GetMoneyCnt(_data.PriceType) < _data.PriceCount) |
| | |
| | | var _cfg = ItemConfig.Get((int)_data.ItemTypeID); |
| | | ItemAttrData attrData = new ItemAttrData((int)_data.ItemTypeID, false, _data.Count, -1, 0, false, PackType.Deleted, "", |
| | | _data.UserData); |
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putItemout, OnPutawayClick); |
| | | attrData.SetTipsFuncBtn(ItemOperateType.putItemout, OnPutawayClick); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | } |
| | | |
| | | private void OnPutawayClick(ItemWinBtnType _type, string arg2) |
| | | private void OnPutawayClick(ItemOperateType _type, string arg2) |
| | | { |
| | | KnapSackEventMgr.Instance.HideItemPopWin(); |
| | | switch (_type) |
| | | { |
| | | case ItemWinBtnType.putItemout: |
| | | case ItemOperateType.putItemout: |
| | | { |
| | | var _data = PlayerDatas.Instance.market.putawayList[index]; |
| | | int gridCnt = PackModel.GetReaminGridCount(PackType.Item); |
| | |
| | | buyItem = data; |
| | | ItemAttrData attrData = new ItemAttrData((int)data.ItemTypeID, false, data.Count, -1, 0, |
| | | false, PackType.Deleted, "", data.UserData); |
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.buy, OnItemBuyClick); |
| | | attrData.SetTipsFuncBtn(ItemOperateType.buy, OnItemBuyClick); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | | } |
| | | |
| | | private void OnItemBuyClick(ItemWinBtnType type, string s) |
| | | private void OnItemBuyClick(ItemOperateType type, string s) |
| | | { |
| | | KnapSackEventMgr.Instance.HideItemPopWin(); |
| | | switch (type) |
| | | { |
| | | case ItemWinBtnType.buy: |
| | | case ItemOperateType.buy: |
| | | { |
| | | if (UIHelper.GetMoneyCnt(buyItem.PriceType) < buyItem.PriceCount) |
| | | { |
| | |
| | | {
|
| | | var _job = PlayerDatas.Instance.baseData.Job;
|
| | | #region 装备
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | | #endregion
|
| | |
|
| | |
| | | case ActivateShow.ActivateFunc.Realm:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.retWing);
|
| | | UI3DModelExhibition.Instance.ShowPlayer(m_ModelRawImage, PlayerDatas.Instance.baseData.Job, RoleEquipType.Wing);
|
| | | break;
|
| | | case ActivateShow.ActivateFunc.GodWeaponEffect:
|
| | | m_ModelRawImage.gameObject.SetActive(true);
|
| | | m_ModelRawImage.rectTransform.sizeDelta = new Vector2(680, 510);
|
| | |
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var _weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | var model = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | |
| | |
|
| | | var playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>();
|
| | |
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
| | | {
|
| | | var _list = rolePlusData.equipSuitList;
|
| | | ItemData _itemData = null;
|
| | | roleEquipDataDic.TryGetValue(RoleEquipType.retClothes, out _itemData);
|
| | | roleEquipDataDic.TryGetValue(RoleEquipType.Clothes, out _itemData);
|
| | | if (_itemData == null)
|
| | | {
|
| | | return 0;
|
| | |
| | | for (int i = 0; i < _list.Count; i++)
|
| | | {
|
| | | var _suit = _list[i];
|
| | | if (_suit.Index >= (int)RoleEquipType.retHat
|
| | | && _suit.Index <= (int)RoleEquipType.retShoes
|
| | | if (_suit.Index >= (int)RoleEquipType.Hat
|
| | | && _suit.Index <= (int)RoleEquipType.Shoes
|
| | | && roleEquipDataDic.TryGetValue((RoleEquipType)_suit.Index, out _itemData))
|
| | | {
|
| | | itemConfig = ItemConfig.Get(_itemData.ItemID);
|
| | |
| | |
|
| | | int clothes = 0;
|
| | | int _suitLevel = 0;
|
| | | RoleParticularModel.ItemData itemData = model.GetItemData(RoleEquipType.retClothes);
|
| | | RoleParticularModel.ItemData itemData = model.GetItemData(RoleEquipType.Clothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | clothes = itemData.ItemID;
|
| | | _suitLevel = viewPlayerData.GetEquipSuitLevel();
|
| | | }
|
| | | int weapon = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retWeapon);
|
| | | itemData = model.GetItemData(RoleEquipType.Weapon);
|
| | | if (itemData != null)
|
| | | {
|
| | | weapon = itemData.ItemID;
|
| | | }
|
| | | int wing = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retWing);
|
| | | itemData = model.GetItemData(RoleEquipType.Wing);
|
| | | if (itemData != null)
|
| | | {
|
| | | wing = itemData.ItemID;
|
| | | }
|
| | | int weapon2 = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retWeapon2);
|
| | | itemData = model.GetItemData(RoleEquipType.Weapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | weapon2 = itemData.ItemID;
|
| | | }
|
| | | int fashionClothes = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retFashionClothes);
|
| | | itemData = model.GetItemData(RoleEquipType.FashionClothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionClothes = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retFashionWeapon);
|
| | | itemData = model.GetItemData(RoleEquipType.FashionWeapon);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionWeapon = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon2 = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retFashionWeapon2);
|
| | | itemData = model.GetItemData(RoleEquipType.FashionWeapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionWeapon2 = itemData.ItemID;
|
| | |
| | | case FuncPowerType.Wing:
|
| | | {
|
| | | handled = true;
|
| | | RoleParticularModel.ItemData itemData = model.GetItemData(RoleEquipType.retWing);
|
| | | RoleParticularModel.ItemData itemData = model.GetItemData(RoleEquipType.Wing);
|
| | | if (itemData!=null)
|
| | | {
|
| | | ItemConfig _tagChinItemModel = ItemConfig.Get(itemData.ItemID);
|
| | |
| | | {
|
| | | targetCompareTxt.text = string.Format(viewRoleFuncModel.compareTip, Language.Get("RoleParticularWin_7"));
|
| | | }
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel != null)
|
| | | {
|
| | | ItemConfig _tagChinItemModel = ItemConfig.Get((int)itemModel.itemInfo.ItemID);
|
| | |
| | | btnGroup.anchoredPosition3D = Vector3.zero;
|
| | | if (itemAttrData.tipsFuncBtnDic.Count > 0)
|
| | | {
|
| | | foreach (ItemWinBtnType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | foreach (ItemOperateType key in itemAttrData.tipsFuncBtnDic.Keys)
|
| | | {
|
| | | Button btn = OnGUIButton(btnGroup.gameObject, operateBtn, key.ToString(), Language.Get(StringUtility.Contact("ItemHandle_", key.ToString())));
|
| | | btn.RemoveAllListeners();
|
| | |
| | | ItemAttrData attrData = new ItemAttrData(itemId,true, (ulong)shopInfo.ItemCnt,-1,shopInfo.IsBind,true,PackType.Deleted
|
| | | ,"",null,ItemTipChildType.Buy);
|
| | | itemTipsModel.SetItemTipsModel(attrData,false);
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.buy,(ItemWinBtnType type ,string id) => { OnClickBuyBtn(ItemWinBtnType.buy, shopInfo.ID); });
|
| | | attrData.SetTipsFuncBtn(ItemOperateType.buy,(ItemOperateType type ,string id) => { OnClickBuyBtn(ItemOperateType.buy, shopInfo.ID); });
|
| | | itemTipsModel.ShowUICtrl();
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | BuyCnt = buyCnt;
|
| | | }
|
| | | private void OnClickBuyBtn(ItemWinBtnType type, int shopId)
|
| | | private void OnClickBuyBtn(ItemOperateType type, int shopId)
|
| | | {
|
| | | BuyShopItemLimit shopItemLimit = GetBuyShopLimit((uint)shopId);
|
| | | StoreConfig storeConfig = StoreConfig.Get(shopId);
|
| | |
| | | private void UpdateFairyEquip(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.Equip
|
| | | && (index != (int)RoleEquipType.retFairyCan || index != (int)RoleEquipType.retFairyCan2)) return;
|
| | | && (index != (int)RoleEquipType.FairyCan || index != (int)RoleEquipType.FairyCan2)) return;
|
| | |
|
| | | ClearAllFairyEquipRedpoint();
|
| | |
|
| | |
| | | if (config == null) return false;
|
| | |
|
| | | ItemConfig itemConfig = ItemConfig.Get(config.ItemID);
|
| | | if(itemConfig.EquipPlace == (int)RoleEquipType.retFairyCan)
|
| | | if(itemConfig.EquipPlace == (int)RoleEquipType.FairyCan)
|
| | | {
|
| | | string key1 = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "ShopId",config.ID,"EquipPlace:",9);
|
| | | string key2 = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "ShopId", config.ID, "EquipPlace:",10);
|
| | |
| | | suitPartlist = new List<int>();
|
| | | for (int i = 0; i < suitOrder.Length; i++)
|
| | | {
|
| | | if ((RoleEquipType)suitOrder[i] != RoleEquipType.retWeapon && (RoleEquipType)suitOrder[i] != RoleEquipType.retWeapon2)
|
| | | if ((RoleEquipType)suitOrder[i] != RoleEquipType.Weapon && (RoleEquipType)suitOrder[i] != RoleEquipType.Weapon2)
|
| | | {
|
| | | suitPartlist.Add(suitOrder[i]);
|
| | | }
|
| | |
| | | go.transform.SetParent(partParent);
|
| | | go.transform.localPosition = Vector3.zero;
|
| | | go.transform.localScale = Vector3.one;
|
| | | string partName = StringUtility.Contact(suitAttrConfig.name, UIHelper.GetEquipAreaName(SuitModel.GetEquipPlaceByGroupType(suitAttrConfig.groupType)[i]));
|
| | | string partName = StringUtility.Contact(suitAttrConfig.name, UIHelper.GetEquipPlaceName(SuitModel.GetEquipPlaceByGroupType(suitAttrConfig.groupType)[i]));
|
| | | go.text = partName;
|
| | | int equipPlace = SuitModel.GetEquipPlaceByGroupType(suitAttrConfig.groupType)[i];
|
| | | partNameDict.Add(equipPlace,go);
|
| | |
| | | {
|
| | | haveEquip.SetActive(false);
|
| | | noEquip.SetActive(true);
|
| | | placeText.text = Language.Get("EquipWash101") + UIHelper.GetEquipAreaName(equipPlace);
|
| | | placeText.text = Language.Get("EquipWash101") + UIHelper.GetEquipPlaceName(equipPlace);
|
| | | condiText.text = Language.Get("EquipSuitUnLowNeed",StringUtility.Contact(Language.Get("EquipSuitOrange"), 1, Language.Get("EquipSuitStar")));
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | haveEquip.SetActive(false);
|
| | | noEquip.SetActive(true);
|
| | | placeText.text = Language.Get("EquipWash101") + UIHelper.GetEquipAreaName(equipPlace);
|
| | | placeText.text = Language.Get("EquipWash101") + UIHelper.GetEquipPlaceName(equipPlace);
|
| | | condiText.text = Language.Get("EquipSuitUnLowNeed", StringUtility.Contact(Language.Get("EquipSuitRed"),2, Language.Get("EquipSuitStar")));
|
| | | }
|
| | | else
|
| | |
| | | haveEquip.SetActive(false);
|
| | | noEquip.SetActive(true);
|
| | | itemCell.gameObject.SetActive(false);
|
| | | placeText.text = Language.Get("EquipWash101") + UIHelper.GetEquipAreaName(equipPlace);
|
| | | placeText.text = Language.Get("EquipWash101") + UIHelper.GetEquipPlaceName(equipPlace);
|
| | | switch (suitType)
|
| | | {
|
| | | case SuitType.LowSuit:
|
| | |
| | | switch (E_SuitType)
|
| | | {
|
| | | case SuitType.LowSuit:
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("EquipSuitSplit101", UIHelper.GetEquipAreaName(equipPlace)),
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("EquipSuitSplit101", UIHelper.GetEquipPlaceName(equipPlace)),
|
| | | (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | | });
|
| | | break;
|
| | | case SuitType.HighSuit:
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("EquipSuitSplit102", UIHelper.GetEquipAreaName(equipPlace)),
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("EquipSuitSplit102", UIHelper.GetEquipPlaceName(equipPlace)),
|
| | | (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | |
| | | nameText.gameObject.SetActive(false);
|
| | | washLevelText.gameObject.SetActive(false);
|
| | | noEquipGo.SetActive(true);
|
| | | placeText.text = StringUtility.Contact(Language.Get("EquipWin_PartTitleText_1"), UIHelper.GetEquipAreaName(washPro.EquipPlace));
|
| | | placeText.text = StringUtility.Contact(Language.Get("EquipWin_PartTitleText_1"), UIHelper.GetEquipPlaceName(washPro.EquipPlace));
|
| | | isPutOnText.text = Language.Get("StrengtheningPanel_DownText_1");
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
|
| | | {
|
| | | int currentRefining = 0;
|
| | |
| | | {
|
| | | if (i < groups.Length - 1)
|
| | | {
|
| | | areaText.text = areaText.text + UIHelper.GetEquipAreaName(groups[i]) + "、";
|
| | | areaText.text = areaText.text + UIHelper.GetEquipPlaceName(groups[i]) + "、";
|
| | | }
|
| | | else
|
| | | {
|
| | | areaText.text = areaText.text + UIHelper.GetEquipAreaName(groups[i]);
|
| | | areaText.text = areaText.text + UIHelper.GetEquipPlaceName(groups[i]);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | {
|
| | | if (PackType.Equip == arg1)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel != null)
|
| | | {
|
| | | Close();
|
| | |
| | | _WingButton.WingBG.AddListener(() =>
|
| | | {
|
| | |
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemWinBtnType.putIn, model.itemInfo.ItemGUID);
|
| | | ItemLogicUtility.Instance.PutOnItem(ItemOperateType.putIn, model.itemInfo.ItemGUID);
|
| | |
|
| | | //string strJob = tagItem.JobLimit.ToString();
|
| | | //if (_ReincarnationLv >= int.Parse(strJob.Substring(strJob.Length - 1, 1)))
|
| | |
| | | playerPack.ItemCntAddAct += ItemCntAddAct;//物品数量增加
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;//物品数量减少
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange;
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (IsOnePutOn)
|
| | | {
|
| | | WingsDot();
|
| | |
| | | public void WingsDot()
|
| | | {
|
| | | redPointStre.state = RedPointState.None;
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | |
|
| | | if (itemModel == null || !FuncOpen.Instance.IsFuncOpen(90))
|
| | | {
|
| | |
| | | }
|
| | | if (arg1 == PackType.Equip)//装备背包物品增加
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (IsOnePutOn)
|
| | | {
|
| | | WingsDot();
|
| | |
| | | }
|
| | | if (arg1 == PackType.Equip)//装备脱下
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel == null && redPointStre.state == RedPointState.Simple)
|
| | | {
|
| | | redPointStre.state = RedPointState.None;
|
| | |
| | |
|
| | | void RefiningButton()//精炼按钮
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | |
|
| | | if (itemModel == null)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel == null)
|
| | | {
|
| | | return;
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | int WingLv2 = itemModel.config.LV;
|
| | | foreach (var key in dicWingUseDateValue.Keys)
|
| | | {
|
| | |
| | |
|
| | | void KeyRefiningButton()//一键精炼
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel == null)
|
| | | {
|
| | | ServerTipDetails.DisplayNormalTip(Language.Get("EquipReinforceWin_WingRefLv_2"));
|
| | |
| | | //背包字典
|
| | |
|
| | | SinglePackModel rptItemPack = playerPack.GetSinglePackModel(PackType.Item);
|
| | | ItemModel putOnModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel putOnModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (rptItemPack == null || rptItemPack.GetPackModelIndexDict().Count == 0 || putOnModel == null)
|
| | | {
|
| | | return;
|
| | |
| | | void EquipmentPositionJudgment()//判断是否有穿戴翅膀
|
| | | {
|
| | | Backpacking();//物品读取
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | int itemID = 0;
|
| | | if (itemModel != null)
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | | EquipFirstTxt.SetActive(false);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var config = WingRefineExpConfig.Get((int)itemModel.itemInfo.ItemID);
|
| | | int _modelID = config.Model;
|
| | | if (itemModel.itemInfo.ItemID == 3724)
|
| | |
| | | {
|
| | | WText.gameObject.SetActive(true);
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | |
|
| | | if (itemModel.GetUseDataModel((int)ItemUseDataKey.wingProgressValue) != null)
|
| | | {
|
| | |
| | | }
|
| | | void ItemSX(int _Equipped)//用于精炼度和边框变色的刷新
|
| | | {
|
| | | if (_Equipped == (int)RoleEquipType.retWing)
|
| | | if (_Equipped == (int)RoleEquipType.Wing)
|
| | | {
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | ;
|
| | | int ItemColor = modelInterface.GetItemQuality(itemModel.itemInfo.ItemID, itemModel.useDataDict);
|
| | | WingsBG.SetItemBackGround(ItemColor);
|
| | |
| | | }
|
| | |
|
| | |
|
| | | if (index == (int)RoleEquipType.retWing)
|
| | | if (index == (int)RoleEquipType.Wing)
|
| | | {
|
| | | WingsImage.gameObject.SetActive(false);
|
| | | IconButton.gameObject.SetActive(true);
|
| | |
| | | {
|
| | | int MaxMaxOrder = 0;
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel != null)
|
| | | {
|
| | | WingRefineExpConfig wingRefineExpConfig = WingRefineExpConfig.Get(itemModel.itemInfo.ItemID);
|
| | |
| | | List<int> ClassifyList = new List<int>();//存背包位置
|
| | | private void WingClassify()
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel == null)
|
| | | {
|
| | | return;
|
| | |
| | | private int Sort2(int Index)
|
| | | {
|
| | | int Max = 0;
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | if (itemModel == null)
|
| | | {
|
| | | return 0;
|
| | |
| | | List<ItemModel> list = null;
|
| | | if (singlePack.GetItemCountByID(_tagItemModel.ID,out list) > 0)
|
| | | {
|
| | | ItemLogicUtility.Instance.UseItem(ItemWinBtnType.makeUse, list[0].itemInfo.ItemPlace);
|
| | | ItemLogicUtility.Instance.UseItem(ItemOperateType.makeUse, list[0].itemInfo.ItemPlace);
|
| | | break;
|
| | | }
|
| | | else
|
| | |
| | | break;
|
| | | case TreasurePrivilege.Wing:
|
| | | var percentWing = (float)special.propertyDict[86] / 10000;
|
| | | var itemModel = pack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var itemModel = pack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | 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.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var itemModel = pack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | m_ContainerPreview.gameObject.SetActive(itemModel != null);
|
| | | if (itemModel != null)
|
| | | {
|
| | |
| | | equipPlace = value[3];
|
| | | condiSB.Append(s);
|
| | | }
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type2",condiSB.ToString(),UIHelper.GetEquipAreaName(equipPlace),GetFindProgressStr(info));
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type2",condiSB.ToString(),UIHelper.GetEquipPlaceName(equipPlace),GetFindProgressStr(info));
|
| | | break;
|
| | | case 3:
|
| | | conditionText.text = Language.Get("TreasureFindHost_Type3", info.targetNum,GetFindProgressStr(info));
|
| | |
| | | var _job = PlayerDatas.Instance.baseData.Job;
|
| | |
|
| | | #region 装备
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var _clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var _weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var _wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
| | | var equipInfo = equipInfos[i];
|
| | | switch ((RoleEquipType)equipInfo.ItemPlace)
|
| | | {
|
| | | case RoleEquipType.retFashionClothes:
|
| | | case RoleEquipType.FashionClothes:
|
| | | flashClothes = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon:
|
| | | case RoleEquipType.FashionWeapon:
|
| | | flashWeapon = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon2:
|
| | | case RoleEquipType.FashionWeapon2:
|
| | | flashSecondary = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retWeapon:
|
| | | case RoleEquipType.Weapon:
|
| | | weaponItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retClothes:
|
| | | case RoleEquipType.Clothes:
|
| | | clothesItemId = (int)equipInfo.ItemID;
|
| | |
|
| | | if (equipInfo.IsSuite == 1)
|
| | |
| | | }
|
| | | }
|
| | | break;
|
| | | case RoleEquipType.retWing:
|
| | | case RoleEquipType.Wing:
|
| | | wingsItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retWeapon2:
|
| | | case RoleEquipType.Weapon2:
|
| | | secondaryItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | | }
|
| | |
| | |
|
| | | public void ShowPlayer(RawImage _rawImage, int _job, bool _isDialogue = false)
|
| | | {
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var flashClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var flashClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | | var flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var flashWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var flashWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | | var flashWeaponId = flashWeapon == null ? 0 : flashWeapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var flahsSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var flahsSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | | var flashSecondaryId = flahsSecondary == null ? 0 : flahsSecondary.itemInfo.ItemID;
|
| | |
|
| | |
| | |
|
| | | ItemModel clothes = null;
|
| | |
|
| | | if (exceptEquip != RoleEquipType.retClothes)
|
| | | if (exceptEquip != RoleEquipType.Clothes)
|
| | | {
|
| | | clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var flashClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var flashClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | | flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | if (exceptEquip != RoleEquipType.retWeapon)
|
| | | if (exceptEquip != RoleEquipType.Weapon)
|
| | | {
|
| | | var flashWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var flashWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | | flashWeaponId = flashWeapon == null ? 0 : flashWeapon.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | if (exceptEquip != RoleEquipType.retWing)
|
| | | if (exceptEquip != RoleEquipType.Wing)
|
| | | {
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | if (exceptEquip != RoleEquipType.retWeapon2)
|
| | | if (exceptEquip != RoleEquipType.Weapon2)
|
| | | {
|
| | | var flashSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var flashSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | | flashSecondaryId = flashSecondary == null ? 0 : flashSecondary.itemInfo.ItemID;
|
| | | }
|
| | |
| | |
|
| | | public void ShowSitDownPlayer(RawImage _rawImage, int _job)
|
| | | {
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retClothes);
|
| | | var flashClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Clothes);
|
| | | var flashClothes = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionClothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | | var flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon);
|
| | | var flashWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon);
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon);
|
| | | var flashWeapon = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | | var flashWeaponId = flashWeapon == null ? 0 : flashWeapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWing);
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Wing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var flahsSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.retWeapon2);
|
| | | var flahsSecondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.FashionWeapon2);
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.Equip, (int)RoleEquipType.Weapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | | var flashSecondaryId = flahsSecondary == null ? 0 : flahsSecondary.itemInfo.ItemID;
|
| | |
|
| | |
| | |
|
| | | int _suitCount = 0;
|
| | |
|
| | | int _start = (int)RoleEquipType.retHat;
|
| | | int _end = (int)RoleEquipType.retShoes;
|
| | | int _start = (int)RoleEquipType.Hat;
|
| | | int _end = (int)RoleEquipType.Shoes;
|
| | |
|
| | | ItemModel _itemModel = null;
|
| | |
|
| | | _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retClothes);
|
| | | _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.Clothes);
|
| | |
|
| | | if (_itemModel == null)
|
| | | {
|
| | |
| | | continue;
|
| | | }
|
| | |
|
| | | if (i == (int)RoleEquipType.retClothes)
|
| | | if (i == (int)RoleEquipType.Clothes)
|
| | | {
|
| | | _rank = _itemModel.config.LV;
|
| | | }
|
| | |
| | | /// </summary>
|
| | | public enum RoleEquipType
|
| | | {
|
| | | retWeapon = 1, //1 主手
|
| | | retWeapon2, //2 副手
|
| | | retHat, //3 帽子
|
| | | retClothes, //4 衣服
|
| | | retBelt, //5 腰带
|
| | | retTrousers, //6 裤子
|
| | | retShoes, //7 鞋子
|
| | | retNeck, //8 项链
|
| | | retFairyCan, //9 仙器
|
| | | retFairyCan2, //10 仙器
|
| | | retWing, //11 翅膀
|
| | | retSpiritAnimal, //12 灵守
|
| | | retBaldric1, //13 佩饰
|
| | | retBaldric2, //14 佩饰
|
| | | retBaldric3, //15 佩饰
|
| | | retBaldric4, //16 佩饰
|
| | | retBaldric5, //17 佩饰
|
| | | retBaldric6, //18 佩饰
|
| | | Weapon = 1, //1 主手
|
| | | Weapon2, //2 副手
|
| | | Hat, //3 帽子
|
| | | Clothes, //4 衣服
|
| | | Belt, //5 腰带
|
| | | Trousers, //6 裤子
|
| | | Shoes, //7 鞋子
|
| | | Neck, //8 项链
|
| | | FairyCan, //9 仙器
|
| | | FairyCan2, //10 仙器
|
| | | Wing, //11 翅膀
|
| | | SpiritAnimal, //12 灵守
|
| | | mount = 19,//当前的坐骑
|
| | | retFashionWeapon = 20,//时装武器
|
| | | retFashionClothes = 21,//时装衣服
|
| | | retFashionWeapon2 = 22,//时装副手
|
| | | FashionWeapon = 20,//时装武器
|
| | | FashionClothes = 21,//时装衣服
|
| | | FashionWeapon2 = 22,//时装副手
|
| | | JadeDynasty_Cloak = 121, //诛仙披风
|
| | | JadeDynasty_FaceMask = 122, //诛仙面罩
|
| | | JadeDynasty_Glove1 = 123, //诛仙手套
|
| | |
| | | #endregion
|
| | | }
|
| | |
|
| | | public enum ItemWinBtnType
|
| | | public enum ItemOperateType
|
| | | {
|
| | | makeUse, //使用
|
| | | putOn, //穿上
|
| | |
| | | _playerInfo.itemDatas[0] = new GActorPlayerBase.CEquipInfo
|
| | | {
|
| | | id = 10484,
|
| | | place = (int)RoleEquipType.retClothes
|
| | | place = (int)RoleEquipType.Clothes
|
| | | };
|
| | | _playerInfo.itemDatas[1] = new GActorPlayerBase.CEquipInfo
|
| | | {
|
| | | id = 10481,
|
| | | place = (int)RoleEquipType.retWeapon
|
| | | place = (int)RoleEquipType.Weapon
|
| | | };
|
| | | _playerInfo.itemDatas[2] = new GActorPlayerBase.CEquipInfo
|
| | | {
|
| | | id = 10482,
|
| | | place = (int)RoleEquipType.retWeapon2
|
| | | place = (int)RoleEquipType.Weapon2
|
| | | };
|
| | | _playerInfo.itemDatas[3] = new GActorPlayerBase.CEquipInfo
|
| | | {
|
| | | id = 3713,
|
| | | place = (int)RoleEquipType.retWing
|
| | | place = (int)RoleEquipType.Wing
|
| | | };
|
| | |
|
| | | GAMgr.Instance.ReqClntPlayer<GA_PVPClientPlayer>(_playerInfo, E_ActorGroup.Player);
|
| | |
| | | #endregion
|
| | |
|
| | | #region 得到装备位对应的部位名称
|
| | | public static string GetEquipAreaName(int place)
|
| | | public static string GetEquipPlaceName(int place)
|
| | | {
|
| | | if(GeneralDefine.equipPlaceNameDict.ContainsKey(place))
|
| | | {
|