Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
1 文件已重命名
34个文件已添加
40个文件已修改
| | |
| | | };
|
| | | int[] m_CompressionValues = { 0, 1, 2 };
|
| | |
|
| | | int rechargeSkin = 1;
|
| | | string createRoleLevel = "001";
|
| | |
|
| | | public AssetBundleBuildTab()
|
| | | {
|
| | |
| | | EditorGUILayout.Space();
|
| | | #endif
|
| | | GUILayout.BeginHorizontal();
|
| | |
|
| | | ClientPackage.AssetPrior = EditorGUILayout.IntField("AssetPrior", ClientPackage.AssetPrior, GUILayout.Height(50), GUILayout.Width(250));
|
| | | publishers = EditorGUILayout.TextField("Publishers", publishers, GUILayout.Height(50));
|
| | | GUILayout.EndHorizontal();
|
| | |
| | | EditorApplication.delayCall += ExecuteSwitchVersionConfig;
|
| | | }
|
| | |
|
| | | GUILayout.Space(20);
|
| | | GUILayout.BeginHorizontal();
|
| | | rechargeSkin = EditorGUILayout.IntField("Recharge Skin", rechargeSkin, GUILayout.Width(250));
|
| | | if (GUILayout.Button("Switch"))
|
| | | {
|
| | | UpdateSpriteSetting.SetRechargeSkin(rechargeSkin);
|
| | | AssetDatabase.Refresh();
|
| | | UpdateSpritePackingSetting.UpdateAllSpritePackingSetting();
|
| | | }
|
| | |
|
| | | createRoleLevel = EditorGUILayout.TextField("CreateRole Level", createRoleLevel, GUILayout.Width(250));
|
| | | if (GUILayout.Button("Switch"))
|
| | | {
|
| | | UpdateLevelSetting.SetCreateRoleLevel(createRoleLevel);
|
| | | AssetDatabase.Refresh();
|
| | | }
|
| | | GUILayout.EndHorizontal();
|
| | |
|
| | | GUILayout.EndVertical();
|
| | | EditorGUILayout.EndScrollView();
|
| | | }
|
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HB102_tagMCClothesCoatSkinState), typeof(DTCB102_tagMCClothesCoatSkinState));
|
| | | Register(typeof(HC103_tagMCCrossRealmPKPlayerHisSeasonInfo), typeof(DTCC103_tagMCCrossRealmPKPlayerHisSeasonInfo));
|
| | | Register(typeof(HA31E_tagMCGatherSoulHoleInfo), typeof(DTCA31E_tagMCGatherSoulHoleInfo));
|
| | | Register(typeof(HAA1D_tagMCActTotalRechargeInfo), typeof(DTCAA1D_tagMCActTotalRechargeInfo));
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 08, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class FashionDressCabinetConfig : ConfigBase { |
| | | |
| | | public int LV { get ; private set ; }
|
| | | public int NeedExp { get ; private set ; }
|
| | | public string Attr { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return LV.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | LV=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | NeedExp=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | Attr = rawContents[2].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 28e71cfd492229640aecaf39e2a40093 |
| | | timeCreated: 1546913213 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 08, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class FashionDressConfig : ConfigBase { |
| | | |
| | | public int CoatID { get ; private set ; }
|
| | | public string name { get ; private set; } |
| | | public int type { get ; private set ; }
|
| | | public int quality { get ; private set ; }
|
| | | public string getWay { get ; private set; } |
| | | public int[] EquipItemID;
|
| | | public int UnlockItemID { get ; private set ; }
|
| | | public int MaxLV { get ; private set ; }
|
| | | public int[] CostItemCnt;
|
| | | public string StarAttr { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return CoatID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | CoatID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | name = rawContents[1].Trim();
|
| | | |
| | | type=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | |
| | | quality=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | |
| | | getWay = rawContents[4].Trim();
|
| | | |
| | | string[] EquipItemIDStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | EquipItemID = new int[EquipItemIDStringArray.Length]; |
| | | for (int i=0;i<EquipItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(EquipItemIDStringArray[i],out EquipItemID[i]); |
| | | }
|
| | | |
| | | UnlockItemID=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | |
| | | MaxLV=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; |
| | | |
| | | string[] CostItemCntStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | CostItemCnt = new int[CostItemCntStringArray.Length]; |
| | | for (int i=0;i<CostItemCntStringArray.Length;i++) |
| | | { |
| | | int.TryParse(CostItemCntStringArray[i],out CostItemCnt[i]); |
| | | }
|
| | | |
| | | StarAttr = rawContents[9].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5ac2a701b6eaba844b1082c87758125e |
| | | timeCreated: 1546945768 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | public string attr { get ; private set; }
|
| | | public string icon { get ; private set; }
|
| | | public string skillName { get ; private set; }
|
| | | public Vector3 effectPosition { get ; private set; } |
| | | public Vector3 effectAngles { get ; private set; } |
| | | public Vector3 effectScale { get ; private set; } |
| | | public Vector3[] effectPosition;
|
| | | public Vector3[] effectAngles;
|
| | | public Vector3[] effectScale; |
| | | |
| | | public override string getKey() |
| | | { |
| | |
| | |
|
| | | skillName = rawContents[7].Trim();
|
| | |
|
| | | effectPosition=rawContents[8].Vector3Parse();
|
| | | string[] effectPositionStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | effectPosition = new Vector3[effectPositionStringArray.Length]; |
| | | for (int i=0;i<effectPositionStringArray.Length;i++) |
| | | { |
| | | effectPosition[i]=effectPositionStringArray[i].Vector3Parse(); |
| | | }
|
| | |
|
| | | effectAngles=rawContents[9].Vector3Parse();
|
| | | string[] effectAnglesStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | effectAngles = new Vector3[effectAnglesStringArray.Length]; |
| | | for (int i=0;i<effectAnglesStringArray.Length;i++) |
| | | { |
| | | effectAngles[i]=effectAnglesStringArray[i].Vector3Parse(); |
| | | }
|
| | |
|
| | | effectScale=rawContents[10].Vector3Parse(); |
| | | string[] effectScaleStringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | effectScale = new Vector3[effectScaleStringArray.Length]; |
| | | for (int i=0;i<effectScaleStringArray.Length;i++) |
| | | { |
| | | effectScale[i]=effectScaleStringArray[i].Vector3Parse(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c7a22e75f9a0eed49aed26e8171f8172 |
| | | timeCreated: 1546827021 |
| | | timeCreated: 1546866443 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | AddAsyncTask<GatherSoulComposeConfig>();
|
| | | AddAsyncTask<KingTreasureConfig>();
|
| | | AddAsyncTask<KingTreasureItemConfig>();
|
| | | AddAsyncTask<FashionDressConfig>();
|
| | | AddAsyncTask<FashionDressCabinetConfig>();
|
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 0B 玩家时装升级 #tagCMCoatUp
|
| | |
|
| | | public class CA50B_tagCMCoatUp : GameNetPackBasic {
|
| | | public uint CoatIndex; // 时装索引
|
| | |
|
| | | public CA50B_tagCMCoatUp () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA50B;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (CoatIndex, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 17ad6502064d0014b9ca6f5ba5e95a2c |
| | | timeCreated: 1546938032 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // A5 20 时装分解 #tagCMCoatDecompose
|
| | |
|
| | | public class CA520_tagCMCoatDecompose : GameNetPackBasic {
|
| | | public byte Count; //材料所在背包索引的数量
|
| | | public ushort[] IndexList; //材料所在背包索引列表
|
| | | public uint[] ItemIDList; //材料所在背包物品ID列表
|
| | |
|
| | | public CA520_tagCMCoatDecompose () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xA520;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (Count, NetDataType.BYTE);
|
| | | WriteBytes (IndexList, NetDataType.WORD, Count);
|
| | | WriteBytes (ItemIDList, NetDataType.DWORD, Count);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e9f99f58f066c144b8d82dd0e54660c5 |
| | | timeCreated: 1546936247 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | base.Done(vNetPack);
|
| | |
|
| | | H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
|
| | | StageLoadTimeOutCatcher.got0102Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetPack.socketType, "0102", DateTime.Now);
|
| | |
|
| | |
|
| | | DEBUG_0102 = true;
|
| | | DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
|
| | |
| | | StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId);
|
| | | GAMgr.Instance.UnInit();
|
| | | DEBUG_STEP = 9;
|
| | |
|
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | StageLoadTimeOutCatcher.got0109Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetData.socketType, "0109", DateTime.Now);
|
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetData.socketType, "0109", DateTime.Now);
|
| | |
|
| | | //修改技能快捷设置发包顺序
|
| | | PlayerDatas.Instance.skill.CheckQuickSet();
|
| | |
| | | GameNetSystem.Instance.SendInfo(mapOk);
|
| | | DTCA127_tagMCStartChangeMap.isChangeLine = false;
|
| | |
|
| | | StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
|
| | | StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
|
| | | }
|
| | | break;
|
| | | case GameNetSystem.SocketType.CrossSever:
|
| | |
| | | mapOk.Type = 0;
|
| | | GameNetSystem.Instance.SendToCrossServer(mapOk);
|
| | |
|
| | | StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
|
| | | StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
|
| | | }
|
| | | break;
|
| | | default:
|
| | |
| | | return; |
| | | } |
| | | |
| | | StageLoadTimeOutCatcher.gotA126Time = DateTime.Now; |
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A126", DateTime.Now); |
| | | StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A126", DateTime.Now); |
| | | |
| | | #if UNITY_EDITOR |
| | | string _content = string.Format("DTCA126_tagMCPrepareChangeMap => 准备切换地图"); |
| | |
| | | DEBUG_A127 = true; |
| | | |
| | | var package = vNetPack as HA127_tagMCStartChangeMap; |
| | | StageLoadTimeOutCatcher.gotA127Time = DateTime.Now; |
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A127", DateTime.Now); |
| | | StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A127", DateTime.Now); |
| | | |
| | | DEBUG_STEP = 0; |
| | | |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, January 08, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using Snxxz.UI;
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | public class DTCB102_tagMCClothesCoatSkinState : DtcBasic {
|
| | |
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HB102_tagMCClothesCoatSkinState;
|
| | | ModelCenter.Instance.GetModel<FashionDressModel>().ReceivePackage(package);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 492fb693405473b41acea24913462db6 |
| | | timeCreated: 1546938241 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B1 02 玩家时装皮肤激活状态 #tagMCClothesCoatSkinState
|
| | |
|
| | | public class HB102_tagMCClothesCoatSkinState : GameNetPackBasic {
|
| | | public uint CoatChestLV; //时装柜等级
|
| | | public uint CoatChestExp; //时装柜经验
|
| | | public ushort CoatNum; //时装个数
|
| | | public tagMCClothesCoatLVInfo[] CoatInfoList; // 时装数据列表
|
| | |
|
| | | public HB102_tagMCClothesCoatSkinState () {
|
| | | _cmd = (ushort)0xB102;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out CoatChestLV, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CoatChestExp, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CoatNum, vBytes, NetDataType.WORD);
|
| | | CoatInfoList = new tagMCClothesCoatLVInfo[CoatNum];
|
| | | for (int i = 0; i < CoatNum; i ++) {
|
| | | CoatInfoList[i] = new tagMCClothesCoatLVInfo();
|
| | | TransBytes (out CoatInfoList[i].CoatIndex, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out CoatInfoList[i].CoatLV, vBytes, NetDataType.BYTE);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagMCClothesCoatLVInfo {
|
| | | public uint CoatIndex; //时装索引
|
| | | public byte CoatLV; //时装等级
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 311be06de3a564b48951786c28d5bb27 |
| | | timeCreated: 1546938210 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | {
|
| | | if (!isClientChangeMap)
|
| | | {
|
| | | StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
|
| | | StageLoadTimeOutCatcher.ReportChangeMapRecord(this.socketType, "0107", DateTime.Now);
|
| | | StageLoadTimeOutCatcher.RecordProtocol(this.socketType, "0107", DateTime.Now);
|
| | |
|
| | | var mapOk = new C0107_tagCInitMapOK();
|
| | | mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
|
| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | | timer = 1f;
|
| | | if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork)
|
| | | {
|
| | | DownLoadAndDiscompressTask.Instance.StartDownLoad();
|
| | | }
|
| | |
|
| | | OnDownLoadStepChange(DownLoadAndDiscompressTask.Instance.step);
|
| | | }
|
| | |
|
| | |
| | | if (config != null)
|
| | | {
|
| | | LocalChatHistory.localSaveCount = int.Parse(config.Numerical1);
|
| | | if (!string.IsNullOrEmpty(config.Numerical2))
|
| | | {
|
| | | LocalChatHistory.localChatKeepHour = int.Parse(config.Numerical2);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm"); |
| | | if (_data.vipLv > 0)
|
| | | {
|
| | | m_VipLevel.text = string.Format("V{0}", _data.vipLv);
|
| | | m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm");
|
| | | if (_data.vipLv > 0)
|
| | | {
|
| | | m_VipLevel.text = string.Format("V{0}", _data.vipLv);
|
| | | m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm"); |
| | | if (chatUserData.vipLv > 0) |
| | | { |
| | | m_VipLv.text = string.Format("V{0}", chatUserData.vipLv); |
| | | m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv); |
| | | } |
| | | else |
| | | { |
| | |
| | | m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm");
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | m_VipLv.text = string.Format("V{0}", chatUserData.vipLv);
|
| | | m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "Vip";//StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | chatName = chatUserData.name;
|
| | | if (chatUserData.vipLv > 0)
|
| | | {
|
| | | vipLv = StringUtility.Contact("V", chatUserData.vipLv);
|
| | | vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
|
| | | }
|
| | | break;
|
| | | }
|
| | |
| | | const string fileName = "ChatHistory";
|
| | |
|
| | | public static int localSaveCount = 50;
|
| | | public static int localChatKeepHour = 48;
|
| | |
|
| | | static StringBuilder sb = new StringBuilder();
|
| | |
|
| | |
| | | case ChatInfoType.Fairy:
|
| | | {
|
| | | LocalChat localChat = LitJson.JsonMapper.ToObject<LocalChat>(line);
|
| | | var ts = DateTime.Now - localChat.time;
|
| | | if (ts.TotalHours >= localChatKeepHour)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | if (type == ChatInfoType.World)
|
| | | {
|
| | | chat = new ChatWorldData(localChat.content, localChat.player, localChat.name, localChat.extra);
|
| | |
| | | case ChatInfoType.Trumpet:
|
| | | {
|
| | | LocalTrumpetChat localChat = LitJson.JsonMapper.ToObject<LocalTrumpetChat>(line);
|
| | | var ts = DateTime.Now - localChat.time;
|
| | | if (ts.TotalHours >= localChatKeepHour)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | chat = new ChatTrumpetData(localChat.content, localChat.player, localChat.name,
|
| | | localChat.extra, localChat.speakType, localChat.accId);
|
| | | chat.createTime = localChat.time;
|
| | |
| | | case ChatInfoType.Friend:
|
| | | {
|
| | | LocalFriendChat localChat = LitJson.JsonMapper.ToObject<LocalFriendChat>(line);
|
| | | var ts = DateTime.Now - localChat.time;
|
| | | if (ts.TotalHours >= localChatKeepHour)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | chat = new ChatFriendData(localChat.content, localChat.player, localChat.name,
|
| | | localChat.extra, localChat.toName, localChat.talkType, (uint)localChat.toPlayer);
|
| | | chat.createTime = localChat.time;
|
| | |
| | | switch((RoleEquipType)itemConfig.EquipPlace)
|
| | | {
|
| | | case RoleEquipType.retSpiritAnimal:
|
| | | WindowCenter.Instance.Open<GuardComposeConfirmWin>();
|
| | | if (!composeWinModel.IsEnoughUnfixedMat(compoundModel))
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<GuardComposeConfirmWin>();
|
| | | } |
| | | break;
|
| | | default:
|
| | | SetFixedItemIndexDic();
|
| | |
| | | if (nextCfg != null)
|
| | | {
|
| | | m_RealmProperties[1].gameObject.SetActive(true);
|
| | | m_RealmProperties[1].Display(_realmLv + 1);
|
| | | m_RealmProperties[1].Display(_realmLv + 1, false);
|
| | | m_NextRealmIcon.gameObject.SetActive(true);
|
| | | m_NextRealmIcon.SetSprite(nextCfg.Img);
|
| | | m_NextRealmIcon.SetNativeSize();
|
| | |
| | | }
|
| | | if (!fairyFeastPlayers.Contains(fairyMember.PlayerID))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FairyFeastPlayerFarfrom");
|
| | | SysNotifyMgr.Instance.ShowTip("PartySitFail");
|
| | | return;
|
| | | }
|
| | | transmitPlayer = fairyMember.PlayerID;
|
| | |
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | | var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
|
| | | var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
|
| | |
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = PlayerDatas.Instance.baseData.Job,
|
| | | clothesId = clothesId,
|
| | | clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
|
| | | suitLevel = 0,
|
| | | weaponId = 0,
|
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
|
| | | isDialogue = false,
|
| | | godWeapons = null
|
| | | };
|
| | |
| | | {
|
| | | clothesId = itemData.ItemID;
|
| | | }
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionClothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | clothesId = itemData.ItemID;
|
| | | }
|
| | | wingsId = 0;
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retWing);
|
| | | if (itemData != null)
|
| | |
| | | {
|
| | | secondaryId = itemData.ItemID;
|
| | | }
|
| | | itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionWeapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | secondaryId = itemData.ItemID;
|
| | | }
|
| | |
|
| | | data = new UI3DPlayerExhibitionData
|
| | | {
|
| | |
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retWeapon2];
|
| | | weapon2 = itemData.ItemID;
|
| | | }
|
| | | int fashionClothes = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionClothes))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionClothes];
|
| | | fashionClothes = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionWeapon))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionWeapon];
|
| | | fashionWeapon = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon2 = 0;
|
| | | if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionWeapon2))
|
| | | {
|
| | | itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionWeapon2];
|
| | | fashionWeapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | | var godWeapons = new Dictionary<int, int>();
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | |
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _leaderData.rolePropData.Job,
|
| | | clothesId = clothes,
|
| | | clothesId = fashionClothes > 0 ? fashionClothes : clothes,
|
| | | suitLevel = _suitEffect,
|
| | | weaponId = weapon,
|
| | | weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
|
| | | wingsId = wing,
|
| | | secondaryId = weapon2,
|
| | | secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
|
| | | godWeapons = godWeapons,
|
| | | isDialogue = false,
|
| | | };
|
| File was renamed from Lua/Gen/Resources.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a545fb3dcf719304fa74180c10219375 |
| | | guid: 87ce498b66c90b94ca39c71f74f9b161 |
| | | folderAsset: yes |
| | | timeCreated: 1542357825 |
| | | timeCreated: 1546830607 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| New file |
| | |
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System.Linq;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionAttrBeh : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Text titleText;
|
| | | [SerializeField] Text starDesText;
|
| | | [SerializeField] List<Text> attrlist = new List<Text>();
|
| | |
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
|
| | |
|
| | | public void SetDisplay(int star,int curStar)
|
| | | {
|
| | | int curFashionId = fashionModel.viewFashionDressId;
|
| | | FashionDress fashionDress = null;
|
| | | fashionModel.TryGetFashionDress(curFashionId,out fashionDress);
|
| | | int minStar = 1;
|
| | | int maxStar = fashionDress.maxLevel;
|
| | |
|
| | | if(star == curStar
|
| | | && curStar < maxStar)
|
| | | {
|
| | | titleText.text = Language.Get("FashionDress101",maxStar);
|
| | | }
|
| | | else if(star == curStar
|
| | | && curStar >= maxStar)
|
| | | {
|
| | | titleText.text = Language.Get("FashionDress105");
|
| | | }
|
| | | else
|
| | | {
|
| | | titleText.text = Language.Get("FashionDress102",star);
|
| | | }
|
| | |
|
| | | if (star == curStar)
|
| | | {
|
| | | starDesText.text = Language.Get("FashionDress103",star);
|
| | | }
|
| | | else
|
| | | {
|
| | | starDesText.text = Language.Get("FashionDress104",star);
|
| | | }
|
| | |
|
| | | Dictionary<int, int> attrDict = null;
|
| | | fashionModel.TryGetFashionDressProperty(curFashionId,star,out attrDict);
|
| | | if(attrDict != null)
|
| | | {
|
| | | List<int> attrIds = attrDict.Keys.ToList();
|
| | | for (int i = 0; i < attrlist.Count; i++)
|
| | | {
|
| | | var attrText = attrlist[i];
|
| | | if (i < attrIds.Count)
|
| | | {
|
| | | attrText.gameObject.SetActive(true);
|
| | | int attrId = attrIds[i];
|
| | | int attrValue = attrDict[attrId];
|
| | | var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | string attrSB = string.Empty;
|
| | | if (attrConfig.Name.Contains("%s"))
|
| | | {
|
| | | attrSB = attrConfig.Name.Replace("%s", tipsModel.GetProValueTypeStr(attrConfig, attrValue));
|
| | | }
|
| | | else
|
| | | {
|
| | | attrSB = StringUtility.Contact(attrConfig.Name, "+", tipsModel.GetProValueTypeStr(attrConfig, attrValue));
|
| | | }
|
| | | attrText.text = attrSB;
|
| | | }
|
| | | else
|
| | | {
|
| | | attrText.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b55bd88d7eff9ea4a813eb57ec06698d |
| | | timeCreated: 1546831641 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using EnhancedUI.EnhancedScroller;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionDecomposeLineBeh : ScrollerUI
|
| | | {
|
| | | [SerializeField] List<DecomposeItemBeh> itemBehs = new List<DecomposeItemBeh>();
|
| | |
|
| | | public override void Refresh(CellView cell)
|
| | | {
|
| | | var decomposeModel = FashionDecomposeModel.Instance;
|
| | | var decomposeGuids = decomposeModel.decomposeItemGuids;
|
| | | int length = itemBehs.Count;
|
| | | for(int i = 0; i < length; i++)
|
| | | {
|
| | | var itemBeh = itemBehs[i];
|
| | | int index = cell.index*length + i;
|
| | | if(decomposeGuids != null
|
| | | && index < decomposeGuids.Count)
|
| | | {
|
| | | var guid = decomposeGuids[index];
|
| | | FashionDecomposeModel.DecomposeItem decomposeItem = null;
|
| | | decomposeModel.TryGetDecomposeItem(guid,out decomposeItem);
|
| | | itemBeh.SetDisplay(decomposeItem.itemModel,decomposeItem.isSelect);
|
| | | }
|
| | | else
|
| | | {
|
| | | itemBeh.SetDisplay(null);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | [Serializable]
|
| | | public class DecomposeItemBeh
|
| | | {
|
| | | [SerializeField] CommonItemBaisc itemBaisc;
|
| | | [SerializeField] GameObject selectObj;
|
| | | |
| | | public void SetDisplay(ItemModel itemModel,bool _isSelect = false)
|
| | | {
|
| | | if (itemModel == null)
|
| | | {
|
| | | itemBaisc.gameObject.SetActive(false);
|
| | | selectObj.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | itemBaisc.gameObject.SetActive(true);
|
| | | selectObj.SetActive(_isSelect);
|
| | | var decomposeModel = FashionDecomposeModel.Instance;
|
| | | itemBaisc.Init(itemModel);
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | decomposeModel.UpdateDecomposeItem(itemModel.itemInfo.ItemGUID, !selectObj.activeInHierarchy);
|
| | | selectObj.SetActive(!selectObj.activeInHierarchy);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2bb54ddc8495e9540847635bd28036b3 |
| | | timeCreated: 1546930677 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using System.Linq;
|
| | | using System.Text;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | [XLua.Hotfix]
|
| | | public class FashionDecomposeModel : Singleton<FashionDecomposeModel>
|
| | | {
|
| | | FashionDressModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
|
| | | }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | public Dictionary<string, DecomposeItem> decomposeItemDict = new Dictionary<string, DecomposeItem>();
|
| | | public List<string> decomposeItemGuids { get; private set; }
|
| | | public event Action UpdateDecomposeExpEvent;
|
| | | List<int> fashionMatIds = new List<int>();
|
| | |
|
| | | public void GetDecomposeItem()
|
| | | {
|
| | | decomposeItemGuids = null;
|
| | | decomposeItemDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null) return;
|
| | |
|
| | | fashionMatIds.Clear();
|
| | | model.TryGetSatisfyResolves(ref fashionMatIds);
|
| | | foreach(var matId in fashionMatIds)
|
| | | {
|
| | | List<ItemModel> itemModels = null;
|
| | | singlePack.GetItemCountByID(matId, out itemModels);
|
| | | if (itemModels != null)
|
| | | {
|
| | | foreach (var model in itemModels)
|
| | | {
|
| | | var decomposeItem = new DecomposeItem();
|
| | | decomposeItem.SetModel(model);
|
| | | decomposeItemDict.Add(decomposeItem.guid, decomposeItem);
|
| | | }
|
| | | }
|
| | | }
|
| | | decomposeItemGuids = decomposeItemDict.Keys.ToList();
|
| | | }
|
| | |
|
| | | public void UpdateDecomposeItem(string guid, bool _isSelect)
|
| | | {
|
| | | DecomposeItem decomposeItem = null;
|
| | | bool isItem = TryGetDecomposeItem(guid, out decomposeItem);
|
| | | if (isItem)
|
| | | {
|
| | | decomposeItem.SetIsSelect(_isSelect);
|
| | | if(UpdateDecomposeExpEvent != null)
|
| | | {
|
| | | UpdateDecomposeExpEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetDecomposeItem(string guid,out DecomposeItem decomposeItem)
|
| | | {
|
| | | return decomposeItemDict.TryGetValue(guid,out decomposeItem);
|
| | | }
|
| | | |
| | | public int GetSumDecomposeExp()
|
| | | {
|
| | | int sumExp = 0;
|
| | | foreach(var guid in decomposeItemDict.Keys)
|
| | | {
|
| | | var decomposeItem = decomposeItemDict[guid];
|
| | | if(decomposeItem.isSelect)
|
| | | {
|
| | | sumExp += decomposeItem.decomposeExp;
|
| | | }
|
| | | }
|
| | | return sumExp;
|
| | | }
|
| | |
|
| | | public void GetSelectItemlist(out List<ushort> indexs,out List<uint> ids)
|
| | | {
|
| | | indexs = new List<ushort>();
|
| | | ids = new List<uint>();
|
| | | foreach(var item in decomposeItemDict.Values)
|
| | | {
|
| | | if(item.isSelect)
|
| | | {
|
| | | indexs.Add((ushort)item.itemModel.itemInfo.ItemPlace);
|
| | | ids.Add((uint)item.itemModel.itemId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendDecomposeFashion()
|
| | | {
|
| | | List<ushort> indexs = null;
|
| | | List<uint> ids = null;
|
| | | GetSelectItemlist(out indexs,out ids);
|
| | | CA520_tagCMCoatDecompose coatDecompose = new CA520_tagCMCoatDecompose();
|
| | | coatDecompose.Count = (byte)indexs.Count;
|
| | | coatDecompose.IndexList = indexs.ToArray();
|
| | | coatDecompose.ItemIDList = ids.ToArray();
|
| | | GameNetSystem.Instance.SendInfo(coatDecompose);
|
| | | }
|
| | |
|
| | | public class DecomposeItem
|
| | | {
|
| | | public string guid { get; private set; }
|
| | | public bool isSelect { get; private set; }
|
| | | public ItemModel itemModel { get; private set; }
|
| | | public int decomposeExp { get; private set; }
|
| | |
|
| | | public void SetModel(ItemModel _model)
|
| | | {
|
| | | guid = _model.itemInfo.ItemGUID;
|
| | | isSelect = true;
|
| | | itemModel = _model;
|
| | | if(itemModel.chinItemModel.Effect1 == 243)
|
| | | {
|
| | | decomposeExp = itemModel.chinItemModel.EffectValueB1 * itemModel.itemInfo.ItemCount;
|
| | | }
|
| | | else
|
| | | {
|
| | | decomposeExp = 0;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetIsSelect(bool _isSelect)
|
| | | {
|
| | | isSelect = _isSelect;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d6722779fa42a274687159f4e8cf8270 |
| | | timeCreated: 1546932457 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System.Collections;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionDetailsWin : Window
|
| | | {
|
| | | [SerializeField] GameObject container;
|
| | | [SerializeField] CanvasGroup alpha;
|
| | | [Header("顶部UI")]
|
| | | [SerializeField] Text nameText;
|
| | | [SerializeField] Text fashionPartText;
|
| | | [SerializeField] Text jobText;
|
| | | [SerializeField] CommonItemBaisc itemBaisc;
|
| | | [Header("中间UI")]
|
| | | [SerializeField] GameObject midPartObj;
|
| | | [SerializeField] FashionAttrBeh currentFashionAttr;
|
| | | [SerializeField] FashionAttrBeh nextFashionAttr;
|
| | | [Header("底部UI")]
|
| | | [SerializeField] GameObject bottomPartObj;
|
| | | [SerializeField] Text resourceText;
|
| | |
|
| | | FashionDress fashionDress = null;
|
| | | ItemConfig itemConfig = null;
|
| | | FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | }
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | SetDisplay();
|
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | StartCoroutine(DelayShow());
|
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void SetDisplay()
|
| | | {
|
| | | |
| | | fashionModel.TryGetFashionDress(fashionModel.viewFashionDressId,out fashionDress);
|
| | | if (fashionDress == null) return;
|
| | |
|
| | | container.SetActive(false);
|
| | | int itemId = fashionDress.GetEquipItemId();
|
| | | DebugEx.Log("物品ID:" + itemId);
|
| | | alpha.alpha = 0;
|
| | | itemConfig = Config.Instance.Get<ItemConfig>(itemId);
|
| | | SetTopUI();
|
| | | SetMidUI();
|
| | | SetBotttomUI();
|
| | | }
|
| | |
|
| | | private void SetTopUI()
|
| | | {
|
| | | if (itemConfig == null) return;
|
| | |
|
| | | if (itemConfig.JobLimit != 0)
|
| | | {
|
| | | JobNameConfig jobNameConfig = Config.Instance.Get<JobNameConfig>(itemConfig.JobLimit);
|
| | | jobText.text = jobNameConfig.name;
|
| | | }
|
| | | nameText.text = itemConfig.ItemName;
|
| | | nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
|
| | | fashionPartText.text = itemConfig.ItemTypeName;
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID);
|
| | | itemBaisc.Init(cellModel);
|
| | | }
|
| | |
|
| | | private void SetMidUI()
|
| | | {
|
| | | //midPartObj.SetActive(true);
|
| | | if (fashionDress == null) return;
|
| | | int minStar = 1;
|
| | | int curSatr = fashionModel.GetFashionDressLevel(fashionDress.id);
|
| | | if(curSatr < minStar)
|
| | | {
|
| | | currentFashionAttr.gameObject.SetActive(false);
|
| | | nextFashionAttr.gameObject.SetActive(true);
|
| | | nextFashionAttr.SetDisplay(minStar,curSatr);
|
| | | }
|
| | | else if(curSatr >= fashionDress.maxLevel)
|
| | | {
|
| | | currentFashionAttr.gameObject.SetActive(true);
|
| | | nextFashionAttr.gameObject.SetActive(false);
|
| | | currentFashionAttr.SetDisplay(fashionDress.maxLevel,curSatr);
|
| | | }
|
| | | else
|
| | | {
|
| | | currentFashionAttr.gameObject.SetActive(true);
|
| | | nextFashionAttr.gameObject.SetActive(true);
|
| | | currentFashionAttr.SetDisplay(curSatr,curSatr);
|
| | | nextFashionAttr.SetDisplay(curSatr+1,curSatr);
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetBotttomUI()
|
| | | {
|
| | | if (itemConfig == null) return;
|
| | |
|
| | | //bottomPartObj.SetActive(true);
|
| | | resourceText.text = itemConfig.Description;
|
| | | }
|
| | |
|
| | | IEnumerator DelayShow()
|
| | | {
|
| | | yield return null;
|
| | | container.SetActive(true);
|
| | | StartCoroutine(DelayAlpha());
|
| | | }
|
| | |
|
| | | IEnumerator DelayShowMid()
|
| | | {
|
| | | yield return null;
|
| | | midPartObj.SetActive(true);
|
| | | StartCoroutine(DelayShowBottom());
|
| | | }
|
| | |
|
| | | IEnumerator DelayShowBottom()
|
| | | {
|
| | | yield return null;
|
| | | bottomPartObj.SetActive(true);
|
| | | StartCoroutine(DelayAlpha());
|
| | | }
|
| | |
|
| | | IEnumerator DelayAlpha()
|
| | | {
|
| | | yield return null;
|
| | | alpha.alpha = 1;
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 91c26b09f6d89e44d8d82d3dcce87396 |
| | | timeCreated: 1546830741 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class FashionDressCell : CellView
|
| | | {
|
| | | [SerializeField] ItemBehaviour m_Item;
|
| | | [SerializeField] Text m_ItemName;
|
| | | [SerializeField] Text m_ItemCount;
|
| | | [SerializeField] Text m_GetPath;
|
| | | [SerializeField] RectTransform m_ContainerStars;
|
| | | [SerializeField] Transform[] m_Stars;
|
| | | [SerializeField] Transform[] m_StarEquips;
|
| | | [SerializeField] Button m_LevelUp;
|
| | | [SerializeField] Transform m_ContainerDarkMask;
|
| | | [SerializeField] Transform m_Lock;
|
| | | [SerializeField] Button m_Unlock;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Transform m_Equiped;
|
| | | [SerializeField] Transform m_Preview;
|
| | | [SerializeField] Transform m_UnlockRedpoint;
|
| | | [SerializeField] Transform m_LevelUpRedpoint;
|
| | | [SerializeField] Button m_Select;
|
| | |
|
| | | int fashionDressId = 0;
|
| | |
|
| | | FashionDressModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
|
| | | }
|
| | |
|
| | | PlayerPackModel packModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); }
|
| | | }
|
| | |
|
| | | public void Display(int id)
|
| | | {
|
| | | fashionDressId = id;
|
| | |
|
| | | FashionDress fashionDress;
|
| | | m_LevelUp.RemoveAllListeners();
|
| | | m_Unlock.RemoveAllListeners();
|
| | | m_Select.RemoveAllListeners();
|
| | |
|
| | | var fashionDressLevel = model.GetFashionDressLevel(fashionDressId);
|
| | |
|
| | | var active = fashionDressLevel > 0;
|
| | |
|
| | | m_ContainerDarkMask.gameObject.SetActive(!active);
|
| | | m_ContainerStars.gameObject.SetActive(active);
|
| | | m_GetPath.gameObject.SetActive(!active);
|
| | |
|
| | | m_UnlockRedpoint.gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && model.fashionDressRedpointId == fashionDressId);
|
| | | m_LevelUpRedpoint.gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && model.fashionDressRedpointId == fashionDressId);
|
| | |
|
| | | if (model.TryGetFashionDress(fashionDressId, out fashionDress))
|
| | | {
|
| | | var equipItemId = fashionDress.GetEquipItemId();
|
| | | var virtualEquipFashionId = model.GetVirtualEquipFashionDress(fashionDress.fashionDressType);
|
| | | var selectFashionDress = model.GetSelectFashionDress(fashionDress.fashionDressType);
|
| | |
|
| | | bool isEquiped = virtualEquipFashionId == fashionDressId;
|
| | | m_Equiped.gameObject.SetActive(isEquiped);
|
| | |
|
| | | bool isSelect = selectFashionDress == fashionDressId;
|
| | | m_Preview.gameObject.SetActive(!isEquiped && isSelect);
|
| | |
|
| | | m_ContainerSelect.gameObject.SetActive(isSelect);
|
| | |
|
| | | m_LevelUp.gameObject.SetActive(active && fashionDressLevel < fashionDress.maxLevel);
|
| | |
|
| | | bool isMax = fashionDressLevel >= fashionDress.maxLevel;
|
| | | var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
|
| | | m_Item.SetItem(equipItemId, 0);
|
| | | var levelUpRequireCount = fashionDress.GetLevelUpRequireCount(fashionDressLevel);
|
| | | var requireCountDisplay = UIHelper.AppendStringColor(count >= levelUpRequireCount ?
|
| | | TextColType.DarkGreen : TextColType.Red, count.ToString());
|
| | | m_ItemCount.text = isMax ? string.Empty : StringUtility.Contact(requireCountDisplay, "/", levelUpRequireCount);
|
| | |
|
| | | var config = Config.Instance.Get<FashionDressConfig>(fashionDressId);
|
| | | m_ItemName.text = config.name;
|
| | | m_GetPath.text = config.getWay;
|
| | | if (fashionDressLevel > 0)
|
| | | {
|
| | | for (int i = 0; i < m_Stars.Length; i++)
|
| | | {
|
| | | m_Stars[i].gameObject.SetActive(i < fashionDress.maxLevel);
|
| | | }
|
| | | for (int i = 0; i < m_StarEquips.Length; i++)
|
| | | {
|
| | | m_StarEquips[i].gameObject.SetActive(i < fashionDressLevel);
|
| | | }
|
| | | }
|
| | |
|
| | | m_Lock.gameObject.SetActive(count < levelUpRequireCount);
|
| | | m_Unlock.gameObject.SetActive(count >= levelUpRequireCount);
|
| | |
|
| | | m_LevelUp.AddListener(LevelUp);
|
| | | m_Unlock.AddListener(LevelUp);
|
| | | m_Select.AddListener(Select);
|
| | | }
|
| | | }
|
| | |
|
| | | private void Select()
|
| | | {
|
| | | FashionDress fashionDress;
|
| | | if (model.TryGetFashionDress(fashionDressId, out fashionDress))
|
| | | {
|
| | | var selectFashionDress = model.GetSelectFashionDress(fashionDress.fashionDressType);
|
| | | var virtualEquipFashionDress = model.GetVirtualEquipFashionDress(fashionDress.fashionDressType);
|
| | | if (selectFashionDress != fashionDressId)
|
| | | {
|
| | | if (model.IsFashionDressUnlock(fashionDressId))
|
| | | {
|
| | | model.SetVirtualEquipFashionDress(fashionDress.fashionDressType, fashionDressId);
|
| | | model.SetSelectFashionDress(fashionDress.fashionDressType, fashionDressId);
|
| | | }
|
| | | else
|
| | | {
|
| | | model.SetSelectFashionDress(fashionDress.fashionDressType, fashionDressId);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (virtualEquipFashionDress == fashionDressId)
|
| | | {
|
| | | model.SetVirtualEquipFashionDress(fashionDress.fashionDressType, 0);
|
| | | model.SetSelectFashionDress(fashionDress.fashionDressType, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | model.SetSelectFashionDress(fashionDress.fashionDressType, virtualEquipFashionDress);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void LevelUp()
|
| | | {
|
| | | var error = 0;
|
| | | if (!model.TryLevelUp(fashionDressId, out error))
|
| | | {
|
| | | model.DisplayLevelUpError(error);
|
| | | return;
|
| | | }
|
| | | model.SendLevelUp(fashionDressId);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 6f69d8fa7c986cd4babb27d708adba91 |
| | | timeCreated: 1546918315 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using System.Linq;
|
| | | using TableConfig;
|
| | | using UnityEngine; |
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class FashionDressModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | Dictionary<int, FashionDress> fashionDressDict = new Dictionary<int, FashionDress>();
|
| | | Dictionary<int, int> fashionDressLevelDict = new Dictionary<int, int>();
|
| | | Dictionary<int, Dictionary<int, int>> cabinetPropertyDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | Dictionary<int, List<int>> fashionDressTypeDict = new Dictionary<int, List<int>>();
|
| | | Dictionary<int, Dictionary<int, List<int>>> fashionDressQualityDict = new Dictionary<int, Dictionary<int, List<int>>>();
|
| | |
|
| | | const int FASHIONDRESS_REDPOINT_BASE = 10105;
|
| | | const int FASHIONDRESS_FUNC_ID = 160;
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(101, FASHIONDRESS_REDPOINT_BASE);
|
| | | public readonly Redpoint levelUpRedpoint = new Redpoint(FASHIONDRESS_REDPOINT_BASE, 1010501);
|
| | |
|
| | | public int cabinetLevel { get; private set; }
|
| | | public int cabinetExp { get; private set; }
|
| | | public int cabinetMaxLevel { get; private set; }
|
| | | public bool serverInited { get; private set; }
|
| | | public int fashoinDressCount
|
| | | {
|
| | | get
|
| | | {
|
| | | return fashionDressDict.Count;
|
| | | }
|
| | | }
|
| | |
|
| | | public Dictionary<int, int> fashionDressSelectDict { get; private set; }
|
| | | public Dictionary<int, int> fashionDressEquipDict { get; private set; }
|
| | | public List<int> fashionDressLevelUpItems { get; private set; }
|
| | | public List<int> fashionDressTypes { get; private set; }
|
| | | public Dictionary<int, int> fashionTypeMapPlaceDict { get; private set; }
|
| | |
|
| | | int m_SelectType = 1;
|
| | | public int selectType
|
| | | {
|
| | | get { return m_SelectType; }
|
| | | set
|
| | | {
|
| | | if (m_SelectType != value)
|
| | | {
|
| | | m_SelectType = value;
|
| | | if (selectTypeRefresh != null)
|
| | | {
|
| | | selectTypeRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | int m_SelectQuality = 0;
|
| | | public int selectQuality
|
| | | {
|
| | | get { return m_SelectQuality; }
|
| | | set
|
| | | {
|
| | | if (m_SelectQuality != value)
|
| | | {
|
| | | m_SelectQuality = value;
|
| | | if (selectQualityRefresh != null)
|
| | | {
|
| | | selectQualityRefresh();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action selectTypeRefresh;
|
| | | public event Action selectQualityRefresh;
|
| | | public event Action cabinetRefresh;
|
| | | public event Action<int> fashionDressRefresh;
|
| | | public event Action<int> previewRefresh;
|
| | | public event Action<int> virtualEquipRefresh;
|
| | |
|
| | | PlayerPackModel packModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); }
|
| | | }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | ParseConfig();
|
| | | fashionDressSelectDict = new Dictionary<int, int>();
|
| | | fashionDressEquipDict = new Dictionary<int, int>();
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | fashionDressLevelDict.Clear();
|
| | | cabinetLevel = 0;
|
| | | cabinetExp = 0;
|
| | | serverInited = false;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | UpdateRedpoint();
|
| | | serverInited = true;
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int id)
|
| | | {
|
| | | if (id == FASHIONDRESS_FUNC_ID)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshItemCountAct(PackType packType, int arg2, int itemId)
|
| | | {
|
| | | if (packType == PackType.rptItem)
|
| | | {
|
| | | if (fashionDressLevelUpItems.Contains(itemId))
|
| | | {
|
| | | UpdateRedpoint();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void ParseConfig()
|
| | | {
|
| | | {
|
| | | var configs = Config.Instance.GetAllValues<FashionDressConfig>();
|
| | | fashionDressLevelUpItems = new List<int>();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | fashionDressDict[config.CoatID] = new FashionDress(config);
|
| | | {
|
| | | List<int> list;
|
| | | if (!fashionDressTypeDict.TryGetValue(config.type, out list))
|
| | | {
|
| | | list = new List<int>();
|
| | | fashionDressTypeDict.Add(config.type, list);
|
| | | }
|
| | | list.Add(config.CoatID);
|
| | | }
|
| | | if (!fashionDressLevelUpItems.Contains(config.UnlockItemID))
|
| | | {
|
| | | fashionDressLevelUpItems.Add(config.UnlockItemID);
|
| | | }
|
| | |
|
| | | {
|
| | | Dictionary<int, List<int>> dict;
|
| | | if (!fashionDressQualityDict.TryGetValue(config.type, out dict))
|
| | | {
|
| | | dict = new Dictionary<int, List<int>>();
|
| | | fashionDressQualityDict.Add(config.type, dict);
|
| | | }
|
| | | List<int> list;
|
| | | if (!dict.TryGetValue(config.quality, out list))
|
| | | {
|
| | | list = new List<int>();
|
| | | dict.Add(config.quality, list);
|
| | | }
|
| | | list.Add(config.CoatID);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | {
|
| | | var configs = Config.Instance.GetAllValues<FashionDressCabinetConfig>();
|
| | | foreach (var config in configs)
|
| | | {
|
| | | cabinetPropertyDict.Add(config.LV, ConfigParse.GetDic<int, int>(config.Attr));
|
| | | if (config.LV > cabinetMaxLevel)
|
| | | {
|
| | | cabinetMaxLevel = config.LV;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | {
|
| | | var config = Config.Instance.Get<FuncConfigConfig>("FashionDressType");
|
| | | if (config != null)
|
| | | {
|
| | | fashionTypeMapPlaceDict = ConfigParse.GetDic<int, int>(config.Numerical1);
|
| | | }
|
| | | fashionDressTypes = fashionTypeMapPlaceDict.Keys.ToList();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public int GetFashionDressLevel(int id)
|
| | | {
|
| | | if (fashionDressLevelDict.ContainsKey(id))
|
| | | {
|
| | | return fashionDressLevelDict[id];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetFashionDressEquipId(int type)
|
| | | {
|
| | | if (fashionTypeMapPlaceDict.ContainsKey(type)
|
| | | && fashionDressTypeDict.ContainsKey(type))
|
| | | {
|
| | | var equipPlace = fashionTypeMapPlaceDict[type];
|
| | | var itemModel = packModel.GetItemModelByIndex(PackType.rptEquip, (int)equipPlace);
|
| | | var list = fashionDressTypeDict[type];
|
| | | if (itemModel != null)
|
| | | {
|
| | | var index = list.FindIndex((id) =>
|
| | | {
|
| | | FashionDress fashionDress;
|
| | | if (TryGetFashionDress(id, out fashionDress))
|
| | | {
|
| | | return fashionDress.GetEquipItemId() == itemModel.itemId;
|
| | | }
|
| | | return false;
|
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | return list[index];
|
| | | }
|
| | | }
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetSelectFashionDress(int type)
|
| | | {
|
| | | if (fashionDressSelectDict.ContainsKey(type))
|
| | | {
|
| | | return fashionDressSelectDict[type];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public int GetVirtualEquipFashionDress(int type)
|
| | | {
|
| | | if (fashionDressEquipDict.ContainsKey(type))
|
| | | {
|
| | | return fashionDressEquipDict[type];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public bool IsFashionDressUnlock(int id)
|
| | | {
|
| | | var level = GetFashionDressLevel(id);
|
| | | return level > 0;
|
| | | }
|
| | |
|
| | | public bool TryGetFashionDress(int id, out FashionDress fashionDress)
|
| | | {
|
| | | return fashionDressDict.TryGetValue(id, out fashionDress);
|
| | | }
|
| | |
|
| | | public bool TryGetFashionDresses(int type, int quality, out List<int> list)
|
| | | {
|
| | | list = null;
|
| | | if (fashionDressQualityDict.ContainsKey(type))
|
| | | {
|
| | | return fashionDressQualityDict[type].TryGetValue(quality, out list);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetFashionDresses(int type, out List<int> list)
|
| | | {
|
| | | return fashionDressTypeDict.TryGetValue(type, out list);
|
| | | }
|
| | |
|
| | | public bool TryGetFashionDressProperty(int id, int level, out Dictionary<int, int> dict)
|
| | | {
|
| | | dict = null;
|
| | | if (fashionDressDict.ContainsKey(id))
|
| | | {
|
| | | return fashionDressDict[id].TryGetProperty(level, out dict);
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetCabinetProperty(int level, out Dictionary<int, int> dict)
|
| | | {
|
| | | return cabinetPropertyDict.TryGetValue(level, out dict);
|
| | | }
|
| | |
|
| | | public bool TryGetSatisfyResolves(ref List<int> list)
|
| | | {
|
| | | if (list == null)
|
| | | {
|
| | | list = new List<int>();
|
| | | }
|
| | | list.Clear();
|
| | | foreach (var fashionDress in fashionDressDict.Values)
|
| | | {
|
| | | var level = GetFashionDressLevel(fashionDress.id);
|
| | | if (level < fashionDress.maxLevel)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
|
| | | if (count > 0 && !list.Contains(fashionDress.requireLevelUpItem))
|
| | | {
|
| | | list.Add(fashionDress.requireLevelUpItem);
|
| | | }
|
| | | }
|
| | | return list != null && list.Count > 0;
|
| | | }
|
| | |
|
| | | public bool TryGetActiveFashionDress(out List<int> list)
|
| | | {
|
| | | list = new List<int>();
|
| | | foreach (var fashionDress in fashionDressDict.Values)
|
| | | {
|
| | | var level = GetFashionDressLevel(fashionDress.id);
|
| | | if (level > 0)
|
| | | {
|
| | | list.Add(fashionDress.id);
|
| | | }
|
| | | }
|
| | | return list.Count > 0;
|
| | | }
|
| | |
|
| | |
|
| | | public bool TryLevelUp(int id, out int error)
|
| | | {
|
| | | error = 0;
|
| | | FashionDress fashionDress;
|
| | | if (TryGetFashionDress(id, out fashionDress))
|
| | | {
|
| | | var level = GetFashionDressLevel(id);
|
| | | if (level >= fashionDress.maxLevel)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
|
| | | var levelUpRequireCount = fashionDress.GetLevelUpRequireCount(level);
|
| | | if (count < levelUpRequireCount)
|
| | | {
|
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
|
| | | public void DisplayLevelUpError(int error)
|
| | | {
|
| | | switch (error)
|
| | | {
|
| | | case 1:
|
| | | SysNotifyMgr.Instance.ShowTip("FashionDressLevelUpError_1");
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetSelectFashionDress(int type, int id)
|
| | | {
|
| | | fashionDressSelectDict[type] = id;
|
| | | if (previewRefresh != null)
|
| | | {
|
| | | previewRefresh(type);
|
| | | }
|
| | | }
|
| | |
|
| | | public void SetVirtualEquipFashionDress(int type, int id)
|
| | | {
|
| | | fashionDressEquipDict[type] = id;
|
| | | if (virtualEquipRefresh != null)
|
| | | {
|
| | | virtualEquipRefresh(type);
|
| | | }
|
| | | }
|
| | |
|
| | | public void ReceivePackage(HB102_tagMCClothesCoatSkinState package)
|
| | | {
|
| | | cabinetLevel = (int)package.CoatChestLV;
|
| | | cabinetExp = (int)package.CoatChestExp;
|
| | | if (cabinetRefresh != null)
|
| | | {
|
| | | cabinetRefresh();
|
| | | }
|
| | | for (int i = 0; i < package.CoatNum; i++)
|
| | | {
|
| | | var id = (int)package.CoatInfoList[i].CoatIndex;
|
| | | var level = (int)package.CoatInfoList[i].CoatLV;
|
| | | fashionDressLevelDict[id] = level;
|
| | | if (fashionDressRefresh != null)
|
| | | {
|
| | | fashionDressRefresh(id);
|
| | | }
|
| | | if (level == 1)
|
| | | {
|
| | | HandleFashionDressUnlock(id);
|
| | | }
|
| | | }
|
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public void HandleFashionDressUnlock(int id)
|
| | | {
|
| | | if (serverInited)
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<FashionDressWin>())
|
| | | {
|
| | | FashionDress fashionDress;
|
| | | if (TryGetFashionDress(id, out fashionDress))
|
| | | {
|
| | | if (selectType == fashionDress.fashionDressType)
|
| | | {
|
| | | var virtualEquipId = GetVirtualEquipFashionDress(selectType);
|
| | | if (virtualEquipId != 0)
|
| | | {
|
| | | SetSelectFashionDress(selectType, virtualEquipId);
|
| | | }
|
| | | else
|
| | | {
|
| | | SetVirtualEquipFashionDress(selectType, id);
|
| | | SetSelectFashionDress(selectType, id);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void SendLevelUp(int id)
|
| | | {
|
| | | CA50B_tagCMCoatUp pak = new CA50B_tagCMCoatUp();
|
| | | pak.CoatIndex = (uint)id;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | public void TryEquip()
|
| | | {
|
| | | foreach (var type in fashionDressEquipDict.Keys)
|
| | | {
|
| | | var equipId = GetFashionDressEquipId(type);
|
| | | var virtualEquipId = fashionDressEquipDict[type];
|
| | | var index = fashionTypeMapPlaceDict[type];
|
| | | if (virtualEquipId != 0)
|
| | | {
|
| | | if (IsFashionDressUnlock(virtualEquipId)
|
| | | && virtualEquipId != equipId)
|
| | | {
|
| | | SendEquipPackage((int)PackType.rptInterimPack, virtualEquipId, (int)PackType.rptEquip, index);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (equipId != 0)
|
| | | {
|
| | | SendEquipPackage((int)PackType.rptEquip, index, (int)PackType.rptInterimPack, 0);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void SendEquipPackage(int srcpackType, int scrIndex, int destpackType, int destIndex)
|
| | | {
|
| | | C073D_tagCPackItemExchange pak = new C073D_tagCPackItemExchange();
|
| | | pak.SrcBackpack = (byte)srcpackType;
|
| | | pak.SrcIndex = (ushort)scrIndex;
|
| | | pak.DesBackPack = (byte)destpackType;
|
| | | pak.DestIndex = (ushort)destIndex;
|
| | | GameNetSystem.Instance.SendInfo(pak);
|
| | | }
|
| | |
|
| | | #region 时装详情
|
| | | public int viewFashionDressId { get; private set; }
|
| | | public void ViewFashionDressDetails(int id)
|
| | | {
|
| | | viewFashionDressId = id;
|
| | | WindowCenter.Instance.Open<FashionDetailsWin>();
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 红点
|
| | | public int fashionDressRedpointId { get; private set; }
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | levelUpRedpoint.state = RedPointState.None;
|
| | | if (!FuncOpen.Instance.IsFuncOpen(FASHIONDRESS_FUNC_ID))
|
| | | {
|
| | | return;
|
| | | }
|
| | | foreach (var fashionDress in fashionDressDict.Values)
|
| | | {
|
| | | var level = GetFashionDressLevel(fashionDress.id);
|
| | | if (level >= fashionDress.maxLevel)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var levelUpRequireCount = fashionDress.GetLevelUpRequireCount(level);
|
| | | var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
|
| | | if (count >= levelUpRequireCount)
|
| | | {
|
| | | fashionDressRedpointId = fashionDress.id;
|
| | | levelUpRedpoint.state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | | }
|
| | |
|
| | | public class FashionDress
|
| | | {
|
| | | public int id { get; private set; }
|
| | | public int requireLevelUpItem { get; private set; }
|
| | | public int maxLevel { get; private set; }
|
| | | public int equipPlace { get; private set; }
|
| | | public int fashionDressType { get; private set; }
|
| | |
|
| | | List<int> equipItems = new List<int>();
|
| | | List<int> requireLevelUpCounts = new List<int>();
|
| | | Dictionary<int, Dictionary<int, int>> propertys = new Dictionary<int, Dictionary<int, int>>();
|
| | | public FashionDress(FashionDressConfig config)
|
| | | {
|
| | | id = config.CoatID;
|
| | | requireLevelUpItem = config.UnlockItemID;
|
| | | maxLevel = config.MaxLV;
|
| | | fashionDressType = config.type;
|
| | | requireLevelUpCounts.AddRange(config.CostItemCnt);
|
| | | var json = LitJson.JsonMapper.ToObject(config.StarAttr);
|
| | | foreach (var starKey in json.Keys)
|
| | | {
|
| | | var star = int.Parse(starKey);
|
| | | Dictionary<int, int> dict = new Dictionary<int, int>();
|
| | | propertys.Add(star, dict);
|
| | | foreach (var propertyKey in json[starKey].Keys)
|
| | | {
|
| | | var property = int.Parse(propertyKey);
|
| | | dict.Add(property, int.Parse(json[starKey][propertyKey].ToString()));
|
| | | }
|
| | | }
|
| | | equipItems.AddRange(config.EquipItemID);
|
| | | var equipItemConfig = Config.Instance.Get<ItemConfig>(equipItems[0]);
|
| | | equipPlace = equipItemConfig.EquipPlace;
|
| | | }
|
| | |
|
| | | public int GetEquipItemId(int job = 0)
|
| | | {
|
| | | if (job == 0)
|
| | | {
|
| | | job = PlayerDatas.Instance.baseData.Job;
|
| | | }
|
| | | var index = job - 1;
|
| | | if (index < equipItems.Count)
|
| | | {
|
| | | return equipItems[index];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public bool TryGetProperty(int level, out Dictionary<int, int> dict)
|
| | | {
|
| | | return propertys.TryGetValue(level, out dict);
|
| | | }
|
| | |
|
| | | public int GetLevelUpRequireCount(int level)
|
| | | {
|
| | | var index = level;
|
| | | if (index < requireLevelUpCounts.Count)
|
| | | {
|
| | | return requireLevelUpCounts[index];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0a0e33f1957b1724ba147992931bd7f9 |
| | | timeCreated: 1546852997 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionDressQualityBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] int m_Quality = 0;
|
| | | [SerializeField] Transform m_ContainerSelect;
|
| | | [SerializeField] Transform m_ContainerNormal;
|
| | | [SerializeField] Transform m_Redpoint;
|
| | | [SerializeField] Shadow m_QualityShadow;
|
| | | [SerializeField] Button m_Select;
|
| | |
|
| | | FashionDressModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_Select.AddListener(OnSelect);
|
| | | }
|
| | |
|
| | | public void Display()
|
| | | {
|
| | | model.selectQualityRefresh += SelectQualityRefresh;
|
| | | model.selectTypeRefresh += SelectTypeRefresh;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | DisplaySelect();
|
| | | DisplayRedpoint();
|
| | | }
|
| | |
|
| | | void DisplaySelect()
|
| | | {
|
| | | bool selected = model.selectQuality == m_Quality;
|
| | | m_ContainerSelect.gameObject.SetActive(selected);
|
| | | m_ContainerNormal.gameObject.SetActive(!selected);
|
| | | m_QualityShadow.enabled = selected;
|
| | | }
|
| | |
|
| | | void DisplayRedpoint()
|
| | | {
|
| | | var requireRedpoint = false;
|
| | | List<int> list;
|
| | | if (model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && model.TryGetFashionDresses(model.selectType, m_Quality, out list)
|
| | | && list.Contains(model.fashionDressRedpointId))
|
| | | {
|
| | | requireRedpoint = true;
|
| | | }
|
| | | m_Redpoint.gameObject.SetActive(requireRedpoint);
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | model.selectQualityRefresh -= SelectQualityRefresh;
|
| | | model.selectTypeRefresh -= SelectTypeRefresh;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
|
| | | }
|
| | |
|
| | | private void RedpointValueChangeEvent(int id)
|
| | | {
|
| | | if (model.levelUpRedpoint.id == id)
|
| | | {
|
| | | DisplayRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectQualityRefresh()
|
| | | {
|
| | | DisplaySelect();
|
| | | }
|
| | |
|
| | | private void SelectTypeRefresh()
|
| | | {
|
| | | DisplayRedpoint();
|
| | | }
|
| | |
|
| | | private void OnSelect()
|
| | | {
|
| | | List<int> list;
|
| | | if (!model.TryGetFashionDresses(model.selectType, m_Quality, out list)
|
| | | || list.Count == 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("NoneOfSelectQualityFashionDress");
|
| | | return;
|
| | | }
|
| | | model.selectQuality = m_Quality;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a006ff57d928a7248b12f7688c91811e |
| | | timeCreated: 1546914298 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionDressTypeBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] int m_FashionDressType;
|
| | | [SerializeField] Button m_Select;
|
| | | [SerializeField] RectTransform m_ContainerSelect;
|
| | | [SerializeField] RectTransform m_ContainerNormal;
|
| | | [SerializeField] Transform m_SelectRedpoint;
|
| | | [SerializeField] Transform m_NormalRedpoint;
|
| | |
|
| | | FashionDressModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
|
| | | }
|
| | |
|
| | | private void Awake()
|
| | | {
|
| | | m_Select.onClick.AddListener(OnSelect);
|
| | | }
|
| | |
|
| | | public void Display()
|
| | | {
|
| | | model.selectTypeRefresh += SelectEquipPlaceRefresh;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
|
| | | DisplaySelect();
|
| | | DisplayRedpoint();
|
| | | }
|
| | |
|
| | | void DisplaySelect()
|
| | | {
|
| | | m_ContainerSelect.gameObject.SetActive(m_FashionDressType == model.selectType);
|
| | | m_ContainerNormal.gameObject.SetActive(m_FashionDressType != model.selectType);
|
| | | }
|
| | |
|
| | | void DisplayRedpoint()
|
| | | {
|
| | | var requireRedpoint = false;
|
| | | List<int> list;
|
| | | if (model.levelUpRedpoint.state == RedPointState.Simple
|
| | | && model.TryGetFashionDresses(m_FashionDressType, out list)
|
| | | && list.Contains(model.fashionDressRedpointId))
|
| | | {
|
| | | requireRedpoint = true;
|
| | | }
|
| | | m_SelectRedpoint.gameObject.SetActive(requireRedpoint);
|
| | | m_NormalRedpoint.gameObject.SetActive(requireRedpoint);
|
| | | }
|
| | |
|
| | | public void Dispose()
|
| | | {
|
| | | model.selectTypeRefresh -= SelectEquipPlaceRefresh;
|
| | | RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
|
| | | }
|
| | |
|
| | | private void RedpointValueChangeEvent(int id)
|
| | | {
|
| | | if (model.levelUpRedpoint.id == id)
|
| | | {
|
| | | DisplayRedpoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void SelectEquipPlaceRefresh()
|
| | | {
|
| | | DisplaySelect();
|
| | | }
|
| | |
|
| | | private void OnSelect()
|
| | | {
|
| | | model.selectType = m_FashionDressType;
|
| | | }
|
| | | }
|
| | | } |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ac86cee78491407418892b9b745e2b1c |
| | | timeCreated: 1546862460 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Monday, January 07, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionDressWin : Window
|
| | | {
|
| | | [SerializeField] FashionDressTypeBehaviour[] m_FashionDressTypes;
|
| | | [SerializeField] Button m_ViewProperty;
|
| | | [SerializeField] Button m_Resolve;
|
| | | [SerializeField] IntensifySmoothSlider m_SmoothSlider;
|
| | | [SerializeField] Text m_CabinetExp;
|
| | | [SerializeField] Text m_CabinetLevel;
|
| | |
|
| | | [SerializeField] RawImage m_RawModel;
|
| | |
|
| | | [SerializeField] FashionDressQualityBehaviour[] m_FashionDressQualitys;
|
| | | [SerializeField] ScrollerController m_ScrollerControl;
|
| | | [SerializeField] RectTransform m_ContainerViewDetail;
|
| | | [SerializeField] Button m_ViewDetail;
|
| | |
|
| | |
|
| | | FashionDressModel model
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
|
| | | }
|
| | |
|
| | | PlayerPackModel packModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); }
|
| | | }
|
| | |
|
| | | MagicianModel godWeaponModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
|
| | | }
|
| | |
|
| | | List<int> resolveList = new List<int>();
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_ViewProperty.AddListener(ViewProperty);
|
| | | m_Resolve.AddListener(Resolve);
|
| | | m_ViewDetail.AddListener(ViewDetail);
|
| | | m_ScrollerControl.OnRefreshCell += OnRefreshCell;
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | SetDefaultSelect();
|
| | |
|
| | | model.cabinetRefresh += FashionDressCabinetRefresh;
|
| | | model.selectTypeRefresh += SelectTypeRefresh;
|
| | | model.selectQualityRefresh += SelectQualityRefresh;
|
| | | model.previewRefresh += PreviewRefresh;
|
| | | //model.virtualEquipRefresh += VirtualEquipRefresh;
|
| | | model.fashionDressRefresh += FashionDressRefresh;
|
| | | packModel.RefreshItemCountAct += RefreshItemCountAct;
|
| | |
|
| | | for (int i = 0; i < m_FashionDressTypes.Length; i++)
|
| | | {
|
| | | m_FashionDressTypes[i].Display();
|
| | | }
|
| | | for (int i = 0; i < m_FashionDressQualitys.Length; i++)
|
| | | {
|
| | | m_FashionDressQualitys[i].Display();
|
| | | }
|
| | | Display();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.cabinetRefresh -= FashionDressCabinetRefresh;
|
| | | model.selectTypeRefresh -= SelectTypeRefresh;
|
| | | model.selectQualityRefresh -= SelectQualityRefresh;
|
| | | model.previewRefresh -= PreviewRefresh;
|
| | | packModel.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | model.fashionDressRefresh -= FashionDressRefresh;
|
| | | //model.virtualEquipRefresh -= VirtualEquipRefresh;
|
| | |
|
| | | for (int i = 0; i < m_FashionDressTypes.Length; i++)
|
| | | {
|
| | | m_FashionDressTypes[i].Dispose();
|
| | | }
|
| | | for (int i = 0; i < m_FashionDressQualitys.Length; i++)
|
| | | {
|
| | | m_FashionDressQualitys[i].Dispose();
|
| | | }
|
| | |
|
| | | model.TryEquip();
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | }
|
| | | #endregion
|
| | |
|
| | | void SetDefaultSelect()
|
| | | {
|
| | | model.selectType = model.fashionDressTypes[0];
|
| | | model.selectQuality = 0;
|
| | |
|
| | | foreach (var fashionDressType in model.fashionDressTypes)
|
| | | {
|
| | | var equipId = model.GetFashionDressEquipId(fashionDressType);
|
| | | model.SetVirtualEquipFashionDress(fashionDressType, equipId);
|
| | | model.SetSelectFashionDress(fashionDressType, equipId);
|
| | | }
|
| | |
|
| | | for (int i = 0; i <= 2; i++)
|
| | | {
|
| | | List<int> list;
|
| | | if (model.TryGetFashionDresses(model.selectType, i, out list)
|
| | | && list.Count > 0)
|
| | | {
|
| | | model.selectQuality = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | void Display()
|
| | | {
|
| | | DisplayCabinet();
|
| | | DisplayFashionDress();
|
| | | DisplayModel();
|
| | | DisplayViewDetail();
|
| | | }
|
| | |
|
| | | void DisplayCabinet(bool requireAnimation = false)
|
| | | {
|
| | | m_SmoothSlider.stage = model.cabinetLevel;
|
| | | if (!requireAnimation)
|
| | | {
|
| | | m_SmoothSlider.delay = 0;
|
| | | m_SmoothSlider.ResetStage();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_SmoothSlider.delay = 0.2f;
|
| | | }
|
| | | bool isMax = model.cabinetLevel >= model.cabinetMaxLevel;
|
| | | var progress = 0f;
|
| | | if (isMax)
|
| | | {
|
| | | progress = 1;
|
| | | m_CabinetExp.text = model.cabinetExp.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | var config = Config.Instance.Get<FashionDressCabinetConfig>(model.cabinetLevel + 1);
|
| | | progress = Mathf.Clamp01((float)model.cabinetExp / config.NeedExp);
|
| | | m_CabinetExp.text = StringUtility.Contact(model.cabinetExp, "/", config.NeedExp);
|
| | | }
|
| | | m_SmoothSlider.value = progress;
|
| | | m_CabinetLevel.text = Language.Get("CabinetLevel", model.cabinetLevel);
|
| | | }
|
| | |
|
| | | void DisplayFashionDress()
|
| | | {
|
| | | List<int> list;
|
| | | m_ScrollerControl.Refresh();
|
| | | if (model.TryGetFashionDresses(model.selectType, model.selectQuality, out list))
|
| | | {
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | m_ScrollerControl.AddCell(ScrollerDataType.Header, list[i]);
|
| | | }
|
| | | }
|
| | | m_ScrollerControl.Restart();
|
| | | }
|
| | |
|
| | | void DisplayViewDetail()
|
| | | {
|
| | | var selectFashionDress = model.GetSelectFashionDress(model.selectType);
|
| | | m_ContainerViewDetail.gameObject.SetActive(selectFashionDress != 0);
|
| | | }
|
| | |
|
| | | private void FashionDressCabinetRefresh()
|
| | | {
|
| | | DisplayCabinet(true);
|
| | | }
|
| | |
|
| | | private void SelectTypeRefresh()
|
| | | {
|
| | | for (int i = 0; i <= 2; i++)
|
| | | {
|
| | | List<int> list;
|
| | | if (model.TryGetFashionDresses(model.selectType, i, out list)
|
| | | && list.Count > 0)
|
| | | {
|
| | | model.selectQuality = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | DisplayFashionDress();
|
| | | }
|
| | |
|
| | | private void SelectQualityRefresh()
|
| | | {
|
| | | DisplayFashionDress();
|
| | | }
|
| | |
|
| | | private void PreviewRefresh(int type)
|
| | | {
|
| | | if (model.selectType == type)
|
| | | {
|
| | | m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | DisplayModel();
|
| | | DisplayViewDetail();
|
| | | }
|
| | |
|
| | | //private void VirtualEquipRefresh(int type)
|
| | | //{
|
| | | // if (model.selectType == type)
|
| | | // {
|
| | | // m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | | // }
|
| | | // DisplayModel();
|
| | | // DisplayViewDetail();
|
| | | //}
|
| | |
|
| | | private void FashionDressRefresh(int id)
|
| | | {
|
| | | m_ScrollerControl.RefreshSingleCellView(id);
|
| | | }
|
| | |
|
| | | private void OnRefreshCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var fashionDressCell = cell as FashionDressCell;
|
| | | fashionDressCell.Display(cell.index);
|
| | | }
|
| | |
|
| | | private void RefreshItemCountAct(PackType packType, int index, int itemId)
|
| | | {
|
| | | if (packType == PackType.rptItem
|
| | | && model.fashionDressLevelUpItems.Contains(itemId))
|
| | | {
|
| | | m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | if (packType == PackType.rptEquip)
|
| | | {
|
| | | if (index == (int)RoleEquipType.retFashionClothes
|
| | | || index == (int)RoleEquipType.retFashionWeapon
|
| | | || index == (int)RoleEquipType.retFashionWeapon2)
|
| | | {
|
| | | m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
|
| | |
|
| | | foreach (var fashionDressType in model.fashionDressTypes)
|
| | | {
|
| | | var equipId = model.GetFashionDressEquipId(fashionDressType);
|
| | | model.SetVirtualEquipFashionDress(fashionDressType, equipId);
|
| | | model.SetSelectFashionDress(fashionDressType, equipId);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void DisplayModel()
|
| | | {
|
| | | m_RawModel.gameObject.SetActive(true);
|
| | |
|
| | | 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;
|
| | |
|
| | | foreach (var type in model.fashionDressTypes)
|
| | | {
|
| | | var selectFashionId = model.GetSelectFashionDress(type);
|
| | | if (selectFashionId == 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | FashionDress fashionDress;
|
| | | if (model.TryGetFashionDress(selectFashionId, out fashionDress))
|
| | | {
|
| | | var index = model.fashionTypeMapPlaceDict[type];
|
| | | switch ((RoleEquipType)index)
|
| | | {
|
| | | case RoleEquipType.retFashionWeapon:
|
| | | weaponId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | case RoleEquipType.retFashionClothes:
|
| | | clothesId = fashionDress.GetEquipItemId();
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon2:
|
| | | 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
|
| | | };
|
| | | UI3DModelExhibition.Instance.ShowOtherPlayer(m_RawModel, data);
|
| | | }
|
| | |
|
| | | private void Resolve()
|
| | | {
|
| | | if (!model.TryGetSatisfyResolves(ref resolveList))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FashionDressResolveOpenError");
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<FashiongDecomposeWin>();
|
| | | }
|
| | |
|
| | | private void ViewProperty()
|
| | | {
|
| | | WindowCenter.Instance.Open<FashionSumAttrWin>();
|
| | | }
|
| | |
|
| | | private void ViewDetail()
|
| | | {
|
| | | var virtualEquipId = model.GetVirtualEquipFashionDress(model.selectType);
|
| | | var previewId = model.GetSelectFashionDress(model.selectType);
|
| | | if (previewId != 0)
|
| | | {
|
| | | model.ViewFashionDressDetails(previewId);
|
| | | }
|
| | | else if (virtualEquipId != 0)
|
| | | {
|
| | | model.ViewFashionDressDetails(virtualEquipId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: aa3feb2eec13a714da4c9c6522acc0a3 |
| | | timeCreated: 1546859809 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System.Linq;
|
| | | using System.Collections;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashionSumAttrWin : Window
|
| | | {
|
| | | [SerializeField] GameObject container;
|
| | | [SerializeField] CanvasGroup alpha;
|
| | | [Header("时装总加成")]
|
| | | [SerializeField] Text activateNumText;
|
| | | [SerializeField] GameObject noneActivate;
|
| | | [SerializeField] List<Text> activateAttrs = new List<Text>();
|
| | | [SerializeField] List<GameObject> activateAttrObjs = new List<GameObject>();
|
| | | [Header("衣柜等级加成")]
|
| | | [SerializeField] Text wardrobeLvText;
|
| | | [SerializeField] GameObject noneLvAdd;
|
| | | [SerializeField] List<Text> lvAddAttrs = new List<Text>();
|
| | | [SerializeField] List<GameObject> lvAddAttrObjs = new List<GameObject>();
|
| | |
|
| | | FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | }
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | SetDisplay();
|
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | StartCoroutine(DelayShow());
|
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void SetDisplay()
|
| | | {
|
| | | alpha.alpha = 0;
|
| | | container.SetActive(false);
|
| | | SetActivateFashionAdd();
|
| | | SetWardrobeLvAdd();
|
| | | }
|
| | |
|
| | | private void SetActivateFashionAdd()
|
| | | {
|
| | | List<int> activateIds = null;
|
| | | bool isActivate = fashionModel.TryGetActiveFashionDress(out activateIds);
|
| | | int sumNum = fashionModel.fashoinDressCount;
|
| | | int activateNum = activateIds.Count;
|
| | | string actvivateNumSB = string.Empty;
|
| | | if(activateNum > 0)
|
| | | {
|
| | | actvivateNumSB = UIHelper.AppendStringColor(TextColType.Green,activateNum.ToString());
|
| | | }
|
| | | else
|
| | | {
|
| | | actvivateNumSB = UIHelper.AppendStringColor(TextColType.Red, activateNum.ToString());
|
| | | }
|
| | | activateNumText.text = StringUtility.Contact(actvivateNumSB, "/",sumNum);
|
| | | Dictionary<int, int> attrDict = GetActivateAttr();
|
| | | if(attrDict != null && attrDict.Count > 0)
|
| | | {
|
| | | noneActivate.SetActive(false);
|
| | | List<int> attrIds = attrDict.Keys.ToList();
|
| | | for(int i = 0; i < activateAttrObjs.Count; i++)
|
| | | {
|
| | | var attrObj = activateAttrObjs[i];
|
| | | attrObj.SetActive(i < attrIds.Count);
|
| | | if(i < attrIds.Count)
|
| | | {
|
| | | var attrText = activateAttrs[i];
|
| | | int attrId = attrIds[i];
|
| | | int attrValue = attrDict[attrId];
|
| | | var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | string attrSB = string.Empty;
|
| | | string attrValueSB = UIHelper.AppendStringColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
|
| | | if (attrConfig.Name.Contains("%s"))
|
| | | {
|
| | | attrSB = attrConfig.Name.Replace("%s",attrValueSB);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrSB = StringUtility.Contact(attrConfig.Name, "+",attrValueSB);
|
| | | }
|
| | | attrText.text = attrSB;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | noneActivate.SetActive(true);
|
| | | for (int i = 0; i < activateAttrObjs.Count; i++)
|
| | | {
|
| | | var attrObj = activateAttrObjs[i];
|
| | | attrObj.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private Dictionary<int,int> GetActivateAttr()
|
| | | {
|
| | | var sumAttrDict = new Dictionary<int, int>();
|
| | | List<int> fashionIds = null;
|
| | | bool isActivate = fashionModel.TryGetActiveFashionDress(out fashionIds);
|
| | | if(isActivate)
|
| | | {
|
| | | foreach(var id in fashionIds)
|
| | | {
|
| | | int fashionLevel = fashionModel.GetFashionDressLevel(id);
|
| | | Dictionary<int, int> attrDict = null;
|
| | | bool isAttr = fashionModel.TryGetFashionDressProperty(id,fashionLevel,out attrDict);
|
| | | if(isAttr)
|
| | | {
|
| | | foreach(var attrId in attrDict.Keys)
|
| | | {
|
| | | var attrValue = attrDict[attrId];
|
| | | if(!sumAttrDict.ContainsKey(attrId))
|
| | | {
|
| | | sumAttrDict.Add(attrId,attrValue);
|
| | | }
|
| | | else
|
| | | {
|
| | | sumAttrDict[attrId] = attrValue;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return sumAttrDict;
|
| | | }
|
| | |
|
| | | private void SetWardrobeLvAdd()
|
| | | {
|
| | | int wardrobeLevel = fashionModel.cabinetLevel;
|
| | | string wardrobeLevelSB = string.Empty;
|
| | | if (wardrobeLevel > 0)
|
| | | {
|
| | | wardrobeLevelSB = UIHelper.AppendStringColor(TextColType.Green, wardrobeLevel.ToString());
|
| | | }
|
| | | else
|
| | | {
|
| | | wardrobeLevelSB = UIHelper.AppendStringColor(TextColType.Red, wardrobeLevel.ToString());
|
| | | }
|
| | | wardrobeLvText.text = Language.Get("FashionDress106",wardrobeLevelSB);
|
| | | Dictionary<int, int> attrDict = null;
|
| | | fashionModel.TryGetCabinetProperty(fashionModel.cabinetLevel, out attrDict);
|
| | | if (attrDict != null && attrDict.Count > 0)
|
| | | {
|
| | | noneLvAdd.SetActive(false);
|
| | | List<int> attrIds = attrDict.Keys.ToList();
|
| | | for (int i = 0; i < lvAddAttrObjs.Count; i++)
|
| | | {
|
| | | var attrObj = lvAddAttrObjs[i];
|
| | | attrObj.SetActive(i < attrIds.Count);
|
| | | if (i < attrIds.Count)
|
| | | {
|
| | | var attrText = lvAddAttrs[i];
|
| | | int attrId = attrIds[i];
|
| | | int attrValue = attrDict[attrId];
|
| | | var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | string attrSB = string.Empty;
|
| | | string attrValueSB = UIHelper.AppendStringColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
|
| | | if (attrConfig.Name.Contains("%s"))
|
| | | {
|
| | | attrSB = attrConfig.Name.Replace("%s", attrValueSB);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrSB = StringUtility.Contact(attrConfig.Name, "+", attrValueSB);
|
| | | }
|
| | | attrText.text = attrSB;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | noneLvAdd.SetActive(true);
|
| | | for (int i = 0; i < lvAddAttrObjs.Count; i++)
|
| | | {
|
| | | var attrObj = lvAddAttrObjs[i];
|
| | | attrObj.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator DelayShow()
|
| | | {
|
| | | yield return null;
|
| | | container.SetActive(true);
|
| | | StartCoroutine(DelayAlpha());
|
| | | }
|
| | |
|
| | | IEnumerator DelayAlpha()
|
| | | {
|
| | | yield return null;
|
| | | alpha.alpha = 1;
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c8afd26123775ac4b912680f965deea6 |
| | | timeCreated: 1546915247 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class FashiongDecomposeWin : Window
|
| | | {
|
| | | [SerializeField] Button closeBtn;
|
| | | [SerializeField] Button decomposeBtn;
|
| | | [SerializeField] Text wardrobeLvText;
|
| | | [SerializeField] Text upgradeExpText;
|
| | | [SerializeField] Text getExpText;
|
| | | [SerializeField] ScrollerController lineCtrl;
|
| | | [SerializeField, Header("创建格子数")] int initGrid = 100;
|
| | |
|
| | | FashionDressModel model{ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }}
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | | protected override void AddListeners()
|
| | | {
|
| | | closeBtn.AddListener(CloseClick);
|
| | | decomposeBtn.AddListener(ClickDecompose);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | model.cabinetRefresh += UpdateCabinetInfo;
|
| | | FashionDecomposeModel.Instance.UpdateDecomposeExpEvent += UpdateGetExp;
|
| | | SetDisplay();
|
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | model.cabinetRefresh -= UpdateCabinetInfo;
|
| | | FashionDecomposeModel.Instance.UpdateDecomposeExpEvent -= UpdateGetExp;
|
| | | }
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void SetDisplay()
|
| | | {
|
| | | FashionDecomposeModel.Instance.GetDecomposeItem();
|
| | | CreateLineCell();
|
| | | UpdateGetExp();
|
| | | UpdateCabinetLv();
|
| | | }
|
| | |
|
| | | private void UpdateCabinetInfo()
|
| | | {
|
| | | FashionDecomposeModel.Instance.GetDecomposeItem();
|
| | | UpdateCabinetLv();
|
| | | lineCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void CreateLineCell()
|
| | | {
|
| | | int line = initGrid / 5;
|
| | | lineCtrl.Refresh();
|
| | | for (int i = 0; i < line; i++)
|
| | | {
|
| | | lineCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | lineCtrl.Restart();
|
| | | }
|
| | |
|
| | | private void UpdateCabinetLv()
|
| | | {
|
| | | int wardrobeLv = model.cabinetLevel;
|
| | | wardrobeLvText.text = Language.Get("FashionDress106",wardrobeLv);
|
| | | int curWardrobeExp = model.cabinetExp;
|
| | | bool isCabinetMax = wardrobeLv >= model.cabinetMaxLevel ? true : false;
|
| | | int upgradeLv = isCabinetMax ? model.cabinetMaxLevel : wardrobeLv + 1;
|
| | | var cabinetConfig = Config.Instance.Get<FashionDressCabinetConfig>(upgradeLv);
|
| | | upgradeExpText.gameObject.SetActive(cabinetConfig != null);
|
| | | if (cabinetConfig != null)
|
| | | {
|
| | | int upgradeWardrobeExp = cabinetConfig.NeedExp;
|
| | | if (isCabinetMax)
|
| | | {
|
| | | upgradeExpText.text = StringUtility.Contact("(", Language.Get("FashionDress105"),")");
|
| | | }
|
| | | else
|
| | | {
|
| | | upgradeExpText.text = StringUtility.Contact("(", curWardrobeExp, "/", upgradeWardrobeExp, ")");
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateGetExp()
|
| | | {
|
| | | int getDecomposeExp = FashionDecomposeModel.Instance.GetSumDecomposeExp();
|
| | | getExpText.text = getDecomposeExp.ToString();
|
| | | }
|
| | |
|
| | | private void ClickDecompose()
|
| | | {
|
| | | int getDecomposeExp = FashionDecomposeModel.Instance.GetSumDecomposeExp();
|
| | | if(getDecomposeExp <= 0)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("FashionDecomposeRemind");
|
| | | return;
|
| | | }
|
| | | FashionDecomposeModel.Instance.SendDecomposeFashion();
|
| | | CloseImmediately();
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dcedad5cc63fa9a449a785ffa93d903c |
| | | timeCreated: 1546928860 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | public const int RARA_GATHERSOUL_QUALITY = 3;
|
| | |
|
| | | const int GATHERSOUL_REDPOINT_BASE = 10102;
|
| | | const int GATHERSOUL_REDPOINT_DEEP = 1010200;
|
| | | const int GATHERSOUL_REDPOINT_BASE = 10104;
|
| | | const int GATHERSOUL_REDPOINT_DEEP = 1010400;
|
| | | static int redpointIndex = 5;
|
| | |
|
| | | public readonly Redpoint redpoint = new Redpoint(101, GATHERSOUL_REDPOINT_BASE);
|
| | | public readonly Redpoint equipRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010201);
|
| | | public readonly Redpoint replaceRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010202);
|
| | | public readonly Redpoint resolveRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010203);
|
| | | public readonly Redpoint levelUpRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010204);
|
| | | public readonly Redpoint equipRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010401);
|
| | | public readonly Redpoint replaceRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010402);
|
| | | public readonly Redpoint resolveRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010403);
|
| | | public readonly Redpoint levelUpRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010404);
|
| | |
|
| | | static readonly IComparer<int> soulPackSort = new GatherSoulPackSort();
|
| | | static readonly IEqualityComparer<int> holeItemTypeDistinct = new HoleItemTypeDistinct();
|
| | |
| | | var serverSurplusTimes = GetUseDataModel((int)ItemUseDataKey.Def_IudetTotalTime);
|
| | | if(remainTime > 0)
|
| | | {
|
| | | if (getTimes != null && serverSurplusTimes != null)
|
| | | if (getTimes != null)
|
| | | {
|
| | | int getTime = getTimes[0];
|
| | | int serverSurplusTime = serverSurplusTimes[0];
|
| | | int serverSurplusTime = serverSurplusTimes != null ? serverSurplusTimes[0] : 0;
|
| | | if (getTime > 0)
|
| | | {
|
| | | double time = modelInterface.GetTimeOffest(TimeUtility.GetTime((uint)getTime));
|
| | |
| | | try
|
| | | {
|
| | | StopLoginOverTimeProcess();
|
| | | loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10* TimeSpan.TicksPerSecond), () =>
|
| | | {
|
| | | busy = false;
|
| | | ReAccountLogin();
|
| | | });
|
| | | loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10 * TimeSpan.TicksPerSecond), () =>
|
| | | {
|
| | | busy = false;
|
| | | ReAccountLogin();
|
| | | });
|
| | | GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected);
|
| | | NetLinkWin.Show();
|
| | | }
|
| | |
| | | {
|
| | | StopLoginOverTimeProcess();
|
| | | busy = false;
|
| | | ExceptionCatcher.ReportException("登录跨服出现异常", StringUtility.Contact("角色:", PlayerDatas.Instance.baseData.PlayerName));
|
| | | ExceptionCatcher.ReportException("登录跨服出现异常",
|
| | | StringUtility.Contact(
|
| | | "角色:", PlayerDatas.Instance.baseData.PlayerName, ";",
|
| | | "本机网络:", Application.internetReachability, ";",
|
| | | "Socket链接状态:", GameNetSystem.Instance.crossServerSocketConnected, ";",
|
| | | "0102记录:", StageLoadTimeOutCatcher.got0102Time.ToString())
|
| | | );
|
| | |
|
| | | var sendInfo = new CC003_tagCGForceQuitCrossState();
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | GameNetSystem.Instance.crossServerConnected_Loigc = false;
|
| | | Clock.Create(DateTime.Now + new TimeSpan(2 * TimeSpan.TicksPerSecond), () =>
|
| | | {
|
| | | loginModel.ReAccountLogin();
|
| | | GameNetSystem.Instance.Reconnect();
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | break;
|
| | | }
|
| | | m_ServerName.text = _serverData.name;
|
| | | m_OpenTime.gameObject.SetActive(m_ServerData.start_date > DateTime.Now);
|
| | |
|
| | | if (m_ServerData.start_date > DateTime.Now)
|
| | | {
|
| | | m_OpenTime.text = Language.Get("ServerOnTime", m_ServerData.start_date.ToString("MM-dd HH:mm"));
|
| | | }
|
| | |
|
| | | var job = 0;
|
| | | if (!string.IsNullOrEmpty(_serverData.job))
|
| | |
| | | if (job != 0)
|
| | | {
|
| | | m_RoleHead.gameObject.SetActive(true);
|
| | | m_RoleHead.SetSprite(GeneralDefine.GetJobHeadPortrait(job, 0));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RoleHead.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_RoleName.text = _serverData.roleid;
|
| | | if (_serverData.level > 0)
|
| | | {
|
| | | m_RoleName.gameObject.SetActive(true);
|
| | | m_RoleLevel.gameObject.SetActive(true);
|
| | | m_OpenTime.gameObject.SetActive(false);
|
| | |
|
| | | m_RoleHead.SetSprite(GeneralDefine.GetJobHeadPortrait(job, 0));
|
| | | m_RoleName.text = _serverData.roleid;
|
| | | m_RoleLevel.text = Language.Get("Z1024", _serverData.level);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_OpenTime.gameObject.SetActive(m_ServerData.start_date > DateTime.Now);
|
| | | if (m_ServerData.start_date > DateTime.Now)
|
| | | {
|
| | | m_OpenTime.text = Language.Get("ServerOnTime", m_ServerData.start_date.ToString("MM-dd HH:mm"));
|
| | | }
|
| | |
|
| | | m_RoleHead.gameObject.SetActive(false);
|
| | | m_RoleName.gameObject.SetActive(false);
|
| | | m_RoleLevel.gameObject.SetActive(false);
|
| | | }
|
| | |
| | |
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | | #endregion
|
| | |
|
| | | showPoint = m_HeroStage;
|
| | | var _hero = ShowHero(_job, _clothesId, _weaponId, _wingsId, _secondaryId);
|
| | | var _hero = ShowHero(_job, fashionClothesId > 0 ? fashionClothesId : _clothesId,
|
| | | fashionWeaponId > 0 ? fashionWeaponId : _weaponId, _wingsId,
|
| | | fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId);
|
| | | if (_hero != null)
|
| | | {
|
| | | SitDown();
|
| | |
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
|
| | | if (clothes != null)
|
| | |
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = job,
|
| | | clothesId = clothesId,
|
| | | clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
|
| | | suitLevel = _suitLevel,
|
| | | weaponId = weaponId,
|
| | | weaponId = fashionWeaponId > 0 ? fashionWeaponId : weaponId,
|
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | | secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
|
| | | isDialogue = false,
|
| | | godWeapons = dict
|
| | | };
|
| | |
| | | [SerializeField] FunctionButton functionButtonRole;
|
| | | [SerializeField] FunctionButton functionButtonMagician;
|
| | | [SerializeField] FunctionButton m_GatherSoul;
|
| | | [SerializeField] FunctionButton m_FashionDress;
|
| | |
|
| | | [SerializeField] RectTransform m_RoleInfoRt;
|
| | | [SerializeField] Text m_PropertyAtk;
|
| | |
| | | functionButtonMagician.onClick.AddListener(OnFuncMagician);
|
| | | m_AddPoint.onClick.AddListener(OnPromoteClick);
|
| | | m_GatherSoul.onClick.AddListener(GatherSoul);
|
| | | m_FashionDress.onClick.AddListener(OpenFashionDress);
|
| | | m_PlayerPropertyBtn.onClick.AddListener(OnAttrExplainClick);
|
| | | m_TitleBtn.onClick.AddListener(OnDesignationClick);
|
| | | m_RenameBtn.onClick.AddListener(OnRenameClick);
|
| | |
| | | functionOrder = m_GatherSoul.order;
|
| | | }
|
| | |
|
| | | private void OpenFashionDress()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<FashionDressWin>();
|
| | | functionOrder = m_FashionDress.order;
|
| | | }
|
| | |
|
| | | private void OnFuncMagician()
|
| | | {
|
| | | CloseChild();
|
| | |
| | | {
|
| | | weapon2 = itemData.ItemID;
|
| | | }
|
| | | int fashionClothes = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retFashionClothes);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionClothes = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retFashionWeapon);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionWeapon = itemData.ItemID;
|
| | | }
|
| | | int fashionWeapon2 = 0;
|
| | | itemData = model.GetItemData(RoleEquipType.retFashionWeapon2);
|
| | | if (itemData != null)
|
| | | {
|
| | | fashionWeapon2 = itemData.ItemID;
|
| | | }
|
| | |
|
| | | var godWeapons = new Dictionary<int, int>();
|
| | | var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
|
| | |
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = viewPlayerData.rolePropData.Job,
|
| | | clothesId = clothes,
|
| | | clothesId = fashionClothes > 0 ? fashionClothes : clothes,
|
| | | suitLevel = _suitLevel,
|
| | | weaponId = weapon,
|
| | | weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
|
| | | wingsId = wing,
|
| | | secondaryId = weapon2,
|
| | | secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
|
| | | godWeapons = godWeapons,
|
| | | isDialogue = false,
|
| | | };
|
| | |
| | | {
|
| | | PlayerPropertyConfig playerPro = Config.Instance.Get<PlayerPropertyConfig>(runeTypes[i]);
|
| | | string _str = StringUtility.Contact(playerPro.Name, "+",
|
| | | UIHelper.ReplacePercentage(GetRuneAttrVal(id, level, runeTypes[i]), playerPro.ISPercentage),
|
| | | UIHelper.ReplacePercentage(GetRuneAttrVal(id, level, runeTypes[i]), playerPro.ISPercentage,
|
| | | UIHelper.GetPropertyDecimalCount(playerPro.ID)),
|
| | | playerPro.ISPercentage == 1 ? "%" : string.Empty, i == runeTypes.Length - 1 ? string.Empty : "\n");
|
| | | _textBuilder.Append(_str);
|
| | | }
|
| | |
| | | if (AchievementGoto.achievementType == AchievementGoto.RuneLevelUp)
|
| | | {
|
| | | int _hole = 0;
|
| | | if(model.CanLevelUpRune(out _hole))
|
| | | if (model.CanLevelUpRune(out _hole))
|
| | | {
|
| | | OnRuneHoleClick(_hole);
|
| | | var _effect = AchievementGuideEffectPool.Require(1);
|
| | |
| | | presentRuneImg.SetSprite(_itemCfg.IconKey);
|
| | | presentRuneAttrTxt.text = model.GetRuneAttrStr(data.id, data.lv);
|
| | | presentRuneNameTxt.text = StringUtility.Contact(_itemCfg.ItemName, Language.Get("Z1024", data.lv));
|
| | | presentRuneNameTxt.color = UIHelper.GetUIColor(_itemCfg.ItemColor);
|
| | | presentRuneNameTxt.color = UIHelper.GetUIColor(_itemCfg.ItemColor, true);
|
| | |
|
| | | var _propertyCfg = Config.Instance.Get<PlayerPropertyConfig>(_runeCfg.AttrType[0]);
|
| | | var _propertyValue = model.GetRuneAttrVal(data.id, data.lv, _runeCfg.AttrType[0]);
|
| | | runeLevelUpAttr1.text = StringUtility.Contact(_propertyCfg.Name, " ", "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
|
| | | runeLevelUpAttr1.text = StringUtility.Contact(_propertyCfg.Name, "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
|
| | | UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
|
| | | _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
|
| | |
|
| | | bool _isRuneMaxLv = data.lv >= model.GetRuneMaxLevelByItem(data.id);
|
| | |
| | | if (!_isRuneMaxLv)
|
| | | {
|
| | | _propertyValue = model.GetRuneAttrVal(data.id, data.lv + 1, _runeCfg.AttrType[0]);
|
| | | runeLevelUpAttrNum1.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
|
| | | runeLevelUpAttrNum1.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
|
| | | UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
|
| | | _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | _propertyCfg = Config.Instance.Get<PlayerPropertyConfig>(_runeCfg.AttrType[1]);
|
| | | _propertyValue = model.GetRuneAttrVal(data.id, data.lv, _runeCfg.AttrType[1]);
|
| | | runeLevelUpAttr2.text = StringUtility.Contact(_propertyCfg.Name, " ", "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
|
| | | runeLevelUpAttr2.text = StringUtility.Contact(_propertyCfg.Name, "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
|
| | | UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
|
| | | _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
|
| | | runeLevelUpAttrNum2.gameObject.SetActive(!_isRuneMaxLv);
|
| | | if (!_isRuneMaxLv)
|
| | | {
|
| | | _propertyValue = model.GetRuneAttrVal(data.id, data.lv + 1, _runeCfg.AttrType[1]);
|
| | | runeLevelUpAttrNum2.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
|
| | | runeLevelUpAttrNum2.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
|
| | | UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
|
| | | _propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | if (_tower == 0)
|
| | | {
|
| | | m_RuneUnlockTip.text = Language.Get("L1060",model.doublePropRuneInlayDict.Values.Last());
|
| | | m_RuneUnlockTip.text = Language.Get("L1060", model.doublePropRuneInlayDict.Values.Last());
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | RegisterModel<GatherSoulComposeModel>();
|
| | | RegisterModel<GatherSoulDungeonModel>();
|
| | | RegisterModel<KingTreasureModel>();
|
| | | RegisterModel<FashionDressModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|
| | |
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
|
| | |
|
| | | var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
|
| | | var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
|
| | |
|
| | | var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
|
| | | if (clothes != null)
|
| | |
| | | UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = _job,
|
| | | clothesId = _clothesId,
|
| | | clothesId = fashionClothesId > 0 ? fashionClothesId : _clothesId,
|
| | | suitLevel = _suitLevel,
|
| | | weaponId = _weaponId,
|
| | | weaponId = fashionWeaponId > 0 ? fashionWeaponId : _weaponId,
|
| | | wingsId = _wingsId,
|
| | | secondaryId = _secondaryId,
|
| | | secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId,
|
| | | godWeapons = dict,
|
| | | isDialogue = false,
|
| | | };
|
| | |
| | | [SerializeField] UI3DModelInteractProcessor m_InteractProcessor;
|
| | | [SerializeField] ColorCorrectionCurves m_CameraColor;
|
| | |
|
| | | public bool interactable
|
| | | {
|
| | | public bool interactable {
|
| | | get { return m_Interactable; }
|
| | | set { m_Interactable = value; }
|
| | | }
|
| | |
| | |
|
| | | int m_HorseModelId = 0;
|
| | | GameObject horseModel = null;
|
| | | public GameObject NpcModelHorse
|
| | | {
|
| | | public GameObject NpcModelHorse {
|
| | | get { return horseModel; }
|
| | | set { horseModel = value; }
|
| | | }
|
| | |
| | | GameObject npcModel = null;
|
| | | SFXController m_NpcEffect;
|
| | | readonly List<SFXController> m_BindEffectList = new List<SFXController>();
|
| | | public GameObject NpcModelPet
|
| | | {
|
| | | public GameObject NpcModelPet {
|
| | | get { return npcModel; }
|
| | | set { npcModel = value; }
|
| | | }
|
| | |
| | | public static UI3DModelExhibition Instance { get; private set; }
|
| | |
|
| | | static UI3DModelExhibition m_InstanceClone1 = null;
|
| | | public static UI3DModelExhibition InstanceClone1
|
| | | {
|
| | | get
|
| | | {
|
| | | public static UI3DModelExhibition InstanceClone1 {
|
| | | get {
|
| | | if (m_InstanceClone1 == null)
|
| | | {
|
| | | CreateCloneStage();
|
| | |
| | |
|
| | | public void ShowLoginPlayer(RawImage _rawImage, int _job)
|
| | | {
|
| | | var flashClothes = 0;
|
| | | var flashWeapon = 0;
|
| | | var flashSecondary = 0;
|
| | | var clothesItemId = 0;
|
| | | var weaponItemId = 0;
|
| | | var wingsItemId = 0;
|
| | |
| | | var equipInfo = equipInfos[i];
|
| | | switch ((RoleEquipType)equipInfo.ItemPlace)
|
| | | {
|
| | | case RoleEquipType.retFashionClothes:
|
| | | flashClothes = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon:
|
| | | flashWeapon = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon2:
|
| | | flashSecondary = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retWeapon:
|
| | | weaponItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | |
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _job,
|
| | | clothesId = clothesItemId,
|
| | | clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
|
| | | suitLevel = suitLevel,
|
| | | weaponId = weaponItemId,
|
| | | weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
|
| | | wingsId = wingsItemId,
|
| | | secondaryId = secondaryItemId,
|
| | | secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
|
| | | isDialogue = false,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
|
| | |
| | |
|
| | | public void ShowPlayer(RawImage _rawImage, int _job, bool _isDialogue = false)
|
| | | {
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
|
| | | var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | clothes = 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 weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
|
| | | weapon = 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 secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | |
|
| | | int _suitLevel = 0;
|
| | |
|
| | | 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];
|
| | | suitLevel = clothes.GetUseDataModel(30)[0];
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | job = _job,
|
| | | clothesId = clothesId,
|
| | | suitLevel = _suitLevel,
|
| | | suitLevel = suitLevel,
|
| | | weaponId = weaponId,
|
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | |
| | | ShowPlayer(_rawImage, data);
|
| | | }
|
| | |
|
| | | public void ShowPlayer(RawImage _rawImage, int _job, RoleEquipType _exceptEquip)
|
| | | public void ShowPlayer(RawImage rawImage, int job, RoleEquipType exceptEquip)
|
| | | {
|
| | | var clothes = _exceptEquip == RoleEquipType.retClothes ?
|
| | | null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
|
| | | var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | | var clothesId = 0;
|
| | | var weaponId = 0;
|
| | | var wingsId = 0;
|
| | | var secondaryId = 0;
|
| | | ItemModel clothes = null;
|
| | |
|
| | | var weapon = _exceptEquip == RoleEquipType.retWeapon ?
|
| | | null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
|
| | | var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | | if (exceptEquip != RoleEquipType.retClothes)
|
| | | {
|
| | | clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
|
| | | clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
|
| | | clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | var wings = _exceptEquip == RoleEquipType.retWing ?
|
| | | null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | | if (exceptEquip != RoleEquipType.retWeapon)
|
| | | {
|
| | | var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
|
| | | weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
|
| | | weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | var secondary = _exceptEquip == RoleEquipType.retWeapon2 ?
|
| | | null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | | if (exceptEquip != RoleEquipType.retWing)
|
| | | {
|
| | | var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | int _suitLevel = 0;
|
| | | if (exceptEquip != RoleEquipType.retWeapon2)
|
| | | {
|
| | | var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
|
| | | secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
|
| | | secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
|
| | | }
|
| | |
|
| | | var 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];
|
| | | suitLevel = clothes.GetUseDataModel(30)[0];
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
|
| | | var data = new UI3DPlayerExhibitionData
|
| | | {
|
| | | job = _job,
|
| | | job = job,
|
| | | clothesId = clothesId,
|
| | | suitLevel = _suitLevel,
|
| | | suitLevel = suitLevel,
|
| | | weaponId = weaponId,
|
| | | wingsId = wingsId,
|
| | | secondaryId = secondaryId,
|
| | |
| | | }
|
| | | };
|
| | |
|
| | | ShowPlayer(_rawImage, data);
|
| | | ShowPlayer(rawImage, data);
|
| | | }
|
| | |
|
| | | void ShowPlayer(RawImage _rawImage, UI3DPlayerExhibitionData data)
|
| | |
| | |
|
| | | if (godWeaponEffect != null)
|
| | | {
|
| | | godWeaponEffect.transform.localPosition = config.effectPosition;
|
| | | godWeaponEffect.transform.localEulerAngles = config.effectAngles;
|
| | | godWeaponEffect.transform.localScale = config.effectScale;
|
| | | var index = Mathf.Max(0, job - 1);
|
| | | godWeaponEffect.transform.localPosition = index < config.effectPosition.Length ?
|
| | | config.effectPosition[index] : Vector3.zero;
|
| | | godWeaponEffect.transform.localEulerAngles = index < config.effectAngles.Length ?
|
| | | config.effectAngles[index] : Vector3.zero;
|
| | | godWeaponEffect.transform.localScale = index < config.effectScale.Length ?
|
| | | config.effectScale[index] : Vector3.one;
|
| | | }
|
| | |
|
| | | if (_rawImage != null)
|
| | |
| | | } |
| | | } |
| | | |
| | | [SerializeField] string m_IconKey = string.Empty; |
| | | |
| | | bool inited = false; |
| | | protected override void Awake() |
| | | { |
| | |
| | | this.material = this.canvasAddition == null ? MaterialUtility.GetDefaultSpriteGrayMaterial() : this.canvasAddition.spriteGrayMaterial; |
| | | } |
| | | |
| | | if (!string.IsNullOrEmpty(m_IconKey)) |
| | | { |
| | | this.SetSprite(m_IconKey); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | retBaldric5, //17 佩饰
|
| | | retBaldric6, //18 佩饰
|
| | | mount = 19,//当前的坐骑
|
| | | retFashionWeapon = 20,//时装武器
|
| | | retFashionClothes = 21,//时装衣服
|
| | | retFashionWeapon2 = 22,//时装副手
|
| | | retMax,
|
| | | };
|
| | |
|
| | |
| | | |
| | | const int timeOut = 20;//秒 |
| | | |
| | | public static DateTime got0102Time = DateTime.MinValue; |
| | | public static DateTime gotA126Time = DateTime.MinValue; |
| | | public static DateTime gotA127Time = DateTime.MinValue; |
| | | public static DateTime got0109Time = DateTime.MinValue; |
| | | public static DateTime send0107Time = DateTime.MinValue; |
| | | public static ProtocolRecorder got0102Time; |
| | | public static ProtocolRecorder gotA126Time; |
| | | public static ProtocolRecorder gotA127Time; |
| | | public static ProtocolRecorder got0109Time; |
| | | public static ProtocolRecorder send0107Time; |
| | | |
| | | public static StageLoadTimeOutCatcher Begin(int stageId) |
| | | { |
| | |
| | | var description = StringUtility.Contact( |
| | | "开始时间:", startTime.ToString("HH:mm:ss"), ";", |
| | | "超时时间:", DateTime.Now.ToString("HH:mm:ss"), |
| | | "0102时间:", got0102Time.ToString("HH:mm:ss"), ";", |
| | | "A126时间:", gotA126Time.ToString("HH:mm:ss"), ";", |
| | | "A127时间:", gotA127Time.ToString("HH:mm:ss"), ";", |
| | | "0109时间:", got0109Time.ToString("HH:mm:ss"), ";", |
| | | "0107时间:", send0107Time.ToString("HH:mm:ss")); |
| | | "0102记录:", got0102Time.ToString(), ";", |
| | | "A126记录:", gotA126Time.ToString(), ";", |
| | | "A127记录:", gotA127Time.ToString(), ";", |
| | | "0109记录:", got0109Time.ToString(), ";", |
| | | "0107记录:", send0107Time.ToString()); |
| | | |
| | | ExceptionCatcher.ReportException(title, description); |
| | | Stop(); |
| | | } |
| | | } |
| | | |
| | | public static void ReportChangeMapRecord(GameNetSystem.SocketType socketType, string protocol, DateTime time) |
| | | public static void RecordProtocol(GameNetSystem.SocketType socketType, string number, DateTime time) |
| | | { |
| | | var recorder = new ProtocolRecorder(number, time, socketType); |
| | | switch (number) |
| | | { |
| | | case "0102": |
| | | got0102Time = recorder; |
| | | break; |
| | | case "A126": |
| | | gotA126Time = recorder; |
| | | break; |
| | | case "A127": |
| | | gotA127Time = recorder; |
| | | break; |
| | | case "0109": |
| | | got0109Time = recorder; |
| | | break; |
| | | case "0107": |
| | | send0107Time = recorder; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | try |
| | | { |
| | | var title = StringUtility.Contact("地图加载记录-->协议编号:", protocol); |
| | | var description = StringUtility.Contact("服务器:", socketType, ";", |
| | | "协议编号:", protocol, ";", "时间:", time.ToString("HH:mm:ss"), "玩家:", PlayerDatas.Instance.baseData.PlayerName); |
| | | var title = StringUtility.Contact("地图加载记录-->封包编号:", number); |
| | | var description = StringUtility.Contact(recorder.ToString(), "玩家:", PlayerDatas.Instance.baseData.PlayerName); |
| | | |
| | | ExceptionCatcher.ReportException(title, description); |
| | | } |
| | |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | public struct ProtocolRecorder |
| | | { |
| | | public string number; |
| | | public DateTime time; |
| | | public GameNetSystem.SocketType socketType; |
| | | |
| | | public ProtocolRecorder(string number, DateTime time, GameNetSystem.SocketType socketType) |
| | | { |
| | | this.number = number; |
| | | this.time = time; |
| | | this.socketType = socketType; |
| | | } |
| | | |
| | | public override string ToString() |
| | | { |
| | | return StringUtility.Contact("封包:", number, ";", "时间:", time.ToString("HH:mm:ss"), ";", "服务器:", socketType); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | {
|
| | | case 73:
|
| | | return 2;
|
| | | case 29:
|
| | | return 2;
|
| | | default:
|
| | | return 1;
|
| | | }
|