Merge remote-tracking branch 'origin/master' into SpringFestival
| | |
| | | {
|
| | | static LaunchStage m_CurrentStage = LaunchStage.None;
|
| | |
|
| | | static int step = 0;
|
| | | public static ProgressInfo progressInfo { get; private set; }
|
| | |
|
| | | private void Awake()
|
| | |
| | | }
|
| | |
|
| | | float timer = 0f;
|
| | | float progressRateOfIncrease = 1f;
|
| | | float originalExpectTotalTime = -1f;
|
| | | float expectTotalTime = 0f;
|
| | | public float totalTime {
|
| | | get {
|
| | | return Mathf.Lerp(originalExpectTotalTime, expectTotalTime, Mathf.Clamp01(timer / expectTotalTime));
|
| | | }
|
| | | }
|
| | |
|
| | | Queue<LaunchTask> tasks = new Queue<LaunchTask>();
|
| | | LaunchTask currentTask = null;
|
| | | bool launchComplete = false;
|
| | | float surplusProgress = 0f;
|
| | | float surplusTime = 0f;
|
| | |
|
| | | void Start()
|
| | | {
|
| | | WindowCenter.Instance.DestoryWinsByStage(WindowCenter.WindowStage.Launch);
|
| | | AssetBundleUtility.Instance.UnloadAssetBundle("builtin/prefabs", true, false);
|
| | |
|
| | | Application.backgroundLoadingPriority = ThreadPriority.High;
|
| | | SoundPlayer.Instance.PlayLoginMusic();
|
| | | Config.Instance.PreLoadConfigs();
|
| | |
| | | Config.Instance.RegisterGlobalEvent();
|
| | | PackageRegedit.Init();
|
| | | DebugUtility.Instance.CreateDebugRoot();
|
| | |
|
| | | WindowCenter.Instance.OpenFromLocal<LaunchWin>();
|
| | |
|
| | | var sdkInitedTask = new SDKInitedTask();
|
| | |
| | | tasks.Enqueue(launchFadeOutTask);
|
| | |
|
| | | CalculateExpectTotalTime();
|
| | | originalExpectTotalTime = expectTotalTime;
|
| | | }
|
| | |
|
| | | void Update()
|
| | |
| | |
|
| | | if (m_CurrentStage == LaunchStage.DownLoad)
|
| | | {
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, progressInfo.totalProgress, 0f);
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, 1, progressInfo.totalProgress, 0f);
|
| | | }
|
| | | else
|
| | | {
|
| | | timer += Time.deltaTime;
|
| | | var progress = progressInfo.totalProgress + progressRateOfIncrease * Time.deltaTime / totalTime;
|
| | | var progress = progressInfo.totalProgress + surplusProgress * (Time.deltaTime / surplusTime);
|
| | | progress = Mathf.Clamp(progress, 0, 0.98f);
|
| | |
|
| | | var partProgress = 0f;
|
| | | if (currentTask == null)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var temp = currentTask.timer / Mathf.Min(1f, currentTask.duration);
|
| | | var temp = currentTask.timer / Mathf.Min(2f, currentTask.duration);
|
| | | step = (int)temp + 1;
|
| | | partProgress = temp - (int)temp;
|
| | | }
|
| | |
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, Mathf.Clamp01(progress), partProgress);
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, step, Mathf.Clamp01(progress), partProgress);
|
| | | }
|
| | | }
|
| | |
|
| | | if (launchComplete)
|
| | | {
|
| | | Debug.LogFormat("启动耗时:{0}", timer);
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, 1f, 1f);
|
| | | progressInfo = new ProgressInfo(m_CurrentStage, 1, 1f, 1f);
|
| | | this.enabled = false;
|
| | | StageManager.Instance.LoadLoginStage();
|
| | | }
|
| | |
| | |
|
| | | void CalculateExpectTotalTime()
|
| | | {
|
| | | var time = timer;
|
| | | foreach (var item in tasks)
|
| | | {
|
| | | time += item.expectTime;
|
| | | surplusTime = 0f;
|
| | | foreach (var item in tasks) |
| | | { |
| | | surplusTime += item.expectTime; |
| | | }
|
| | |
|
| | | expectTotalTime = time;
|
| | | if (originalExpectTotalTime <= 0f)
|
| | | {
|
| | | originalExpectTotalTime = expectTotalTime;
|
| | | }
|
| | |
|
| | | progressRateOfIncrease = (expectTotalTime - timer) / (originalExpectTotalTime - timer);
|
| | | surplusProgress = 1 - progressInfo.totalProgress;
|
| | | }
|
| | |
|
| | | public enum LaunchStage
|
| | |
| | | None = 0,
|
| | | SDKInit = 1,
|
| | | AssetCopy = 2,
|
| | | ClientVersion = 3,
|
| | | CheckAsset = 4,
|
| | | DownLoad = 5,
|
| | | AssetBundleInit = 6,
|
| | | ConfigInit = 7,
|
| | | Complete = 8,
|
| | | AssetDecompress=3,
|
| | | ClientVersion = 4,
|
| | | CheckAsset = 5,
|
| | | DownLoad = 6,
|
| | | AssetBundleInit = 7,
|
| | | ConfigInit = 8,
|
| | | Complete = 9,
|
| | | }
|
| | |
|
| | | public abstract class LaunchTask
|
| | |
| | | var memory = 2048;
|
| | | DeviceUtility.GetCpuAndMemory(out cpu, out memory);
|
| | | DebugEx.LogFormat("获得机器信息:cpu {0}----内存 {1}", cpu, memory);
|
| | | GameNotice.OpenGameNotice();
|
| | | }
|
| | |
|
| | | public override void Update()
|
| | |
| | | List<FileInfo> copyTasks = new List<FileInfo>();
|
| | |
|
| | | public override float expectTime {
|
| | | get { return LocalSave.GetFloat("AssetCopyTask_ExpectTime", 30f); }
|
| | | get { return LocalSave.GetFloat("AssetCopyTask_ExpectTime", 70f); }
|
| | | protected set { LocalSave.SetFloat("AssetCopyTask_ExpectTime", value); }
|
| | | }
|
| | |
|
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetCopy;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | outTime = 50f;
|
| | | #if UNITY_ANDROID
|
| | | switch (VersionConfig.Get().assetAccess)
|
| | |
| | |
|
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetCopy;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | m_CurrentStage = LaunchStage.AssetDecompress;
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | if (!AssetDeCompressTask.assetDeCompressCompleted)
|
| | | {
|
| | |
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.ClientVersion;
|
| | | duration = expectTime;
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | #if UNITY_ANDROID
|
| | | if (InGameDownTestUtility.enable || !Application.isEditor)
|
| | |
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.CheckAsset;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | ServerListCenter.Instance.RequestJumpUrl();
|
| | | OperationLogCollect.Instance.RecordLauchEvent(2);
|
| | |
| | | {
|
| | | expectTime = timer;
|
| | | DebugEx.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer);
|
| | | GameNotice.OpenGameNotice();
|
| | | }
|
| | |
|
| | | public override void Update()
|
| | |
| | | {
|
| | | m_CurrentStage = LaunchStage.DownLoad;
|
| | |
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | if (VersionUtility.Instance.NeedDownAsset())
|
| | | {
|
| | | if (!AssetVersionUtility.priorAssetDownLoadDone)
|
| | |
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetBundleInit;
|
| | |
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | if (!AssetSource.allFromEditor)
|
| | | {
|
| | | AssetBundleUtility.Instance.Sync_LoadAll("ui/prioritywindow");
|
| | |
| | | public override void End()
|
| | | {
|
| | | expectTime = timer;
|
| | | UILoader.LoadWindowAsync("LaunchBackGroundWin", null);
|
| | | DebugEx.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer);
|
| | | }
|
| | |
|
| | |
| | | public class ConfigInitTask : LaunchTask
|
| | | {
|
| | | public override float expectTime {
|
| | | get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", inferredTime); }
|
| | | get { return LocalSave.GetFloat("ConfigInitTask_ExpectTime", 10f); }
|
| | | protected set { LocalSave.SetFloat("ConfigInitTask_ExpectTime", value); }
|
| | | }
|
| | |
|
| | | float threshold = 1f;
|
| | | float inferredTime = 3f;
|
| | |
|
| | | public override void Begin()
|
| | | {
|
| | | inferredTime = LocalSave.GetFloat("AssetCopyTask_ExpectTime", 30f) / 30f * 10f;
|
| | |
|
| | | m_CurrentStage = LaunchStage.ConfigInit;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | | threshold = Application.platform == RuntimePlatform.WindowsEditor ? 1f : 0.9f;
|
| | |
|
| | | LaunchPostProcess.Instance.Begin();
|
| | |
| | | protected set { LocalSave.SetFloat("LaunchFadeOutTask_ExpectTime", value); }
|
| | | }
|
| | |
|
| | | bool launchBackGroundLoadedOk = false;
|
| | | bool openBackGround = false;
|
| | |
|
| | | public override void Begin()
|
| | | {
|
| | | m_CurrentStage = LaunchStage.Complete;
|
| | | duration = Mathf.Max(0.1f, expectTime);
|
| | | duration = Mathf.Max(0.5f, expectTime);
|
| | |
|
| | | LuaUtility.Instance.Init();
|
| | | CSharpCallLua.Init();
|
| | | ShaderUtility.WarmUpAll();
|
| | | SpeechTranslate.Instance.RequestGetToken();
|
| | | UI3DModelExhibition.CreateStage();
|
| | |
|
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>(true);
|
| | | var launchWin = WindowCenter.Instance.Get<LaunchWin>();
|
| | | if (launchWin != null)
|
| | | {
|
| | | launchWin.FadeOut();
|
| | | }
|
| | |
|
| | | UILoader.LoadWindowAsync("LaunchBackGroundWin",
|
| | | (bool ok, UnityEngine.Object @object) =>
|
| | | {
|
| | | if (ok)
|
| | | {
|
| | | launchBackGroundLoadedOk = true;
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | public override void End()
|
| | | {
|
| | | expectTime = timer;
|
| | | DebugEx.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer);
|
| | | if (!openBackGround)
|
| | | {
|
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>(true);
|
| | | }
|
| | |
|
| | | var launchBackGroundWin = WindowCenter.Instance.Get<LaunchBackGroundWin>();
|
| | | launchBackGroundWin.transform.SetAsFirstSibling();
|
| | |
| | | return;
|
| | | }
|
| | | timer += Time.deltaTime;
|
| | |
|
| | | if (!openBackGround)
|
| | | {
|
| | | if (launchBackGroundLoadedOk)
|
| | | {
|
| | | WindowCenter.Instance.Open<LaunchBackGroundWin>();
|
| | | openBackGround = true;
|
| | | }
|
| | | }
|
| | |
|
| | | if (timer >= expectTime)
|
| | | {
|
| | |
| | | public struct ProgressInfo
|
| | | {
|
| | | public LaunchStage stage;
|
| | | public int step;
|
| | | public float totalProgress;
|
| | | public float partProgress;
|
| | |
|
| | | public ProgressInfo(LaunchStage stage, float totalProgress, float partProgress)
|
| | | public ProgressInfo(LaunchStage stage, int step, float totalProgress, float partProgress)
|
| | | {
|
| | | this.stage = stage;
|
| | | this.step = step;
|
| | | this.totalProgress = totalProgress;
|
| | | this.partProgress = partProgress;
|
| | | }
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | // [ Date ]: Thursday, January 24, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int SkillAtkRateReduceC { get ; private set ; }
|
| | | public int HitC { get ; private set ; }
|
| | | public int MissC { get ; private set ; }
|
| | | public int SkillAddPer1C { get ; private set ; }
|
| | | public int SkillAddPer2C { get ; private set ; }
|
| | | public int SkillAddPer3C { get ; private set ; }
|
| | | public int SkillAddPer4C { get ; private set ; }
|
| | | public int SkillAddPer5C { get ; private set ; }
|
| | | public int SkillAddPer6C { get ; private set ; }
|
| | | public int SkillAddPer7C { get ; private set ; }
|
| | | public int SkillReducePer1C { get ; private set ; }
|
| | | public int SkillReducePer2C { get ; private set ; }
|
| | | public int SkillReducePer3C { get ; private set ; }
|
| | | public int SkillReducePer4C { get ; private set ; }
|
| | | public int SkillReducePer5C { get ; private set ; }
|
| | | public int SkillReducePer6C { get ; private set ; }
|
| | | public int SkillReducePer7C { get ; private set ; } |
| | | public int SkillAddPerAC { get ; private set ; }
|
| | | public int SkillAddPerBC { get ; private set ; }
|
| | | public int SkillAddPerCC { get ; private set ; }
|
| | | public int SkillAddPerDC { get ; private set ; }
|
| | | public int SkillAddPerEC { get ; private set ; }
|
| | | public int SkillAddPerFC { get ; private set ; }
|
| | | public int SkillAddPerGC { get ; private set ; }
|
| | | public int SkillReducePerAC { get ; private set ; }
|
| | | public int SkillReducePerBC { get ; private set ; }
|
| | | public int SkillReducePerCC { get ; private set ; }
|
| | | public int SkillReducePerDC { get ; private set ; }
|
| | | public int SkillReducePerEC { get ; private set ; }
|
| | | public int SkillReducePerFC { get ; private set ; }
|
| | | public int SkillReducePerGC { get ; private set ; } |
| | | |
| | | public override string getKey() |
| | | { |
| | |
| | |
|
| | | MissC=IsNumeric(rawContents[28]) ? int.Parse(rawContents[28]):0;
|
| | |
|
| | | SkillAddPer1C=IsNumeric(rawContents[29]) ? int.Parse(rawContents[29]):0; |
| | | SkillAddPerAC=IsNumeric(rawContents[29]) ? int.Parse(rawContents[29]):0; |
| | |
|
| | | SkillAddPer2C=IsNumeric(rawContents[30]) ? int.Parse(rawContents[30]):0; |
| | | SkillAddPerBC=IsNumeric(rawContents[30]) ? int.Parse(rawContents[30]):0; |
| | |
|
| | | SkillAddPer3C=IsNumeric(rawContents[31]) ? int.Parse(rawContents[31]):0; |
| | | SkillAddPerCC=IsNumeric(rawContents[31]) ? int.Parse(rawContents[31]):0; |
| | |
|
| | | SkillAddPer4C=IsNumeric(rawContents[32]) ? int.Parse(rawContents[32]):0; |
| | | SkillAddPerDC=IsNumeric(rawContents[32]) ? int.Parse(rawContents[32]):0; |
| | |
|
| | | SkillAddPer5C=IsNumeric(rawContents[33]) ? int.Parse(rawContents[33]):0; |
| | | SkillAddPerEC=IsNumeric(rawContents[33]) ? int.Parse(rawContents[33]):0; |
| | |
|
| | | SkillAddPer6C=IsNumeric(rawContents[34]) ? int.Parse(rawContents[34]):0; |
| | | SkillAddPerFC=IsNumeric(rawContents[34]) ? int.Parse(rawContents[34]):0; |
| | |
|
| | | SkillAddPer7C=IsNumeric(rawContents[35]) ? int.Parse(rawContents[35]):0; |
| | | SkillAddPerGC=IsNumeric(rawContents[35]) ? int.Parse(rawContents[35]):0; |
| | |
|
| | | SkillReducePer1C=IsNumeric(rawContents[36]) ? int.Parse(rawContents[36]):0; |
| | | SkillReducePerAC=IsNumeric(rawContents[36]) ? int.Parse(rawContents[36]):0; |
| | |
|
| | | SkillReducePer2C=IsNumeric(rawContents[37]) ? int.Parse(rawContents[37]):0; |
| | | SkillReducePerBC=IsNumeric(rawContents[37]) ? int.Parse(rawContents[37]):0; |
| | |
|
| | | SkillReducePer3C=IsNumeric(rawContents[38]) ? int.Parse(rawContents[38]):0; |
| | | SkillReducePerCC=IsNumeric(rawContents[38]) ? int.Parse(rawContents[38]):0; |
| | |
|
| | | SkillReducePer4C=IsNumeric(rawContents[39]) ? int.Parse(rawContents[39]):0; |
| | | SkillReducePerDC=IsNumeric(rawContents[39]) ? int.Parse(rawContents[39]):0; |
| | |
|
| | | SkillReducePer5C=IsNumeric(rawContents[40]) ? int.Parse(rawContents[40]):0; |
| | | SkillReducePerEC=IsNumeric(rawContents[40]) ? int.Parse(rawContents[40]):0; |
| | |
|
| | | SkillReducePer6C=IsNumeric(rawContents[41]) ? int.Parse(rawContents[41]):0; |
| | | SkillReducePerFC=IsNumeric(rawContents[41]) ? int.Parse(rawContents[41]):0; |
| | |
|
| | | SkillReducePer7C=IsNumeric(rawContents[42]) ? int.Parse(rawContents[42]):0; |
| | | SkillReducePerGC=IsNumeric(rawContents[42]) ? int.Parse(rawContents[42]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e238f9455d4062c4c867b41cfea2f046 |
| | | timeCreated: 1548160973 |
| | | timeCreated: 1548314012 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, January 18, 2019 |
| | | // [ Date ]: Thursday, January 24, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int RealmLV { get ; private set ; }
|
| | | public int ZhuXianScore { get ; private set ; }
|
| | | public string dropItems { get ; private set; }
|
| | | public string PortraitID { get ; private set; } |
| | | public string PortraitID { get ; private set; } |
| | | public int[] conditionSorts; |
| | | |
| | | public override string getKey() |
| | | { |
| | |
| | |
|
| | | dropItems = rawContents[5].Trim();
|
| | |
|
| | | PortraitID = rawContents[6].Trim(); |
| | | PortraitID = rawContents[6].Trim();
|
| | | |
| | | string[] conditionSortsStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | conditionSorts = new int[conditionSortsStringArray.Length]; |
| | | for (int i=0;i<conditionSortsStringArray.Length;i++) |
| | | { |
| | | int.TryParse(conditionSortsStringArray[i],out conditionSorts[i]); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bc9f70989c6d3344aad5bd0dbda7bc2b |
| | | timeCreated: 1547804881 |
| | | timeCreated: 1548302334 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 22, 2019 |
| | | // [ Date ]: Thursday, January 24, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int floorId { get ; private set ; } |
| | | public int floorIndex { get ; private set ; } |
| | | public string floorName { get ; private set; } |
| | | public int[] rewardIdsFirstS; |
| | | public int[] rewardCountsFirstS; |
| | | public int[] rewardIdsLevelS; |
| | | public int[] rewardCountsLevelS; |
| | | public int[] rewardIdsLevelA; |
| | |
| | | |
| | | floorName = rawContents[2].Trim(); |
| | | |
| | | string[] rewardIdsLevelSStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] rewardIdsFirstSStringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsFirstS = new int[rewardIdsFirstSStringArray.Length]; |
| | | for (int i=0;i<rewardIdsFirstSStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsFirstSStringArray[i],out rewardIdsFirstS[i]); |
| | | } |
| | | |
| | | string[] rewardCountsFirstSStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsFirstS = new int[rewardCountsFirstSStringArray.Length]; |
| | | for (int i=0;i<rewardCountsFirstSStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsFirstSStringArray[i],out rewardCountsFirstS[i]); |
| | | } |
| | | |
| | | string[] rewardIdsLevelSStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsLevelS = new int[rewardIdsLevelSStringArray.Length]; |
| | | for (int i=0;i<rewardIdsLevelSStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsLevelSStringArray[i],out rewardIdsLevelS[i]); |
| | | } |
| | | |
| | | string[] rewardCountsLevelSStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] rewardCountsLevelSStringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsLevelS = new int[rewardCountsLevelSStringArray.Length]; |
| | | for (int i=0;i<rewardCountsLevelSStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsLevelSStringArray[i],out rewardCountsLevelS[i]); |
| | | } |
| | | |
| | | string[] rewardIdsLevelAStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] rewardIdsLevelAStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsLevelA = new int[rewardIdsLevelAStringArray.Length]; |
| | | for (int i=0;i<rewardIdsLevelAStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsLevelAStringArray[i],out rewardIdsLevelA[i]); |
| | | } |
| | | |
| | | string[] rewardCountsLevelAStringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] rewardCountsLevelAStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsLevelA = new int[rewardCountsLevelAStringArray.Length]; |
| | | for (int i=0;i<rewardCountsLevelAStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsLevelAStringArray[i],out rewardCountsLevelA[i]); |
| | | } |
| | | |
| | | string[] rewardIdsLevelBStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] rewardIdsLevelBStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardIdsLevelB = new int[rewardIdsLevelBStringArray.Length]; |
| | | for (int i=0;i<rewardIdsLevelBStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardIdsLevelBStringArray[i],out rewardIdsLevelB[i]); |
| | | } |
| | | |
| | | string[] rewardCountsLevelBStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] rewardCountsLevelBStringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | rewardCountsLevelB = new int[rewardCountsLevelBStringArray.Length]; |
| | | for (int i=0;i<rewardCountsLevelBStringArray.Length;i++) |
| | | { |
| | | int.TryParse(rewardCountsLevelBStringArray[i],out rewardCountsLevelB[i]); |
| | | } |
| | | |
| | | unLockEquipPlace=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; |
| | | unLockEquipPlace=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | |
| | | specialRewardDescription = rawContents[10].Trim(); |
| | | specialRewardDescription = rawContents[12].Trim(); |
| | | |
| | | fightPower=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | fightPower=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bcb7d8fc32f347441a4024465ce1df51 |
| | | timeCreated: 1548127880 |
| | | timeCreated: 1548315669 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | }
|
| | |
|
| | | var data = new H0418_tagObjInfoRefresh();
|
| | | data.socketType = vNetData.socketType;
|
| | | data.ObjID = vNetData.ObjID;
|
| | | data.ObjType = vNetData.ObjType;
|
| | | data.RefreshType = vNetData.RefreshType[i].RefreshType;
|
| | |
| | | _tagGsProValueDict.Add(AttrEnum.SkillHurtPrecent, gsModel.SkillAtkRateReduceC);
|
| | | _tagGsProValueDict.Add(AttrEnum.HIT, gsModel.HitC);
|
| | | _tagGsProValueDict.Add(AttrEnum.MISS, gsModel.MissC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer1, gsModel.SkillAddPer1C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer2, gsModel.SkillAddPer2C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer3, gsModel.SkillAddPer3C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer4, gsModel.SkillAddPer4C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer5, gsModel.SkillAddPer5C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPer6, gsModel.SkillAddPer6C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer1, gsModel.SkillReducePer1C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer2, gsModel.SkillReducePer2C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer3, gsModel.SkillReducePer3C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer4, gsModel.SkillReducePer4C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer5, gsModel.SkillReducePer5C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer6, gsModel.SkillReducePer6C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePer7, gsModel.SkillReducePer7C);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerA, gsModel.SkillAddPerAC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerB, gsModel.SkillAddPerBC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerC, gsModel.SkillAddPerCC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerD, gsModel.SkillAddPerDC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerE, gsModel.SkillAddPerEC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerF, gsModel.SkillAddPerFC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillAddPerG, gsModel.SkillAddPerGC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerA, gsModel.SkillReducePerAC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerB, gsModel.SkillReducePerBC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerC, gsModel.SkillReducePerCC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerD, gsModel.SkillReducePerDC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerE, gsModel.SkillReducePerEC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerF, gsModel.SkillReducePerFC);
|
| | | _tagGsProValueDict.Add(AttrEnum.SkillReducePerG, gsModel.SkillReducePerGC);
|
| | | return _tagGsProValueDict;
|
| | | }
|
| | | }
|
| | |
| | | DEBUG_STEP = 1;
|
| | | try
|
| | | {
|
| | | if (vNetData.socketType==GameNetSystem.SocketType.Main)
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | RedpointCenter.Instance.ResetAllRedpointState();
|
| | | }
|
| | |
| | | PlayerDatas.Instance.InitPlayerData(vNetData);
|
| | | PlayerDatas.Instance.RequestWorldTick();
|
| | |
|
| | | SDKUtility.Instance.RoleLogin(vNetData.PlayerID.ToString(),
|
| | | vNetData.PlayerName,
|
| | | vNetData.LV.ToString(),
|
| | | vNetData.VIPLv.ToString());
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | SDKUtility.Instance.RoleLogin(vNetData.PlayerID.ToString(),
|
| | | vNetData.PlayerName,
|
| | | vNetData.LV.ToString(),
|
| | | vNetData.VIPLv.ToString());
|
| | | }
|
| | |
|
| | | var _mapConfig = Config.Instance.Get<MapConfig>(vNetData.MapID);
|
| | |
|
| | |
| | | DEBUG_STEP = 9;
|
| | |
|
| | | StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
|
| | | |
| | |
|
| | | GA_Hero.s_MapSwitching = true;
|
| | | }
|
| | | }
|
| | |
| | | public void ReInitBuiltInAsset()
|
| | | {
|
| | | WindowConfig.Release();
|
| | | UnloadAssetBundle("builtin/scriptableobjects",true,false);
|
| | | UnloadAssetBundle("builtin/scriptableobjects", true, false);
|
| | |
|
| | | var path = AssetVersionUtility.GetBuiltInAssetFilePath("builtin_assetbundle");
|
| | | var assetBundle = AssetBundle.LoadFromFile(path);
|
| | | if (assetBundle == null)
|
| | |
| | | } |
| | | else |
| | | { |
| | | var assetInfo = new AssetInfo(StringUtility.Contact("maps/", folder), name); |
| | | var assetInfo = new AssetInfo(StringUtility.Contact("maps/", folder).ToLower(), name); |
| | | texture2D = AssetBundleUtility.Instance.Sync_LoadAsset(assetInfo) as Texture2D; |
| | | } |
| | | |
| | |
| | | }
|
| | | _data.defaultSkillID = m_WillUsedSkillID;
|
| | | m_Hero.aiHandler.currentType = E_HeroAIType.KillUntilDie;
|
| | | if (AI_BossDSX.GetStep() == 1)
|
| | |
|
| | | if (OnUserClickSkill != null)
|
| | | {
|
| | | if (m_WillUsedSkillID == 190)
|
| | | {
|
| | | if (OnUserClickSkill != null)
|
| | | {
|
| | | OnUserClickSkill(m_WillUsedSkillID);
|
| | | }
|
| | | }
|
| | | OnUserClickSkill(m_WillUsedSkillID);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | {
|
| | | if (m_Hero.aiHandler.IsAuto())
|
| | | {
|
| | | if (m_Hero.LockTarget != null)
|
| | | GActorFight _fight = m_Hero.LockTarget as GActorFight;
|
| | | if (_fight != null && _fight.CanAtked())
|
| | | {
|
| | | _realDir = m_Hero.Forward = MathUtility.ForwardXZ(m_Hero.LockTarget.Pos, m_Hero.Pos);
|
| | | }
|
| | |
| | | if (skill.skillInfo.config.Skillactmark != GAStaticDefine.Act_Roll
|
| | | && skill.skillInfo.config.AtkType != (int)E_AtkType.FlashMove)
|
| | | {
|
| | | if (m_Hero.LockTarget != null)
|
| | | GActorFight _fight = m_Hero.LockTarget as GActorFight;
|
| | | if (_fight != null && _fight.CanAtked())
|
| | | {
|
| | | skill.targetPosition = m_Hero.LockTarget.Pos;
|
| | | }
|
| | |
| | | {
|
| | | Vector3 _dir;
|
| | | float _radius = 0.5f;
|
| | | if (m_Hero.LockTarget != null)
|
| | | GActorFight _fight = m_Hero.LockTarget as GActorFight;
|
| | | if (_fight != null && _fight.CanAtked())
|
| | | {
|
| | | GActorNpcFight _npcFight = m_Hero.LockTarget as GActorNpcFight;
|
| | | if (_npcFight != null)
|
| | |
| | | else if (m_Hero.SelectTarget != null)
|
| | | {
|
| | | GActorNpcFight _npcFight = m_Hero.SelectTarget as GActorNpcFight;
|
| | | if (_npcFight != null)
|
| | | if (_npcFight != null && _fight.CanAtked())
|
| | | {
|
| | | _radius = _npcFight.NpcConfig.ModelRadius;
|
| | | }
|
| | |
| | | {
|
| | | Debug.LogFormat("<color=yellow>在当前选择目标是玩家的时候切换到了另一个玩家: {0} => {1}</color>", base.SelectTarget.ServerInstID, value.ServerInstID);
|
| | | }
|
| | | if (base.SelectTarget is GActorPlayerBase && value is GA_NpcFightBoss)
|
| | | {
|
| | | Debug.LogFormat("<color=yellow>在当前选择目标是玩家的时候切换到了Boss: {0} => {1}</color>", base.SelectTarget.ServerInstID, value.ServerInstID);
|
| | | }
|
| | | #endif
|
| | | IOtherSelectable _selectable = base.SelectTarget as IOtherSelectable;
|
| | | if (_selectable != null)
|
| | |
| | | }
|
| | |
|
| | | HandleBossAttack();
|
| | |
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | if (SelectTarget is GActorNpcFight)
|
| | | {
|
| | | GAMgr.Instance.Release(SelectTarget);
|
| | | SelectTarget = null;
|
| | | }
|
| | |
|
| | | if (LockTarget is GActorNpcFight || LockTarget == null)
|
| | | {
|
| | | var _list = GAMgr.Instance.GetTypeList(E_ActorClassType.Player);
|
| | | if (_list != null && _list.Count > 0)
|
| | | {
|
| | | LockTarget = _list[0];
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void HandleBossAttack()
|
| | |
| | | catch (System.Exception ex)
|
| | | {
|
| | | ExceptionCatcher.ReportException("场景加载 Step6 执行到: " + m_InitHeroStep, ex);
|
| | | #if UNITY_EDITOR
|
| | | Debug.Log(ex.StackTrace);
|
| | | #endif
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | Debug.LogFormat("不发包0107:当前Stage:{0}", CurrentStage);
|
| | | }
|
| | |
|
| | | isLoading = false;
|
| | |
|
| | | switch (this.socketType)
|
| | | {
|
| | | case GameNetSystem.SocketType.Main:
|
| | |
| | | loadTimeOutCatcher = null;
|
| | |
|
| | | Application.backgroundLoadingPriority = ThreadPriority.BelowNormal;
|
| | | isLoading = false;
|
| | |
|
| | | DebugEx.LogFormat("StageManager => Load Scene : {0} Finished.", _resources);
|
| | | WindowCenter.Instance.Close<LoadingWin>();
|
| | |
| | |
|
| | | private void OnPackageRefresh(PackType _packType)
|
| | | {
|
| | | if (_packType != PackType.rptItem)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var keys = new List<string>(betterEquipModels.Keys);
|
| | | for (int i = keys.Count - 1; i >= 0; i--)
|
| | | {
|
| | | var guid = keys[i];
|
| | | var itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel == null || itemModel.packType != PackType.rptItem)
|
| | | if (itemModel == null |
| | | || (itemModel.packType != PackType.rptItem
|
| | | && itemModel.packType != PackType.rptJadeDynastyItem))
|
| | | {
|
| | | betterEquipModels.Remove(guid);
|
| | | }
|
| | |
| | |
|
| | | private void OnPackageItemRefresh(PackType _packType, int _index, int _itemId)
|
| | | {
|
| | | if (_packType == PackType.rptEquip)
|
| | | switch(_packType)
|
| | | {
|
| | | //穿上装备的时候的处理
|
| | | var item = playerPack.GetItemModelByIndex(_packType, _index);
|
| | | if (item != null)
|
| | | {
|
| | | RemoveLowGradeItemByEquipPlace(_index, item.equipScore);
|
| | | }
|
| | | OnPackageRefresh(PackType.rptItem);
|
| | | }
|
| | | else if (_packType == PackType.rptItem)
|
| | | {
|
| | | var itemModel = playerPack.GetItemModelByIndex(PackType.rptItem,_index);
|
| | | if(itemModel == null)
|
| | | {
|
| | | OnPackageRefresh(_packType);
|
| | | }
|
| | | case PackType.rptEquip:
|
| | | case PackType.rptJadeDynastyEquip:
|
| | | //穿上装备的时候的处理
|
| | | var item = playerPack.GetItemModelByIndex(_packType, _index);
|
| | | if (item != null)
|
| | | {
|
| | | RemoveLowGradeItemByEquipPlace(_index, item.equipScore);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(_itemId);
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
|
| | | var itemModel = playerPack.GetItemModelByIndex(packType, _index);
|
| | | if (itemModel == null)
|
| | | {
|
| | | OnPackageRefresh(_packType);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | private int preThirdType = 0;
|
| | | [SerializeField] int initSuccessRate = 0;
|
| | | private int curComposeEquipIndex = -1;
|
| | | public static int selectEquipPlace;
|
| | | ItemCompoundConfig compoundModel = null;
|
| | | bool isIncreaseRate = false;
|
| | | int successRate = 0;
|
| | |
| | | composeWinModel.UpdateThirdTypeEvent -= UpdateThirdType;
|
| | | selectModel.UpdateSelectEvent -= UpdateSelect;
|
| | | composeWinModel.UpdateEquipTypeEvent -= UpdateEquipType;
|
| | | selectEquipPlace = -1;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | if(composeWinModel.CurComposeModel == null)
|
| | | {
|
| | | curComposeEquipIndex = -1;
|
| | | }
|
| | | List<ComposeWinModel.ComposeThirdTypeData> thirdTypeDatas = null;
|
| | | composeWinModel.TryGetThirdTypeData((int)ComposeFuncType.Equip, curSecondType, curThirdType, out thirdTypeDatas);
|
| | | if (thirdTypeDatas != null)
|
| | | {
|
| | | for (int i = 0; i < thirdTypeDatas.Count; i++)
|
| | | {
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(thirdTypeDatas[i].itemCompound.makeID[0]);
|
| | | if (itemConfig.EquipPlace == selectEquipPlace)
|
| | | {
|
| | | curComposeEquipIndex = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | private void SetFixedItemIndexDic()
|
| | | {
|
| | | fixedItemIndexDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null || compoundModel == null) return;
|
| | | if (compoundModel == null) return;
|
| | |
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return;
|
| | |
|
| | | int minBindCnt = 0;
|
| | | int minNoBindCnt = 0;
|
| | |
| | | public void SetDisplay(ItemCompoundConfig _itemCompound,NeedMatType _matType,bool isLock,string des = "", int _itemId = 0,int _itemIndex = -1)
|
| | | {
|
| | | this.itemCompound = _itemCompound;
|
| | | this.itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, _itemIndex);
|
| | | var packType = composeModel.GetPackTypeByMakerId(itemCompound.makeID);
|
| | | this.itemModel = playerPack.GetItemModelByIndex(packType, _itemIndex);
|
| | | this.matType = _matType;
|
| | | this.itemId = _itemId;
|
| | | matDes = des;
|
| | |
| | | case NeedMatType.fixedItem:
|
| | | int needCount = 0;
|
| | | TryGetCountById(out needCount);
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem, itemId);
|
| | | var packType = composeModel.GetPackTypeByMakerId(itemCompound.makeID);
|
| | | int haveCount = playerPack.GetItemCountByID(packType, itemId);
|
| | | itemCell.countText.gameObject.SetActive(true);
|
| | | if (haveCount >= needCount)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | List<int> composeCountlist = new List<int>();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | int[] fixedIds = compoundModel.itemID;
|
| | | int[] fixedCounts = compoundModel.itemCount;
|
| | | for (int i = 0; i < fixedIds.Length; i++)
|
| | | {
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem, fixedIds[i]);
|
| | | int haveCount = playerPack.GetItemCountByID(packType, fixedIds[i]);
|
| | | int canComposeCount = haveCount / fixedCounts[i];
|
| | | composeCountlist.Add(canComposeCount);
|
| | | List<int> itemIndexlist = null;
|
| | |
| | | private void SetFixedItemIndexDic()
|
| | | {
|
| | | fixedItemIndexDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null || compoundModel == null) return;
|
| | | if (compoundModel == null) return;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return;
|
| | |
|
| | | int minBindCnt = 0;
|
| | | int minNoBindCnt = 0;
|
| | |
| | | private void SetFixedItemIndexDic()
|
| | | {
|
| | | fixedItemIndexDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null || compoundModel == null) return;
|
| | | if (compoundModel == null) return;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return;
|
| | |
|
| | | int minBindCnt = 0;
|
| | | int minNoBindCnt = 0;
|
| | |
| | |
|
| | | List<int> composeCountlist = new List<int>();
|
| | | fixedItemIndexDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | int[] fixedIds = compoundModel.itemID;
|
| | | int[] fixedCounts = compoundModel.itemCount;
|
| | |
|
| | | for (int i = 0; i < fixedIds.Length; i++)
|
| | | {
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem,fixedIds[i]);
|
| | | int haveCount = playerPack.GetItemCountByID(packType,fixedIds[i]);
|
| | | int canComposeCount = haveCount / fixedCounts[i];
|
| | | composeCountlist.Add(canComposeCount);
|
| | | List<int> itemIndexlist = null;
|
| | |
| | | }
|
| | | #endregion
|
| | |
|
| | | public PackType GetPackTypeByMakerId(int[] makeIds)
|
| | | {
|
| | | if (makeIds == null || makeIds.Length < 1) return PackType.rptDeleted;
|
| | |
|
| | | int makeId = makeIds[0];
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(makeId);
|
| | |
|
| | | return GeneralDefine.GetPackTypeByItemType(itemConfig.Type); |
| | | }
|
| | |
|
| | | public void SetUpdateSendComposeEvent()
|
| | | {
|
| | | if(UpdateSendComposeEvent != null)
|
| | |
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
|
| | | return;
|
| | | }
|
| | |
|
| | | var packType = GetPackTypeByMakerId(compoundModel.makeID);
|
| | | int[] fixedIds = compoundModel.itemID;
|
| | | int[] fixedCounts = compoundModel.itemCount;
|
| | | for (i = 0; i < fixedCounts.Length; i++)
|
| | | {
|
| | | int haveCount = playerPack.GetItemCountByID(PackType.rptItem,fixedIds[i]);
|
| | | int haveCount = playerPack.GetItemCountByID(packType, fixedIds[i]);
|
| | | if (haveCount < fixedCounts[i])
|
| | | {
|
| | | ItemConfig fixedConfig = Config.Instance.Get<ItemConfig>(fixedIds[i]);
|
| | |
| | | {
|
| | | for(i= 0; i < fixedIndexArray.Length;i++ )
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem,fixedIndexArray[i]);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(packType, fixedIndexArray[i]);
|
| | | SetMatIsBindDict(itemModel,fixedMatIsBindDict);
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | for (i = 0; i < unfixedIndexArray.Length; i++)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, unfixedIndexArray[i]);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(packType, unfixedIndexArray[i]);
|
| | | SetMatIsBindDict(itemModel,unfixedMatIsBindDict);
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | private bool ChangeFixedMatUI()
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null || compoundModel == null) return false;
|
| | | if (compoundModel == null) return false;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return false;
|
| | |
|
| | | bool isBind = false;
|
| | | Dictionary<int,ItemModel> unfixedMatDict = selectModel.GetHaveUnfixedSelectItem();
|
| | |
| | | private void SetFixedMatIndex()
|
| | | {
|
| | | fixedItemIndexDict.Clear();
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null || compoundModel == null) return;
|
| | | if (compoundModel == null) return;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(compoundModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return;
|
| | | int isBind = 0;
|
| | |
|
| | | if(IsComposeBind)
|
| | |
| | |
|
| | | public Dictionary<int, ItemModel> GetUnfixedItemModel()
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null || composeWinModel.CurComposeModel == null)
|
| | | return null;
|
| | | if (composeWinModel.CurComposeModel == null) return null;
|
| | |
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return null;
|
| | |
|
| | | int[] unfixedIds = composeWinModel.CurComposeModel.unfixedItemID;
|
| | | allBagItemInfo = singlePack.GetPackModelIndexDict();
|
| | |
| | |
|
| | | public Dictionary<int, ItemModel> GetAddItemModel()
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null)
|
| | | return null;
|
| | | if (composeWinModel.CurComposeModel == null) return null;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (singlePack == null) return null;
|
| | |
|
| | | allBagItemInfo = singlePack.GetPackModelIndexDict();
|
| | | List<ItemModel> modellist = allBagItemInfo.Values.ToList();
|
| | |
| | |
|
| | | public void AddHaveUnfixedSelectItem(int itemPlace)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, itemPlace);
|
| | | if (composeWinModel.CurComposeModel == null) return;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(packType, itemPlace);
|
| | | if (!haveUnfixedSelectItemDic.ContainsKey(itemPlace))
|
| | | {
|
| | | haveUnfixedSelectItemDic.Add(itemPlace, itemModel);
|
| | |
| | |
|
| | | public void AddHaveAddSelectItem(int itemPlace)
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptItem, itemPlace);
|
| | | if (composeWinModel.CurComposeModel == null) return;
|
| | | var packType = composeWinModel.GetPackTypeByMakerId(composeWinModel.CurComposeModel.makeID);
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(packType, itemPlace);
|
| | | if (!haveAddSelectItemDic.ContainsKey(itemPlace))
|
| | | {
|
| | | haveAddSelectItemDic.Add(itemPlace, itemModel);
|
| | |
| | | {
|
| | | crossDayAwardsRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | CrossServerUtility.UpdateCrossServerRedpoint();
|
| | | }
|
| | |
|
| | | public void UpdateCrossMatchRedpoint()
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | CrossServerUtility.UpdateCrossServerRedpoint();
|
| | | }
|
| | |
|
| | | public bool TryGetRedTypeByShopId(int shopId, out int type)
|
| | |
| | | {
|
| | | redPointStre1.state = RedPointState.None;
|
| | | }
|
| | |
|
| | | CrossServerUtility.UpdateCrossServerRedpoint();
|
| | | }
|
| | |
|
| | | private void RedPointSea()//赛季奖励红点
|
| | |
| | | {
|
| | | redPointStre2.state = RedPointState.None;
|
| | | }
|
| | | CrossServerUtility.UpdateCrossServerRedpoint();
|
| | | }
|
| | |
|
| | | private static int m_PkType = 0;
|
| | |
| | | if (m_BigBoxCollectCount != value) |
| | | { |
| | | m_BigBoxCollectCount = value;
|
| | | UpdateRedpoint(); |
| | | UpdateRedpoint();
|
| | | crossServerBossModel.UpdateRedpoint(); |
| | | if (bigBoxCollectCountChangeEvent != null) |
| | | { |
| | | bigBoxCollectCountChangeEvent(); |
| | |
| | | case JadeDynastyTowerModel.DATA_MAPID:
|
| | | var jadeDynastyTowerModel = ModelCenter.Instance.GetModel<JadeDynastyTowerModel>();
|
| | | jadeDynastyTowerModel.RequestAward();
|
| | | if (model.dungeonResult.grade == 5)
|
| | | {
|
| | | if (!jadeDynastyTowerModel.IsTopFloor(jadeDynastyTowerModel.currentFloor))
|
| | | {
|
| | | var dungeonStage = StageManager.Instance.CurrentStage as JadeDynastyTowerDungeonStage;
|
| | | dungeonStage.PerformChallengeNextLevel();
|
| | | model.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0);
|
| | | model.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | |
|
| | | model.ExitCurrentDungeon();
|
| | | WindowCenter.Instance.Close<JadyDynastyTowerVictoryWin>();
|
| | | break;
|
| | | default:
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (WindowCenter.Instance.IsOpen("DemonJarBossLifeBarWin"))
|
| | | {
|
| | | WindowCenter.Instance.Close<DemonJarBossLifeBarWin>();
|
| | | }
|
| | |
|
| | | TargetBriefInfoWin win;
|
| | | if (!WindowCenter.Instance.IsOpen<TargetBriefInfoWin>())
|
| | | {
|
| | |
| | | switch (_type)
|
| | | {
|
| | | case PlayerDataRefresh.LV:
|
| | | var bossId = GetLatestUnLockBoss();
|
| | | AutoSubscribeLastUnLockBoss(bossId);
|
| | | if (FuncOpen.Instance.IsFuncOpen(76))
|
| | | {
|
| | | var bossId = GetLatestUnLockBoss();
|
| | | AutoSubscribeLastUnLockBoss(bossId);
|
| | | }
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.LV == GeneralDefine.demonJarRedPoint)
|
| | | {
|
| | |
| | | Redpoint lootPreciousRedpoint = new Redpoint(LOOTPRECIOUs_REDPOINTID);
|
| | |
|
| | | int m_ViewKillRecordsBoss = 0;
|
| | | public int ViewKillRecordsBoss {
|
| | | public int ViewKillRecordsBoss
|
| | | {
|
| | | get { return this.m_ViewKillRecordsBoss; }
|
| | | set { this.m_ViewKillRecordsBoss = value; }
|
| | | }
|
| | |
| | | public List<BossNotify> bossNotifies = new List<BossNotify>();
|
| | |
|
| | | BossNotify m_CurrentBossNotify = default(BossNotify);
|
| | | public BossNotify currentBossNotify {
|
| | | public BossNotify currentBossNotify
|
| | | {
|
| | | get { return m_CurrentBossNotify; }
|
| | | private set {
|
| | | private set
|
| | | {
|
| | | if (m_CurrentBossNotify != value)
|
| | | {
|
| | | m_CurrentBossNotify = value;
|
| | |
| | | var bossId = boss.bossId;
|
| | | if (Config.Instance.ContainKey<DemonJarConfig>(bossId))
|
| | | {
|
| | | if (IsBossAlive(bossId))
|
| | | if (FuncOpen.Instance.IsFuncOpen(76) && IsBossAlive(bossId))
|
| | | {
|
| | | var config = Config.Instance.Get<DemonJarConfig>(bossId);
|
| | | var grade = dungeonModel.GetGrade(new Dungeon(DemonJarModel.DEMONJAR_MAPID, config.LineID));
|
| | |
| | | itemCell.gameObject.SetActive(true);
|
| | | MailItemModel itemModel = info.Items[giftCount];
|
| | | ItemCellModel cellModel = new ItemCellModel((int)itemModel.ItemID, false, (ulong)itemModel.Count,
|
| | | itemModel.IsBind,"",PackType.rptDeleted, false, ConfigParse.Analysis(itemModel.UserData));
|
| | | itemModel.IsBind, "", PackType.rptDeleted, false, ConfigParse.Analysis(itemModel.UserData));
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.cellBtn.onClick.RemoveAllListeners();
|
| | | itemCell.cellBtn.onClick.AddListener(() =>
|
| | |
| | | {
|
| | | if (preReceiveIndex != _nextReceiveIndex)
|
| | | {
|
| | | if(_chooseMailList != null && _chooseMailList.Count > _nextReceiveIndex)
|
| | | if (_chooseMailList != null && _chooseMailList.Count > _nextReceiveIndex)
|
| | | {
|
| | | ReceiveAllChooseMail(_nextReceiveIndex, _chooseMailList[_nextReceiveIndex]);
|
| | | } |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | CreateMailCell();
|
| | | }
|
| | |
|
| | | private Dictionary<PackType, int> GetPackItemDcit = new Dictionary<PackType, int>();
|
| | | public void SendAskReceive(string id)
|
| | | {
|
| | | MailInfo mailInfo = MailAllModel.Instance.GetMailInfo(id);
|
| | | if (mailInfo == null) return;
|
| | |
|
| | | GetPackItemDcit.Clear();
|
| | | int i = 0;
|
| | | int getBagItemCount = 0;
|
| | | int getRuneCount = 0;
|
| | | int getDogzCount = 0;
|
| | | int getSoulCount = 0;
|
| | | //int getBagItemCount = 0;
|
| | | //int getRuneCount = 0;
|
| | | //int getDogzCount = 0;
|
| | | //int getSoulCount = 0;
|
| | | ItemConfig tagChinItem = null;
|
| | | //for (i = 0; i < mailInfo.Count; i++)
|
| | | //{
|
| | | // tagChinItem = Config.Instance.Get<ItemConfig>((int)mailInfo.Items[i].ItemID);
|
| | | // if (tagChinItem != null)
|
| | | // {
|
| | | // var packType = GeneralDefine.GetPackTypeByItemType(tagChinItem.Type);
|
| | | // if(!GetPackItemDcit.ContainsKey(packType))
|
| | | // {
|
| | | // GetPackItemDcit.Add(packType,1);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // GetPackItemDcit[packType]
|
| | | // }
|
| | |
|
| | | // switch(tagChinItem.Type)
|
| | | // {
|
| | | // case RuneModel.RUNE_TYPE:
|
| | | // case RuneModel.RUNE_CREAMTYPE:
|
| | | // getRuneCount += 1;
|
| | | // break;
|
| | | // case (int)ItemType.DogzStrengthMat:
|
| | | // case (int)ItemType.DogzEquipType1:
|
| | | // case (int)ItemType.DogzEquipType2:
|
| | | // case (int)ItemType.DogzEquipType3:
|
| | | // case (int)ItemType.DogzEquipType4:
|
| | | // case (int)ItemType.DogzEquipType5:
|
| | | // getDogzCount += 1;
|
| | | // break;
|
| | | // case GatheringSoulModel.GATHERSOUL_CORE_TYPE:
|
| | | // case GatheringSoulModel.GATHERSOUL_ESSENCE_TYPE:
|
| | | // case GatheringSoulModel.GATHERSOUL_SOUL_TYPE:
|
| | | // getSoulCount += 1;
|
| | | // break;
|
| | | // default:
|
| | | // getBagItemCount += 1;
|
| | | // break;
|
| | | // }
|
| | | // }
|
| | | //}
|
| | |
|
| | | for (i = 0; i < mailInfo.Count; i++)
|
| | | {
|
| | | tagChinItem = Config.Instance.Get<ItemConfig>((int)mailInfo.Items[i].ItemID);
|
| | | if (tagChinItem != null)
|
| | | {
|
| | | switch(tagChinItem.Type)
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(tagChinItem.Type);
|
| | | if (!GetPackItemDcit.ContainsKey(packType))
|
| | | {
|
| | | case RuneModel.RUNE_TYPE:
|
| | | case RuneModel.RUNE_CREAMTYPE:
|
| | | getRuneCount += 1;
|
| | | break;
|
| | | case (int)ItemType.DogzStrengthMat:
|
| | | case (int)ItemType.DogzEquipType1:
|
| | | case (int)ItemType.DogzEquipType2:
|
| | | case (int)ItemType.DogzEquipType3:
|
| | | case (int)ItemType.DogzEquipType4:
|
| | | case (int)ItemType.DogzEquipType5:
|
| | | getDogzCount += 1;
|
| | | break;
|
| | | case GatheringSoulModel.GATHERSOUL_CORE_TYPE:
|
| | | case GatheringSoulModel.GATHERSOUL_ESSENCE_TYPE:
|
| | | case GatheringSoulModel.GATHERSOUL_SOUL_TYPE:
|
| | | getSoulCount += 1;
|
| | | break;
|
| | | default:
|
| | | getBagItemCount += 1;
|
| | | break;
|
| | | GetPackItemDcit.Add(packType, 1);
|
| | | }
|
| | | else
|
| | | {
|
| | | GetPackItemDcit[packType] += 1;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (getBagItemCount > playerPack.GetReaminGridCount(PackType.rptItem))
|
| | | foreach (var key in GetPackItemDcit.Keys)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | return;
|
| | | }
|
| | | else if (getRuneCount > runeModel.SurplusRunePackCnt)
|
| | | {
|
| | | int remainCount = 0;
|
| | | switch (key)
|
| | | {
|
| | | case PackType.rptGatherSoul:
|
| | | remainCount = virtualPackModel.GetPackRemainCount(key);
|
| | | break;
|
| | | case PackType.rptRunePack:
|
| | | remainCount = runeModel.SurplusRunePackCnt;
|
| | | break;
|
| | | default:
|
| | | remainCount = playerPack.GetReaminGridCount(key);
|
| | | break;
|
| | | }
|
| | |
|
| | | SysNotifyMgr.Instance.ShowTip("RuneBagFull");
|
| | | return;
|
| | | int getCount = GetPackItemDcit[key];
|
| | | if (remainCount < getCount)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_676165", key);
|
| | | return;
|
| | | }
|
| | | }
|
| | | else if(getDogzCount > playerPack.GetReaminGridCount(PackType.rptDogzItem))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("DogzBagFull");
|
| | | return;
|
| | | }
|
| | | else if(getSoulCount > virtualPackModel.GetPackRemainCount(PackType.rptGatherSoul))
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_676165",PackType.rptGatherSoul);
|
| | | return;
|
| | | }
|
| | |
|
| | | //if (getBagItemCount > playerPack.GetReaminGridCount(PackType.rptItem))
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | // return;
|
| | | //}
|
| | | //else if (getRuneCount > runeModel.SurplusRunePackCnt)
|
| | | //{
|
| | |
|
| | | // SysNotifyMgr.Instance.ShowTip("RuneBagFull");
|
| | | // return;
|
| | | //}
|
| | | //else if(getDogzCount > playerPack.GetReaminGridCount(PackType.rptDogzItem))
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("DogzBagFull");
|
| | | // return;
|
| | | //}
|
| | | //else if(getSoulCount > virtualPackModel.GetPackRemainCount(PackType.rptGatherSoul))
|
| | | //{
|
| | | // SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_676165",PackType.rptGatherSoul);
|
| | | // return;
|
| | | //}
|
| | |
|
| | | CA53B_tagCMRequestCompensation askRecive = new CA53B_tagCMRequestCompensation();
|
| | | askRecive.GUID = id;
|
| | |
| | | public static Dictionary<int, int> fairyGrabBossMapLines { get; private set; } |
| | | |
| | | public static Dictionary<int, List<int>> DropItemEffectMapID { get; private set; } |
| | | |
| | | public static Dictionary<int, List<int>> itemPutInPackDict { get; private set; } |
| | | public static List<int> RebornAutoFightMapID { get; private set; } |
| | | |
| | | public static string teamWorldCall; |
| | |
| | | public static Dictionary<int, int> SgzcRealm { get; private set; } |
| | | |
| | | public static int crossServerOneVsOneOpenDay { get; private set; } |
| | | public static int UISpringDecorate { get; private set; } |
| | | |
| | | public static void Init() |
| | | { |
| | |
| | | _pos[0] = (double)_data[_key][0]; |
| | | _pos[1] = (double)_data[_key][1]; |
| | | NpcPosOffset.Add(_npcID, new Vector3((float)_pos[0], 0, (float)_pos[1])); |
| | | } |
| | | |
| | | var putInItemPack = Config.Instance.Get<FuncConfigConfig>("PutInItemPack"); |
| | | LitJson.JsonData itemPutInData = LitJson.JsonMapper.ToObject(putInItemPack.Numerical1); |
| | | itemPutInPackDict = new Dictionary<int, List<int>>(); |
| | | foreach(var _key in itemPutInData.Keys)
|
| | | {
|
| | | var itemTypeData = itemPutInData[_key];
|
| | | int packType = int.Parse(_key);
|
| | | List<int> itemTypes = new List<int>();
|
| | | itemPutInPackDict.Add(packType,itemTypes);
|
| | | if(itemTypeData.IsArray)
|
| | | {
|
| | | for (i = 0; i < itemTypeData.Count; i++)
|
| | | {
|
| | | int itemType = int.Parse(itemTypeData[i].ToString());
|
| | | itemTypes.Add(itemType);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture"); |
| | |
| | | } |
| | | |
| | | crossServerOneVsOneOpenDay = GetInt("CrossRealmCfg"); |
| | | UISpringDecorate = GetInt("UISpringDecorate"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public static PackType GetPackTypeByItemType(int itemType)
|
| | | {
|
| | | foreach(var key in itemPutInPackDict.Keys)
|
| | | {
|
| | | var types = itemPutInPackDict[key];
|
| | | if(types.Contains(itemType))
|
| | | {
|
| | | return (PackType)key;
|
| | | }
|
| | | }
|
| | | return PackType.rptItem;
|
| | | } |
| | | |
| | | private static int GetInt(string _key, int _index = 1) |
| | | { |
| | | var result = 0; |
| | |
| | | realmLevel = config.RealmLV,
|
| | | score = config.ZhuXianScore,
|
| | | },
|
| | | conditionSorts = new List<int>(config.conditionSorts),
|
| | | });
|
| | |
|
| | | var itemArray = LitJson.JsonMapper.ToObject<int[][]>(config.dropItems);
|
| | |
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | var boss = jadeDynastyBosses[index];
|
| | | var challengeCondition = jadeDynastyBosses[index].challengeCondition;
|
| | | foreach (var code in boss.conditionSorts)
|
| | | {
|
| | | switch (code)
|
| | | {
|
| | | case 1:
|
| | | if (PlayerDatas.Instance.baseData.LV < challengeCondition.level)
|
| | | {
|
| | | condition = 1;
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | if (PlayerDatas.Instance.baseData.realmLevel < challengeCondition.realmLevel)
|
| | | {
|
| | | condition = 2;
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | case 3:
|
| | | if (jadeDynastyScore < (ulong)challengeCondition.score)
|
| | | {
|
| | | condition = 3;
|
| | | return false;
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.LV < challengeCondition.level)
|
| | | {
|
| | | condition = 1;
|
| | |
| | | public int bossNpcId;
|
| | | public int lineId;
|
| | | public JadeDynastyBossCondition challengeCondition;
|
| | | public List<int> conditionSorts;
|
| | | }
|
| | |
|
| | | public struct JadeDynastyBossCondition
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyDecomposeGetItemWin : Window
|
| | | {
|
| | | [SerializeField] GameObject getItemObj;
|
| | |
| | | {
|
| | | [SerializeField] CommonItemBaisc itemBaisc;
|
| | | [SerializeField] GameObject selectObj;
|
| | | [SerializeField] GameObject equipLvObj;
|
| | | [SerializeField] Text equipLvText;
|
| | |
|
| | | JadeDynastyDecomposeModel decomposeModel { get { return ModelCenter.Instance.GetModel<JadeDynastyDecomposeModel>(); } }
|
| | |
|
| | | public void SetDisplay(ItemModel itemModel,List<string> selectGuids)
|
| | | {
|
| | | itemBaisc.cellBtn.RemoveAllListeners();
|
| | | equipLvObj.SetActive(false);
|
| | | if (itemModel == null || selectGuids == null)
|
| | | {
|
| | | itemBaisc.gameObject.SetActive(false);
|
| | |
| | | itemBaisc.gameObject.SetActive(true);
|
| | | selectObj.SetActive(selectGuids.Contains(itemModel.itemInfo.ItemGUID));
|
| | | itemBaisc.Init(itemModel,true);
|
| | | if(itemModel.chinItemModel.EquipPlace > 0)
|
| | | {
|
| | | equipLvObj.SetActive(true);
|
| | | string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.chinItemModel.LV));
|
| | | equipLvText.text = Language.Get("L1091", equipLvSB);
|
| | | }
|
| | | itemBaisc.cellBtn.AddListener(()=>
|
| | | {
|
| | | if (selectObj.activeInHierarchy)
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | [XLua.LuaCallCSharp]
|
| | | public class JadeDynastyDecomposeModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public int selectEquipLv { get; private set; }
|
| | |
| | | public List<string> selectGuids { get; private set; }
|
| | | public List<string> allGuids { get; private set; }
|
| | | public event Action UpdateSelectItemEvent;
|
| | |
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | PackModelInterface modelInterface { get { return ModelCenter.Instance.GetModel<PackModelInterface>(); } }
|
| | |
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyDecomposeWin : Window
|
| | | {
|
| | | [SerializeField] ScrollerController decomposeCtrl;
|
| | |
| | |
|
| | | private void ClickDecompose()
|
| | | {
|
| | | if(decomposeModel.selectGuids.Count < 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("JadeDynastyDecompose");
|
| | | return;
|
| | | }
|
| | | decomposeModel.SendJadeDynastyDecompose(0);
|
| | | }
|
| | |
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyEquipBeh : MonoBehaviour
|
| | | {
|
| | | [SerializeField] RoleEquipType equipType = RoleEquipType.retMax;
|
| | |
| | | [SerializeField] Button equipBtn;
|
| | | [SerializeField] GameObject equipLvObj;
|
| | | [SerializeField] Text equipLvText;
|
| | | [SerializeField] GameObject composeImg;
|
| | |
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
| | | equipBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | equipLvObj.SetActive(false);
|
| | | composeImg.SetActive(false);
|
| | | if(islock)
|
| | | {
|
| | | itemCell.gameObject.SetActive(false);
|
| | |
| | | nameText.gameObject.SetActive(false);
|
| | | itemCell.Init(itemModel);
|
| | | itemCell.cellBtn.AddListener(() => { ClickItemCell(itemModel); });
|
| | | equipLvText.text = Language.Get("L1091",itemModel.chinItemModel.LV);
|
| | | string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.chinItemModel.LV));
|
| | | equipLvText.text = Language.Get("L1091",equipLvSB);
|
| | | }
|
| | | else
|
| | | {
|
| | | equipBtn.AddListener(ClickEquipBtn);
|
| | | if (equipModel.equipPlaceComposes.Contains((int)equipType))
|
| | | {
|
| | | composeImg.SetActive(true);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyEquipGetPathsWin : Window
|
| | | {
|
| | | [SerializeField] RectTransform container;
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | [XLua.LuaCallCSharp]
|
| | | public class JadeDynastyEquipModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | JadeDynastyTowerModel towerModel { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } }
|
| | |
| | | {
|
| | | ParseFuncConfig();
|
| | | ParseSuitAttrConfig();
|
| | | ParseTowerConfig();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | public Dictionary<int, int> lockEquipLayerDict { get; private set; }
|
| | | public Dictionary<int, List<int>> suitTypeDict { get; private set;}
|
| | | public Dictionary<int, List<int>> equipGetPathDict { get; private set;}
|
| | | public List<int> equipPlaceComposes { get; private set;}
|
| | | public void ParseFuncConfig()
|
| | | {
|
| | | lockEquipLayerDict = new Dictionary<int, int>();
|
| | | suitTypeDict = new Dictionary<int, List<int>>();
|
| | | var equipZhuXian = Config.Instance.Get<FuncConfigConfig>("EquipZhuXian");
|
| | | var lockEquipData = JsonMapper.ToObject(equipZhuXian.Numerical1);
|
| | | foreach(var key in lockEquipData.Keys)
|
| | | {
|
| | | int equipPlace = int.Parse(key);
|
| | | int towerLayer = int.Parse(lockEquipData[key].ToString());
|
| | | lockEquipLayerDict.Add(equipPlace,towerLayer);
|
| | | }
|
| | |
|
| | | var suitGroupData = JsonMapper.ToObject(equipZhuXian.Numerical2);
|
| | | foreach(var key in suitGroupData.Keys)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | var jadeDynastyEquipCompose = Config.Instance.Get<FuncConfigConfig>("JadeDynastyEquipCompose");
|
| | | int[] composes = ConfigParse.GetMultipleStr<int>(jadeDynastyEquipCompose.Numerical1);
|
| | | equipPlaceComposes = composes.ToList();
|
| | | }
|
| | |
|
| | | public Dictionary<int, Dictionary<int, JadeDynastySuitAttrData>> suitAttrDict { get; private set; }
|
| | |
| | | dict.Add(suitLv, suitAttrData);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public void ParseTowerConfig()
|
| | | {
|
| | | lockEquipLayerDict = new Dictionary<int, int>();
|
| | | var configs = Config.Instance.GetAllValues<JadeDynastyTowerConfig>();
|
| | | foreach(var key in configs)
|
| | | {
|
| | | if(key.unLockEquipPlace != 0)
|
| | | {
|
| | | int equipPlace = key.unLockEquipPlace;
|
| | | int towerLayer = key.floorIndex;
|
| | | lockEquipLayerDict.Add(equipPlace, towerLayer);
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetMaxSuitLV(int equipPlace,out int maxSuitLv)
|
| | | public bool TryGetMaxSuitLV(int itemId,int equipPlace,out int maxSuitLv)
|
| | | {
|
| | | maxSuitLv = 0;
|
| | | var config = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (config == null) return false;
|
| | | |
| | | var suitLvs = GetSuitLvList(equipPlace);
|
| | | if(suitLvs != null && suitLvs.Count > 0)
|
| | | {
|
| | | maxSuitLv = suitLvs[suitLvs.Count - 1];
|
| | | return true;
|
| | | for(int i = suitLvs.Count - 1; i > -1; i--)
|
| | | {
|
| | | var suitLv = suitLvs[i];
|
| | | if(suitLv <= config.LV)
|
| | | {
|
| | | maxSuitLv = suitLv;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
| | | return isActive;
|
| | | }
|
| | |
|
| | | public bool TryGetSuitLV(int equipPlace,PackType type,out int curSuitLv,out int nextSuitLV)
|
| | | public bool TryGetSuitLV(int equipPlace,PackType type,out int curSuitLv,out int nextSuitLV,int itemId = 0)
|
| | | {
|
| | | curSuitLv = 0;
|
| | | nextSuitLV = 0;
|
| | | int maxSuitLv = 0;
|
| | | bool isMax = TryGetMaxSuitLV(equipPlace,out maxSuitLv);
|
| | | switch(type)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | | if(isMax)
|
| | | if(itemId != 0)
|
| | | {
|
| | | nextSuitLV = maxSuitLv;
|
| | | return true;
|
| | | int maxSuitLv = 0;
|
| | | bool isMax = TryGetMaxSuitLV(itemId,equipPlace, out maxSuitLv);
|
| | | if(isMax)
|
| | | {
|
| | | nextSuitLV = maxSuitLv;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | break;
|
| | | case PackType.rptJadeDynastyEquip:
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public bool TryGetSumSuitAttr(int suitType,PackType type,out JadeDynastySuitAttrData activeSuit,out JadeDynastySuitAttrData nextSuit)
|
| | | public bool TryGetSumSuitAttr(int suitType,PackType type,out JadeDynastySuitAttrData activeSuit,out JadeDynastySuitAttrData nextSuit,int itemId = 0)
|
| | | {
|
| | | activeSuit = null;
|
| | | nextSuit = null;
|
| | |
| | | int equipPlace = suitTypeDict[suitType][0];
|
| | | int curSuitLv = 0;
|
| | | int nextSuitLv = 0;
|
| | | bool isSuitLv = TryGetSuitLV(equipPlace,type,out curSuitLv,out nextSuitLv);
|
| | | bool isSuitLv = TryGetSuitLV(equipPlace,type,out curSuitLv,out nextSuitLv,itemId);
|
| | |
|
| | | TryGetSuitAttrData(equipPlace,curSuitLv,out activeSuit);
|
| | | TryGetSuitAttrData(equipPlace,nextSuitLv,out nextSuit);
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyEquipWin : Window
|
| | | {
|
| | | [SerializeField] Text fightPowerText;
|
| | |
| | |
|
| | | private void UpdateJadeDynastyItem(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptJadeDynastyItem) return;
|
| | |
|
| | | switch(type)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | |
| | | equipModel.ClearLookItemModel();
|
| | | break;
|
| | | case PackType.rptJadeDynastyEquip:
|
| | | UpdateItemLine();
|
| | | equipModel.ClearLookItemModel();
|
| | | UpdatePlayerUI3DModel();
|
| | | UpdateFightPower();
|
| | | break;
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyItemBeh : MonoBehaviour
|
| | | {
|
| | | [SerializeField] ItemCell itemCell;
|
| | |
| | | var singlePack = playerPack.GetSinglePackModel(PackType.rptJadeDynastyItem);
|
| | | if (singlePack == null) return;
|
| | |
|
| | | equipLvObj.SetActive(false);
|
| | | var itemModel = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyItem, index);
|
| | | itemCell.gameObject.SetActive(itemModel != null);
|
| | |
|
| | | if(itemModel != null)
|
| | | {
|
| | | equipLvObj.SetActive(true);
|
| | | lockBtn.gameObject.SetActive(false);
|
| | | itemCell.Init(itemModel,true);
|
| | | equipLvText.text = Language.Get("L1091",itemModel.chinItemModel.LV);
|
| | | if (itemModel.EquipPlace > 0)
|
| | | {
|
| | | equipLvObj.SetActive(true);
|
| | | string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", itemModel.chinItemModel.LV));
|
| | | equipLvText.text = Language.Get("L1091", equipLvSB);
|
| | | }
|
| | |
|
| | | itemCell.cellBtn.RemoveAllListeners();
|
| | | itemCell.cellBtn.AddListener(()=>
|
| | | {
|
| | | equipModel.ClearLookItemModel();
|
| | | tipsModel.SetItemTipsModel(itemModel.packType,itemModel.itemInfo.ItemGUID,false,true);
|
| | | tipsModel.SetJadeDynastyItemTipsBtn(tipsModel.curAttrData);
|
| | | tipsModel.ShowUICtrl();
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | equipLvObj.SetActive(false);
|
| | | bool isLock = index > (singlePack.openGridCount - 1);
|
| | | lockBtn.gameObject.SetActive(isLock);
|
| | | UpdatePlayerEffect(null);
|
| | |
| | | effect.Play();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (effect.IsPlaying)
|
| | | {
|
| | | effect.Stop();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyItemLineBeh : ScrollerUI
|
| | | {
|
| | | [SerializeField] List<JadeDynastyItemBeh> itemBehs = new List<JadeDynastyItemBeh>();
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastyKnapSackWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButton funcEquip;
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastySuitAttrBeh : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Text titleText;
|
| | |
| | | [SerializeField] GameObject noneActive;
|
| | |
|
| | | JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
|
| | |
|
| | | public void SetDisplay(PackType type,bool isNext = false,int equipPlace = 0)
|
| | | int itemId = 0;
|
| | | public void SetDisplay(PackType type,bool isNext = false,int equipPlace = 0,int _itemId = 0)
|
| | | {
|
| | | this.itemId = _itemId;
|
| | | if(equipPlace == 0)
|
| | | {
|
| | | UpdateSumSuitAttr(type, isNext);
|
| | |
| | | suitAttr.attrTypeObj.SetActive(true);
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
|
| | | equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData);
|
| | | equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData,itemId);
|
| | | if (isNext)
|
| | | {
|
| | | if (nextAttrData != null)
|
| | |
| | | isNoneActive = false;
|
| | | }
|
| | | }
|
| | | suitAttr.SetDisplay(suitType, type, isNext);
|
| | | suitAttr.SetDisplay(suitType, type, isNext,itemId);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | int suitType = suitTypes[i];
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
|
| | | equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData);
|
| | | equipModel.TryGetSumSuitAttr(suitType, type, out curAttrData, out nextAttrData,this.itemId);
|
| | | if (isNext)
|
| | | {
|
| | | if (nextAttrData != null)
|
| | |
| | | isNoneActive = false;
|
| | | }
|
| | | }
|
| | | suitAttr.SetDisplay(suitType, type, isNext);
|
| | | suitAttr.SetDisplay(suitType, type, isNext,itemId);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | JadeDynastyEquipModel equipModel { get { return ModelCenter.Instance.GetModel<JadeDynastyEquipModel>(); } }
|
| | |
|
| | | public void SetDisplay(int suitType,PackType type,bool isNext)
|
| | | public void SetDisplay(int suitType,PackType type,bool isNext,int itemId)
|
| | | {
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData curAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData nextAttrData = null;
|
| | | JadeDynastyEquipModel.JadeDynastySuitAttrData suitAttrData = null;
|
| | | equipModel.TryGetSumSuitAttr(suitType,type,out curAttrData,out nextAttrData);
|
| | | equipModel.TryGetSumSuitAttr(suitType,type,out curAttrData,out nextAttrData,itemId);
|
| | | suitAttrData = isNext ? nextAttrData : curAttrData;
|
| | | if(suitAttrData == null)
|
| | | {
|
| | |
| | | int equipPlace = equipPlaces[0];
|
| | | List<int> activeEquips = null;
|
| | | bool isActive = equipModel.TryGetIsActiveSuit(equipPlace,suitAttrData.suitLv,out activeEquips);
|
| | | activeObj.SetActive(!isActive);
|
| | | if(!isActive)
|
| | | bool isShowActiveObj = !isActive || type == PackType.rptJadeDynastyItem;
|
| | | activeObj.SetActive(isShowActiveObj);
|
| | | if(isShowActiveObj)
|
| | | {
|
| | | string equipsName = string.Empty;
|
| | | for(int i = 0; i < equipPlaces.Count; i++)
|
| | | {
|
| | | var place = equipPlaces[i];
|
| | | string equipName = Language.Get(((RoleEquipType)place).ToString());
|
| | | if (activeEquips.Contains(place))
|
| | | if (activeEquips.Contains(place) && type == PackType.rptJadeDynastyEquip)
|
| | | {
|
| | | equipName = UIHelper.AppendStringColor(TextColType.Green,equipName);
|
| | | }
|
| | |
| | | var attrText = attrTextlist[i];
|
| | | var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | string attrSB = string.Empty;
|
| | | string attrValueSB = string.Empty;
|
| | | if (isActive)
|
| | | {
|
| | | attrValueSB = UIHelper.AppendStringColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
|
| | | }
|
| | | else
|
| | | {
|
| | | attrValueSB = UIHelper.AppendStringColor(TextColType.Gray, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
|
| | | }
|
| | | string attrValueSB = tipsModel.GetProValueTypeStr(attrConfig, attrValue); ;
|
| | | if (attrConfig.Name.Contains("%s"))
|
| | | {
|
| | | attrSB = attrConfig.Name.Replace("%s", attrValueSB);
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class JadeDynastySuitAttrWin : Window
|
| | | {
|
| | | [SerializeField] JadeDynastySuitAttrBeh curSuitAttrBeh;
|
| | |
| | | m_Floor.text = config.floorName; |
| | | var isLastFloor = model.IsTopFloor(model.currentFloor); |
| | | |
| | | if (isLastFloor && model.currentFloor == model.highestPassFloor) |
| | | { |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | } |
| | | else |
| | | if (model.currentFloor > model.highestPassFloor) |
| | | { |
| | | var isSpecialFloor = config.unLockEquipPlace > 0; |
| | | if (isSpecialFloor) |
| | |
| | | { |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | m_Reward.SetItem(config.rewardIdsFirstS[0], config.rewardCountsFirstS[0]); |
| | | } |
| | | |
| | | m_Description.text = config.specialRewardDescription; |
| | | } |
| | | else |
| | | { |
| | | m_Reward.gameObject.SetActive(true); |
| | | m_UnLockEquipPlace.gameObject.SetActive(false); |
| | | m_Reward.SetItem(config.rewardIdsLevelS[0], config.rewardCountsLevelS[0]); |
| | | |
| | | var itemConfig = Config.Instance.Get<ItemConfig>(config.rewardIdsLevelS[0]); |
| | | m_Description.text = Language.Get("JadeDynastyNameReward", itemConfig.ItemName); |
| | | } |
| | | |
| | | m_Description.text = config.specialRewardDescription; |
| | | } |
| | | |
| | | } |
| | |
| | | public const int DATA_MAPID = 31370; |
| | | const int REDPOINTID_01 = 21501; |
| | | const int REDPOINTID_02 = 215; |
| | | const int REDPOINTID_03 = 21503; |
| | | const int FUNCTIONID = 164; |
| | | |
| | | public int highestPassFloor { get; private set; } |
| | |
| | | |
| | | bool redpointConfirm_01 = false; |
| | | bool redpointConfirm_02 = false; |
| | | bool redpointConfirm_03 = false; |
| | | |
| | | Redpoint redpoint01 = new Redpoint(37, REDPOINTID_01); |
| | | Redpoint redpoint02 = new Redpoint(REDPOINTID_02); |
| | | Redpoint redpoint03 = new Redpoint(REDPOINTID_03); |
| | | |
| | | List<int> sortedFloors = new List<int>(); |
| | | |
| | |
| | | |
| | | public void SetOpenJadeDynastyTowerWinDirty() |
| | | { |
| | | openJadeDynastyTower = true; |
| | | if (specialUnLockFloor==0) |
| | | { |
| | | openJadeDynastyTower = true; |
| | | } |
| | | } |
| | | |
| | | public List<int> GetShowFloors() |
| | |
| | | UpateRedpoint(); |
| | | } |
| | | |
| | | public void ConfirmRedpoint03() |
| | | { |
| | | redpointConfirm_03 = true; |
| | | UpateRedpoint(); |
| | | } |
| | | |
| | | public void OnPlayerLoginOk() |
| | | { |
| | | serverInited = true; |
| | |
| | | { |
| | | redpointConfirm_01 = false; |
| | | redpointConfirm_02 = false; |
| | | redpointConfirm_03 = false; |
| | | } |
| | | |
| | | public void OnMapInitOk() |
| | |
| | | { |
| | | redpoint02.state = RedPointState.None; |
| | | } |
| | | |
| | | if (!redpointConfirm_03) |
| | | { |
| | | redpoint03.state = challengable ? RedPointState.Simple : RedPointState.None; |
| | | } |
| | | else |
| | | { |
| | | redpoint03.state = RedPointState.None; |
| | | } |
| | | } |
| | | |
| | | private void ParseConfig() |
| | |
| | | |
| | | private void ViewRank() |
| | | { |
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.JadeDynastyTowerRank); |
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.JadeDynastyTowerRank289); |
| | | } |
| | | |
| | | public struct RankInfo |
| | |
| | | // [ Date ]: Monday, January 21, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | |
| | | [SerializeField] Text m_ExtraRewardFloor; |
| | | [SerializeField] Text m_ExtraRewardDescription; |
| | | |
| | | JadeDynastyTowerModel model { get { return ModelCenter.Instance.GetModel<JadeDynastyTowerModel>(); } } |
| | | |
| | | public void Display(int floor) |
| | | { |
| | | var config = Config.Instance.Get<JadeDynastyTowerConfig>(floor); |
| | | |
| | | var rewardLevelS = new List<Item>(); |
| | | if (model.currentFloor > model.highestPassFloor) |
| | | { |
| | | for (var i = 0; i < config.rewardIdsFirstS.Length; i++) |
| | | { |
| | | rewardLevelS.Add(new Item(config.rewardIdsFirstS[i], config.rewardCountsFirstS[i])); |
| | | } |
| | | } |
| | | |
| | | for (var i = 0; i < config.rewardIdsLevelS.Length; i++) |
| | | { |
| | | rewardLevelS.Add(new Item(config.rewardIdsLevelS[i], config.rewardCountsLevelS[i])); |
| | | } |
| | | |
| | | for (var i = 0; i < m_RewardsLevelS.Length; i++) |
| | | { |
| | | var behaviour = m_RewardsLevelS[i]; |
| | | if (i < config.rewardIdsLevelS.Length) |
| | | if (i < rewardLevelS.Count) |
| | | { |
| | | var id = config.rewardIdsLevelS[i]; |
| | | var count = config.rewardCountsLevelS[i]; |
| | | behaviour.gameObject.SetActive(true); |
| | | behaviour.SetItem(id, count); |
| | | behaviour.SetItem(rewardLevelS[i]); |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | private void Challenge() |
| | | { |
| | | model.ConfirmRedpoint03(); |
| | | model.RequestChallenge(); |
| | | } |
| | | |
| | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Award.SetListener(Award); |
| | | m_Exit.SetListener(ExitDungeon); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | |
| | | |
| | | protected override void DrawExitTimer(int seconds) |
| | | { |
| | | if (m_ExitTimer.gameObject.activeInHierarchy) |
| | | { |
| | | m_AwardTimer.text = Language.Get("CoinTaskWin_Btn_Receive"); |
| | | m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue)); |
| | | } |
| | | else |
| | | if (dungeonModel.dungeonResult.grade == 5) |
| | | { |
| | | m_AwardTimer.text = Language.Get("JadeDynastyRewardTime", Mathf.Clamp(seconds, 0, int.MaxValue)); |
| | | m_ExitTimer.text = Language.Get("DemonDungeonExit"); |
| | | } |
| | | else |
| | | { |
| | | m_AwardTimer.text = Language.Get("CoinTaskWin_Btn_Receive"); |
| | | m_ExitTimer.text = Language.Get("DungeonVictoryWin_Btn_Exit_1", Mathf.Clamp(seconds, 0, int.MaxValue)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | private void Award() |
| | | { |
| | | model.SetOpenJadeDynastyTowerWinDirty(); |
| | | model.RequestAward(); |
| | | |
| | | if (model.IsTopFloor(model.highestPassFloor)) |
| | | { |
| | | dungeonModel.ExitCurrentDungeon(); |
| | | } |
| | | else |
| | | { |
| | | ChallengeNextRuneTower(); |
| | | } |
| | | dungeonModel.ExitCurrentDungeon(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | public class TowerWin : Window |
| | | { |
| | | [SerializeField] Image m_BackGround; |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_RuneTower; |
| | | [SerializeField] FunctionButton m_JadeDynastyTower; |
| | |
| | | private void OpenRuneTower() |
| | | { |
| | | CloseSubWindows(); |
| | | m_BackGround.SetSprite("RuneTowerBg"); |
| | | WindowCenter.Instance.Open<RuneTowerWin>(true); |
| | | functionOrder = m_RuneTower.order; |
| | | } |
| | |
| | | private void OpenJadeDynastyTower() |
| | | { |
| | | CloseSubWindows(); |
| | | |
| | | m_BackGround.SetSprite("JadeDynastyTowerBg"); |
| | | WindowCenter.Instance.Open<JadeDynastyTowerWin>(true); |
| | | functionOrder = m_JadeDynastyTower.order; |
| | | } |
| | |
| | | [SerializeField] Text coolTimeText;
|
| | | [SerializeField] Button m_Puton;
|
| | | [SerializeField] Button m_BetterEquipDetail;
|
| | | [SerializeField] GameObject equipLvObj;
|
| | | [SerializeField] Text equipLvText;
|
| | |
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | BetterEquipGetModel model { get { return ModelCenter.Instance.GetModel<BetterEquipGetModel>(); } }
|
| | |
| | |
|
| | | private void ToOpenJadeDynastyKnapsack(ItemModel betterEquip)
|
| | | {
|
| | | var model = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>();
|
| | | model.SetLookItemModel(betterEquip.itemInfo.ItemGUID);
|
| | | var equipModel = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>();
|
| | | equipModel.SetLookItemModel(betterEquip.itemInfo.ItemGUID);
|
| | | model.ReportConfirmBetterEquip(model.currentEquipGuid);
|
| | | }
|
| | |
|
| | | private void ShowBetterEquipDetails()
|
| | |
| | | if (model.TryGetBetterEquip(model.currentEquipGuid, out betterEquip))
|
| | | {
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(betterEquip.itemInfo.ItemID);
|
| | | itemTipsModel.SetItemTipsModel(PackType.rptItem, betterEquip.itemInfo.ItemGUID);
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
|
| | | itemTipsModel.SetItemTipsModel(packType, betterEquip.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | m_FunctionTitle.text = Language.Get(itemConfig.ItemColor >= 3 ? "GoodEquip_See" : "GoodEquip_FitUp");
|
| | | m_EquipBehaviour.Init(betterModel, true);
|
| | | UpdateCoolTime(betterModel.itemInfo.ItemGUID);
|
| | |
|
| | | if(betterModel.packType == PackType.rptJadeDynastyItem && betterModel.chinItemModel.EquipPlace > 0)
|
| | | {
|
| | | equipLvObj.SetActive(true);
|
| | | string equipLvSB = Language.Get(StringUtility.Contact("Num_CHS_", betterModel.chinItemModel.LV));
|
| | | equipLvText.text = Language.Get("L1091", equipLvSB);
|
| | | }
|
| | | else
|
| | | {
|
| | | equipLvObj.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_Delay(string _guid)
|
| | |
| | | if (itemAttrData.isPreview)
|
| | | {
|
| | | legendCntPreview.gameObject.SetActive(true);
|
| | | |
| | | switch (itemAttrData.itemConfig.EquipPlace)
|
| | | {
|
| | | case 1:
|
| | |
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | case 121:
|
| | | case 122:
|
| | | case 123:
|
| | | case 124:
|
| | | case 125:
|
| | | case 126:
|
| | | case 127:
|
| | | case 128:
|
| | | case 129:
|
| | | case 130:
|
| | | case 131:
|
| | | case 132:
|
| | | legendCntPreview.text = itemTipsModel.GetEquipLegendAttrCntPreview(itemAttrData);
|
| | | break;
|
| | | case 101:
|
| | |
| | | case 104:
|
| | | case 105:
|
| | | legendCntPreview.text = itemTipsModel.GetDogzLegendAttrCntPreview(itemAttrData);
|
| | | break;
|
| | | }
|
| | |
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemAttrData.itemConfig.Type);
|
| | | switch(packType)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | | legendCntPreview.text = itemTipsModel.GetJadeDynastyAttrCntPreview(itemAttrData);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | jadeDynastySuitObj.SetActive(false);
|
| | | return;
|
| | | }
|
| | | curJadeDynastySuitAttr.SetDisplay(itemAttrData.packType,false,itemAttrData.itemConfig.EquipPlace);
|
| | | nextJadeDynastySuitAttr.SetDisplay(itemAttrData.packType, true, itemAttrData.itemConfig.EquipPlace);
|
| | |
|
| | | PackType packType = itemAttrData.packType == PackType.rptDeleted ? PackType.rptJadeDynastyItem : itemAttrData.packType;
|
| | |
|
| | | curJadeDynastySuitAttr.SetDisplay(packType,false,itemAttrData.itemConfig.EquipPlace,itemAttrData.itemId);
|
| | | nextJadeDynastySuitAttr.SetDisplay(packType, true, itemAttrData.itemConfig.EquipPlace,itemAttrData.itemId);
|
| | | }
|
| | |
|
| | | private void SetMidUIHeight(float midHeight)
|
| | |
| | |
|
| | | public int[] randomRuneIds { get; private set; }
|
| | | public int[] PeerlessEquipIds { get; private set; } //绝世装备列表
|
| | |
|
| | | |
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | ParseFuncConfig();
|
| | | ParseJadeDynastyEquipLegendAttr();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | |
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | #region 解析诛仙装备传奇属性
|
| | | public Dictionary<string, List<int>> jadeDynastyLegendCountDict { get; private set; } //key 阶数 +星级 随机条数
|
| | | public Dictionary<int, List<int>> jadeDynastyLegendGroupDict { get; private set; } //key 物品类型 群组列表
|
| | | public Dictionary<int, List<int>> jadeDynastyLegendIdDict { get; private set; } //key 群组id 属性Id列表
|
| | | public Dictionary<int, Dictionary<int, int>> jadeDynastyLegendColorDict { get; private set; } //key s属性id 属性value范围 颜色值
|
| | | public Dictionary<int, string> jadeDynastyColorDict { get; private set; } //key 色值类型
|
| | | public Dictionary<int, int> jadeDynastyLegendValueDict { get; private set; } //key 属性id 最大属性value
|
| | |
|
| | | private void ParseJadeDynastyEquipLegendAttr()
|
| | | {
|
| | | jadeDynastyColorDict = new Dictionary<int, string>();
|
| | | jadeDynastyLegendCountDict = new Dictionary<string, List<int>>();
|
| | | jadeDynastyLegendGroupDict = new Dictionary<int, List<int>>();
|
| | | jadeDynastyLegendColorDict = new Dictionary<int, Dictionary<int, int>>();
|
| | | jadeDynastyLegendIdDict = new Dictionary<int, List<int>>();
|
| | | jadeDynastyLegendValueDict = new Dictionary<int, int>();
|
| | | var legendAttrColor = Config.Instance.Get<FuncConfigConfig>("LegendAttrColor");
|
| | | JsonData colorData = JsonMapper.ToObject(legendAttrColor.Numerical4);
|
| | | foreach(var key in colorData.Keys)
|
| | | {
|
| | | int colorType = int.Parse(key);
|
| | | string color = colorData[key].ToString();
|
| | | jadeDynastyColorDict.Add(colorType,color);
|
| | | }
|
| | |
|
| | | JsonData legendColorData = JsonMapper.ToObject(legendAttrColor.Numerical3);
|
| | | foreach(var key in legendColorData.Keys)
|
| | | {
|
| | | int attrId = int.Parse(key);
|
| | | var colorDict = new Dictionary<int, int>();
|
| | | jadeDynastyLegendColorDict.Add(attrId,colorDict);
|
| | | var attrValueData = legendColorData[key];
|
| | | foreach(var value in attrValueData.Keys)
|
| | | {
|
| | | int attrValue = int.Parse(value);
|
| | | int colorType = int.Parse(attrValueData[value].ToString());
|
| | | colorDict.Add(attrValue,colorType);
|
| | | }
|
| | | }
|
| | |
|
| | | var legendAttrRandRule = Config.Instance.Get<FuncConfigConfig>("LegendAttrRandRule");
|
| | | JsonData legendCountData = JsonMapper.ToObject(legendAttrRandRule.Numerical3);
|
| | | foreach(var key in legendCountData.Keys)
|
| | | {
|
| | | var rangeData = legendCountData[key];
|
| | | int equipLv = int.Parse(key);
|
| | | foreach(var star in rangeData.Keys)
|
| | | {
|
| | | var countData = rangeData[star];
|
| | | int equipStar = int.Parse(star);
|
| | | string guid = StringUtility.Contact(equipLv,equipStar);
|
| | | List<int> list = new List<int>();
|
| | | jadeDynastyLegendCountDict.Add(guid,list);
|
| | | if(countData.IsArray)
|
| | | {
|
| | | for(int i = 0; i < countData.Count; i++)
|
| | | {
|
| | | int count = int.Parse(countData[i].ToString());
|
| | | list.Add(count);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | JsonData legendGroupData = JsonMapper.ToObject(legendAttrRandRule.Numerical2);
|
| | | foreach(var type in legendGroupData.Keys)
|
| | | {
|
| | | var groupData = legendGroupData[type];
|
| | | int itemType = int.Parse(type);
|
| | | List<int> list = new List<int>();
|
| | | jadeDynastyLegendGroupDict.Add(itemType,list);
|
| | | if(groupData.IsArray)
|
| | | {
|
| | | for(int i = 0; i < groupData.Count; i++)
|
| | | {
|
| | | int groupType = int.Parse(groupData[i].ToString());
|
| | | list.Add(groupType);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | JsonData legendIdData = JsonMapper.ToObject(legendAttrRandRule.Numerical1);
|
| | | foreach(var key in legendIdData.Keys)
|
| | | {
|
| | | var attrIdData = legendIdData[key];
|
| | | int groupId = int.Parse(key);
|
| | | List<int> list = new List<int>();
|
| | | jadeDynastyLegendIdDict.Add(groupId, list);
|
| | | if (attrIdData.IsArray)
|
| | | {
|
| | | for (int i = 0; i < attrIdData.Count; i++)
|
| | | {
|
| | | int attrId = int.Parse(attrIdData[i].ToString());
|
| | | list.Add(attrId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | JsonData legendValueData = JsonMapper.ToObject(legendAttrRandRule.Numerical4);
|
| | | foreach(var key in legendValueData.Keys)
|
| | | {
|
| | | int attrId = int.Parse(key);
|
| | | var valueData = legendValueData[key];
|
| | | if(valueData.IsArray && valueData.Count > 0)
|
| | | {
|
| | | int attrValue = int.Parse(valueData[0].ToString());
|
| | | jadeDynastyLegendValueDict.Add(attrId,attrValue);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetJadeDynastyLegendCount(int itemId,out int minCount,out int maxCount)
|
| | | {
|
| | | minCount = 0;
|
| | | maxCount = 0;
|
| | | var config = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (config == null) return false;
|
| | |
|
| | | int equipLv = config.LV;
|
| | | int equipStar = config.StarLevel;
|
| | | string guid = StringUtility.Contact(equipLv,equipStar);
|
| | | if(jadeDynastyLegendCountDict.ContainsKey(guid))
|
| | | {
|
| | | var list = jadeDynastyLegendCountDict[guid];
|
| | | if(list.Count > 1)
|
| | | {
|
| | | minCount = list[0];
|
| | | maxCount = list[1];
|
| | | return true;
|
| | | }
|
| | | else if(list.Count > 0)
|
| | | {
|
| | | maxCount = list[0];
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetJadeDynastyLegendAttr(int itemId,out Dictionary<int,int> attrDict)
|
| | | {
|
| | | attrDict = new Dictionary<int, int>();
|
| | | var config = Config.Instance.Get<ItemConfig>(itemId);
|
| | | if (config == null) return false;
|
| | |
|
| | | if(jadeDynastyLegendGroupDict.ContainsKey(config.Type))
|
| | | {
|
| | | var grouplist = jadeDynastyLegendGroupDict[config.Type];
|
| | | foreach(var groupId in grouplist)
|
| | | {
|
| | | if(jadeDynastyLegendIdDict.ContainsKey(groupId))
|
| | | {
|
| | | var attrIds = jadeDynastyLegendIdDict[groupId];
|
| | | foreach(var attrId in attrIds)
|
| | | {
|
| | | int attrValue = 0;
|
| | | if(jadeDynastyLegendValueDict.ContainsKey(attrId))
|
| | | {
|
| | | attrValue = jadeDynastyLegendValueDict[attrId];
|
| | | }
|
| | | attrDict.Add(attrId,attrValue);
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetJadeDyanastyLegendColorType(int attrId,int attrValue,out int colorType)
|
| | | {
|
| | | colorType = 0;
|
| | | if(jadeDynastyLegendColorDict.ContainsKey(attrId))
|
| | | {
|
| | | var colorRanges = jadeDynastyLegendColorDict[attrId];
|
| | | foreach(var key in colorRanges.Keys)
|
| | | {
|
| | | if (attrValue <= key)
|
| | | {
|
| | | colorType = colorRanges[key];
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetJadeDyanastyLegendColor(int colorType,out string color)
|
| | | {
|
| | | color = string.Empty;
|
| | | return jadeDynastyColorDict.TryGetValue(colorType,out color);
|
| | | }
|
| | |
|
| | | public int GetJadeDynastyLegendValue(int attrId)
|
| | | {
|
| | | int attrValue = 0;
|
| | | jadeDynastyLegendValueDict.TryGetValue(attrId,out attrValue);
|
| | | return attrValue;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #endregion
|
| | |
|
| | | /// <summary>
|
| | |
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.sell, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendSellQuest(ItemWinBtnType.sell, attrData); });
|
| | | }
|
| | | List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | if (dismantleReturnlist != null && dismantleReturnlist.Count > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.dismantle, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendDismantleQuest(ItemWinBtnType.dismantle, attrData); });
|
| | | }
|
| | | //List<int> dismantleReturnlist = attrData.GetUseDataModel((int)ItemUseDataKey.Def_IudetItemDecompound);
|
| | | //if (dismantleReturnlist != null && dismantleReturnlist.Count > 0)
|
| | | //{
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.dismantle, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendDismantleQuest(ItemWinBtnType.dismantle, attrData); });
|
| | | //}
|
| | |
|
| | | if (!isOverdue)
|
| | | {
|
| | | if (attrData.itemConfig.JumpComposeCondi != null && attrData.itemConfig.JumpComposeCondi.Length > 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) => {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.compose, (ItemWinBtnType, ItemAttrData) =>
|
| | | {
|
| | | int jumpId = 0;
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(attrData.itemId, out jumpId);
|
| | | if (isUnlock)
|
| | |
| | | });
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.Type == 25 && attrData.itemConfig.Effect1 == 225)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.inlay, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.ClickInlayBtn(ItemWinBtnType.inlay, attrData.guid); });
|
| | | }
|
| | | // if (attrData.itemConfig.Type == 25 && attrData.itemConfig.Effect1 == 225)
|
| | | // {
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.inlay, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.ClickInlayBtn(ItemWinBtnType.inlay, attrData.guid); });
|
| | | // }
|
| | |
|
| | | if (attrData.itemConfig.CanTrade == 1 && attrData.isBind == 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putAway, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutAwayQuest(ItemWinBtnType.putAway, attrData.guid); });
|
| | | }
|
| | | }
|
| | | // if (attrData.itemConfig.CanTrade == 1 && attrData.isBind == 0)
|
| | | // {
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.putAway, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutAwayQuest(ItemWinBtnType.putAway, attrData.guid); });
|
| | | // }
|
| | | //}
|
| | |
|
| | | if (attrData.count > 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.split, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.OnClickSplitBtn(ItemWinBtnType.split, attrData.guid); });
|
| | | }
|
| | | //if (attrData.count > 1)
|
| | | //{
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.split, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.OnClickSplitBtn(ItemWinBtnType.split, attrData.guid); });
|
| | | //}
|
| | |
|
| | | if (!isOverdue)
|
| | | {
|
| | | switch (attrData.winType)
|
| | | if (!isOverdue)
|
| | | {
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
|
| | | break;
|
| | | }
|
| | |
|
| | | if (attrData.itemConfig.UseTag == 1)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.makeUse, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendUseItemQuest(ItemWinBtnType.makeUse, attrData.index); });
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < ItemRenewalIds.Length; i++)
|
| | | {
|
| | | if (ItemRenewalIds[i] == attrData.itemId)
|
| | | {
|
| | | if (isOverdue)
|
| | | switch (attrData.winType)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendRenewalQuest(ItemWinBtnType.renewal, attrData.guid); });
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendPutOnQuest(ItemWinBtnType.putOn, attrData.guid); });
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | for (int i = 0; i < tryPutOnEquipIds.Length; i++)
|
| | | {
|
| | | if (tryPutOnEquipIds[i] == attrData.itemId)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.coinPointTotal <= 0)
|
| | | {
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FirstRecharge); });
|
| | | }
|
| | | //if (attrData.itemConfig.UseTag == 1)
|
| | | //{
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.makeUse, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendUseItemQuest(ItemWinBtnType.makeUse, attrData.index); });
|
| | | //}
|
| | | }
|
| | |
|
| | | //for (int i = 0; i < ItemRenewalIds.Length; i++)
|
| | | //{
|
| | | // if (ItemRenewalIds[i] == attrData.itemId)
|
| | | // {
|
| | | // if (isOverdue)
|
| | | // {
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { PackSendQuestMgr.Instance.SendRenewalQuest(ItemWinBtnType.renewal, attrData.guid); });
|
| | | // }
|
| | | // }
|
| | | //}
|
| | |
|
| | | //for (int i = 0; i < tryPutOnEquipIds.Length; i++)
|
| | | //{
|
| | | // if (tryPutOnEquipIds[i] == attrData.itemId)
|
| | | // {
|
| | | // if (PlayerDatas.Instance.baseData.coinPointTotal <= 0)
|
| | | // {
|
| | | // attrData.SetTipsFuncBtn(ItemWinBtnType.renewal, (ItemWinBtnType, ItemAttrData) => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FirstRecharge); });
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return s;
|
| | | }
|
| | |
|
| | | public string GetJadeDynastyAttrCntPreview(ItemAttrData attrData)
|
| | | {
|
| | | int minCount = 0;
|
| | | int maxCount = 0;
|
| | | TryGetJadeDynastyLegendCount(attrData.itemId,out minCount,out maxCount);
|
| | | string countSB = StringUtility.Contact(minCount,"-",maxCount);
|
| | | string s = Language.Get("LegendAttPreview_MightTitle", countSB);
|
| | | return s;
|
| | | }
|
| | |
|
| | | public string GetDogzLegendAttrCntPreview(ItemAttrData attrData)
|
| | | {
|
| | | string s = "";
|
| | |
| | | attrDict.Clear();
|
| | | int i = 0;
|
| | | attrSB.Length = 0;
|
| | |
|
| | | for (i = 0; i < idlist.Count; i++)
|
| | | {
|
| | | attrDict.Add(idlist[i], valuelist[i]);
|
| | | int attrId = idlist[i];
|
| | | int attrValue = valuelist[i];
|
| | | attrDict.Add(attrId,attrValue);
|
| | | }
|
| | |
|
| | | switch (itemConfig.EquipPlace)
|
| | |
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | idlist.Sort(CompareLegendAttrType);
|
| | | break;
|
| | | case 121:
|
| | | case 122:
|
| | | case 123:
|
| | |
| | | case 130:
|
| | | case 131:
|
| | | case 132:
|
| | | idlist.Sort(CompareLegendAttrType);
|
| | | idlist.Sort(CompareJadeDynastyLegendColorType);
|
| | | break;
|
| | | case 101:
|
| | | case 102:
|
| | |
| | |
|
| | | for (i = 0; i < idlist.Count; i++)
|
| | | {
|
| | | playerProModel = Config.Instance.Get<PlayerPropertyConfig>(idlist[i]);
|
| | | if (playerProModel != null)
|
| | | var attrId = idlist[i];
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
|
| | | switch(packType)
|
| | | {
|
| | | string s = "";
|
| | | if (playerProModel.Name.Contains("%s"))
|
| | | {
|
| | | if(!isPreview)
|
| | | {
|
| | | s = playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[idlist[i]]));
|
| | | }
|
| | | else
|
| | | {
|
| | | if(itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | {
|
| | | if (isCustom || itemConfig.StarLevel >= 3)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[idlist[i]])));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[idlist[i]])));
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if(isCustom)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[idlist[i]])));
|
| | | }
|
| | | else if(wingsLegendAttrCntPreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | int minValue = 0;
|
| | | int maxValue = 0;
|
| | | if(wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | if(wingsLegendAttrValuePreviewDict[itemConfig.LV].ContainsKey(idlist[i]))
|
| | | {
|
| | | List<int> attrValuelist = wingsLegendAttrValuePreviewDict[itemConfig.LV][idlist[i]];
|
| | | minValue = attrValuelist[0];
|
| | | maxValue = attrValuelist[attrValuelist.Count - 1];
|
| | | }
|
| | | }
|
| | | if(wingsLegendAttrCntPreviewDict[itemConfig.LV] > 1)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s",StringUtility.Contact("[",GetProValueTypeStr(playerProModel,minValue),"~", StringUtility.Contact(GetProValueTypeStr(playerProModel,maxValue)), "]")));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", StringUtility.Contact("[",GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)),"]")));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | }
|
| | | |
| | | }
|
| | | else
|
| | | {
|
| | | if(!isPreview)
|
| | | {
|
| | | s = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, attrDict[idlist[i]]);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | {
|
| | | if (isCustom || itemConfig.StarLevel >= 3)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[idlist[i]]));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[idlist[i]]));
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (isCustom)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name,"+", GetProValueTypeStr(playerProModel, attrDict[idlist[i]]));
|
| | | }
|
| | | else if (wingsLegendAttrCntPreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | int minValue = 0;
|
| | | int maxValue = 0;
|
| | | if (wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | if (wingsLegendAttrValuePreviewDict[itemConfig.LV].ContainsKey(idlist[i]))
|
| | | {
|
| | | List<int> attrValuelist = wingsLegendAttrValuePreviewDict[itemConfig.LV][idlist[i]];
|
| | | minValue = attrValuelist[0];
|
| | | maxValue = attrValuelist[attrValuelist.Count - 1];
|
| | | }
|
| | | }
|
| | | if (wingsLegendAttrCntPreviewDict[itemConfig.LV] > 1)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name,"[+", StringUtility.Contact(GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)),"]"));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name,"[+",StringUtility.Contact(GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)),"]"));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | switch (itemConfig.EquipPlace)
|
| | | {
|
| | | case 11:
|
| | | foreach (var key in wingsLegendAttrColorDict.Keys)
|
| | | {
|
| | | if (key == idlist[i])
|
| | | {
|
| | | foreach (var key2 in wingsLegendAttrColorDict[key].Keys)
|
| | | {
|
| | | if (attrDict[idlist[i]] < key2)
|
| | | {
|
| | | s = string.Format("<color=#{0}>{1}</color>", wingsLegendAttrColorDict[key][key2], s);
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 1:
|
| | | case 2:
|
| | | case 3:
|
| | | case 4:
|
| | | case 5:
|
| | | case 6:
|
| | | case 7:
|
| | | case 8:
|
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | case 121:
|
| | | case 122:
|
| | | case 123:
|
| | | case 124:
|
| | | case 125:
|
| | | case 126:
|
| | | case 127:
|
| | | case 128:
|
| | | case 129:
|
| | | case 130:
|
| | | case 131:
|
| | | case 132:
|
| | | s = GetTextColorByLegendType(GetLegendType(idlist[i]), s);
|
| | | break;
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | s = GetTextColorByLegendType(GetDogzLegendType(idlist[i]), s);
|
| | | break;
|
| | | }
|
| | |
|
| | | if (attrSB.Length <= 0)
|
| | | {
|
| | | attrSB.Append(s);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrSB.Append("\n" + s);
|
| | | }
|
| | |
|
| | | case PackType.rptJadeDynastyItem:
|
| | | SetJadeDynastyLengend(itemConfig,attrId);
|
| | | break;
|
| | | default:
|
| | | SetNormalPackLengend(itemConfig,attrId,isCustom,isPreview);
|
| | | break;
|
| | | }
|
| | | }
|
| | | return attrSB.ToString();
|
| | | }
|
| | |
|
| | | private void SetNormalPackLengend(ItemConfig itemConfig, int attrId, bool isCustom,bool isPreview)
|
| | | {
|
| | | playerProModel = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | if (playerProModel != null)
|
| | | {
|
| | | string s = "";
|
| | | if (playerProModel.Name.Contains("%s"))
|
| | | {
|
| | | if (!isPreview)
|
| | | {
|
| | | s = playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId]));
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | {
|
| | | if (isCustom || itemConfig.StarLevel >= 3)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (isCustom)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId])));
|
| | | }
|
| | | else if (wingsLegendAttrCntPreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | int minValue = 0;
|
| | | int maxValue = 0;
|
| | | if (wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | if (wingsLegendAttrValuePreviewDict[itemConfig.LV].ContainsKey(attrId))
|
| | | {
|
| | | List<int> attrValuelist = wingsLegendAttrValuePreviewDict[itemConfig.LV][attrId];
|
| | | minValue = attrValuelist[0];
|
| | | maxValue = attrValuelist[attrValuelist.Count - 1];
|
| | | }
|
| | | }
|
| | | if (wingsLegendAttrCntPreviewDict[itemConfig.LV] > 1)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name.Replace("%s", StringUtility.Contact("[", GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]")));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name.Replace("%s", StringUtility.Contact("[", GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]")));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!isPreview)
|
| | | {
|
| | | s = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, attrDict[attrId]);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (itemConfig.EquipPlace != (int)RoleEquipType.retWing)
|
| | | {
|
| | | if (isCustom || itemConfig.StarLevel >= 3)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (isCustom)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "+", GetProValueTypeStr(playerProModel, attrDict[attrId]));
|
| | | }
|
| | | else if (wingsLegendAttrCntPreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | int minValue = 0;
|
| | | int maxValue = 0;
|
| | | if (wingsLegendAttrValuePreviewDict.ContainsKey(itemConfig.LV))
|
| | | {
|
| | | if (wingsLegendAttrValuePreviewDict[itemConfig.LV].ContainsKey(attrId))
|
| | | {
|
| | | List<int> attrValuelist = wingsLegendAttrValuePreviewDict[itemConfig.LV][attrId];
|
| | | minValue = attrValuelist[0];
|
| | | maxValue = attrValuelist[attrValuelist.Count - 1];
|
| | | }
|
| | | }
|
| | | if (wingsLegendAttrCntPreviewDict[itemConfig.LV] > 1)
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Must"), playerProModel.Name, "[+", StringUtility.Contact(GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]"));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = StringUtility.Contact(Language.Get("LegendAttPreview_Might"), playerProModel.Name, "[+", StringUtility.Contact(GetProValueTypeStr(playerProModel, minValue), "~", StringUtility.Contact(GetProValueTypeStr(playerProModel, maxValue)), "]"));
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | switch (itemConfig.EquipPlace)
|
| | | {
|
| | | case 11:
|
| | | foreach (var key in wingsLegendAttrColorDict.Keys)
|
| | | {
|
| | | if (key == attrId)
|
| | | {
|
| | | foreach (var key2 in wingsLegendAttrColorDict[key].Keys)
|
| | | {
|
| | | if (attrDict[attrId] < key2)
|
| | | {
|
| | | s = string.Format("<color=#{0}>{1}</color>", wingsLegendAttrColorDict[key][key2], s);
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | | break;
|
| | | case 1:
|
| | | case 2:
|
| | | case 3:
|
| | | case 4:
|
| | | case 5:
|
| | | case 6:
|
| | | case 7:
|
| | | case 8:
|
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | s = GetTextColorByLegendType(GetLegendType(attrId), s);
|
| | | break;
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | s = GetTextColorByLegendType(GetDogzLegendType(attrId), s);
|
| | | break;
|
| | | }
|
| | |
|
| | | if (attrSB.Length <= 0)
|
| | | {
|
| | | attrSB.Append(s);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrSB.Append("\n" + s);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetJadeDynastyLengend(ItemConfig itemConfig, int attrId)
|
| | | {
|
| | | playerProModel = Config.Instance.Get<PlayerPropertyConfig>(attrId);
|
| | | if (playerProModel != null)
|
| | | {
|
| | | string s = "";
|
| | | if (playerProModel.Name.Contains("%s"))
|
| | | {
|
| | | s = playerProModel.Name.Replace("%s", GetProValueTypeStr(playerProModel, attrDict[attrId]));
|
| | | }
|
| | | else
|
| | | {
|
| | | s = playerProModel.Name + "+" + GetProValueTypeStr(playerProModel, attrDict[attrId]);
|
| | | }
|
| | | int colorType = 0;
|
| | | TryGetJadeDyanastyLegendColorType(attrId, attrDict[attrId],out colorType);
|
| | | s = GetTextColorByColorType(colorType,s);
|
| | |
|
| | | if (attrSB.Length <= 0)
|
| | | {
|
| | | attrSB.Append(s);
|
| | | }
|
| | | else
|
| | | {
|
| | | attrSB.Append("\n" + s);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private int CompareLegendAttrType(int start, int end)
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | private int CompareJadeDynastyLegendColorType(int start,int end)
|
| | | {
|
| | | int value1 = attrDict[start];
|
| | | int value2 = attrDict[end];
|
| | | int colorType1 = 0;
|
| | | int colorType2 = 0;
|
| | | TryGetJadeDyanastyLegendColorType(start,value1,out colorType1);
|
| | | TryGetJadeDyanastyLegendColorType(end,value2,out colorType2);
|
| | | if (colorType1.CompareTo(colorType2) != 0) return -colorType1.CompareTo(colorType2);
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | private int CompareDogzLegendAttrType(int start, int end)
|
| | | {
|
| | | int type1 = GetDogzLegendType(start);
|
| | | int type2 = GetDogzLegendType(end);
|
| | | if (type1.CompareTo(type2) != 0) return type1.CompareTo(type2);
|
| | | if (type1.CompareTo(type2) != 0) return -type1.CompareTo(type2);
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
| | |
|
| | | }
|
| | | return msg;
|
| | | }
|
| | |
|
| | | private string GetTextColorByColorType(int colorType, string msg)
|
| | | {
|
| | | string colorSB = string.Empty;
|
| | | TryGetJadeDyanastyLegendColor(colorType,out colorSB);
|
| | | string s = StringUtility.Contact("<color=#",colorSB,">",msg, "</color>");
|
| | | return s;
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | SetDogzEquipLegendAttrPreview(out legendIdlist, out legendValuelist);
|
| | | break;
|
| | | }
|
| | |
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
|
| | | switch(packType)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | | SetJadeDynastyEquipLegendAttrPreview(out legendIdlist,out legendValuelist);
|
| | | break;
|
| | | }
|
| | |
|
| | | if(legendIdlist != null && legendValuelist != null)
|
| | | {
|
| | | if (legendIdlist.Count == legendValuelist.Count)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void SetJadeDynastyEquipLegendAttrPreview(out List<int> legendIdlist, out List<int> legendValuelist)
|
| | | {
|
| | | Dictionary<int, int> attrDict = null;
|
| | | itemTipsModel.TryGetJadeDynastyLegendAttr(itemId,out attrDict);
|
| | | legendIdlist = attrDict.Keys.ToList();
|
| | | legendValuelist = attrDict.Values.ToList();
|
| | | }
|
| | |
|
| | | private StringBuilder _extraInfoBuider = new StringBuilder();
|
| | | private StringBuilder _allInfoDesBuider = new StringBuilder();
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type);
|
| | | switch (packType)
|
| | | {
|
| | | case PackType.rptJadeDynastyItem:
|
| | | CalculateJadeDynastyLegendAttr(itemConfig,out legendIdlist, out legendValuelist);
|
| | | break;
|
| | | }
|
| | |
|
| | | if (legendIdlist.Count == legendValuelist.Count)
|
| | | {
|
| | | SetLegendData(legendIdlist, legendValuelist);
|
| | |
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | | private void CalculateJadeDynastyLegendAttr(ItemConfig itemConfig, out List<int> legendIdlist, out List<int> legendValuelist)
|
| | | {
|
| | | Dictionary<int, int> attrDict = null;
|
| | | itemTipsModel.TryGetJadeDynastyLegendAttr(itemConfig.ID,out attrDict);
|
| | | legendIdlist = attrDict.Keys.ToList();
|
| | | legendValuelist = attrDict.Values.ToList();
|
| | | }
|
| | |
|
| | | #region 预览定制属性逻辑处理
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | ItemModel equipItemModel = null;
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptEquip);
|
| | | int putOnScore = 0;
|
| | | if (model.chinItemModel.EquipPlace != 9)
|
| | | {
|
| | | if (singlePack != null)
|
| | | {
|
| | | equipItemModel = singlePack.GetItemModelByIndex(model.chinItemModel.EquipPlace);
|
| | | if (equipItemModel != null)
|
| | | {
|
| | | putOnScore = equipItemModel.equipScore;
|
| | | }
|
| | |
|
| | | if (CheckIsBetterEquip(model.equipScore, putOnScore))
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= 200)
|
| | | int isFightUp = IsFightUp(model.itemId,model.equipScore);
|
| | | int equipPlace = model.chinItemModel.EquipPlace;
|
| | | if (isFightUp == 1)
|
| | | {
|
| | | switch(equipPlace)
|
| | | {
|
| | | case 9:
|
| | | break;
|
| | | default:
|
| | | if(model.packType == PackType.rptItem)
|
| | | {
|
| | | if (model.EquipPlace > (int)RoleEquipType.retWeapon2 && model.EquipPlace < (int)RoleEquipType.retNeck)
|
| | | var equipItemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, model.chinItemModel.EquipPlace);
|
| | | if (PlayerDatas.Instance.baseData.LV >= 200)
|
| | | {
|
| | | if (equipItemModel != null && equipItemModel.chinItemModel.ItemColor > model.chinItemModel.ItemColor)
|
| | | if (model.EquipPlace > (int)RoleEquipType.retWeapon2 && model.EquipPlace < (int)RoleEquipType.retNeck)
|
| | | {
|
| | | return;
|
| | | if (equipItemModel != null && equipItemModel.chinItemModel.ItemColor > model.chinItemModel.ItemColor)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if (RefreshGetBetterEquipEvent != null)
|
| | | {
|
| | | RefreshGetBetterEquipEvent(model.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | |
|
| | | break;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (singlePack != null)
|
| | | if (RefreshGetBetterEquipEvent != null)
|
| | | {
|
| | | equipItemModel = singlePack.GetItemModelByIndex(model.chinItemModel.EquipPlace);
|
| | | if (equipItemModel != null)
|
| | | {
|
| | | putOnScore = equipItemModel.equipScore;
|
| | | }
|
| | | bool isbetter = CheckIsBetterEquip(model.equipScore, putOnScore);
|
| | | if (!isbetter)
|
| | | {
|
| | | equipItemModel = singlePack.GetItemModelByIndex(10);
|
| | | putOnScore = equipItemModel == null ? 0 : equipItemModel.equipScore;
|
| | | isbetter = CheckIsBetterEquip(model.equipScore, putOnScore);
|
| | | }
|
| | |
|
| | | if (isbetter)
|
| | | {
|
| | | if (RefreshGetBetterEquipEvent != null)
|
| | | {
|
| | | RefreshGetBetterEquipEvent(model.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | | RefreshGetBetterEquipEvent(model.itemInfo.ItemGUID);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | putOnModel2 = playerPack.GetItemModelByIndex(PackType.rptJadeDynastyEquip, (int)RoleEquipType.JadeDynasty_Ring2);
|
| | | break;
|
| | | }
|
| | | if (putOnModel2 != null)
|
| | |
|
| | | switch ((RoleEquipType)chinItemModel.EquipPlace)
|
| | | {
|
| | | if (putOnModel != null)
|
| | | {
|
| | | if (putOnModel2.equipScore < putOnModel.equipScore)
|
| | | case RoleEquipType.retFairyCan:
|
| | | case RoleEquipType.JadeDynasty_Glove1:
|
| | | case RoleEquipType.JadeDynasty_Ring1:
|
| | | if (putOnModel2 != null)
|
| | | {
|
| | | if (putOnModel != null)
|
| | | {
|
| | | if (putOnModel2.equipScore < putOnModel.equipScore)
|
| | | {
|
| | | putOnModel = putOnModel2;
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | putOnModel = putOnModel2;
|
| | | }
|
| | | }
|
| | | break;
|
| | | }
|
| | |
|
| | | int equipScore1 = 0;
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (sendItemModel.chinItemModel.EquipPlace >= (int)RoleEquipType.JadeDynasty_Cloak
|
| | | && sendItemModel.chinItemModel.EquipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | if(sendItemModel.packType == PackType.rptJadeDynastyItem)
|
| | | {
|
| | | var jadeDynastyModel = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>();
|
| | | bool islock = jadeDynastyModel.IsLockEquipPlace(sendItemModel.chinItemModel.EquipPlace);
|
| | | if (islock)
|
| | | if (equipPlace >= (int)RoleEquipType.JadeDynasty_Cloak
|
| | | && equipPlace <= (int)RoleEquipType.JadeDynasty_Sword4)
|
| | | {
|
| | | int towerlayer = 0;
|
| | | jadeDynastyModel.TryGetLockTowerLayer(sendItemModel.chinItemModel.EquipPlace, out towerlayer);
|
| | | SysNotifyMgr.Instance.ShowTip("JadeDynastyEquip", towerlayer);
|
| | | var jadeDynastyModel = ModelCenter.Instance.GetModel<JadeDynastyEquipModel>();
|
| | | bool islock = jadeDynastyModel.IsLockEquipPlace(equipPlace);
|
| | | if (islock)
|
| | | {
|
| | | int towerlayer = 0;
|
| | | jadeDynastyModel.TryGetLockTowerLayer(equipPlace, out towerlayer);
|
| | | SysNotifyMgr.Instance.ShowTip("JadeDynastyEquip", towerlayer);
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | if (sendItemModel != null && sendItemModel.itemInfo.IsBind == 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("JadeDynastyEquip5"), (bool isOk) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | SendPutOnQuest(equipPlace, itemIndex);
|
| | | }
|
| | | });
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | if (sendItemModel != null && sendItemModel.itemInfo.IsBind == 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("JadeDynastyEquip5"),(bool isOk)=>
|
| | | {
|
| | | if(isOk)
|
| | | {
|
| | | SendPutOnQuest(equipPlace, itemIndex);
|
| | | }
|
| | | });
|
| | | return;
|
| | | }
|
| | |
|
| | | SendPutOnQuest(equipPlace, itemIndex);
|
| | |
| | | }
|
| | | public void SendSplitQuest(string guid,int splitCount)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null) return;
|
| | | if (string.IsNullOrEmpty(guid)) return;
|
| | |
|
| | | ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if (itemModel == null || itemModel.packType != PackType.rptItem) return;
|
| | |
|
| | | if (playerPack.GetReaminGridCount(PackType.rptItem) < 1)
|
| | | if (itemModel == null) return;
|
| | | var packType = GeneralDefine.GetPackTypeByItemType(itemModel.chinItemModel.Type);
|
| | | var singlePack = playerPack.GetSinglePackModel(packType);
|
| | | if (playerPack.GetReaminGridCount(packType) < 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_998371");
|
| | | SysNotifyMgr.Instance.ShowTip("GeRen_chenxin_676165",packType);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public class FairyWearWin : Window
|
| | | {
|
| | | #region 成员变量
|
| | | [SerializeField] Image wear01Img;
|
| | | [SerializeField] Image wear02Img;
|
| | | private Button _closeBtn;
|
| | | private Button _wear01Btn;
|
| | | private Button _wear02Btn;
|
| | |
| | | curItemModel = PackSendQuestMgr.Instance.sendItemModel;
|
| | | if(curItemModel != null)
|
| | | {
|
| | | switch(curItemModel.packType)
|
| | | wear01Img.SetSprite(StringUtility.Contact("EquipPlace_",curItemModel.chinItemModel.EquipPlace));
|
| | | wear02Img.SetSprite(StringUtility.Contact("EquipPlace_", curItemModel.chinItemModel.EquipPlace));
|
| | | switch (curItemModel.packType)
|
| | | {
|
| | | case PackType.rptItem:
|
| | | _itemModel01 = playerPack.GetItemModelByIndex(PackType.rptEquip,(int)RoleEquipType.retFairyCan);
|
| | |
| | | using UnityEngine.EventSystems;
|
| | | using Snxxz.UI;
|
| | |
|
| | | namespace Snxxz.UI {
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class RoleEquipWin : Window
|
| | | {
|
| | |
| | | private Text _timeDown;
|
| | | [SerializeField] UIEffect STREffect;
|
| | | [SerializeField] UIEffect StarsEffect;
|
| | | [SerializeField] Button m_JadeDynasty;
|
| | | #endregion
|
| | |
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack
|
| | | {
|
| | | PlayerPackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
| | | }
|
| | |
|
| | |
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel
|
| | | {
|
| | | get
|
| | | {
|
| | | ItemTipsModel itemTipsModel {
|
| | | get {
|
| | | return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>());
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | PackModelInterface _modelInterface;
|
| | | PackModelInterface modelInterface
|
| | | {
|
| | | PackModelInterface modelInterface {
|
| | | get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
|
| | | }
|
| | | private bool isUpdatePlayerLv;
|
| | |
| | | {
|
| | | _oneKeySellBtn.onClick.AddListener(OnClickOneKeySell);
|
| | | _sortBtn.onClick.AddListener(() => { OnClickSortBtn(); });
|
| | | m_JadeDynasty.SetListener(() => { WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.JadeDynastyEquip292); });
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | |
|
| | | SuccessConfig successConfig = Config.Instance.Get<SuccessConfig>(AchievementGoto.guideAchievementId);
|
| | | if(successConfig != null && successConfig.Type == 95)
|
| | | if (successConfig != null && successConfig.Type == 95)
|
| | | {
|
| | | playerPack.SetJumpToOneKeySell(_oneKeySellBtn.transform);
|
| | | }
|
| | |
|
| | | if(playerPack.IsActiveStarAttr())
|
| | | if (playerPack.IsActiveStarAttr())
|
| | | {
|
| | | ControlEffect(1,true);
|
| | | ControlEffect(1, true);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | |
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | public void UpdateRoleEquip(int equipPlace)
|
| | | {
|
| | | for(int i = 0; i < equipPlaces.Count; i++)
|
| | | for (int i = 0; i < equipPlaces.Count; i++)
|
| | | {
|
| | | var placeCell = equipPlaces[i];
|
| | | if ((int)placeCell.equipType == equipPlace)
|
| | |
| | | }
|
| | |
|
| | |
|
| | | public void PutOnEquip(PackType type,int index, int Id)
|
| | | public void PutOnEquip(PackType type, int index, int Id)
|
| | | {
|
| | | //临时条件判断
|
| | | if (type != PackType.rptEquip) return;
|
| | |
| | | UpdateRoleEquip(index);
|
| | | }
|
| | |
|
| | | public void PutOffEquip(PackType type, int place,int id)
|
| | | public void PutOffEquip(PackType type, int place, int id)
|
| | | {
|
| | | if (type != PackType.rptEquip) return;
|
| | |
|
| | |
| | | {
|
| | | WindowCenter.Instance.Open<PlayerStarNumWin>();
|
| | | }
|
| | | |
| | |
|
| | | public void OnClickSortBtn()
|
| | | {
|
| | | modelInterface.SendPackResetQuest(PackType.rptItem);
|
| | |
| | | _timeDown.text = Language.Get("BagWin_SortCDbtn_Text_1", 5);
|
| | | _sortImage.SetSprite("BlackBtn");
|
| | | _sortBtn.enabled = false;
|
| | | |
| | |
|
| | | }
|
| | |
|
| | | private void RefreshTime(float time)
|
| | | {
|
| | | |
| | |
|
| | | if (time <= 0)
|
| | | {
|
| | | _sortImage.SetSprite("SecondBtn1");
|
| | |
| | | _timeDown.text = Language.Get("BagWin_SortCDbtn_Text_1", time);
|
| | | _sortBtn.enabled = false;
|
| | | }
|
| | | |
| | |
|
| | | }
|
| | | public void OnFrenshBagInfo()
|
| | | {
|
| | |
| | | public void InitPanel() |
| | | { |
| | | ItemModel itemModel = playerPack.GetItemModelByGUID(itemTipsModel.curAttrData.guid); |
| | | if (itemModel == null || itemModel.packType != PackType.rptItem) |
| | | if (itemModel == null) |
| | | return; |
| | | |
| | | _itemCell.Init(itemModel); |
| | |
| | | [SerializeField] Image m_BackGround;
|
| | | [SerializeField] RectTransform m_AndroidProgressContainer;
|
| | | [SerializeField] SmoothSlider m_PartProgressSlider;
|
| | | [SerializeField] Text m_PartProgress;
|
| | | [SerializeField] SmoothSlider m_TotalProgressSlider;
|
| | | [SerializeField] Text m_TotalProgress;
|
| | | [SerializeField] Text m_StageDescription;
|
| | | [SerializeField] RectTransform m_IosProgressContainer;
|
| | | [SerializeField] Text m_IosProgressTip;
|
| | |
| | | bool assetBuildTimeShowed = false;
|
| | |
|
| | | Launch.LaunchStage showStage = Launch.LaunchStage.None;
|
| | | int showStep = 0;
|
| | | string stepDescription = string.Empty;
|
| | |
|
| | | float backGroundTimer = 0f;
|
| | |
| | | {
|
| | | backGroundTimer = 0f;
|
| | | backGroundIndex = 0;
|
| | | m_TotalProgressSlider.ResetValue(0f);
|
| | | if (m_TotalProgressSlider != null)
|
| | | {
|
| | | m_TotalProgressSlider.ResetValue(0f);
|
| | | }
|
| | |
|
| | | m_AlphaTween.SetStartState();
|
| | |
|
| | | m_Version.text = StringUtility.Contact(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex);
|
| | |
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if (m_TotalProgressSlider == null)
|
| | | {
|
| | | m_TotalProgressSlider = this.GetComponentInChildren<SmoothSlider>(true);
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | public void FadeOut()
|
| | |
| | | m_AlphaTween.Play();
|
| | | }
|
| | |
|
| | | string GetLaunchStageDescription(Launch.LaunchStage _stage)
|
| | | string GetLaunchStageDescription(Launch.LaunchStage _stage, int step)
|
| | | {
|
| | | switch (_stage)
|
| | | {
|
| | | case Launch.LaunchStage.SDKInit:
|
| | | return Language.GetFromLocal(36);
|
| | | case Launch.LaunchStage.AssetCopy:
|
| | | return Language.GetFromLocal(37);
|
| | | return StringUtility.Contact(Language.GetFromLocal(37), "(", step, ")");
|
| | | case Launch.LaunchStage.AssetDecompress:
|
| | | return StringUtility.Contact(Language.GetFromLocal(38), "(", step, ")");
|
| | | case Launch.LaunchStage.ClientVersion:
|
| | | return Language.GetFromLocal(38);
|
| | | case Launch.LaunchStage.CheckAsset:
|
| | | return Language.GetFromLocal(39);
|
| | | case Launch.LaunchStage.DownLoad:
|
| | | case Launch.LaunchStage.CheckAsset:
|
| | | return Language.GetFromLocal(40);
|
| | | case Launch.LaunchStage.AssetBundleInit:
|
| | | case Launch.LaunchStage.DownLoad:
|
| | | return Language.GetFromLocal(41);
|
| | | case Launch.LaunchStage.ConfigInit:
|
| | | case Launch.LaunchStage.AssetBundleInit:
|
| | | return Language.GetFromLocal(42);
|
| | | case Launch.LaunchStage.ConfigInit:
|
| | | return StringUtility.Contact(Language.GetFromLocal(43), "(", step, ")");
|
| | | case Launch.LaunchStage.Complete:
|
| | | return Language.GetFromLocal(43);
|
| | | return Language.GetFromLocal(44);
|
| | | default:
|
| | | return "";
|
| | | }
|
| | |
| | | else
|
| | | {
|
| | | var progressInfo = Launch.progressInfo;
|
| | | m_TotalProgressSlider.value = progressInfo.totalProgress;
|
| | | m_TotalProgress.text = StringUtility.Contact(Mathf.RoundToInt(progressInfo.totalProgress * 100), "%");
|
| | |
|
| | | if (progressInfo.stage == Launch.LaunchStage.DownLoad)
|
| | | {
|
| | | if (m_PartProgressSlider.gameObject.activeInHierarchy)
|
| | | if (m_PartProgressSlider != null && m_PartProgressSlider.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_PartProgressSlider.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (m_TotalProgressSlider != null && m_TotalProgressSlider.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_TotalProgressSlider.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (!m_PartProgressSlider.gameObject.activeInHierarchy)
|
| | | if (m_PartProgressSlider != null && !m_PartProgressSlider.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_PartProgressSlider.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | m_PartProgressSlider.value = progressInfo.partProgress;
|
| | | m_PartProgress.text = StringUtility.Contact(Mathf.RoundToInt(progressInfo.partProgress * 100), "%");
|
| | | if (m_TotalProgressSlider != null && !m_TotalProgressSlider.gameObject.activeInHierarchy)
|
| | | {
|
| | | m_TotalProgressSlider.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | if (m_TotalProgressSlider != null)
|
| | | {
|
| | | m_TotalProgressSlider.value = progressInfo.totalProgress;
|
| | | }
|
| | |
|
| | | if (m_PartProgressSlider != null)
|
| | | {
|
| | | m_PartProgressSlider.value = progressInfo.partProgress;
|
| | | }
|
| | | }
|
| | |
|
| | | DisplayStageDescription(progressInfo.stage);
|
| | | DisplayStageDescription(progressInfo.stage, progressInfo.step);
|
| | |
|
| | | if (!assetBuildTimeShowed && AssetVersionUtility.assetsBuildTime != DateTime.MinValue)
|
| | | {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void DisplayStageDescription(Launch.LaunchStage stage)
|
| | | private void DisplayStageDescription(Launch.LaunchStage stage, int step)
|
| | | {
|
| | | if (showStage != stage)
|
| | | if (showStage != stage || showStep != step)
|
| | | {
|
| | | showStage = stage;
|
| | | m_StageDescription.text = GetLaunchStageDescription(stage);
|
| | | showStep = step;
|
| | | if (m_StageDescription != null)
|
| | | {
|
| | | m_StageDescription.text = GetLaunchStageDescription(stage, step);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public void SetServerListPlayer(ServerInfoPlayer serverInfoPlayer)
|
| | | {
|
| | | this.serverInfoPlayer = serverInfoPlayer;
|
| | | ProcessRecentServerData();
|
| | | FiltrateDefaultServerAndServerGroup();
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f3a0fba6f1cadae4daf7933f5582bf9a |
| | | folderAsset: yes |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | |
| | | public class NewYearCeremonyCoolTime : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Text m_Time;
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
|
| | | RefreshSecond();
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
|
| | | }
|
| | |
|
| | | private void RefreshSecond()
|
| | | {
|
| | | int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
|
| | | if (seconds > 0)
|
| | | {
|
| | | m_Time.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Time.text = UIHelper.AppendStringColor(TextColType.Red, Language.Get("XMZZ110"));
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8abee5598b1e21a4ab77bb56d3d2f267 |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class NewYearCeremonyFirepartyWin : Window
|
| | | {
|
| | | [SerializeField] Button buyBtn;
|
| | | [SerializeField] Text buyPriceText;
|
| | | [SerializeField] Text remainTimeText;
|
| | | [SerializeField] CommonItemBaisc fireItem;
|
| | | [SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>();
|
| | | |
| | | List<FairylandCeremonyModel.AwardItem> itemlist;
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } }
|
| | |
|
| | | StoreConfig storeConfig;
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | buyBtn.AddListener(ClickBuy);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
|
| | | itemlist = ceremonyModel.GetFireAwardlist();
|
| | | Init();
|
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void Init()
|
| | | {
|
| | | storeConfig = ceremonyModel.GetFireIdByLv();
|
| | | if (storeConfig == null) return;
|
| | |
|
| | | buyPriceText.text = storeConfig.MoneyNumber.ToString();
|
| | | ItemCellModel fireModel = new ItemCellModel(storeConfig.ItemID,true,(ulong)storeConfig.ItemCnt,storeConfig.IsBind);
|
| | | fireItem.Init(fireModel);
|
| | | fireItem.cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(storeConfig.ItemID,true, (ulong)storeConfig.ItemCnt,-1,storeConfig.IsBind);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | |
|
| | | if (itemlist == null) return;
|
| | |
|
| | | for (int i = 0; i < itemBaiscs.Count; i++)
|
| | | {
|
| | | if (i < itemlist.Count)
|
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | RefreshSecond();
|
| | | }
|
| | |
|
| | | private void RefreshSecond()
|
| | | {
|
| | | int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
|
| | | if (seconds > 0)
|
| | | {
|
| | | remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
|
| | | }
|
| | | else
|
| | | {
|
| | | remainTimeText.text = UIHelper.AppendStringColor(TextColType.Red, Language.Get("XMZZ110"));
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickBuy()
|
| | | {
|
| | | if(playerPack.GetReaminGridCount(PackType.rptItem) < 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | return;
|
| | | }
|
| | | storeModel.OnClickShopCell(storeConfig);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 866275db997a2bf4d8fcf2d2b153cad5 |
| | | timeCreated: 1548402738 |
| | | 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;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class NewYearCeremonyOutOfPrintWin : Window
|
| | | {
|
| | | [SerializeField] Text firstNameText;
|
| | | [SerializeField] Text secondNameText;
|
| | | [SerializeField] Text thirdNameText;
|
| | | [SerializeField] Text remainTimeText;
|
| | | [SerializeField] List<UIEffect> rankEffectlist = new List<UIEffect>();
|
| | | [SerializeField] List<CommonItemBaisc> firstItemlist = new List<CommonItemBaisc>();
|
| | | [SerializeField] List<CommonItemBaisc> secondItemlist = new List<CommonItemBaisc>();
|
| | | [SerializeField] List<CommonItemBaisc> thirdItemlist = new List<CommonItemBaisc>();
|
| | |
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | | KingFairyModel kingFairyModel { get { return ModelCenter.Instance.GetModel<KingFairyModel>(); } }
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
|
| | | PlayerDatas.Instance.rank.OnRefreshRank += OnRefreshRankList;
|
| | | Init();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
|
| | | PlayerDatas.Instance.rank.OnRefreshRank -= OnRefreshRankList;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void Init()
|
| | | {
|
| | | ceremonyModel.SendGetRankInfo(PlayerRankData.RankType.Def_BT_FCCostGold);
|
| | | SetRankAward(firstItemlist,ceremonyModel.GetRankAwardByLv(1));
|
| | | SetRankAward(secondItemlist, ceremonyModel.GetRankAwardByLv(2));
|
| | | SetRankAward(thirdItemlist, ceremonyModel.GetRankAwardByLv(3));
|
| | | RefreshRankInfo();
|
| | | RefreshSecond();
|
| | | }
|
| | |
|
| | |
|
| | | private void OnRefreshRankList(int type)
|
| | | {
|
| | | if (type != (int)PlayerRankData.RankType.Def_BT_FCCostGold) return;
|
| | |
|
| | | RefreshRankInfo();
|
| | | }
|
| | |
|
| | | private void RefreshRankInfo()
|
| | | {
|
| | | List<PlayerRankData.RankData> list = PlayerDatas.Instance.rank.GetRankList((int)PlayerRankData.RankType.Def_BT_FCCostGold);
|
| | | firstNameText.text = Language.Get("CeremoneyOutOfPrint");
|
| | | secondNameText.text = Language.Get("CeremoneyOutOfPrint");
|
| | | thirdNameText.text = Language.Get("CeremoneyOutOfPrint");
|
| | |
|
| | | if (list != null)
|
| | | {
|
| | | if (list.Count > 0)
|
| | | {
|
| | | firstNameText.text = list[0].Name1;
|
| | | SetRankEffect(0,(int)list[0].ID);
|
| | | }
|
| | |
|
| | | if (list.Count > 1)
|
| | | {
|
| | | secondNameText.text = list[1].Name1;
|
| | | SetRankEffect(1, (int)list[1].ID);
|
| | | }
|
| | |
|
| | | if (list.Count > 2)
|
| | | {
|
| | | thirdNameText.text = list[2].Name1;
|
| | | SetRankEffect(2, (int)list[2].ID);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetRankEffect(int rank,int playerId)
|
| | | {
|
| | | for(int i = 0; i < rankEffectlist.Count; i++)
|
| | | {
|
| | | if(rank == i && playerId == PlayerDatas.Instance.baseData.PlayerID)
|
| | | {
|
| | | if(!rankEffectlist[i].IsPlaying)
|
| | | {
|
| | | rankEffectlist[i].Play();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (rankEffectlist[i].IsPlaying)
|
| | | {
|
| | | rankEffectlist[i].Stop();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshSecond()
|
| | | {
|
| | | int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
|
| | | if(seconds > 0)
|
| | | {
|
| | | remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
|
| | | }
|
| | | else
|
| | | {
|
| | | remainTimeText.text = UIHelper.AppendStringColor(TextColType.Red,Language.Get("XMZZ110"));
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void SetRankAward(List<CommonItemBaisc> baiscs,List<FairylandCeremonyModel.AwardItem> list)
|
| | | {
|
| | | if (list == null) return;
|
| | |
|
| | | for (int i = 0; i < baiscs.Count; i++)
|
| | | {
|
| | | if (i < list.Count)
|
| | | {
|
| | | baiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = list[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind);
|
| | | baiscs[i].Init(cellModel);
|
| | | baiscs[i].cellBtn.RemoveAllListeners();
|
| | | baiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | switch(itemData.itemId)
|
| | | {
|
| | | case 2278:
|
| | | kingFairyModel.ViewKingFairyChest(itemData.itemId,itemData.itemCount,itemData.isBind);
|
| | | break;
|
| | | default:
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount, -1, itemData.isBind);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | break;
|
| | | }
|
| | | |
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | baiscs[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5deef7fb5ed08b64ab02e4eada93b8ae |
| | | timeCreated: 1548402738 |
| | | 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;
|
| | | using System.Collections.Generic;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class NewYearCeremonyPeopleToHiWin : Window
|
| | | {
|
| | | [SerializeField] ScrollerController awardCtrl;
|
| | | [SerializeField] ScrollerController taskCtrl;
|
| | | [SerializeField] Text hiPointText;
|
| | |
|
| | | List<AllPeoplePartyConfig> taskConfigs;
|
| | | List<AllPeoplePartyAwardConfig> awardConfigs;
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | |
|
| | | int presentAwardIndex = 0;
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | | awardCtrl.OnRefreshCell += RefreshAwardCell;
|
| | | taskCtrl.OnRefreshCell += RefreshTaskCell;
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | ceremonyModel.RefreshHiAwardStateAct += CreateAwardCell;
|
| | | Init();
|
| | | }
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | ceremonyModel.RefreshHiAwardStateAct -= CreateAwardCell;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void Init()
|
| | | {
|
| | | hiPointText.text = ceremonyModel.sumHiPoint.ToString();
|
| | | ceremonyModel.IsPeopleAwardRecive(out presentAwardIndex);
|
| | | taskConfigs = ceremonyModel.GetPeoplePartTasklist();
|
| | | awardConfigs = ceremonyModel.GetPeoplePartAwardlist();
|
| | | CreateAwardCell();
|
| | | CreateTaskCell();
|
| | | taskCtrl.JumpIndex(0);
|
| | | awardCtrl.JumpIndex(presentAwardIndex - 1 < 0 ? 0 : presentAwardIndex - 1);
|
| | | }
|
| | |
|
| | | private void CreateTaskCell()
|
| | | {
|
| | | if (taskCtrl.GetNumberOfCells(taskCtrl.m_Scorller) > 0)
|
| | | {
|
| | | taskCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | else
|
| | | {
|
| | | taskCtrl.Refresh();
|
| | | for(int i = 0; i < taskConfigs.Count; i++)
|
| | | {
|
| | | taskCtrl.AddCell(ScrollerDataType.Header,i);
|
| | | }
|
| | | taskCtrl.Restart();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshTaskCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | ToHiTaskCell taskCell = cell.GetComponent<ToHiTaskCell>();
|
| | | if (taskCell == null) return;
|
| | |
|
| | | taskCell.Init(taskConfigs[cell.index]);
|
| | | }
|
| | |
|
| | | private void CreateAwardCell()
|
| | | {
|
| | | if (awardCtrl.GetNumberOfCells(awardCtrl.m_Scorller) > 0)
|
| | | {
|
| | | awardCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | | else
|
| | | {
|
| | | awardCtrl.Refresh();
|
| | | for (int i = 0; i < awardConfigs.Count; i++)
|
| | | {
|
| | | awardCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | awardCtrl.Restart();
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshAwardCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | ToHiAwardCell awardCell = cell.GetComponent<ToHiAwardCell>();
|
| | | if (awardCell == null) return;
|
| | |
|
| | | awardCell.Init(awardConfigs[cell.index]);
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b9e35057c68b73e4fac1ec49cc70afab |
| | | timeCreated: 1548402738 |
| | | 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;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class NewYearCeremonyRechargeGiftWin : Window
|
| | | {
|
| | | [SerializeField] Button receiveBtn;
|
| | | [SerializeField] Button rechargeBtn;
|
| | | [SerializeField] Text receiveBtnText;
|
| | | [SerializeField] Image receiveBtnImg;
|
| | | [SerializeField] Text remainTimeText;
|
| | | [SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>();
|
| | |
|
| | | List<FairylandCeremonyModel.AwardItem> itemlist;
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | rechargeBtn.AddListener(ClickRecharge);
|
| | | receiveBtn.AddListener(OnReceiveGift);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
|
| | | ceremonyModel.RefreshRechargeStateAct += SetReceiveBtnState;
|
| | | itemlist = ceremonyModel.GetRechargeAwardByLv();
|
| | | Init();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= RefreshSecond;
|
| | | ceremonyModel.RefreshRechargeStateAct -= SetReceiveBtnState;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void Init()
|
| | | {
|
| | | if (itemlist == null) return;
|
| | |
|
| | | for(int i = 0; i < itemBaiscs.Count; i++)
|
| | | {
|
| | | if(i < itemlist.Count)
|
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount, itemData.isBind);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | RefreshSecond();
|
| | | SetReceiveBtnState();
|
| | | }
|
| | |
|
| | |
|
| | | private void RefreshSecond()
|
| | | {
|
| | | int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony);
|
| | | if (seconds > 0)
|
| | | {
|
| | | remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>");
|
| | | }
|
| | | else
|
| | | {
|
| | | remainTimeText.text = UIHelper.AppendStringColor(TextColType.Red, Language.Get("XMZZ110"));
|
| | | }
|
| | | }
|
| | |
|
| | | private void SetReceiveBtnState()
|
| | | {
|
| | | switch (ceremonyModel.receiveState)
|
| | | {
|
| | | case FairylandCeremonyModel.ReceiveState.NoReach:
|
| | | receiveBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | receiveBtnText.text = "领取礼包";
|
| | | break;
|
| | | case FairylandCeremonyModel.ReceiveState.Reach:
|
| | | receiveBtnImg.material = MaterialUtility.GetUIDefaultGraphicMaterial();
|
| | | receiveBtnText.text = "领取礼包";
|
| | | break;
|
| | | case FairylandCeremonyModel.ReceiveState.Already:
|
| | | receiveBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial();
|
| | | receiveBtnText.text = "已领取";
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnReceiveGift()
|
| | | {
|
| | | if (itemlist == null) return;
|
| | |
|
| | | switch (ceremonyModel.receiveState)
|
| | | {
|
| | | case FairylandCeremonyModel.ReceiveState.NoReach:
|
| | | SysNotifyMgr.Instance.ShowTip("FairylandCermonyRecharge1");
|
| | | break;
|
| | | case FairylandCeremonyModel.ReceiveState.Reach:
|
| | | bool isGrid = playerPack.GetReaminGridCount(PackType.rptItem) - itemlist.Count >= 0 ? true : false;
|
| | | if (isGrid)
|
| | | {
|
| | | ceremonyModel.SendReceiveAward(GotServerRewardType.Def_RewardType_FCRecharge,0);
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | }
|
| | | break;
|
| | | case FairylandCeremonyModel.ReceiveState.Already:
|
| | | SysNotifyMgr.Instance.ShowTip("FairylandCermonyRecharge2");
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickRecharge()
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.VipRechargeFunc1);
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: fd7487dccd7370041947e1a4134b2bd1 |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using TableConfig;
|
| | | using LitJson;
|
| | | using System.Collections.Generic;
|
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class NewYearFairylandCeremonyModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | public ReceiveState receiveState { get; private set; }
|
| | | Dictionary<CeremonyType, Dictionary<int, List<int>>> typeLvDict = new Dictionary<CeremonyType, Dictionary<int, List<int>>>();
|
| | | Dictionary<int, List<AwardItem>> rechargeAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | public Dictionary<int, int> fireDict = new Dictionary<int, int>();
|
| | | List<AllPeoplePartyConfig> allPeoples = new List<AllPeoplePartyConfig>();
|
| | | List<AllPeoplePartyAwardConfig> allPeopleAwards = new List<AllPeoplePartyAwardConfig>();
|
| | | Dictionary<int, Dictionary<int, List<AwardItem>>> jobToHiAwardDict = new Dictionary<int, Dictionary<int, List<AwardItem>>>();
|
| | | Dictionary<string, Dictionary<int, List<AwardItem>>> rankAwardDict = new Dictionary<string, Dictionary<int, List<AwardItem>>>();
|
| | | Dictionary<int,Dictionary<int,List<AwardItem>>> fireGiftsDict = new Dictionary<int, Dictionary<int, List<AwardItem>>>();
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | | FuncConfigConfig lvConfig = Config.Instance.Get<FuncConfigConfig>("CeremonyWorldLv");
|
| | | JsonData lvData = JsonMapper.ToObject(lvConfig.Numerical1);
|
| | | foreach (var type in lvData.Keys)
|
| | | {
|
| | | Dictionary<int, List<int>> lvDict = new Dictionary<int, List<int>>();
|
| | | typeLvDict.Add((CeremonyType)int.Parse(type),lvDict);
|
| | | if(lvData[type].IsArray)
|
| | | {
|
| | | for(int i = 0; i < lvData[type].Count; i++)
|
| | | {
|
| | | JsonData rangeData = lvData[type][i];
|
| | | List<int> lvlist = new List<int>();
|
| | | lvDict.Add(i,lvlist);
|
| | | lvlist.Add(int.Parse(rangeData[0].ToString()));
|
| | | lvlist.Add(int.Parse(rangeData[1].ToString()));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig rechargeConfig = Config.Instance.Get<FuncConfigConfig>("CeremonyRecharge");
|
| | | JsonData rechargeData = JsonMapper.ToObject(rechargeConfig.Numerical1);
|
| | | foreach(var index in rechargeData.Keys)
|
| | | {
|
| | | List<AwardItem> awardItems = new List<AwardItem>();
|
| | | rechargeAwardDict.Add(int.Parse(index),awardItems);
|
| | | if(rechargeData[index].IsArray)
|
| | | {
|
| | | for(int i = 0; i < rechargeData[index].Count; i++)
|
| | | {
|
| | | JsonData itemData = rechargeData[index][i];
|
| | | AwardItem item = new AwardItem(int.Parse(itemData[0].ToString()), int.Parse(itemData[1].ToString()),
|
| | | int.Parse(itemData[2].ToString()));
|
| | | awardItems.Add(item);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | FuncConfigConfig fireConfig = Config.Instance.Get<FuncConfigConfig>("CeremonyFireParty");
|
| | | JsonData fireData = JsonMapper.ToObject(fireConfig.Numerical1);
|
| | | foreach(var index in fireData.Keys)
|
| | | {
|
| | | fireDict.Add(int.Parse(index),int.Parse(fireData[index].ToString()));
|
| | | }
|
| | |
|
| | | FuncConfigConfig fireAwardConfig = Config.Instance.Get<FuncConfigConfig>("CeremonyFireAward");
|
| | | JsonData fireAwardData = JsonMapper.ToObject(fireAwardConfig.Numerical1);
|
| | | foreach (var index in fireAwardData.Keys)
|
| | | {
|
| | | Dictionary<int, List<AwardItem>> jobFireAwardDict = new Dictionary<int, List<AwardItem>>();
|
| | | fireGiftsDict.Add(int.Parse(index),jobFireAwardDict);
|
| | | foreach(var job in fireAwardData[index].Keys)
|
| | | {
|
| | | List<AwardItem> awardItems = new List<AwardItem>();
|
| | | jobFireAwardDict.Add(int.Parse(job),awardItems);
|
| | | if (fireAwardData[index][job].IsArray)
|
| | | {
|
| | | for (int i = 0; i < fireAwardData[index][job].Count; i++)
|
| | | {
|
| | | JsonData itemData = fireAwardData[index][job][i];
|
| | | AwardItem item = new AwardItem(int.Parse(itemData[0].ToString()), int.Parse(itemData[1].ToString()),
|
| | | int.Parse(itemData[2].ToString()));
|
| | | awardItems.Add(item);
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | allPeoples = Config.Instance.GetAllValues<AllPeoplePartyConfig>();
|
| | | allPeopleAwards = Config.Instance.GetAllValues<AllPeoplePartyAwardConfig>();
|
| | | for(int i = 0; i < allPeopleAwards.Count; i++)
|
| | | {
|
| | | Dictionary<int, List<AwardItem>> awardKeyDict = new Dictionary<int, List<AwardItem>>();
|
| | | jobToHiAwardDict.Add(allPeopleAwards[i].ID,awardKeyDict);
|
| | | JsonData awardData = JsonMapper.ToObject(allPeopleAwards[i].Award);
|
| | | foreach(var job in awardData.Keys)
|
| | | {
|
| | | List<AwardItem> awardItems = new List<AwardItem>();
|
| | | awardKeyDict.Add(int.Parse(job),awardItems);
|
| | | if(awardData[job].IsArray)
|
| | | {
|
| | | for(int j = 0; j < awardData[job].Count;j++)
|
| | | {
|
| | | JsonData itemData = awardData[job][j];
|
| | | AwardItem item = new AwardItem(int.Parse(itemData[0].ToString()), int.Parse(itemData[1].ToString()),
|
| | | int.Parse(itemData[2].ToString()));
|
| | | awardItems.Add(item);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | List<UniquenessArriveConfig> arriveConfigs = Config.Instance.GetAllValues<UniquenessArriveConfig>();
|
| | | for(int i = 0; i < arriveConfigs.Count; i++)
|
| | | {
|
| | | string key = StringUtility.Contact(arriveConfigs[i].WorldLvNum,arriveConfigs[i].Rank);
|
| | | Dictionary<int, List<AwardItem>> awardKeyDict = new Dictionary<int, List<AwardItem>>();
|
| | | rankAwardDict.Add(key,awardKeyDict);
|
| | | JsonData awardData = JsonMapper.ToObject(arriveConfigs[i].Award);
|
| | | foreach (var job in awardData.Keys)
|
| | | {
|
| | | List<AwardItem> awardItems = new List<AwardItem>();
|
| | | awardKeyDict.Add(int.Parse(job), awardItems);
|
| | | if (awardData[job].IsArray)
|
| | | {
|
| | | for (int j = 0; j < awardData[job].Count; j++)
|
| | | {
|
| | | JsonData itemData = awardData[job][j];
|
| | | AwardItem item = new AwardItem(int.Parse(itemData[0].ToString()), int.Parse(itemData[1].ToString()),
|
| | | int.Parse(itemData[2].ToString()));
|
| | | awardItems.Add(item);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //OperationTimeHepler.Instance.operationEndEvent += OnActiveEnd;
|
| | | |
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | worldLv = 0;
|
| | | sumHiPoint = 0;
|
| | | preAwardRecord = 0;
|
| | | peopleTaskRecordDict.Clear();
|
| | | receiveState = ReceiveState.NoReach;
|
| | | }
|
| | |
|
| | | public void OnAfterPlayerDataInitialize()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | CheckRechargeRed();
|
| | | CheckPeoplePartyRed();
|
| | | }
|
| | | #region 处理服务端数据
|
| | | public int worldLv { get; private set;}
|
| | | public void GetServerActiveInfo(HAC09_tagGCFairyCeremonyInfo info)
|
| | | {
|
| | | worldLv = info.WorldLV;
|
| | | OperationTimeHepler.Instance.RefreshFairyCeremonyInfo(info);
|
| | | }
|
| | |
|
| | | public Action RefreshRechargeStateAct;
|
| | | public void GetServerRechargeInfo(HAA14_tagMCXJSDRecharge info)
|
| | | {
|
| | | switch(info.State)
|
| | | {
|
| | | case 0:
|
| | | receiveState = ReceiveState.NoReach;
|
| | | break;
|
| | | case 1:
|
| | | receiveState = ReceiveState.Reach;
|
| | | break;
|
| | | case 2:
|
| | | receiveState = ReceiveState.Already;
|
| | | break;
|
| | |
|
| | | }
|
| | | if(RefreshRechargeStateAct != null)
|
| | | {
|
| | | RefreshRechargeStateAct();
|
| | | }
|
| | | CheckRechargeRed();
|
| | | }
|
| | |
|
| | | |
| | | public int sumHiPoint { get; private set; }
|
| | | private int preAwardRecord;
|
| | | Dictionary<int, bool> peopleAwardRecordDict = new Dictionary<int, bool>(); //领取记录
|
| | | Dictionary<int, int> peopleTaskRecordDict = new Dictionary<int, int>(); //全民来嗨任务状态记录
|
| | | public Action<int> RefreshHiPointAct;
|
| | | public Action RefreshHiAwardStateAct;
|
| | | |
| | | public void GetServerPeopleInfo(HAA15_tagMCAllPeoplePartyInfo info)
|
| | | {
|
| | | peopleAwardRecordDict.Clear();
|
| | | sumHiPoint = (int)info.CurPoint;
|
| | | int sumIndex = GetPeoplePartAwardlist().Count;
|
| | | for (int i = 0; i < sumIndex; i++)
|
| | | {
|
| | | bool isRecord = MathUtility.GetBitValue(info.AwardRecord, (ushort)i);
|
| | | peopleAwardRecordDict.Add(i, isRecord);
|
| | | }
|
| | |
|
| | | for(int i = 0; i < info.Count; i++)
|
| | | {
|
| | | if(!peopleTaskRecordDict.ContainsKey((int)info.BuyCountList[i].ActID))
|
| | | {
|
| | | peopleTaskRecordDict.Add((int)info.BuyCountList[i].ActID,info.BuyCountList[i].CurTimes);
|
| | | }
|
| | | else
|
| | | {
|
| | | peopleTaskRecordDict[(int)info.BuyCountList[i].ActID] = info.BuyCountList[i].CurTimes;
|
| | | }
|
| | |
|
| | | if(RefreshHiPointAct != null)
|
| | | {
|
| | | RefreshHiPointAct((int)info.BuyCountList[i].ActID);
|
| | | }
|
| | | }
|
| | |
|
| | | if(preAwardRecord != info.AwardRecord)
|
| | | {
|
| | | if(RefreshHiAwardStateAct != null)
|
| | | {
|
| | | RefreshHiAwardStateAct();
|
| | | }
|
| | | }
|
| | | CheckPeoplePartyRed();
|
| | | preAwardRecord = (int)info.AwardRecord;
|
| | | }
|
| | |
|
| | | public int GetPeopleTaskTimesById(int actId)
|
| | | {
|
| | | int times = 0;
|
| | | peopleTaskRecordDict.TryGetValue(actId,out times);
|
| | | return times;
|
| | | }
|
| | |
|
| | | public bool GetPeopleAwardRecordByIndex(int index)
|
| | | {
|
| | | bool isReceive = false;
|
| | | peopleAwardRecordDict.TryGetValue(index,out isReceive);
|
| | | return isReceive;
|
| | | }
|
| | |
|
| | | private void OnActiveEnd(Operation type, int arg2)
|
| | | {
|
| | | if (type != Operation.FairyCeremony) return;
|
| | |
|
| | | peopleTaskRecordDict.Clear();
|
| | | sumHiPoint = 0;
|
| | | worldLv = 0;
|
| | | }
|
| | |
|
| | | public void SendReceiveAward(GotServerRewardType type,int index)
|
| | | {
|
| | | CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward();
|
| | | getReward.RewardType = (byte)type;
|
| | | getReward.DataEx = (uint)index;
|
| | | getReward.DataExStrLen = 0;
|
| | | getReward.DataExStr = string.Empty;
|
| | | GameNetSystem.Instance.SendInfo(getReward);
|
| | | }
|
| | |
|
| | | public void SendGetRankInfo(PlayerRankData.RankType type)
|
| | | {
|
| | | C1001_tagCWatchBillboard rankPack = new C1001_tagCWatchBillboard();
|
| | | rankPack.Type = (byte)type;
|
| | | GameNetSystem.Instance.SendInfo(rankPack);
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 处理本地数据
|
| | | public int GetWorldLvIndex(CeremonyType type)
|
| | | {
|
| | | if(typeLvDict.ContainsKey(type))
|
| | | {
|
| | | foreach(var index in typeLvDict[type].Keys)
|
| | | {
|
| | | if(worldLv >= typeLvDict[type][index][0] && worldLv <= typeLvDict[type][index][1])
|
| | | {
|
| | | return index;
|
| | | }
|
| | | }
|
| | | }
|
| | | return -1;
|
| | | }
|
| | |
|
| | | public List<AwardItem> GetRechargeAwardByLv()
|
| | | {
|
| | | int index = GetWorldLvIndex(CeremonyType.Recharge);
|
| | | List<AwardItem> awardItems = null;
|
| | | rechargeAwardDict.TryGetValue(index,out awardItems);
|
| | | return awardItems;
|
| | | }
|
| | |
|
| | | public StoreConfig GetFireIdByLv()
|
| | | {
|
| | | int index = GetWorldLvIndex(CeremonyType.Fire);
|
| | | int storeId = 0;
|
| | | fireDict.TryGetValue(index,out storeId);
|
| | | StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(storeId);
|
| | | return storeConfig;
|
| | | }
|
| | |
|
| | | public List<AwardItem> GetFireAwardlist()
|
| | | {
|
| | | int index = GetWorldLvIndex(CeremonyType.Fire);
|
| | | if(fireGiftsDict.ContainsKey(index))
|
| | | {
|
| | | if(fireGiftsDict[index].ContainsKey(PlayerDatas.Instance.baseData.Job))
|
| | | {
|
| | | return fireGiftsDict[index][PlayerDatas.Instance.baseData.Job];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public bool CheckIsBuyFireCondi(StoreConfig storeConfig,int buyNum = 1)
|
| | | {
|
| | | ulong price =(ulong)(storeConfig.MoneyNumber * buyNum);
|
| | | if(UIHelper.GetMoneyCnt(storeConfig.MoneyType) >= price)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | List<AllPeoplePartyConfig> openTasklist = new List<AllPeoplePartyConfig>();
|
| | | public List<AllPeoplePartyConfig> GetPeoplePartTasklist()
|
| | | {
|
| | | openTasklist.Clear();
|
| | | for(int i = 0; i < allPeoples.Count; i++)
|
| | | {
|
| | | if(FuncOpen.Instance.IsFuncOpen(allPeoples[i].FuncID))
|
| | | {
|
| | | openTasklist.Add(allPeoples[i]);
|
| | | }
|
| | | }
|
| | | openTasklist.Sort(CompareByTimes);
|
| | | return openTasklist;
|
| | | }
|
| | |
|
| | | private int CompareByTimes(AllPeoplePartyConfig start,AllPeoplePartyConfig end)
|
| | | {
|
| | | bool startIsComplte = PeopleTaskComplete(start);
|
| | | bool endIsComplte = PeopleTaskComplete(end);
|
| | | if (startIsComplte.CompareTo(endIsComplte) != 0) return startIsComplte.CompareTo(endIsComplte);
|
| | |
|
| | | int startIndex = allPeoples.IndexOf(start);
|
| | | int endIndex = allPeoples.IndexOf(end);
|
| | | if (startIndex.CompareTo(endIndex) != 0) return startIndex.CompareTo(endIndex);
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public bool PeopleTaskComplete(AllPeoplePartyConfig partyConfig)
|
| | | {
|
| | | if (GetPeopleTaskTimesById(partyConfig.ID) >= partyConfig.TotalTimes)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | List<AllPeoplePartyAwardConfig> worldAwardlist = new List<AllPeoplePartyAwardConfig>();
|
| | | public List<AllPeoplePartyAwardConfig> GetPeoplePartAwardlist()
|
| | | {
|
| | | worldAwardlist.Clear();
|
| | | int index = GetWorldLvIndex(CeremonyType.WholePeople);
|
| | | for (int i = 0; i < allPeopleAwards.Count; i++)
|
| | | {
|
| | | if(allPeopleAwards[i].WorldLvNum == index)
|
| | | {
|
| | | worldAwardlist.Add(allPeopleAwards[i]);
|
| | | }
|
| | | }
|
| | | worldAwardlist.Sort(CompareByIndex);
|
| | | return worldAwardlist;
|
| | | }
|
| | |
|
| | | public int CompareByIndex(AllPeoplePartyAwardConfig start,AllPeoplePartyAwardConfig end)
|
| | | {
|
| | | int startIndex = start.Index;
|
| | | int endIndex = end.Index;
|
| | | if (startIndex.CompareTo(endIndex) != 0) return startIndex.CompareTo(endIndex);
|
| | |
|
| | | startIndex = allPeopleAwards.IndexOf(start);
|
| | | endIndex = allPeopleAwards.IndexOf(end);
|
| | | if (startIndex.CompareTo(endIndex) != 0) return startIndex.CompareTo(endIndex);
|
| | |
|
| | | return 0;
|
| | | }
|
| | |
|
| | | public List<AwardItem> GetPeoplePartyAwardById(int peopleId)
|
| | | {
|
| | | if(jobToHiAwardDict.ContainsKey(peopleId))
|
| | | {
|
| | | if(jobToHiAwardDict[peopleId].ContainsKey(PlayerDatas.Instance.baseData.Job))
|
| | | {
|
| | | return jobToHiAwardDict[peopleId][PlayerDatas.Instance.baseData.Job];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public List<AwardItem> GetRankAwardByLv(int rank)
|
| | | {
|
| | | int index = GetWorldLvIndex(CeremonyType.OutOfPrint);
|
| | | string key = StringUtility.Contact(index,rank);
|
| | | int playerJob = PlayerDatas.Instance.baseData.Job;
|
| | |
|
| | | if(rankAwardDict.ContainsKey(key))
|
| | | {
|
| | | if(rankAwardDict[key].ContainsKey(playerJob))
|
| | | {
|
| | | return rankAwardDict[key][playerJob];
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 红点逻辑处理
|
| | | public const int FairyCeremony_RedKey = 212;
|
| | | public Redpoint fairyCeremonyRedp = new Redpoint(MainRedDot.RedPoint_UpFuncBase,FairyCeremony_RedKey);
|
| | |
|
| | | public const int CeremonyRecharge_RedKey = 21201;
|
| | | public Redpoint rechargeRedp = new Redpoint(FairyCeremony_RedKey,CeremonyRecharge_RedKey);
|
| | | public const int RechargeReceiveBtn_RedKey = 2120101;
|
| | | public Redpoint receiveBtnRedp = new Redpoint(CeremonyRecharge_RedKey, RechargeReceiveBtn_RedKey);
|
| | | public void CheckRechargeRed()
|
| | | {
|
| | | if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony)) return;
|
| | |
|
| | | if(receiveState == ReceiveState.Reach)
|
| | | {
|
| | | receiveBtnRedp.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | receiveBtnRedp.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | |
|
| | | public const int CeremonyPeople_RedKey = 21203;
|
| | | public Redpoint peopleRedp = new Redpoint(FairyCeremony_RedKey, CeremonyPeople_RedKey);
|
| | |
|
| | | public void CheckPeoplePartyRed()
|
| | | {
|
| | | if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony)) return;
|
| | |
|
| | | int index = 0;
|
| | | if(IsPeopleAwardRecive(out index))
|
| | | {
|
| | | peopleRedp.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | peopleRedp.state = RedPointState.None;
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public bool IsPeopleAwardRecive(out int index)
|
| | | {
|
| | | index = 0;
|
| | | if (worldAwardlist.Count < 1) return false;
|
| | |
|
| | | for (int i = 0; i < worldAwardlist.Count; i++)
|
| | | {
|
| | | if (!GetPeopleAwardRecordByIndex(worldAwardlist[i].Index))
|
| | | {
|
| | | if (sumHiPoint >= worldAwardlist[i].NeedPoint)
|
| | | {
|
| | | index = i;
|
| | | return true;
|
| | | }
|
| | | }
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public struct AwardItem
|
| | | {
|
| | | public int itemId { get; private set;}
|
| | | public int itemCount { get; private set; }
|
| | | public int isBind { get; private set; }
|
| | | public AwardItem(int id,int cnt,int isBind)
|
| | | {
|
| | | this.itemId = id;
|
| | | this.itemCount = cnt;
|
| | | this.isBind = isBind;
|
| | | }
|
| | | }
|
| | |
|
| | | public enum ReceiveState
|
| | | {
|
| | | NoReach, //未充值
|
| | | Reach, //可领取
|
| | | Already, //已领取
|
| | | }
|
| | | /// <summary>
|
| | | /// 庆典类型
|
| | | /// </summary>
|
| | | public enum CeremonyType
|
| | | {
|
| | | Recharge = 1, // 充值
|
| | | Fire = 2, //烟花
|
| | | WholePeople = 3, //全民
|
| | | OutOfPrint = 4, //绝版降临
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4a8fe48f819d39044b5e3669ec791465 |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class NewYearFairylandCeremonyWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButtonGroup funcBtnGroup;
|
| | | [SerializeField] FunctionButton rechargeFunc;
|
| | | [SerializeField] FunctionButton fireFunc;
|
| | | [SerializeField] FunctionButton peopleToHiFunc;
|
| | | [SerializeField] FunctionButton outofFunc;
|
| | | [SerializeField] Button leftBtn;
|
| | | [SerializeField] Button rightBtn;
|
| | | [SerializeField] Button closeBtn;
|
| | |
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | |
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | rechargeFunc.onClick.AddListener(ClickRecharge);
|
| | | fireFunc.onClick.AddListener(ClickFire);
|
| | | peopleToHiFunc.onClick.AddListener(ClickPeopleToHi);
|
| | | outofFunc.onClick.AddListener(ClickOutOf);
|
| | | leftBtn.onClick.AddListener(OnClickLeftBtn);
|
| | | rightBtn.onClick.AddListener(OnClickRightBtn);
|
| | | closeBtn.onClick.AddListener(ClickClose);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | |
|
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0)
|
| | | {
|
| | | if(ceremonyModel.rechargeRedp.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = rechargeFunc.order;
|
| | | }
|
| | | else if(ceremonyModel.peopleRedp.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = peopleToHiFunc.order;
|
| | | }
|
| | | }
|
| | | funcBtnGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | | if(!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnClickRightBtn()
|
| | | {
|
| | | funcBtnGroup.TriggerNext();
|
| | | }
|
| | |
|
| | | private void OnClickLeftBtn()
|
| | | {
|
| | | funcBtnGroup.TriggerLast();
|
| | | }
|
| | |
|
| | | private void ClickOutOf()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<CeremonyOutOfPrintWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<CeremonyOutOfPrintWin>();
|
| | | }
|
| | | functionOrder = 3;
|
| | | }
|
| | |
|
| | | private void ClickPeopleToHi()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<CeremonyPeopleToHiWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<CeremonyPeopleToHiWin>();
|
| | | }
|
| | | functionOrder = 2;
|
| | | }
|
| | |
|
| | | private void ClickFire()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<CeremonyFirepartyWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<CeremonyFirepartyWin>();
|
| | | }
|
| | | functionOrder = 1;
|
| | | }
|
| | |
|
| | | private void ClickRecharge()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<CeremonyRechargeGiftWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<CeremonyRechargeGiftWin>();
|
| | | }
|
| | | functionOrder = 0;
|
| | | }
|
| | |
|
| | | private void CloseChildWin()
|
| | | {
|
| | | var children = WindowConfig.Get().FindChildWindows("FairylandCeremonyWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void ClickClose()
|
| | | {
|
| | | CloseChildWin();
|
| | | CloseClick();
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cba4e6bd0f8e90246b6f3925f49c17e7 |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | |
| | | public class NewYearToHiAwardCell : CellView
|
| | | {
|
| | | [SerializeField] Text titleText;
|
| | | [SerializeField] Button receiveBtn;
|
| | | [SerializeField] GameObject noReachImg;
|
| | | [SerializeField] GameObject alreadyImg;
|
| | | [SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>();
|
| | |
|
| | | List<FairylandCeremonyModel.AwardItem> itemlist;
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | FairylandCeremonyModel.ReceiveState receiveState = FairylandCeremonyModel.ReceiveState.NoReach;
|
| | | PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | | AllPeoplePartyAwardConfig awardConfig;
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | ceremonyModel.RefreshHiAwardStateAct += SetAwardState;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | ceremonyModel.RefreshHiAwardStateAct -= SetAwardState;
|
| | | }
|
| | | public void Init(AllPeoplePartyAwardConfig awardConfig)
|
| | | {
|
| | | this.awardConfig = awardConfig;
|
| | | titleText.text = Language.Get("CeremoneyToHiAward", awardConfig.NeedPoint);
|
| | | itemlist = ceremonyModel.GetPeoplePartyAwardById(awardConfig.ID);
|
| | | for (int i = 0; i < itemBaiscs.Count; i++)
|
| | | {
|
| | | if (i < itemlist.Count)
|
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(true);
|
| | | FairylandCeremonyModel.AwardItem itemData = itemlist[i];
|
| | | ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount, itemData.isBind);
|
| | | itemBaiscs[i].Init(cellModel);
|
| | | itemBaiscs[i].cellBtn.RemoveAllListeners();
|
| | | itemBaiscs[i].cellBtn.AddListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemData.itemId, true, (ulong)itemData.itemCount,-1,itemData.isBind);
|
| | | tipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | itemBaiscs[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | SetAwardState();
|
| | | }
|
| | |
|
| | | private void SetAwardState()
|
| | | {
|
| | | if (awardConfig == null) return;
|
| | |
|
| | | if(ceremonyModel.GetPeopleAwardRecordByIndex(awardConfig.Index))
|
| | | {
|
| | | receiveState = FairylandCeremonyModel.ReceiveState.Already;
|
| | | }
|
| | | else
|
| | | {
|
| | | if(ceremonyModel.sumHiPoint >= awardConfig.NeedPoint)
|
| | | {
|
| | | receiveState = FairylandCeremonyModel.ReceiveState.Reach;
|
| | | }
|
| | | else
|
| | | {
|
| | | receiveState = FairylandCeremonyModel.ReceiveState.NoReach;
|
| | | }
|
| | | }
|
| | | RefreshAwardStateUI();
|
| | | }
|
| | |
|
| | | private void RefreshAwardStateUI()
|
| | | {
|
| | | receiveBtn.RemoveAllListeners();
|
| | | switch (receiveState)
|
| | | {
|
| | | case FairylandCeremonyModel.ReceiveState.NoReach:
|
| | | noReachImg.SetActive(true);
|
| | | alreadyImg.SetActive(false);
|
| | | receiveBtn.gameObject.SetActive(false);
|
| | | break;
|
| | | case FairylandCeremonyModel.ReceiveState.Reach:
|
| | | noReachImg.SetActive(false);
|
| | | alreadyImg.SetActive(false);
|
| | | receiveBtn.gameObject.SetActive(true);
|
| | | receiveBtn.AddListener(OnReceiveGift);
|
| | | break;
|
| | | case FairylandCeremonyModel.ReceiveState.Already:
|
| | | noReachImg.SetActive(false);
|
| | | alreadyImg.SetActive(true);
|
| | | receiveBtn.gameObject.SetActive(false);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnReceiveGift()
|
| | | {
|
| | | bool isGrid = playerPack.GetReaminGridCount(PackType.rptItem) - itemlist.Count >= 0 ? true : false;
|
| | | if (isGrid)
|
| | | {
|
| | | ceremonyModel.SendReceiveAward(GotServerRewardType.Def_RewardType_FCParty, awardConfig.Index);
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("BagFull");
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 12a9a9d0bb4006a45ad0eefe13ad039c |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class NewYearToHiTaskCell : CellView
|
| | | {
|
| | | [SerializeField] Image activeIcon;
|
| | | [SerializeField] Text activeNameText;
|
| | | [SerializeField] Text activeDesText;
|
| | | [SerializeField] Text progressText;
|
| | | [SerializeField] Button gobtn;
|
| | | [SerializeField] GameObject completeImg;
|
| | |
|
| | | AllPeoplePartyConfig taskConfig;
|
| | | FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | | ceremonyModel.RefreshHiPointAct += OnRefreshProgress;
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | ceremonyModel.RefreshHiPointAct -= OnRefreshProgress;
|
| | | }
|
| | |
|
| | | public void Init(AllPeoplePartyConfig taskConfig)
|
| | | {
|
| | | activeNameText.gameObject.SetActive(false);
|
| | | this.taskConfig = taskConfig;
|
| | | activeIcon.SetSprite(taskConfig.IconKey);
|
| | | SetTaskState(ceremonyModel.GetPeopleTaskTimesById(taskConfig.ID),taskConfig.TotalTimes);
|
| | | activeDesText.text = string.Format(taskConfig.TaskDes,taskConfig.AddPoint);
|
| | | }
|
| | |
|
| | | private void OnRefreshProgress(int actId)
|
| | | {
|
| | | if (taskConfig == null || taskConfig.ID != actId) return;
|
| | |
|
| | | SetTaskState(ceremonyModel.GetPeopleTaskTimesById(taskConfig.ID), taskConfig.TotalTimes);
|
| | | }
|
| | |
|
| | | public void SetTaskState(int curProgress,int sumProgress)
|
| | | {
|
| | | gobtn.RemoveAllListeners();
|
| | | progressText.text = StringUtility.Contact(curProgress, "/", sumProgress);
|
| | | if (curProgress < sumProgress)
|
| | | {
|
| | | gobtn.gameObject.SetActive(true);
|
| | | completeImg.SetActive(false);
|
| | | progressText.color = UIHelper.GetUIColor(TextColType.Red);
|
| | | gobtn.AddListener(()=>
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)taskConfig.JumpId);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | gobtn.gameObject.SetActive(false);
|
| | | completeImg.SetActive(true);
|
| | | progressText.color = UIHelper.GetUIColor(TextColType.Green);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 005a236d335a39b40b69ba9242f67311 |
| | | timeCreated: 1548402738 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | case JumpUIType.EquipCompose268:
|
| | | case JumpUIType.EquipCompose269:
|
| | | case JumpUIType.EquipCompose270:
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | if(types.Length > 0)
|
| | | case JumpUIType.EquipCompose291:
|
| | | case JumpUIType.EquipCompose293:
|
| | | case JumpUIType.EquipCompose294:
|
| | | case JumpUIType.EquipCompose295:
|
| | | case JumpUIType.EquipCompose296:
|
| | | case JumpUIType.EquipCompose297:
|
| | | case JumpUIType.EquipCompose298:
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions; |
| | | if(types.Length > 2)
|
| | | {
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1,types[0],types[1]);
|
| | | ComposeEquipWin.selectEquipPlace = types[2];
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1, types[0], types[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | }
|
| | | else if (types.Length > 1)
|
| | | {
|
| | | composeModel.SetJumpToModel((ComposeFuncType)_tagWinSearchModel.TABID + 1, types[0], types[1]);
|
| | | SetJumpLogic<ComposeWin>(_tagWinSearchModel.TABID);
|
| | | }
|
| | | break;
|
| | |
| | | case JumpUIType.LootPreciousFrameFunc1:
|
| | | case JumpUIType.DogzDungeon:
|
| | | case JumpUIType.FairyGrabBoss:
|
| | | case JumpUIType.JadeDynastyBoss290:
|
| | | SetJumpLogic<LootPreciousFrameWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.JadeDynastyEquip292:
|
| | | SetJumpLogic<JadeDynastyKnapSackWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.LootPreciousFrameSpec:
|
| | | DemonJarWin.guideChallenge = true;
|
| | |
| | | case JumpUIType.JadeDynastyTower288:
|
| | | SetJumpLogic<TowerWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.JadeDynastyTowerRank:
|
| | | case JumpUIType.JadeDynastyTowerRank289:
|
| | | var rankModel = ModelCenter.Instance.GetModel<RankModel>();
|
| | | rankModel.jumpRankType = int.Parse(_tagWinSearchModel.SelectActive);
|
| | | SetJumpLogic<RankPanel>(_tagWinSearchModel.TABID);
|
| | |
| | | case JumpUIType.EquipCompose268:
|
| | | case JumpUIType.EquipCompose269:
|
| | | case JumpUIType.EquipCompose270:
|
| | | case JumpUIType.EquipCompose291:
|
| | | int[] types = GetSearchData(_tagWinSearchModel.ID).conditions;
|
| | | if (types.Length > 0)
|
| | | {
|
| | |
| | | SevenDaysTour286 = 286, //七日巡礼
|
| | | SevenDaysTour287 = 287, //七日巡礼
|
| | | JadeDynastyTower288 = 288,//诛仙塔
|
| | | JadeDynastyTowerRank = 289,//排行榜-诛仙塔
|
| | | JadeDynastyTowerRank289 = 289,//排行榜-诛仙塔
|
| | | JadeDynastyBoss290 = 290,//诛仙Boss
|
| | | EquipCompose291 = 291,//装备合成-诛仙装备
|
| | | JadeDynastyEquip292=292,//诛仙装备
|
| | | EquipCompose293 = 293,//装备合成-诛仙装备-合成披风
|
| | | EquipCompose294 = 294,//装备合成-诛仙装备-合成如意
|
| | | EquipCompose295 = 295,//装备合成-诛仙装备-合成诛仙剑
|
| | | EquipCompose296 = 296,//装备合成-诛仙装备-合成戮仙剑
|
| | | EquipCompose297 = 297,//装备合成-诛仙装备-合成陷仙剑
|
| | | EquipCompose298 = 298,//装备合成-诛仙装备-合成绝仙剑
|
| | |
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | |
| | | [RequireComponent(typeof(RectTransform))] |
| | | public class SpringDecorate : MonoBehaviour |
| | | { |
| | | GameObject springDecorate = null; |
| | | |
| | | private void Start() |
| | | { |
| | | if (GeneralDefine.UISpringDecorate != 0) |
| | | { |
| | | if (springDecorate == null) |
| | | { |
| | | springDecorate = UIUtility.CreateWidget("Container_SpringDecorate", "SpringDecorate"); |
| | | } |
| | | var rectTransform = springDecorate.transform as RectTransform; |
| | | rectTransform.MatchWhith(this.transform as RectTransform); |
| | | } |
| | | else |
| | | { |
| | | if (springDecorate != null) |
| | | { |
| | | GameObject.DestroyImmediate(springDecorate); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2f22490435e43864f8b21928175f09be |
| | | timeCreated: 1548641856 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | ZXRuyiAttrPer = 99,//诛仙·如意属性百分比
|
| | | ZXPendantAttrPer = 100, //诛仙·吊坠属性百分比
|
| | | ZXRingAttrPer = 101, //诛仙·戒指属性百分比
|
| | | SkillAddPer1 = 102,//定海神针技能伤害百分比
|
| | | SkillAddPer2 = 103, //皓月枪技能伤害百分比
|
| | | SkillAddPer3 = 104, //鬼牙刃技能伤害百分比
|
| | | SkillAddPer4 = 105, //磐龙印技能伤害百分比
|
| | | SkillAddPer5 = 106, //杏黄旗技能伤害百分比
|
| | | SkillAddPer6 = 107,//嗜天斧技能伤害百分比
|
| | | SkillAddPer7 = 108, //射日神弓技能伤害百分比
|
| | | SkillReducePer1 = 109, //定海神针技能减伤百分比
|
| | | SkillReducePer2 = 110, //皓月枪技能减伤百分比
|
| | | SkillReducePer3 = 111, //鬼牙刃技能减伤百分比
|
| | | SkillReducePer4 = 112, //磐龙印技能减伤百分比
|
| | | SkillReducePer5 = 113, //杏黄旗技能减伤百分比
|
| | | SkillReducePer6 = 114, //嗜天斧技能减伤百分比
|
| | | SkillReducePer7 = 115, //射日神弓技能减伤百分比
|
| | | SkillAddPerA = 102,//定海神针技能伤害百分比
|
| | | SkillAddPerB = 103, //皓月枪技能伤害百分比
|
| | | SkillAddPerC = 104, //鬼牙刃技能伤害百分比
|
| | | SkillAddPerD = 105, //磐龙印技能伤害百分比
|
| | | SkillAddPerE = 106, //杏黄旗技能伤害百分比
|
| | | SkillAddPerF = 107,//嗜天斧技能伤害百分比
|
| | | SkillAddPerG = 108, //射日神弓技能伤害百分比
|
| | | SkillReducePerA = 109, //定海神针技能减伤百分比
|
| | | SkillReducePerB = 110, //皓月枪技能减伤百分比
|
| | | SkillReducePerC = 111, //鬼牙刃技能减伤百分比
|
| | | SkillReducePerD = 112, //磐龙印技能减伤百分比
|
| | | SkillReducePerE = 113, //杏黄旗技能减伤百分比
|
| | | SkillReducePerF = 114, //嗜天斧技能减伤百分比
|
| | | SkillReducePerG = 115, //射日神弓技能减伤百分比
|
| | | }
|
| | | //UI图标类型
|
| | | public enum SpriteFileType
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | if (Application.platform == RuntimePlatform.IPhonePlayer)
|
| | | {
|
| | | var eventData = new PointerEventData(EventSystem.current);
|
| | | eventData.pressPosition = Input.mousePosition;
|
| | | eventData.position = Input.mousePosition;
|
| | | var eventData = new PointerEventData(EventSystem.current);
|
| | | eventData.pressPosition = Input.mousePosition;
|
| | | eventData.position = Input.mousePosition;
|
| | |
|
| | | var list = new List<RaycastResult>();
|
| | | EventSystem.current.RaycastAll(eventData, list);
|
| | | var list = new List<RaycastResult>();
|
| | | EventSystem.current.RaycastAll(eventData, list);
|
| | |
|
| | | return list.Count > 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | return EventSystem.current.IsPointerOverGameObject();
|
| | | }
|
| | | return list.Count > 0;
|
| | | }
|
| | |
|
| | | struct Quadrangle
|