| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
| | | [SerializeField] public GameObject fightImg;
|
| | |
|
| | | ModelShowType showType;
|
| | | FashionDressModel fashionDressModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
|
| | | MagicianModel godWeaponModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
|
| | | }
|
| | |
|
| | | public void OnDisable()
|
| | | {
|
| | |
| | | {
|
| | | titleText.text = title;
|
| | | this.showType = showType;
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | | switch (showType)
|
| | | {
|
| | | case ModelShowType.treasure:
|
| | |
| | | case ModelShowType.pet:
|
| | | var config = Config.Instance.Get<NPCConfig>(id);
|
| | | UI3DModelExhibition.Instance.ShowNPC(id, config.UIModeLOffset, config.UIModelRotation, modelImg);
|
| | | break;
|
| | | case ModelShowType.FashionDress:
|
| | | UI3DModelExhibition.Instance.ShowOtherPlayer(modelImg,SetFashionDressData(id));
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | fightPowerText.text = fightValue.ToString();
|
| | | }
|
| | | }
|
| | |
|
| | | public UI3DPlayerExhibitionData SetFashionDressData(int fashionId)
|
| | | {
|
| | | var job = PlayerDatas.Instance.baseData.Job;
|
| | |
|
| | | var playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>();
|
| | |
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | |
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | |
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | FashionDress fashionDress = null;
|
| | | bool isFashion = fashionDressModel.TryGetFashionDress(fashionId,out fashionDress);
|
| | | if(isFashion)
|
| | | {
|
| | | int itemId = fashionDress.requireLevelUpItem;
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(itemId);
|
| | | switch(fashionDress.fashionDressType)
|
| | | {
|
| | | case 1:
|
| | | clothesId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | case 2:
|
| | | weaponId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | case 3:
|
| | | secondaryId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
|
| | | if (clothes != null)
|
| | | {
|
| | | if (clothes.itemInfo.IsSuite == 1)
|
| | | {
|
| | | if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
|
| | | {
|
| | | _suitLevel = clothes.GetUseDataModel(30)[0];
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | Dictionary<int, int> dict = new Dictionary<int, int>();
|
| | | for (int i = 0; i < godWeaponModel.godWeaponTypes.Count; i++)
|
| | | {
|
| | | var type = godWeaponModel.godWeaponTypes[i];
|
| | | var godWeaponInfo = godWeaponModel.GetGodWeaponInfo(type);
|
| | | var equipedLevel = godWeaponInfo != null ? godWeaponInfo.level : 0;
|
| | | dict[type] = equipedLevel;
|
| | | }
|
| | |
|
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = job,
|
| | | clothesId = clothesId,
|
| | | suitLevel = _suitLevel,
|
| | | weaponId = weaponId,
|
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | isDialogue = false,
|
| | | godWeapons = dict
|
| | | };
|
| | | return data;
|
| | | }
|
| | | }
|
| | |
|
| | | public enum ModelShowType
|
| | | {
|
| | | treasure, //法宝
|
| | | mount, //坐骑
|
| | | pet,
|
| | | pet, //灵宠
|
| | | FashionDress, //时装
|
| | | }
|
| | | }
|