Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2 文件已重命名
32个文件已修改
2 文件已复制
2个文件已添加
| | |
| | | public static void Init()
|
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HAB04_tagMCBossRebornInfo), typeof(DTCAB04_tagMCBossRebornInfo));
|
| | | Register(typeof(HA40B_tagGCPlayerJoinFamilyWarInfo), typeof(DTCA40B_tagGCPlayerJoinFamilyWarInfo));
|
| | | Register(typeof(HA319_tagMCPackDownloadRecord), typeof(DTCA319_tagMCPackDownloadRecord));
|
| | |
|
| | | Register(typeof(HAC0A_tagGCMultiRealmPointInfo), typeof(DTCAC0A_tagGCMultiRealmPointInfo));
|
| | | Register(typeof(HAC08_tagGCBossRebornPoint), typeof(DTCAC08_tagGCBossRebornPoint));
|
| | | Register(typeof(HAC07_tagGCBossRebornInfo), typeof(DTCAC07_tagGCBossRebornInfo));
|
| | | Register(typeof(HAB03_tagMCBossRebornPlayerInfo), typeof(DTCAB03_tagMCBossRebornPlayerInfo));
|
| | | Register(typeof(HAA11_tagMCSpringSaleInfo), typeof(DTCAA11_tagMCSpringSaleInfo));
|
| | | Register(typeof(HAA10_tagMCCostRebatePlayerInfo), typeof(DTCAA10_tagMCCostRebatePlayerInfo));
|
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, July 20, 2018 |
| | | // [ Date ]: Monday, August 13, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public partial class BossRebornConfig : ConfigBase {
|
| | |
|
| | | public int Id { get ; private set ; }
|
| | | public int TotalTimes { get ; private set ; }
|
| | | public int SingleTimes { get ; private set ; }
|
| | | public int[] Reward1;
|
| | | public int[] RewardCount1;
|
| | | public int[] Reward2;
|
| | | public int[] RewardCount2;
|
| | | public int[] Reward3;
|
| | | public int[] RewardCount3;
|
| | | public int[] WorldLevel;
|
| | | public string Description { get ; private set; }
|
| | | public int jump { get ; private set ; }
|
| | | public int order { get ; private set ; }
|
| | |
| | | {
|
| | | Id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
|
| | |
|
| | | TotalTimes=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | Description = rawContents[1].Trim();
|
| | |
|
| | | SingleTimes=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | | jump=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; |
| | |
|
| | | string[] Reward1StringArray = rawContents[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Reward1 = new int[Reward1StringArray.Length]; |
| | | for (int i=0;i<Reward1StringArray.Length;i++) |
| | | { |
| | | int.TryParse(Reward1StringArray[i],out Reward1[i]); |
| | | }
|
| | | |
| | | string[] RewardCount1StringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RewardCount1 = new int[RewardCount1StringArray.Length]; |
| | | for (int i=0;i<RewardCount1StringArray.Length;i++) |
| | | { |
| | | int.TryParse(RewardCount1StringArray[i],out RewardCount1[i]); |
| | | }
|
| | | |
| | | string[] Reward2StringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Reward2 = new int[Reward2StringArray.Length]; |
| | | for (int i=0;i<Reward2StringArray.Length;i++) |
| | | { |
| | | int.TryParse(Reward2StringArray[i],out Reward2[i]); |
| | | }
|
| | | |
| | | string[] RewardCount2StringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RewardCount2 = new int[RewardCount2StringArray.Length]; |
| | | for (int i=0;i<RewardCount2StringArray.Length;i++) |
| | | { |
| | | int.TryParse(RewardCount2StringArray[i],out RewardCount2[i]); |
| | | }
|
| | | |
| | | string[] Reward3StringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Reward3 = new int[Reward3StringArray.Length]; |
| | | for (int i=0;i<Reward3StringArray.Length;i++) |
| | | { |
| | | int.TryParse(Reward3StringArray[i],out Reward3[i]); |
| | | }
|
| | | |
| | | string[] RewardCount3StringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RewardCount3 = new int[RewardCount3StringArray.Length]; |
| | | for (int i=0;i<RewardCount3StringArray.Length;i++) |
| | | { |
| | | int.TryParse(RewardCount3StringArray[i],out RewardCount3[i]); |
| | | }
|
| | | |
| | | string[] WorldLevelStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | WorldLevel = new int[WorldLevelStringArray.Length]; |
| | | for (int i=0;i<WorldLevelStringArray.Length;i++) |
| | | { |
| | | int.TryParse(WorldLevelStringArray[i],out WorldLevel[i]); |
| | | }
|
| | | |
| | | Description = rawContents[10].Trim();
|
| | | |
| | | jump=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0; |
| | | |
| | | order=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | order=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 26164724ca2c3a54e9798d3537fb0ca7 |
| | | timeCreated: 1532053505 |
| | | timeCreated: 1534162360 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, July 20, 2018 |
| | | // [ Date ]: Tuesday, August 14, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | |
| | | public int LineID { get ; private set ; }
|
| | | public int Time { get ; private set ; }
|
| | | public int[] MustItemID;
|
| | | public string[] MustItemDescriptions;
|
| | | public int[] RareItemID;
|
| | | public string PortraitID { get ; private set; }
|
| | | public int SpecialItemMark { get ; private set ; }
|
| | |
| | | int.TryParse(MustItemIDStringArray[i],out MustItemID[i]); |
| | | }
|
| | |
|
| | | string[] RareItemIDStringArray = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | MustItemDescriptions = rawContents[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | | |
| | | string[] RareItemIDStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RareItemID = new int[RareItemIDStringArray.Length]; |
| | | for (int i=0;i<RareItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | }
|
| | |
|
| | | PortraitID = rawContents[5].Trim();
|
| | | PortraitID = rawContents[6].Trim();
|
| | |
|
| | | SpecialItemMark=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; |
| | | SpecialItemMark=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; |
| | |
|
| | | CanEnterTimes=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; |
| | | CanEnterTimes=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; |
| | |
|
| | | AutoAttention=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; |
| | | AutoAttention=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; |
| | |
|
| | | string[] Job1StringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] Job1StringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Job1 = new int[Job1StringArray.Length]; |
| | | for (int i=0;i<Job1StringArray.Length;i++) |
| | | { |
| | | int.TryParse(Job1StringArray[i],out Job1[i]); |
| | | }
|
| | |
|
| | | string[] Job2StringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] Job2StringArray = rawContents[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Job2 = new int[Job2StringArray.Length]; |
| | | for (int i=0;i<Job2StringArray.Length;i++) |
| | | { |
| | | int.TryParse(Job2StringArray[i],out Job2[i]); |
| | | }
|
| | |
|
| | | string[] Job3StringArray = rawContents[11].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | string[] Job3StringArray = rawContents[12].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | Job3 = new int[Job3StringArray.Length]; |
| | | for (int i=0;i<Job3StringArray.Length;i++) |
| | | { |
| | | int.TryParse(Job3StringArray[i],out Job3[i]); |
| | | }
|
| | |
|
| | | KillHurtMin=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0; |
| | | KillHurtMin=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; |
| | |
|
| | | KillHurtMax=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0; |
| | | KillHurtMax=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0; |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 7e442059ea96745478dd5787f9e84ef5 |
| | | timeCreated: 1532068533 |
| | | timeCreated: 1534212554 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | AddAsyncTask<IconConfig>();
|
| | | AddAsyncTask<ItemConfig>();
|
| | | AddAsyncTask<SkillConfig>();
|
| | | AddAsyncTask<TASKINFOConfig>();
|
| | | AddAsyncTask<mapnpcConfig>();
|
| | | AddAsyncTask<LoginSeverListConfig>();
|
| | | AddAsyncTask<DienstgradConfig>();
|
| | |
| | | AddAsyncTask<ItemPlusConfig>();
|
| | | AddAsyncTask<ItemPlusMaxConfig>();
|
| | | AddAsyncTask<PyTaskConfig>();
|
| | | AddAsyncTask<TASKINFOConfig>();
|
| | | AddAsyncTask<MailConfig>();
|
| | | AddAsyncTask<RuneTowerConfig>();
|
| | | AddAsyncTask<EquipWashConfig>();
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding)
|
| | | if (!WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding && !BossShowModel.Instance.BossShowing)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmUpHoldWin>();
|
| | | }
|
| | |
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += RefreshInfo;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | NewBieCenter.Instance.guideCompletedEvent += GuideCompletedEvent;
|
| | | BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
|
| | | }
|
| | |
|
| | | private int cacheMapId = 0;
|
| | |
| | | if (StageManager.Instance.CurrentStage is DungeonStage)
|
| | | {
|
| | | if (PlayerDatas.Instance.realm.holdDataList.Count > 0
|
| | | && !WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding)
|
| | | && !WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding && !BossShowModel.Instance.BossShowing)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmUpHoldWin>();
|
| | | }
|
| | |
| | | cacheRealmLv = PlayerDatas.Instance.baseData.realmLevel;
|
| | | }
|
| | | if (PlayerDatas.Instance.realm.holdDataList.Count > 0
|
| | | && !WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding)
|
| | | && !WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding && !BossShowModel.Instance.BossShowing)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmUpHoldWin>();
|
| | | }
|
| | |
| | | cacheMapId = PlayerDatas.Instance.baseData.MapID;
|
| | | }
|
| | |
|
| | | private void BossShowCompletedEvent()
|
| | | {
|
| | | if (StageManager.Instance.CurrentStage is DungeonStage)
|
| | | {
|
| | | if (PlayerDatas.Instance.realm.holdDataList.Count > 0
|
| | | && !WindowCenter.Instance.CheckOpen<RealmUpHoldWin>() && !NewBieCenter.Instance.inGuiding && !BossShowModel.Instance.BossShowing)
|
| | | {
|
| | | WindowCenter.Instance.Open<RealmUpHoldWin>();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshInfo(PlayerDataRefresh refreshType)
|
| | | {
|
| | | if (refreshType == PlayerDataRefresh.OfficialRank)
|
| File was renamed from Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCBossRebornInfo.cs |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Wednesday, July 18, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System;
|
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, August 13, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCAC07_tagGCBossRebornInfo : DtcBasic
|
| | | {
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | var package = vNetPack as HAC07_tagGCBossRebornInfo;
|
| | | OperationTimeHepler.Instance.UpdateBossReborn(package);
|
| | | public class DTCAB04_tagMCBossRebornInfo : DtcBasic { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HAB04_tagMCBossRebornInfo; |
| | | OperationTimeHepler.Instance.UpdateBossReborn(package); |
| | | } |
| | | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
|
| | | } |
| | | |
| | | |
| | | |
| | | |
| File was renamed from Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCBossRebornInfo.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1dac3402caac450408ead6d8c9f5474b |
| | | timeCreated: 1531883702 |
| | | guid: cdf0d89d8efb5514b93662ac1c1e081e |
| | | timeCreated: 1534162080 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | var package = vNetPack as HAC08_tagGCBossRebornPoint;
|
| | |
|
| | | model.bossRebornIntegral = (int)package.Point;
|
| | | model.bossRebornIndegralTotal = (int)package.TotalPoint;
|
| | | } |
| | | |
| | | }
|
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // AB 04 Boss复活活动信息 #tagMCBossRebornInfo |
| | | |
| | | public class HAB04_tagMCBossRebornInfo : GameNetPackBasic |
| | | { |
| | | public string StartDate; // 开始日期 y-m-d |
| | | public string EndtDate; // 结束日期 y-m-d |
| | | public ushort LimitLV; // 限制等级 |
| | | public byte TaskCnt; |
| | | public tagMCBossRebornTaskInfo[] TaskInfo = null; |
| | | |
| | | public HAB04_tagMCBossRebornInfo() |
| | | { |
| | | _cmd = (ushort)0xAB04; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out StartDate, vBytes, NetDataType.Chars, 10); |
| | | TransBytes(out EndtDate, vBytes, NetDataType.Chars, 10); |
| | | TransBytes(out LimitLV, vBytes, NetDataType.WORD); |
| | | TransBytes(out TaskCnt, vBytes, NetDataType.BYTE); |
| | | TaskInfo = new tagMCBossRebornTaskInfo[TaskCnt]; |
| | | for (int i = 0; i < TaskCnt; i++) |
| | | { |
| | | TaskInfo[i] = new tagMCBossRebornTaskInfo(); |
| | | TransBytes(out TaskInfo[i].TaskID, vBytes, NetDataType.BYTE); |
| | | TransBytes(out TaskInfo[i].TotalTimes, vBytes, NetDataType.BYTE); |
| | | TransBytes(out TaskInfo[i].SingleTimes, vBytes, NetDataType.BYTE); |
| | | TransBytes(out TaskInfo[i].AwardItemCount, vBytes, NetDataType.BYTE); |
| | | TaskInfo[i].AwardItem = new tagMCBossRebornAwardItem[TaskInfo[i].AwardItemCount]; |
| | | for (int j = 0; j < TaskInfo[i].AwardItemCount; j++) |
| | | { |
| | | TaskInfo[i].AwardItem[j] = new tagMCBossRebornAwardItem(); |
| | | TransBytes(out TaskInfo[i].AwardItem[j].ItemID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out TaskInfo[i].AwardItem[j].ItemCount, vBytes, NetDataType.WORD); |
| | | TransBytes(out TaskInfo[i].AwardItem[j].IsBind, vBytes, NetDataType.BYTE); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public struct tagMCBossRebornAwardItem |
| | | { |
| | | public uint ItemID; |
| | | public ushort ItemCount; |
| | | public byte IsBind; |
| | | } |
| | | |
| | | public struct tagMCBossRebornTaskInfo |
| | | { |
| | | public byte TaskID; // id |
| | | public byte TotalTimes; // 可完成总次数,0表示不限次数 |
| | | public byte SingleTimes; // 单次领奖需要次数 |
| | | public byte AwardItemCount; // 奖励物品数 |
| | | public tagMCBossRebornAwardItem[] AwardItem; // 奖励物品信息 |
| | | } |
| | | |
| | | } |
copy from Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCBossRebornInfo.cs.meta
copy to Core/NetworkPackage/ServerPack/HAB_Activity/HAB04_tagMCBossRebornInfo.cs.meta
| File was copied from Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCBossRebornInfo.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1dac3402caac450408ead6d8c9f5474b |
| | | timeCreated: 1531883702 |
| | | guid: cba95a04b38120749b2fd9a9e9a3ce1b |
| | | timeCreated: 1534159505 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | public class HAC08_tagGCBossRebornPoint : GameNetPackBasic
|
| | | {
|
| | | public uint Point; // 复活点数
|
| | | public uint TotalPoint; // 复活总点数
|
| | |
|
| | | public HAC08_tagGCBossRebornPoint()
|
| | | {
|
| | |
| | | public override void ReadFromBytes(byte[] vBytes)
|
| | | {
|
| | | TransBytes(out Point, vBytes, NetDataType.DWORD);
|
| | | TransBytes(out TotalPoint, vBytes, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | } |
| | |
| | | private void DisplayBaseInfo()
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<BossRebornConfig>(rebornTask.id);
|
| | | var surplusTime = config.TotalTimes == 0 ? -1 : ((config.TotalTimes - rebornTask.gotRewardTimes) / config.SingleTimes);
|
| | | var surplusTime = rebornTask.TotalTimes == 0 ? -1 : ((rebornTask.TotalTimes - rebornTask.gotRewardTimes) / rebornTask.SingleTimes);
|
| | | var surplusTimeString = UIHelper.GetTextColorByItemColor(surplusTime == 0 ? TextColType.Red : TextColType.Green,
|
| | | surplusTime == -1 ? Language.Get("BossFHLanguage4") : surplusTime.ToString());
|
| | |
|
| | | m_surplusTimes.text = Language.Get("BossFHLanguage3", surplusTimeString);
|
| | | m_Decription.text = string.Format(config.Description, config.SingleTimes);
|
| | | m_Decription.text = string.Format(config.Description, rebornTask.SingleTimes);
|
| | |
|
| | | var rewardIndex = config.WorldLevel.Length - 1;
|
| | | var worldLevel = model.GetWorldLevel();
|
| | | for (int i = 0; i < config.WorldLevel.Length; i++)
|
| | | {
|
| | | if (worldLevel < config.WorldLevel[i])
|
| | | {
|
| | | rewardIndex = i;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | var items = new List<Item>();
|
| | | if (config.Reward1.Length > rewardIndex && config.Reward1[rewardIndex] != 0)
|
| | | {
|
| | | items.Add(new Item(config.Reward1[rewardIndex], config.RewardCount1[rewardIndex]));
|
| | | }
|
| | |
|
| | | if (config.Reward2.Length > rewardIndex && config.Reward2[rewardIndex] != 0)
|
| | | {
|
| | | items.Add(new Item(config.Reward2[rewardIndex], config.RewardCount2[rewardIndex]));
|
| | | }
|
| | |
|
| | | if (config.Reward3.Length > rewardIndex && config.Reward3[rewardIndex] != 0)
|
| | | {
|
| | | items.Add(new Item(config.Reward3[rewardIndex], config.RewardCount3[rewardIndex]));
|
| | | }
|
| | |
|
| | | m_Rewards.Display(items);
|
| | | m_Rewards.Display(rebornTask.rewards);
|
| | | }
|
| | |
|
| | | private void Goto()
|
| | |
| | | state == BossRebornTask.State.Normal || state == BossRebornTask.State.Rewardable);
|
| | |
|
| | | var config = ConfigManager.Instance.GetTemplate<BossRebornConfig>(rebornTask.id);
|
| | | var surplusTime = config.TotalTimes == 0 ? -1 : ((config.TotalTimes - rebornTask.gotRewardTimes) / config.SingleTimes);
|
| | | var surplusTime = rebornTask.TotalTimes == 0 ? -1 : ((rebornTask.TotalTimes - rebornTask.gotRewardTimes) / rebornTask.SingleTimes);
|
| | | var surplusTimeString = UIHelper.GetTextColorByItemColor(surplusTime == 0 ? TextColType.Red : TextColType.Green,
|
| | | surplusTime == -1 ? Language.Get("BossFHLanguage4") : surplusTime.ToString());
|
| | | m_surplusTimes.text = Language.Get("BossFHLanguage3", surplusTimeString);
|
| | |
| | | private void UpdateRewardableTimes()
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<BossRebornConfig>(rebornTask.id);
|
| | | m_CompleteTimes.text = StringUtility.Contact(rebornTask.completedTimes - rebornTask.gotRewardTimes, "/", config.SingleTimes);
|
| | | m_CompleteTimes.text = StringUtility.Contact(rebornTask.completedTimes - rebornTask.gotRewardTimes, "/", rebornTask.SingleTimes);
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | using System.Collections.Generic; |
| | | using System; |
| | | using TableConfig; |
| | | using Snxxz.UI; |
| | | |
| | | public class BossRebornTask
|
| | | {
|
| | | public readonly int id;
|
| | |
|
| | | public int TotalTimes; // 可完成总次数,0表示不限次数
|
| | | public int SingleTimes; // 单次领奖需要次数
|
| | | public List<Item> rewards = new List<Item>();
|
| | |
|
| | | int m_CompleteTimes = 0;
|
| | | public int completedTimes {
|
| | |
| | | this.id = _id;
|
| | | }
|
| | |
|
| | | public BossRebornTask(HAB04_tagMCBossRebornInfo.tagMCBossRebornTaskInfo _taskInfo)
|
| | | {
|
| | | this.id = _taskInfo.TaskID;
|
| | | ParseServerInfo(_taskInfo);
|
| | | }
|
| | |
|
| | | public void UpdateActivityData(int _completedTimes, int _gotRewardTimes)
|
| | | {
|
| | | this.completedTimes = _completedTimes;
|
| | | this.gotRewardTimes = _gotRewardTimes;
|
| | | }
|
| | |
|
| | | public void UpdateActivityBaseData(HAB04_tagMCBossRebornInfo.tagMCBossRebornTaskInfo _taskInfo)
|
| | | {
|
| | | ParseServerInfo(_taskInfo);
|
| | | }
|
| | |
|
| | | public State GetState()
|
| | | {
|
| | | var config = ConfigManager.Instance.GetTemplate<BossRebornConfig>(this.id);
|
| | | var totalTimes = config.TotalTimes == 0 ? int.MaxValue : config.TotalTimes;
|
| | | var totalTimes = TotalTimes == 0 ? int.MaxValue : TotalTimes;
|
| | | if (gotRewardTimes >= totalTimes)
|
| | | {
|
| | | return State.Completed;
|
| | | }
|
| | | else if (completedTimes - gotRewardTimes >= config.SingleTimes)
|
| | | else if (completedTimes - gotRewardTimes >= SingleTimes)
|
| | | {
|
| | | return State.Rewardable;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ParseServerInfo(HAB04_tagMCBossRebornInfo.tagMCBossRebornTaskInfo _taskInfo)
|
| | | {
|
| | | this.TotalTimes = _taskInfo.TotalTimes;
|
| | | this.SingleTimes = _taskInfo.SingleTimes;
|
| | | this.rewards.Clear();
|
| | | for (int i = 0; i < _taskInfo.AwardItemCount; i++)
|
| | | {
|
| | | var serverItem = _taskInfo.AwardItem[i];
|
| | | this.rewards.Add(new Item((int)serverItem.ItemID, serverItem.ItemCount, serverItem.IsBind == 1));
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public static int SortCompare(BossRebornTask _lhs, BossRebornTask _rhs)
|
| | | {
|
| | | var stateA = _lhs.GetState();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | int m_BossRebornInderalTotal = 0;
|
| | | public int bossRebornIndegralTotal {
|
| | | get { return m_BossRebornInderalTotal; }
|
| | | set { m_BossRebornInderalTotal = value; }
|
| | | }
|
| | |
|
| | | public int surplusSecond { get { return OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.BossReborn); } }
|
| | |
|
| | | public event Action bossRebornIntergralEvent;
|
| | | public event Action<int> bossTaskStateChangeEvent;
|
| | | Dictionary<int, BossRebornTask> bossRebornTasks = new Dictionary<int, BossRebornTask>();
|
| | |
|
| | | const int bossRebornPointId = 20108;
|
| | | Redpoint bossRebornPoint = new Redpoint(201, bossRebornPointId);
|
| | | const int bossRebornPointId = 20909;
|
| | | public Redpoint bossRebornPoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, bossRebornPointId);
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | return OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.BossReborn);
|
| | | }
|
| | |
|
| | | public int GetWorldLevel()
|
| | | public void UpdateTaskBaseInfos(HAB04_tagMCBossRebornInfo.tagMCBossRebornTaskInfo[] _tasks)
|
| | | {
|
| | | OperationBase operation;
|
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.BossReborn, out operation))
|
| | | foreach (var task in _tasks)
|
| | | {
|
| | | var bossOperation = operation as OperationBossReborn;
|
| | | return bossOperation != null ? bossOperation.worldLevel : 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | return 0;
|
| | | if (bossRebornTasks.ContainsKey(task.TaskID))
|
| | | {
|
| | | bossRebornTasks[task.TaskID].UpdateActivityBaseData(task);
|
| | | }
|
| | | else
|
| | | {
|
| | | bossRebornTasks[task.TaskID] = new BossRebornTask(task);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | return bossRebornTasks[_id];
|
| | | }
|
| | |
|
| | | public int GetBossRebornNeedPoint()
|
| | | {
|
| | | var worldLevel = GetWorldLevel();
|
| | |
|
| | | var index = 0;
|
| | | for (int i = 0; i < GeneralConfig.Instance.bossRebornTotalPointWorldLevelNeed.Count; i++)
|
| | | {
|
| | | if (worldLevel >= GeneralConfig.Instance.bossRebornTotalPointWorldLevelNeed[i])
|
| | | {
|
| | | index = i + 1;
|
| | | }
|
| | | }
|
| | |
|
| | | return GeneralConfig.Instance.bossRebornTotalPoint[Mathf.Clamp(index, 0, GeneralConfig.Instance.bossRebornTotalPoint.Count - 1)];
|
| | | }
|
| | |
|
| | | public void RequestTaskReward(int _id)
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_Description.text = Language.Get("BossFHLanguage7", model.GetBossRebornNeedPoint());
|
| | | m_Description.text = Language.Get("BossFHLanguage7", model.bossRebornIndegralTotal);
|
| | | UpdateIntegral();
|
| | | UpdateCountDown();
|
| | | }
|
| | |
| | |
|
| | | private void UpdateIntegral()
|
| | | {
|
| | | var needPoint = model.GetBossRebornNeedPoint();
|
| | | var needPoint = model.bossRebornIndegralTotal;
|
| | | var progress = (float)model.bossRebornIntegral / needPoint;
|
| | | m_Slider.value = progress;
|
| | | m_Progress.text = StringUtility.Contact(model.bossRebornIntegral, "/", needPoint);
|
| | |
| | |
|
| | | public class BossIntroduceBehaviour : MonoBehaviour
|
| | | {
|
| | | [SerializeField] FindPreciousType m_FindPreciousType = FindPreciousType.WorldBoss;
|
| | | [SerializeField] protected FindPreciousType m_FindPreciousType = FindPreciousType.WorldBoss;
|
| | | [SerializeField] Transform m_ContainerReward;
|
| | | [SerializeField] Transform m_ContainerBossInfo;
|
| | |
|
| | |
| | | float confirmDelay = 0.3f;
|
| | | float confirmTimer = 0f;
|
| | | int tempBossId = 0;
|
| | | int bossId = 0;
|
| | | protected int bossId = 0;
|
| | |
|
| | | public void Display(int _bossId, bool _immediately)
|
| | | {
|
| | |
| | | m_BossAbility.Display(bossId);
|
| | | }
|
| | |
|
| | | private void DrawReward()
|
| | | protected virtual void DrawReward()
|
| | | {
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | m_ViewType = ViewType.Reward;
|
| New file |
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, August 14, 2018
|
| | | //--------------------------------------------------------
|
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using UnityEngine.UI;
|
| | | using TableConfig;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | public class DemonJarBossIntroduceBehaviour : BossIntroduceBehaviour
|
| | | {
|
| | |
|
| | | [SerializeField] Text[] m_UndoubtedlyRewardDescription;
|
| | |
|
| | | protected override void DrawReward()
|
| | | {
|
| | | base.DrawReward();
|
| | |
|
| | | if (m_FindPreciousType == FindPreciousType.DemonJar)
|
| | | {
|
| | | var demonJarConfig = ConfigManager.Instance.GetTemplate<DemonJarConfig>(bossId);
|
| | | for (int i = 0; i < m_UndoubtedlyRewardDescription.Length; i++)
|
| | | {
|
| | | var behaviour = m_UndoubtedlyRewardDescription[i];
|
| | | if (i < demonJarConfig.MustItemDescriptions.Length)
|
| | | {
|
| | | behaviour.gameObject.SetActive(true);
|
| | | behaviour.text = demonJarConfig.MustItemDescriptions[i];
|
| | | }
|
| | | else
|
| | | {
|
| | | behaviour.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
copy from Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCBossRebornInfo.cs.meta
copy to System/FindPrecious/DemonJarBossIntroduceBehaviour.cs.meta
| File was copied from Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC07_tagGCBossRebornInfo.cs.meta |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1dac3402caac450408ead6d8c9f5474b |
| | | timeCreated: 1531883702 |
| | | guid: c1971e6d24a8dc4469a7c7465ff1e3b9 |
| | | timeCreated: 1534212978 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | {
|
| | | if (type != PackType.rptItem)
|
| | | return;
|
| | |
|
| | | _gridlineCtrl.JumpIndex(0);
|
| | | OnRefrenshUIModel();
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (type != PackType.rptWarehouse)
|
| | | return;
|
| | | _gridlineCtrl.JumpIndex(0);
|
| | | OnCreateGridLineCell(_gridlineCtrl);
|
| | | }
|
| | |
|
| | |
| | | #endregion
|
| | | public event Action OnSelectRankTypeEvent;
|
| | | private int m_PresentSelectType = 0;
|
| | | public int presentSelectType
|
| | | {
|
| | | public int presentSelectType {
|
| | | get { return m_PresentSelectType; }
|
| | | set
|
| | | {
|
| | | set {
|
| | | m_PresentSelectType = value;
|
| | | if (OnSelectRankTypeEvent != null)
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | private PlayerRankData.RankType m_PresentBillRankType = PlayerRankData.RankType.OpenServerStrengthen;
|
| | | public PlayerRankData.RankType presentBillRankType
|
| | | {
|
| | | public PlayerRankData.RankType presentBillRankType {
|
| | | get { return m_PresentBillRankType; }
|
| | | set
|
| | | {
|
| | | set {
|
| | | m_PresentBillRankType = value;
|
| | | if (CoroutineMgr.Instance.CanBegRank((int)m_PresentBillRankType))
|
| | | {
|
| | |
| | | ConsumeRebateModel consumeRebateModel { get { return ModelCenter.Instance.GetModel<ConsumeRebateModel>(); } }
|
| | |
|
| | | MultipleExpModel multipleExpModel { get { return ModelCenter.Instance.GetModel<MultipleExpModel>(); } }
|
| | | BossRebornModel bossRebornModel { get { return ModelCenter.Instance.GetModel<BossRebornModel>(); } }
|
| | |
|
| | | MultipleRealmPointModel multipleRealmModel { get { return ModelCenter.Instance.GetModel<MultipleRealmPointModel>(); } }
|
| | |
|
| | | public event Action openServerActivityStateChange;
|
| | |
|
| | |
| | | _functionOrder = 5;
|
| | | return true;
|
| | | }
|
| | | if (IsMultipleRealmOpen())
|
| | | {
|
| | | _functionOrder = 8;
|
| | | return true;
|
| | | }
|
| | |
|
| | | if (IsBossRebornOpen())
|
| | | {
|
| | | _functionOrder = 9;
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | |
| | | return multipleExpModel.Open();
|
| | | }
|
| | |
|
| | | public bool IsMultipleRealmOpen()
|
| | | {
|
| | | return multipleRealmModel.IsOpen;
|
| | | }
|
| | |
|
| | | public void ProcessErrorTip()
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("ActiveOutTime");
|
| | | }
|
| | |
|
| | | public bool IsBossRebornOpen()
|
| | | {
|
| | | return bossRebornModel.IsOpen();
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | public class OpenServerActivityCell : CellView |
| | | { |
| | | [SerializeField] RedpointBehaviour m_Redpoint; |
| | | public RedpointBehaviour redpoint |
| | | { |
| | | get |
| | | { |
| | | return m_Redpoint; |
| | | } |
| | | } |
| | | [SerializeField] Button m_FuncBtn; |
| | | public Button funcBtn |
| | | { |
| | | get |
| | | { |
| | | return m_FuncBtn; |
| | | } |
| | | } |
| | | [SerializeField] FunctionButtonConfig m_AlternativeConfig; |
| | | public FunctionButtonConfig alternativeConfig { get { return m_AlternativeConfig; } set { m_AlternativeConfig = value; } } |
| | | [SerializeField] Image m_Icon; |
| | | [SerializeField] Text m_Title; |
| | | public Text title { get { return m_Title; } } |
| | | [SerializeField] Image m_Arrow; |
| | | public Image arrow { get { return m_Arrow; } } |
| | | private int m_Order = 0; |
| | | public int order { get { return m_Order; } set { m_Order = value; } } |
| | | |
| | | public void ChangeState(TitleBtnState _state) |
| | | { |
| | | m_Icon.SetSprite(alternativeConfig.GetIconKey(_state)); |
| | | m_Title.color = alternativeConfig.GetFontColor(_state); |
| | | m_Title.fontSize = alternativeConfig.GetFontSize(_state); |
| | | } |
| | | } |
| | | } |
| | | |
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | public class OpenServerActivityCell : CellView
|
| | | {
|
| | | [SerializeField] RedpointBehaviour m_Redpoint;
|
| | | public RedpointBehaviour redpoint
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_Redpoint;
|
| | | }
|
| | | }
|
| | | [SerializeField] Button m_FuncBtn;
|
| | | public Button funcBtn
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_FuncBtn;
|
| | | }
|
| | | }
|
| | | [SerializeField] FunctionButtonConfig m_AlternativeConfig;
|
| | | public FunctionButtonConfig alternativeConfig { get { return m_AlternativeConfig; } set { m_AlternativeConfig = value; } }
|
| | | [SerializeField] Image m_Icon;
|
| | | [SerializeField] Text m_Title;
|
| | | public Text title { get { return m_Title; } }
|
| | | [SerializeField] Image m_DownArrow;
|
| | | public Image downArrow { get { return m_DownArrow; } }
|
| | | [SerializeField] Image m_UpArrow;
|
| | | public Image upArrow { get { return m_UpArrow; } }
|
| | |
|
| | | private int m_Order = 0;
|
| | | public int order { get { return m_Order; } set { m_Order = value; } }
|
| | |
|
| | | public void ChangeState(TitleBtnState _state)
|
| | | {
|
| | | m_Icon.SetSprite(alternativeConfig.GetIconKey(_state));
|
| | | m_Title.color = alternativeConfig.GetFontColor(_state);
|
| | | m_Title.fontSize = alternativeConfig.GetFontSize(_state);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | Dictionary<int, bool> m_ActivitySpreadDict = new Dictionary<int, bool>();
|
| | |
|
| | | ImpactRankModel m_ImpactRankModel;
|
| | | ImpactRankModel impactRankModel
|
| | | {
|
| | | get
|
| | | {
|
| | | ImpactRankModel impactRankModel {
|
| | | get {
|
| | | return m_ImpactRankModel ?? (m_ImpactRankModel = ModelCenter.Instance.GetModel<ImpactRankModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | OSRedEnvelopeModel m_OSRedEnvelopeModel;
|
| | | OSRedEnvelopeModel envelopeModel
|
| | | {
|
| | | get
|
| | | {
|
| | | OSRedEnvelopeModel envelopeModel {
|
| | | get {
|
| | | return m_OSRedEnvelopeModel ?? (m_OSRedEnvelopeModel = ModelCenter.Instance.GetModel<OSRedEnvelopeModel>());
|
| | | }
|
| | | }
|
| | |
|
| | | OSTimeLimitGiftModel m_OSTimeLimitGiftModel;
|
| | | OSTimeLimitGiftModel timeLimitGiftModel
|
| | | {
|
| | | get
|
| | | {
|
| | | OSTimeLimitGiftModel timeLimitGiftModel {
|
| | | get {
|
| | | return m_OSTimeLimitGiftModel ?? (m_OSTimeLimitGiftModel = ModelCenter.Instance.GetModel<OSTimeLimitGiftModel>());
|
| | | }
|
| | | }
|
| | |
| | | ConsumeRebateModel consumeRebateModel { get { return ModelCenter.Instance.GetModel<ConsumeRebateModel>(); } }
|
| | |
|
| | | MultipleExpModel multipleExpModel { get { return ModelCenter.Instance.GetModel<MultipleExpModel>(); } }
|
| | |
|
| | | MultipleRealmPointModel multipleRealmPointModel { get { return ModelCenter.Instance.GetModel<MultipleRealmPointModel>(); } }
|
| | | BossRebornModel bossRebornModel { get { return ModelCenter.Instance.GetModel<BossRebornModel>(); } }
|
| | |
|
| | | List<int> openActivitys = new List<int>();
|
| | | List<int> activityReds = new List<int>();
|
| | |
| | | activityReds.Add(1);
|
| | | }
|
| | | }
|
| | | if (OpenServerActivityCenter.Instance.IsBossRebornOpen())
|
| | | {
|
| | | openActivitys.Add(9);
|
| | | if (bossRebornModel.bossRebornPoint.state == RedPointState.Simple)
|
| | | {
|
| | | activityReds.Add(9);
|
| | | }
|
| | | }
|
| | |
|
| | | if (OpenServerActivityCenter.Instance.IsMultipleExpOpen())
|
| | | {
|
| | | openActivitys.Add(5);
|
| | |
| | | activityReds.Add(5);
|
| | | }
|
| | | }
|
| | |
|
| | | if (OpenServerActivityCenter.Instance.IsMultipleRealmOpen())
|
| | | {
|
| | | openActivitys.Add(8);
|
| | | if (multipleRealmPointModel.multipleRed.state == RedPointState.Simple)
|
| | | {
|
| | | activityReds.Add(8);
|
| | | }
|
| | | }
|
| | | if (activityReds.Count > 0)
|
| | | {
|
| | | activityReds.Sort(Compare);
|
| | |
| | | {
|
| | | alreadyOpenActivitys.Add(5);
|
| | | }
|
| | | if (OpenServerActivityCenter.Instance.IsMultipleRealmOpen())
|
| | | {
|
| | | alreadyOpenActivitys.Add(8);
|
| | | }
|
| | |
|
| | | if (OpenServerActivityCenter.Instance.IsBossRebornOpen())
|
| | | {
|
| | | alreadyOpenActivitys.Add(9);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnOpenServerActivityRefresh(ScrollerDataType type, CellView cell)
|
| | |
| | |
|
| | | private void RefreshOpenActivityCell(OpenServerActivityCell _cell)
|
| | | {
|
| | | OperationBase operationBase;
|
| | | switch (_cell.index)
|
| | | {
|
| | | case 5:
|
| | | OperationBase operationBase;
|
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.MultipleExp, out operationBase))
|
| | | {
|
| | | _cell.title.text = Language.Get("ExpActivity_Text5", (operationBase as OperationMultiExp).GetMultipleCHS());
|
| | | }
|
| | | break;
|
| | | case 8:
|
| | | if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.MultipRealmPoint, out operationBase))
|
| | | {
|
| | | _cell.title.text = Language.Get("MultipleRealmPoint", Language.Get(StringUtility.Contact("Num_CHS_", (operationBase as OperationMultipleRealmPoint).multiplePractice)));
|
| | | }
|
| | | break;
|
| | | default:
|
| | |
| | | _cell.order = _cell.index;
|
| | | _cell.redpoint.redpointId = MainRedDot.REDPOINT_OPENSERVER * 100 + _cell.index;
|
| | | _cell.ChangeState(_cell.order == functionOrder ? TitleBtnState.Click : TitleBtnState.Normal);
|
| | | _cell.arrow.rectTransform.localEulerAngles = m_ActivitySpreadDict[_cell.order] ? new Vector3(0, 0, -90) : Vector3.zero;
|
| | | _cell.arrow.gameObject.SetActive(_cell.order == 0 || _cell.order == 2);
|
| | | _cell.downArrow.gameObject.SetActive(false);
|
| | | _cell.upArrow.gameObject.SetActive(false);
|
| | | if(_cell.order == 0 || _cell.order == 2)
|
| | | {
|
| | | _cell.downArrow.gameObject.SetActive(m_ActivitySpreadDict[_cell.order]);
|
| | | _cell.upArrow.gameObject.SetActive(!m_ActivitySpreadDict[_cell.order]);
|
| | | }
|
| | | _cell.funcBtn.onClick.RemoveAllListeners();
|
| | | _cell.funcBtn.onClick.AddListener(() =>
|
| | | {
|
| | |
| | | m_ActivityCtrl.AddCell(ScrollerDataType.Normal, sort * 100 + 2);
|
| | | break;
|
| | | case 3:
|
| | | m_ActivityCtrl.AddCell(ScrollerDataType.Header, sort);
|
| | | break;
|
| | | case 4:
|
| | | m_ActivityCtrl.AddCell(ScrollerDataType.Header, sort);
|
| | | break;
|
| | | case 5:
|
| | | case 8:
|
| | | case 9:
|
| | | m_ActivityCtrl.AddCell(ScrollerDataType.Header, sort);
|
| | | break;
|
| | | }
|
| | |
| | | WindowCenter.Instance.Open<MultipleExpWin>(true);
|
| | | }
|
| | | break;
|
| | | case 8:
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<NPracticePointWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<NPracticePointWin>(true);
|
| | | }
|
| | | break;
|
| | | case 9:
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<BossRebornWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<BossRebornWin>(true);
|
| | | }
|
| | | break;
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | WindowCenter.Instance.CloseImmediately<FlashSaleWin>();
|
| | | WindowCenter.Instance.CloseImmediately<ConsumeRebateWin>();
|
| | | WindowCenter.Instance.CloseImmediately<MultipleExpWin>();
|
| | | WindowCenter.Instance.CloseImmediately<NPracticePointWin>();
|
| | | WindowCenter.Instance.CloseImmediately<BossRebornWin>();
|
| | | }
|
| | |
|
| | | private int Compare(int x, int y)
|
| | |
| | | }
|
| | | break;
|
| | | case Operation.BossReborn:
|
| | | if (state == 0 && !alreadyOpenActivitys.Contains(9))
|
| | | {
|
| | | alreadyOpenActivitys.Add(9);
|
| | | UpdateFunctionBtns();
|
| | | }
|
| | | break;
|
| | | case Operation.GiftPackage:
|
| | | break;
|
| | | case Operation.FairyCeremony:
|
| | | break;
|
| | | case Operation.MultipRealmPoint:
|
| | | break;
|
| | | case Operation.max:
|
| | | if (state == 0 && !alreadyOpenActivitys.Contains(8))
|
| | | {
|
| | | alreadyOpenActivitys.Add(8);
|
| | | UpdateFunctionBtns();
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0)
|
| | | {
|
| | | if(m_storeModel.storeFunc1Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _weekStoreTitle.order;
|
| | | }
|
| | | else if(m_storeModel.storeFunc2Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _commonStoreTitle.order;
|
| | | }
|
| | | else if (m_storeModel.storeFunc3Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _growStrongerStoreTitle.order;
|
| | | }
|
| | | else if (m_storeModel.storeFunc4Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _bindStoreTitle.order;
|
| | | }
|
| | | else if (m_storeModel.storeFunc5Point.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _integralStoreTitle.order;
|
| | | }
|
| | | }
|
| | | _funcBtnGroup.TriggerByOrder(functionOrder);
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshResetTime;
|
| | | }
|
| | |
| | | model.teammateChangeMapEvent += UpdateMission;
|
| | | model.missionLevelLimitChangeEvent += UpdateMission;
|
| | | model.missionLevelLimitChangeEvent += UpdateLevelLimit;
|
| | | model.missionLevelLimitChangeEvent += UpdateAutoPrepareButton;
|
| | | model.matchingStateChangeEvent += OnMatchStateChange;
|
| | |
|
| | | m_TeamInviteEntrancePanel.activeOrDeActiveEvent += OnInvitePanelActiveOrDeActive;
|
| | |
| | | model.teammateChangeMapEvent -= UpdateMission;
|
| | | model.missionLevelLimitChangeEvent -= UpdateMission;
|
| | | model.missionLevelLimitChangeEvent -= UpdateLevelLimit;
|
| | | model.missionLevelLimitChangeEvent -= UpdateAutoPrepareButton;
|
| | | model.matchingStateChangeEvent -= OnMatchStateChange;
|
| | |
|
| | | m_TeamInviteEntrancePanel.activeOrDeActiveEvent -= OnInvitePanelActiveOrDeActive;
|
| | |
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | }
|
| | |
|
| | | public void ReqeustPrepareEnterDungeon(bool _prepare)
|
| | | public void RequestPrepareEnterDungeon(bool _prepare)
|
| | | {
|
| | | var sendInfo = new CB909_tagCGTeamMemberPrepare();
|
| | | sendInfo.PrepareState = (byte)(_prepare ? 1 : 2);
|
| | |
| | | {
|
| | | if (!AssetSource.sceneFromEditor && VersionConfig.Get().assetAccess != InstalledAsset.IngoreDownLoad && !AssetVersionUtility.unPriorAssetDownLoadDone)
|
| | | {
|
| | | ReqeustPrepareEnterDungeon(false);
|
| | | RequestPrepareEnterDungeon(false);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (isMatching)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("TeamMatchingTimeOut");
|
| | | RequestCancelAutoMatchTeam();
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | bool autoHandupRecord = false;
|
| | | int moveToNPCRecord = 0;
|
| | |
|
| | | bool rejectManual = false;
|
| | |
|
| | | TeamModel model { get { return ModelCenter.Instance.GetModel<TeamModel>(); } }
|
| | | #region Built-in
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | rejectManual = false;
|
| | | autoHandupRecord = PlayerDatas.Instance.hero.aiHandler.IsAuto();
|
| | | moveToNPCRecord = MapTransferUtility.Instance.NpcID;
|
| | |
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | if (rejectManual || model.teamPrepare.isError || model.teamPrepare.IsReject())
|
| | | {
|
| | | if (autoHandupRecord)
|
| | | {
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.Behaviour.StartHandupAI();
|
| | | }
|
| | |
|
| | | autoHandupRecord = false;
|
| | | }
|
| | |
|
| | | if (moveToNPCRecord != 0)
|
| | | {
|
| | | MapTransferUtility.Instance.MoveToNPC(moveToNPCRecord);
|
| | | moveToNPCRecord = 0;
|
| | | }
|
| | | }
|
| | |
|
| | | model.memberPrepareStateChangeEvent -= ShowPrepareStates;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | | {
|
| | |
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | |
|
| | | private void Reject()
|
| | | {
|
| | | if (autoHandupRecord)
|
| | | {
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.Behaviour.StartHandupAI();
|
| | | }
|
| | |
|
| | | autoHandupRecord = false;
|
| | | }
|
| | |
|
| | | if (moveToNPCRecord != 0)
|
| | | {
|
| | | MapTransferUtility.Instance.MoveToNPC(moveToNPCRecord);
|
| | | moveToNPCRecord = 0;
|
| | | }
|
| | |
|
| | | var myPlayerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var prepareState = model.teamPrepare.GetPlayerPrepareSate((int)myPlayerId);
|
| | | if (prepareState == TeammatePrepareState.UnPrepared)
|
| | | {
|
| | | model.ReqeustPrepareEnterDungeon(false);
|
| | | rejectManual = true;
|
| | | model.RequestPrepareEnterDungeon(false);
|
| | | WindowCenter.Instance.Close<TeamPrepareWin>();
|
| | | }
|
| | | }
|
| | |
| | | var prepareState = model.teamPrepare.GetPlayerPrepareSate((int)myPlayerId);
|
| | | if (prepareState == TeammatePrepareState.UnPrepared)
|
| | | {
|
| | | model.ReqeustPrepareEnterDungeon(true);
|
| | | model.RequestPrepareEnterDungeon(true);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | if (model.myTeam.iamCaptainer)
|
| | | {
|
| | | model.ReqeustPrepareEnterDungeon(false);
|
| | | rejectManual = true;
|
| | | model.RequestPrepareEnterDungeon(false);
|
| | | WindowCenter.Instance.Close<TeamPrepareWin>();
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | public class MultipleRealmPointModel : Model,IBeforePlayerDataInitialize,IAfterPlayerDataInitialize,IPlayerLoginOk
|
| | | {
|
| | | public const int MULTIPLEREALM_KEY = 20109;
|
| | | public Redpoint multipleRed = new Redpoint(201,MULTIPLEREALM_KEY);
|
| | | public Redpoint multipleRed = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, 20908);
|
| | | public string LocalRecord_Key = "MultipleRealmRecord";
|
| | | bool isNewDay = false;
|
| | | public override void Init()
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public bool IsOpen
|
| | | {
|
| | | get
|
| | | {
|
| | | OperationBase operation;
|
| | | OperationTimeHepler.Instance.TryGetOperationTime(Operation.MultipRealmPoint, out operation);
|
| | | return operation != null && operation.SatisfyOpenCondition() && operation.InDay(TimeUtility.ServerNow);
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshOperationClose(Operation type)
|
| | | {
|
| | | if (type != Operation.MultipRealmPoint) return;
|
| | |
| | | [SerializeField] Image multipleRealmImg;
|
| | | [SerializeField] Text activeRuleText;
|
| | | OperationBase operation;
|
| | | MultipleRealmPointModel multipleRealm { get { return ModelCenter.Instance.GetModel<MultipleRealmPointModel>(); } }
|
| | | protected override void BindController()
|
| | | {
|
| | |
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | multipleRealm.CheckShowRed(true);
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshSecond;
|
| | | InitUI();
|
| | | }
|
| | |
| | |
|
| | | }
|
| | |
|
| | | public void UpdateBossReborn(HAC07_tagGCBossRebornInfo package)
|
| | | public void UpdateBossReborn(HAB04_tagMCBossRebornInfo package)
|
| | | {
|
| | | if (string.IsNullOrEmpty(package.StartDate) || string.IsNullOrEmpty(package.EndtDate))
|
| | | {
|
| | |
| | | operationBase.Reset();
|
| | | operationBase.limitLv = package.LimitLV;
|
| | | operationBase.allDay = true;
|
| | | (operationBase as OperationBossReborn).worldLevel = package.WorldLV;
|
| | | operationBase.startDate = ParseOperationDate(package.StartDate);
|
| | | operationBase.endDate = ParseOperationDate(package.EndtDate);
|
| | |
|
| | | ModelCenter.Instance.GetModel<BossRebornModel>().UpdateTaskBaseInfos(package.TaskInfo); |
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | public class OperationBossReborn : OperationBase
|
| | | {
|
| | | public int worldLevel;
|
| | |
|
| | | public override bool SatisfyOpenCondition()
|
| | | {
|
| | | return PlayerDatas.Instance.baseData.LV >= limitLv;
|
| | |
| | |
|
| | | InSevenDayModel sevenDayModel { get { return ModelCenter.Instance.GetModel<InSevenDayModel>(); } }
|
| | |
|
| | | BossRebornModel bossRebornModel { get { return ModelCenter.Instance.GetModel<BossRebornModel>(); } }
|
| | |
|
| | | FairyJadeInvestmentModel m_FairyJadeInvestmentModel;
|
| | | FairyJadeInvestmentModel fairyJadeInvestmentModel { get { return m_FairyJadeInvestmentModel ?? (m_FairyJadeInvestmentModel = ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>()); } }
|
| | | /// <summary>
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (bossRebornModel.IsOpen() && RedpointCenter.Instance.GetRedpointState(20108) == RedPointState.Simple)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<WelfareWin>(false, 7);
|
| | | return;
|
| | | }
|
| | | if (fairyJadeInvestmentModel.redPointStre1.state == RedPointState.Simple || fairyJadeInvestmentModel.redPointStre1.state == RedPointState.GetReward)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | |
| | | return 3;
|
| | | }
|
| | |
|
| | | if (bossRebornModel.IsOpen() && RedpointCenter.Instance.GetRedpointState(20108) == RedPointState.Simple)
|
| | | {
|
| | | return 7;
|
| | | }
|
| | | if (fairyJadeInvestmentModel.redPointStre1.state == RedPointState.Simple || fairyJadeInvestmentModel.redPointStre1.state == RedPointState.GetReward)
|
| | | {
|
| | | return 8;
|
| | |
| | | [SerializeField] FunctionButton Btn_InSeven;
|
| | | [SerializeField] FunctionButton m_LevelGiftBtn;
|
| | | [SerializeField] FunctionButton m_ExchangeBtn;
|
| | | [SerializeField] FunctionButton m_BossReornBtn;
|
| | | [SerializeField] FunctionButton m_NpracticeBtn;
|
| | | [SerializeField] FunctionButton m_FairyJadeInvestment;
|
| | | [SerializeField] FunctionButtonGroup buttonGroup;
|
| | | [SerializeField] Button closeBtn;
|
| | |
|
| | | [SerializeField] Text m_MultipleRealmPointTitle;
|
| | |
|
| | | MultipleRealmPointModel multipleRealmModel { get { return ModelCenter.Instance.GetModel<MultipleRealmPointModel>(); } }
|
| | | InSevenDayModel m_InSevenDayModel;
|
| | | InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } }
|
| | |
|
| | | BossRebornModel bossRebornModel { get { return ModelCenter.Instance.GetModel<BossRebornModel>(); } }
|
| | | FairyJadeInvestmentModel m_FairyJadeInvestmentModel;
|
| | | FairyJadeInvestmentModel fairyJadeInvestmentModel { get { return m_FairyJadeInvestmentModel ?? (m_FairyJadeInvestmentModel = ModelCenter.Instance.GetModel<FairyJadeInvestmentModel>()); } }
|
| | | #region Built-in
|
| | |
| | | Btn_InSeven.AddListener(InSeven);
|
| | | m_LevelGiftBtn.onClick.AddListener(OnLevelGift);
|
| | | m_ExchangeBtn.onClick.AddListener(OnExchange);
|
| | | m_NpracticeBtn.AddListener(OnNPractice);
|
| | | closeBtn.onClick.AddListener(CloseClick);
|
| | | m_BossReornBtn.AddListener(BossRebornBtn);
|
| | | m_FairyJadeInvestment.AddListener(FairyJade);
|
| | | }
|
| | |
|
| | |
| | | functionOrder = 3;
|
| | | }
|
| | |
|
| | | private void BossRebornBtn()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<BossRebornWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<BossRebornWin>();
|
| | | }
|
| | |
|
| | | functionOrder = 7;
|
| | | }
|
| | |
|
| | | private void FairyJade()
|
| | | {
|
| | | CloseChildWin();
|
| | |
| | | WindowCenter.Instance.Open<AwardExchangeWin>();
|
| | | }
|
| | | functionOrder = 6;
|
| | | }
|
| | |
|
| | |
|
| | | private void OnNPractice()
|
| | | {
|
| | | CloseChildWin();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<NPracticePointWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<NPracticePointWin>();
|
| | | }
|
| | | multipleRealmModel.CheckShowRed(true);
|
| | | functionOrder = 8;
|
| | | }
|
| | |
|
| | | private void OnSignIn()
|
| | |
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<AwardExchangeWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<NPracticePointWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<NPracticePointWin>();
|
| | | }
|
| | | if (WindowCenter.Instance.CheckOpen<FairyJadeInvestmentWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<FairyJadeInvestmentWin>();
|
| | | }
|
| | | WindowCenter.Instance.CloseImmediately<BossRebornWin>();
|
| | | }
|
| | |
|
| | | private void OperationStartEvent(Operation arg1, int arg2)
|
| | |
| | |
|
| | | private void OperationEndEvent(Operation type, int state)
|
| | | {
|
| | | OperationBase operation;
|
| | | if (type == Operation.BossReborn && !bossRebornModel.IsOpen() && WindowCenter.Instance.CheckOpen<BossRebornWin>())
|
| | | {
|
| | | buttonGroup.TriggerByOrder(WelfareCenter.Instance.GetWelfareFuncOrder());
|
| | | }
|
| | | else if (type == Operation.MultipRealmPoint && !Open(Operation.MultipRealmPoint, out operation) && WindowCenter.Instance.CheckOpen<NPracticePointWin>())
|
| | | {
|
| | | buttonGroup.TriggerByOrder(WelfareCenter.Instance.GetWelfareFuncOrder());
|
| | | }
|
| | | }
|
| | |
|
| | | void CheckOperationOpen()
|
| | | {
|
| | | m_BossReornBtn.gameObject.SetActive(bossRebornModel.IsOpen());
|
| | |
|
| | | OperationBase operation = null;
|
| | | bool isOpen = Open(Operation.MultipRealmPoint, out operation);
|
| | | m_NpracticeBtn.gameObject.SetActive(isOpen);
|
| | | if (isOpen)
|
| | | {
|
| | | m_MultipleRealmPointTitle.text = Language.Get("MultipleRealmPoint", Language.Get(StringUtility.Contact("Num_CHS_", (operation as OperationMultipleRealmPoint).multiplePractice)));
|
| | | }
|
| | | }
|
| | |
|
| | | public bool Open(Operation type,out OperationBase operation)
|
| | |
| | | case JumpUIType.TreasureSoul:
|
| | | SetJumpLogic<TreasureSoulWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.ConsumreRebate:
|
| | | case JumpUIType.BossReborn:
|
| | | SetJumpLogic<WelfareWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.LimitedTimePackage:
|
| | | SetJumpLogic<LimitedTimePackageWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.OSTimeLimitGift:
|
| | | case JumpUIType.FlashSale:
|
| | | case JumpUIType.ConsumreRebate:
|
| | | case JumpUIType.BossReborn:
|
| | | SetJumpLogic<OpenServerActivityWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.BestXB:
|
| | |
| | | PersonalBoss,
|
| | | ElderGodArea,
|
| | | DemonJar,
|
| | | AerialBuilding,
|
| | | }
|
| | |
|
| | | public enum GotServerRewardType
|
| | |
| | |
|
| | | public class RuntimeLogUtility : MonoBehaviour
|
| | | {
|
| | | private static string LS_Key_ForceAutoFight = "LS_Key_ForceAutoFight";
|
| | |
|
| | | public static bool s_BattleLog = false;
|
| | | public static bool s_MoveLog = false;
|
| | | public static bool s_ForceOneEnemy = false;
|
| | |
| | | public static bool s_UseKeyBoardCastSkill = false;
|
| | | public static bool s_LogMoveDistance = false;
|
| | | public static bool s_SkillEffectLog = false;
|
| | | public static bool s_forceAutoFight = false;
|
| | | public static bool s_forceAutoFight
|
| | | {
|
| | | get
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | return EditorPrefs.GetBool("LS_Key_ForceAutoFight", true);
|
| | | #else
|
| | | return true;
|
| | | #endif
|
| | | }
|
| | |
|
| | | set
|
| | | {
|
| | | #if UNITY_EDITOR
|
| | | EditorPrefs.SetBool("LS_Key_ForceAutoFight", value);
|
| | | #endif
|
| | | }
|
| | | }
|
| | | public static string s_LogPath;
|
| | | static readonly Dictionary<uint, StringBuilder> s_LogDict = new Dictionary<uint, StringBuilder>();
|
| | | static readonly List<string> s_LogList = new List<string>();
|