Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -424,6 +424,9 @@ Register(typeof(HAC09_tagGCFairyCeremonyInfo), typeof(DTCAC09_tagGCFairyCeremonyInfo)); Register(typeof(HAA14_tagMCXJSDRecharge), typeof(DTCAA14_tagMCXJSDRecharge)); Register(typeof(HAA15_tagMCAllPeoplePartyInfo), typeof(DTCAA15_tagMCAllPeoplePartyInfo)); Register(typeof(HAC0B_tagGCNewFairyCeremonyInfo), typeof(DTCAC0B_tagGCNewFairyCeremonyInfo)); Register(typeof(HAA22_tagMCNewXJSDRecharge), typeof(DTCAA22_tagMCNewXJSDRecharge)); Register(typeof(HAA23_tagMCNewAllPeoplePartyInfo), typeof(DTCAA23_tagMCNewAllPeoplePartyInfo)); #endregion #region 神兽 @@ -439,6 +442,10 @@ Register(typeof(HA806_tagMCMysticalShopTimeInfo), typeof(DTCA806_tagMCMysticalShopTimeInfo)); Register(typeof(HAA0A_tagMCWeekPartyInfo), typeof(DTCAA0A_tagMCWeekPartyInfo)); Register(typeof(HAA0B_tagMCWeekPartyPlayerInfo), typeof(DTCAA0B_tagMCWeekPartyPlayerInfo)); Register(typeof(HAA0C_tagMCActLoginAwardInfo), typeof(DTCAA0C_tagMCActLoginAwardInfo)); Register(typeof(HAA0D_tagMCActLoginAwardPlayerInfo), typeof(DTCAA0D_tagMCActLoginAwardPlayerInfo)); Register(typeof(HAA20_tagMCFeastWeekPartyInfo), typeof(DTCAA20_tagMCFeastWeekPartyInfo)); Register(typeof(HAA21_tagMCFeastWeekPartyPlayerInfo), typeof(DTCAA21_tagMCFeastWeekPartyPlayerInfo)); } private static void Register(Type _pack, Type _business) Core/GameEngine/Model/Config/FashionDressConfig.cs
@@ -1,6 +1,6 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, January 08, 2019 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; @@ -14,6 +14,7 @@ public int CoatID { get ; private set ; } public string name { get ; private set; } public int type { get ; private set ; } public int FashionSuitType { get ; private set ; } public int quality { get ; private set ; } public string getWay { get ; private set; } public int[] EquipItemID; @@ -36,29 +37,31 @@ type=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; quality=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; FashionSuitType=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; getWay = rawContents[4].Trim(); quality=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; string[] EquipItemIDStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); getWay = rawContents[5].Trim(); string[] EquipItemIDStringArray = rawContents[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); EquipItemID = new int[EquipItemIDStringArray.Length]; for (int i=0;i<EquipItemIDStringArray.Length;i++) { int.TryParse(EquipItemIDStringArray[i],out EquipItemID[i]); } UnlockItemID=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; UnlockItemID=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; MaxLV=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0; MaxLV=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0; string[] CostItemCntStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); string[] CostItemCntStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); CostItemCnt = new int[CostItemCntStringArray.Length]; for (int i=0;i<CostItemCntStringArray.Length;i++) { int.TryParse(CostItemCntStringArray[i],out CostItemCnt[i]); } StarAttr = rawContents[9].Trim(); StarAttr = rawContents[10].Trim(); } catch (Exception ex) { Core/GameEngine/Model/Config/FashionDressConfig.cs.meta
@@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 5ac2a701b6eaba844b1082c87758125e timeCreated: 1546945768 timeCreated: 1548676001 licenseType: Pro MonoImporter: serializedVersion: 2 Core/GameEngine/Model/Config/HolidayHomingConfig.cs
New file @@ -0,0 +1,56 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class HolidayHomingConfig : ConfigBase { public int Id { get ; private set ; } public int ActionType { get ; private set ; } public string Description { get ; private set; } public int jump { get ; private set ; } public int order { get ; private set ; } public int DailyQusetId { get ; private set ; } public int SpecialDisplayType { get ; private set ; } public override string getKey() { return Id.ToString(); } public override void Parse() { try { Id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; ActionType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; Description = rawContents[2].Trim(); jump=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; order=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; DailyQusetId=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; SpecialDisplayType=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/HolidayHomingConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 8d3d7608c7608d344837efce0985daa5 timeCreated: 1548642619 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/Config/HolidayHomingPointConfig.cs
New file @@ -0,0 +1,47 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class HolidayHomingPointConfig : ConfigBase { public int Id { get ; private set ; } public string ImageType1 { get ; private set; } public string ImageType2 { get ; private set; } public string name { get ; private set; } public override string getKey() { return Id.ToString(); } public override void Parse() { try { Id=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; ImageType1 = rawContents[1].Trim(); ImageType2 = rawContents[2].Trim(); name = rawContents[3].Trim(); } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/HolidayHomingPointConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 72b35cd6566b7d34389dd31103502961 timeCreated: 1548642631 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/Config/NewAllPeoplePartyAwardConfig.cs
New file @@ -0,0 +1,50 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class NewAllPeoplePartyAwardConfig : ConfigBase { public int ID { get ; private set ; } public int WorldLvNum { get ; private set ; } public int Index { get ; private set ; } public int NeedPoint { get ; private set ; } public string Award { get ; private set; } public override string getKey() { return ID.ToString(); } public override void Parse() { try { ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; WorldLvNum=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; Index=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; NeedPoint=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0; Award = rawContents[4].Trim(); } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/NewAllPeoplePartyAwardConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: dc45dc5c333241a4aa6a86d6582345d4 timeCreated: 1548641231 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/Config/NewAllPeoplePartyConfig.cs
New file @@ -0,0 +1,56 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class NewAllPeoplePartyConfig : ConfigBase { public int ID { get ; private set ; } public int TotalTimes { get ; private set ; } public int AddPoint { get ; private set ; } public string TaskDes { get ; private set; } public int FuncID { get ; private set ; } public int JumpId { get ; private set ; } public string IconKey { get ; private set; } public override string getKey() { return ID.ToString(); } public override void Parse() { try { ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; TotalTimes=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; AddPoint=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; TaskDes = rawContents[3].Trim(); FuncID=IsNumeric(rawContents[4]) ? int.Parse(rawContents[4]):0; JumpId=IsNumeric(rawContents[5]) ? int.Parse(rawContents[5]):0; IconKey = rawContents[6].Trim(); } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/NewAllPeoplePartyConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 01085571ea414574ab820a603c95a7e4 timeCreated: 1548641216 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/Config/NewUniquenessArriveConfig.cs
New file @@ -0,0 +1,47 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; using System; namespace TableConfig { public partial class NewUniquenessArriveConfig : ConfigBase { public int ID { get ; private set ; } public int WorldLvNum { get ; private set ; } public int Rank { get ; private set ; } public string Award { get ; private set; } public override string getKey() { return ID.ToString(); } public override void Parse() { try { ID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; WorldLvNum=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; Rank=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0; Award = rawContents[3].Trim(); } catch (Exception ex) { DebugEx.Log(ex); } } } } Core/GameEngine/Model/Config/NewUniquenessArriveConfig.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 87366e89b63cd3342857f3a053af847d timeCreated: 1548641281 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/GameEngine/Model/ConfigManager.cs
@@ -192,6 +192,9 @@ AddAsyncTask<UniquenessArriveConfig>(); AddAsyncTask<AllPeoplePartyConfig>(); AddAsyncTask<AllPeoplePartyAwardConfig>(); AddAsyncTask<NewUniquenessArriveConfig>(); AddAsyncTask<NewAllPeoplePartyConfig>(); AddAsyncTask<NewAllPeoplePartyAwardConfig>(); AddAsyncTask<OrderInfoConfig>(); AddAsyncTask<TrialExchangeConfig>(); AddAsyncTask<DogzDungeonConfig>(); @@ -230,7 +233,8 @@ AddAsyncTask<JadeDynastySuitAttrConfig>(); AddAsyncTask<SkillFrameAnimationConfig>(); AddAsyncTask<FestivalRedpackTaskConfig>(); AddAsyncTask<HolidayHomingConfig>(); AddAsyncTask<HolidayHomingPointConfig>(); while (!AllCompleted()) { var completedCount = 0; Core/GameEngine/Model/Player/Rank/PlayerRankData.cs
@@ -124,6 +124,7 @@ OpenServerRecharge = 21, OpenServerPet = 22, JadeDynastyTower=23,//诛仙塔排行榜 Def_BT_NewFCCostGold = 24, //消费排行榜(新仙界盛典) 24 } public class RankData Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA0A_tagMCWeekPartyInfo.cs
@@ -15,6 +15,7 @@ { return; } OperationTimeHepler.Instance.OpenServiceAchievement(vNetData); model.WeekPartyInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA0C_tagMCActLoginAwardInfo.cs
New file @@ -0,0 +1,21 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo public class DTCAA0C_tagMCActLoginAwardInfo : DtcBasic { LoginRewardModel m_LoginRewardModel; LoginRewardModel loginRewardModel { get { return m_LoginRewardModel ?? (m_LoginRewardModel = ModelCenter.Instance.GetModel<LoginRewardModel>()); } } public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAA0C_tagMCActLoginAwardInfo vNetData = vNetPack as HAA0C_tagMCActLoginAwardInfo; if (vNetData == null) { return; } OperationTimeHepler.Instance.RefreshLoginReward(vNetData); loginRewardModel.LoginAwardInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA0C_tagMCActLoginAwardInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 7a1f6e4974acd9e4fa893257d4a0a5a3 timeCreated: 1547783303 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA0D_tagMCActLoginAwardPlayerInfo.cs
New file @@ -0,0 +1,20 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AA 0D 登录奖励玩家活动信息 #tagMCActLoginAwardPlayerInfo public class DTCAA0D_tagMCActLoginAwardPlayerInfo : DtcBasic { LoginRewardModel m_LoginRewardModel; LoginRewardModel loginRewardModel { get { return m_LoginRewardModel ?? (m_LoginRewardModel = ModelCenter.Instance.GetModel<LoginRewardModel>()); } } public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAA0D_tagMCActLoginAwardPlayerInfo vNetData = vNetPack as HAA0D_tagMCActLoginAwardPlayerInfo; if (vNetData == null) { return; } loginRewardModel.LoginAwardPlayerInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA0D_tagMCActLoginAwardPlayerInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 34ae4e7c0f7c0184391054f28930408a timeCreated: 1547783303 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA20_tagMCFeastWeekPartyInfo.cs
New file @@ -0,0 +1,22 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AA 20 节日巡礼活动信息 #tagMCFeastWeekPartyInfo public class DTCAA20_tagMCFeastWeekPartyInfo : DtcBasic { SpringFestivalModel model { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAA20_tagMCFeastWeekPartyInfo vNetData = vNetPack as HAA20_tagMCFeastWeekPartyInfo; if (vNetData == null) { return; } OperationTimeHepler.Instance.SpringFestival(vNetData); model.SpringFestivalTemplate(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA20_tagMCFeastWeekPartyInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: aaf06cbce14a41245bd9fba2fdfbbc87 timeCreated: 1548641524 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA21_tagMCFeastWeekPartyPlayerInfo.cs
New file @@ -0,0 +1,22 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AA 21 节日巡礼玩家活动信息 #tagMCFeastWeekPartyPlayerInfo public class DTCAA21_tagMCFeastWeekPartyPlayerInfo : DtcBasic { SpringFestivalModel model { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAA21_tagMCFeastWeekPartyPlayerInfo vNetData = vNetPack as HAA21_tagMCFeastWeekPartyPlayerInfo; if (vNetData == null) { return; } model.SpringFestivalInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA21_tagMCFeastWeekPartyPlayerInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 545412b628f8a19419a48aee51cea0dc timeCreated: 1548641521 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA22_tagMCNewXJSDRecharge.cs
New file @@ -0,0 +1,21 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AA 22 新仙界盛典充值大礼 #tagMCNewXJSDRecharge public class DTCAA22_tagMCNewXJSDRecharge : DtcBasic { public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAA22_tagMCNewXJSDRecharge vNetData = vNetPack as HAA22_tagMCNewXJSDRecharge; var model = ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); model.GetServerRechargeInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA22_tagMCNewXJSDRecharge.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: e8bcbd5d6d737b04196d56af34ff8f19 timeCreated: 1548645936 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA23_tagMCNewAllPeoplePartyInfo.cs
New file @@ -0,0 +1,21 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AA 23 新仙界盛典全民来嗨玩家信息 #tagMCNewAllPeoplePartyInfo public class DTCAA23_tagMCNewAllPeoplePartyInfo : DtcBasic { public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAA23_tagMCNewAllPeoplePartyInfo vNetData = vNetPack as HAA23_tagMCNewAllPeoplePartyInfo; var model = ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); model.GetServerPeopleInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAA_SaleActivity/DTCAA23_tagMCNewAllPeoplePartyInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: b58ea3beec5473f40beee65664f5c52f timeCreated: 1548645936 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC0B_tagGCNewFairyCeremonyInfo.cs
New file @@ -0,0 +1,21 @@ using UnityEngine; using System.Collections; using Snxxz.UI; // AC 0B 新仙界盛典活动信息 #tagGCNewFairyCeremonyInfo public class DTCAC0B_tagGCNewFairyCeremonyInfo : DtcBasic { public override void Done(GameNetPackBasic vNetPack) { base.Done(vNetPack); HAC0B_tagGCNewFairyCeremonyInfo vNetData = vNetPack as HAC0B_tagGCNewFairyCeremonyInfo; var model = ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); model.GetServerActiveInfo(vNetData); } } Core/NetworkPackage/DTCFile/ServerPack/HAC_Activity/DTCAC0B_tagGCNewFairyCeremonyInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: b35fcff20e831be44b8cd523fd6dd60d timeCreated: 1548645936 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA0C_tagMCActLoginAwardInfo.cs
New file @@ -0,0 +1,75 @@ using UnityEngine; using System.Collections; // AA 0C 登录奖励活动信息 #tagMCActLoginAwardInfo public class HAA0C_tagMCActLoginAwardInfo : GameNetPackBasic { public string StartDate; // 开始日期 y-m-d public string EndtDate; // 结束日期 y-m-d public ushort AdvanceMinutes; // 提前显示分钟 public byte IsDayReset; //是否每天重置 public byte ResetType; // 重置类型,0-0点重置;1-5点重置 public ushort LimitLV; // 限制等级 public byte DayCnt; // 天数 public tagMCActLoginAwardDayInfo[] DayInfoList; // 每天模板 public byte TCount; // 模板数 public tagMCActLoginAwardAction[] ActionInfo; // 活动模板信息 public HAA0C_tagMCActLoginAwardInfo () { _cmd = (ushort)0xAA0C; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out StartDate, vBytes, NetDataType.Chars, 10); TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10); TransBytes (out AdvanceMinutes, vBytes, NetDataType.WORD); TransBytes (out IsDayReset, vBytes, NetDataType.BYTE); TransBytes (out ResetType, vBytes, NetDataType.BYTE); TransBytes (out LimitLV, vBytes, NetDataType.WORD); TransBytes (out DayCnt, vBytes, NetDataType.BYTE); DayInfoList = new tagMCActLoginAwardDayInfo[DayCnt]; for (int i = 0; i < DayCnt; i ++) { DayInfoList[i] = new tagMCActLoginAwardDayInfo(); TransBytes (out DayInfoList[i].ActCnt, vBytes, NetDataType.BYTE); TransBytes (out DayInfoList[i].TemplateList, vBytes, NetDataType.WORD, DayInfoList[i].ActCnt); } TransBytes (out TCount, vBytes, NetDataType.BYTE); ActionInfo = new tagMCActLoginAwardAction[TCount]; for (int i = 0; i < TCount; i ++) { ActionInfo[i] = new tagMCActLoginAwardAction(); TransBytes (out ActionInfo[i].TemplateID, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].ActionType, vBytes, NetDataType.WORD); TransBytes (out ActionInfo[i].TotalTimes, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].SingleTimes, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].Count, vBytes, NetDataType.BYTE); ActionInfo[i].ItemInfo = new tagMCActLoginAwardItem[ActionInfo[i].Count]; for (int j = 0; j < ActionInfo[i].Count; j ++) { ActionInfo[i].ItemInfo[j] = new tagMCActLoginAwardItem(); TransBytes (out ActionInfo[i].ItemInfo[j].ItemID, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].ItemInfo[j].ItemCnt, vBytes, NetDataType.WORD); TransBytes (out ActionInfo[i].ItemInfo[j].IsBind, vBytes, NetDataType.BYTE); } } } public struct tagMCActLoginAwardItem { public uint ItemID; // 物品ID public ushort ItemCnt; // 物品数量 public byte IsBind; // 是否绑定 } public struct tagMCActLoginAwardAction { public uint TemplateID; // 模板ID public ushort ActionType; // 活动类别 public uint TotalTimes; // 可完成的总次数,0表示不限次数 public uint SingleTimes; // 单次领奖需要的次数 public byte Count; // 物品数 public tagMCActLoginAwardItem[] ItemInfo; // 物品信息 } public struct tagMCActLoginAwardDayInfo { public byte ActCnt; // 数量 public ushort[] TemplateList; // 模板列表 } } Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA0C_tagMCActLoginAwardInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: b1fcb37796d75a545a76f01f1ec085bf timeCreated: 1547783303 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA0D_tagMCActLoginAwardPlayerInfo.cs
New file @@ -0,0 +1,43 @@ using UnityEngine; using System.Collections; // AA 0D 登录奖励玩家活动信息 #tagMCActLoginAwardPlayerInfo public class HAA0D_tagMCActLoginAwardPlayerInfo : GameNetPackBasic { public byte Count; public tagMCActLoginAwardDayPlayerInfo[] DayInfoList; //活动完成次数信息 public HAA0D_tagMCActLoginAwardPlayerInfo () { _cmd = (ushort)0xAA0D; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out Count, vBytes, NetDataType.BYTE); DayInfoList = new tagMCActLoginAwardDayPlayerInfo[Count]; for (int i = 0; i < Count; i ++) { DayInfoList[i] = new tagMCActLoginAwardDayPlayerInfo(); TransBytes (out DayInfoList[i].DayIndex, vBytes, NetDataType.DWORD); TransBytes (out DayInfoList[i].ACount, vBytes, NetDataType.DWORD); DayInfoList[i].TaskList = new tagMCActLoginAwardTaskInfo[DayInfoList[i].ACount]; for (int j = 0; j < DayInfoList[i].ACount; j ++) { DayInfoList[i].TaskList[j] = new tagMCActLoginAwardTaskInfo(); TransBytes (out DayInfoList[i].TaskList[j].TemplateID, vBytes, NetDataType.WORD); TransBytes (out DayInfoList[i].TaskList[j].CurTimes, vBytes, NetDataType.WORD); TransBytes (out DayInfoList[i].TaskList[j].GotTimes, vBytes, NetDataType.WORD); } } } public struct tagMCActLoginAwardDayPlayerInfo { public uint DayIndex; //第X天 public uint ACount; //任务条目数 public tagMCActLoginAwardTaskInfo[] TaskList; //活动完成次数信息 } public struct tagMCActLoginAwardTaskInfo { public ushort TemplateID; // 模板ID public ushort CurTimes; //已完成次数 public ushort GotTimes; //已领取次数 } } Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA0D_tagMCActLoginAwardPlayerInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 0ba7797ba0b9ed64daf82d4441538adf timeCreated: 1547783303 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA20_tagMCFeastWeekPartyInfo.cs
New file @@ -0,0 +1,90 @@ using UnityEngine; using System.Collections; // AA 20 节日巡礼活动信息 #tagMCFeastWeekPartyInfo public class HAA20_tagMCFeastWeekPartyInfo : GameNetPackBasic { public string StartDate; // 开始日期 y-m-d public string EndtDate; // 结束日期 y-m-d public ushort AdvanceMinutes; // 提前显示分钟 public byte IsDayReset; //是否每天重置 public byte ResetType; // 重置类型,0-0点重置;1-5点重置 public ushort LimitLV; // 限制等级 public byte DayCnt; // 天数 public tagMCFeastWeekPartyDayInfo[] DayInfoList; // 每天模板 public byte TCount; // 模板数 public tagMCFeastWeekPartyAction[] ActionInfo; // 活动模板信息 public HAA20_tagMCFeastWeekPartyInfo () { _cmd = (ushort)0xAA20; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out StartDate, vBytes, NetDataType.Chars, 10); TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10); TransBytes (out AdvanceMinutes, vBytes, NetDataType.WORD); TransBytes (out IsDayReset, vBytes, NetDataType.BYTE); TransBytes (out ResetType, vBytes, NetDataType.BYTE); TransBytes (out LimitLV, vBytes, NetDataType.WORD); TransBytes (out DayCnt, vBytes, NetDataType.BYTE); DayInfoList = new tagMCFeastWeekPartyDayInfo[DayCnt]; for (int i = 0; i < DayCnt; i ++) { DayInfoList[i] = new tagMCFeastWeekPartyDayInfo(); TransBytes (out DayInfoList[i].ActCnt, vBytes, NetDataType.BYTE); TransBytes (out DayInfoList[i].TemplateList, vBytes, NetDataType.WORD, DayInfoList[i].ActCnt); TransBytes (out DayInfoList[i].PCount, vBytes, NetDataType.BYTE); DayInfoList[i].PItemInfo = new tagMCFeastWeekPartyItem[DayInfoList[i].PCount]; for (int j = 0; j < DayInfoList[i].PCount; j ++) { DayInfoList[i].PItemInfo[j] = new tagMCFeastWeekPartyItem(); TransBytes (out DayInfoList[i].PItemInfo[j].NeedPoint, vBytes, NetDataType.WORD); TransBytes (out DayInfoList[i].PItemInfo[j].ItemID, vBytes, NetDataType.DWORD); TransBytes (out DayInfoList[i].PItemInfo[j].ItemCnt, vBytes, NetDataType.WORD); TransBytes (out DayInfoList[i].PItemInfo[j].IsBind, vBytes, NetDataType.BYTE); } } TransBytes (out TCount, vBytes, NetDataType.BYTE); ActionInfo = new tagMCFeastWeekPartyAction[TCount]; for (int i = 0; i < TCount; i ++) { ActionInfo[i] = new tagMCFeastWeekPartyAction(); TransBytes (out ActionInfo[i].TemplateID, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].ActionType, vBytes, NetDataType.WORD); TransBytes (out ActionInfo[i].TotalTimes, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].SingleTimes, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].Point, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].Count, vBytes, NetDataType.BYTE); ActionInfo[i].ItemInfo = new tagMCFeastWeekPartyItem[ActionInfo[i].Count]; for (int j = 0; j < ActionInfo[i].Count; j ++) { ActionInfo[i].ItemInfo[j] = new tagMCFeastWeekPartyItem(); TransBytes (out ActionInfo[i].ItemInfo[j].NeedPoint, vBytes, NetDataType.WORD); TransBytes (out ActionInfo[i].ItemInfo[j].ItemID, vBytes, NetDataType.DWORD); TransBytes (out ActionInfo[i].ItemInfo[j].ItemCnt, vBytes, NetDataType.WORD); TransBytes (out ActionInfo[i].ItemInfo[j].IsBind, vBytes, NetDataType.BYTE); } } } public struct tagMCFeastWeekPartyAction { public uint TemplateID; // 模板ID public ushort ActionType; // 活动类别 public uint TotalTimes; // 可完成的总次数,0表示不限次数 public uint SingleTimes; // 单次领奖需要的次数 public uint Point; // 单次领奖积分 public byte Count; // 物品数 public tagMCFeastWeekPartyItem[] ItemInfo; // 物品信息 } public struct tagMCFeastWeekPartyItem { public ushort NeedPoint; // 领奖需要积分 public uint ItemID; // 物品ID public ushort ItemCnt; // 物品数量 public byte IsBind; // 是否绑定 } public struct tagMCFeastWeekPartyDayInfo { public byte ActCnt; // 数量 public ushort[] TemplateList; // 模板列表 public byte PCount; // 物品数 public tagMCFeastWeekPartyItem[] PItemInfo; // 物品信息 } } Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA20_tagMCFeastWeekPartyInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: eeaeb20e0eb5d8c47a368fa5b96cfc98 timeCreated: 1548641524 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA21_tagMCFeastWeekPartyPlayerInfo.cs
New file @@ -0,0 +1,47 @@ using UnityEngine; using System.Collections; // AA 21 节日巡礼玩家活动信息 #tagMCFeastWeekPartyPlayerInfo public class HAA21_tagMCFeastWeekPartyPlayerInfo : GameNetPackBasic { public byte Count; public tagMCFeastWeekPartyDayPlayerInfo[] DayInfoList; //活动完成次数信息 public HAA21_tagMCFeastWeekPartyPlayerInfo () { _cmd = (ushort)0xAA21; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out Count, vBytes, NetDataType.BYTE); DayInfoList = new tagMCFeastWeekPartyDayPlayerInfo[Count]; for (int i = 0; i < Count; i ++) { DayInfoList[i] = new tagMCFeastWeekPartyDayPlayerInfo(); TransBytes (out DayInfoList[i].DayIndex, vBytes, NetDataType.DWORD); TransBytes (out DayInfoList[i].Point, vBytes, NetDataType.DWORD); TransBytes (out DayInfoList[i].AwardRecord, vBytes, NetDataType.DWORD); TransBytes (out DayInfoList[i].ACount, vBytes, NetDataType.DWORD); DayInfoList[i].TaskList = new tagMCFeastWeekPartyTaskInfo[DayInfoList[i].ACount]; for (int j = 0; j < DayInfoList[i].ACount; j ++) { DayInfoList[i].TaskList[j] = new tagMCFeastWeekPartyTaskInfo(); TransBytes (out DayInfoList[i].TaskList[j].TemplateID, vBytes, NetDataType.WORD); TransBytes (out DayInfoList[i].TaskList[j].CurTimes, vBytes, NetDataType.DWORD); TransBytes (out DayInfoList[i].TaskList[j].GotTimes, vBytes, NetDataType.DWORD); } } } public struct tagMCFeastWeekPartyDayPlayerInfo { public uint DayIndex; //第X天 public uint Point; //积分 public uint AwardRecord; //积分领奖记录 public uint ACount; //任务条目数 public tagMCFeastWeekPartyTaskInfo[] TaskList; //活动完成次数信息 } public struct tagMCFeastWeekPartyTaskInfo { public ushort TemplateID; // 模板ID public uint CurTimes; //已完成次数 public uint GotTimes; //已领取次数 } } Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA21_tagMCFeastWeekPartyPlayerInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 726d8302a026f8941aa12b1844e92b1c timeCreated: 1548641524 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA22_tagMCNewXJSDRecharge.cs
New file @@ -0,0 +1,17 @@ using UnityEngine; using System.Collections; // AA 22 新仙界盛典充值大礼 #tagMCNewXJSDRecharge public class HAA22_tagMCNewXJSDRecharge : GameNetPackBasic { public byte State; //0-不可领 1-可领 2-已领取 public HAA22_tagMCNewXJSDRecharge () { _cmd = (ushort)0xAA22; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out State, vBytes, NetDataType.BYTE); } } Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA22_tagMCNewXJSDRecharge.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: ece86af19cf032a488d22e51682d5ab6 timeCreated: 1548645937 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA23_tagMCNewAllPeoplePartyInfo.cs
New file @@ -0,0 +1,33 @@ using UnityEngine; using System.Collections; // AA 23 新仙界盛典全民来嗨玩家信息 #tagMCNewAllPeoplePartyInfo public class HAA23_tagMCNewAllPeoplePartyInfo : GameNetPackBasic { public uint CurPoint; //当前总点数 public uint AwardRecord; //领奖记录 按奖励索引二进制位存储是否已领取 public byte Count; public tagMCNewAllPeoplePartyCount[] BuyCountList; //活动完成次数信息 public HAA23_tagMCNewAllPeoplePartyInfo () { _cmd = (ushort)0xAA23; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out CurPoint, vBytes, NetDataType.DWORD); TransBytes (out AwardRecord, vBytes, NetDataType.DWORD); TransBytes (out Count, vBytes, NetDataType.BYTE); BuyCountList = new tagMCNewAllPeoplePartyCount[Count]; for (int i = 0; i < Count; i ++) { BuyCountList[i] = new tagMCNewAllPeoplePartyCount(); TransBytes (out BuyCountList[i].ActID, vBytes, NetDataType.DWORD); TransBytes (out BuyCountList[i].CurTimes, vBytes, NetDataType.WORD); } } public struct tagMCNewAllPeoplePartyCount { public uint ActID; //活动ID public ushort CurTimes; //已完成次数 } } Core/NetworkPackage/ServerPack/HAA_SaleActivity/HAA23_tagMCNewAllPeoplePartyInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 5a952a9c068761b409b457f19e45960f timeCreated: 1548645936 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HAC_Activity/HAC0B_tagGCNewFairyCeremonyInfo.cs
New file @@ -0,0 +1,25 @@ using UnityEngine; using System.Collections; // AC 0B 新仙界盛典活动信息 #tagGCNewFairyCeremonyInfo public class HAC0B_tagGCNewFairyCeremonyInfo : GameNetPackBasic { public string StartDate; // 开始日期 y-m-d public string EndtDate; // 结束日期 y-m-d public ushort WorldLV; // 世界等级 public ushort LimitLV; // 限制等级 public byte ResetType; // 重置类型 0-0点重置 1-5点重置 public HAC0B_tagGCNewFairyCeremonyInfo () { _cmd = (ushort)0xAC0B; } public override void ReadFromBytes (byte[] vBytes) { TransBytes (out StartDate, vBytes, NetDataType.Chars, 10); TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10); TransBytes (out WorldLV, vBytes, NetDataType.WORD); TransBytes (out LimitLV, vBytes, NetDataType.WORD); TransBytes (out ResetType, vBytes, NetDataType.BYTE); } } Core/NetworkPackage/ServerPack/HAC_Activity/HAC0B_tagGCNewFairyCeremonyInfo.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 2e9d907361017904abe277919823d31a timeCreated: 1548645936 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Core/NetworkPackage/ServerPack/HB2_ActionMap/HB213_tagMCZhuXianTowerInfo.cs
@@ -5,6 +5,7 @@ public class HB213_tagMCZhuXianTowerInfo : GameNetPackBasic { public uint Floor; // 已通关层 public uint LastFloor; // 上次挑战层 public HB213_tagMCZhuXianTowerInfo () { _cmd = (ushort)0xB213; @@ -12,6 +13,7 @@ public override void ReadFromBytes (byte[] vBytes) { TransBytes (out Floor, vBytes, NetDataType.DWORD); TransBytes (out LastFloor, vBytes, NetDataType.DWORD); } } Fight/Actor/HeroBehaviour.cs
@@ -448,7 +448,7 @@ && skill.skillInfo.config.AtkType != (int)E_AtkType.FlashMove) { GActorFight _fight = m_Hero.LockTarget as GActorFight; if (m_Hero.LockTarget != null && _fight.CanAtked()) if (_fight != null && _fight.CanAtked()) { skill.targetPosition = m_Hero.LockTarget.Pos; } @@ -463,7 +463,7 @@ Vector3 _dir; float _radius = 0.5f; GActorFight _fight = m_Hero.LockTarget as GActorFight; if (m_Hero.LockTarget != null && _fight.CanAtked()) if (_fight != null && _fight.CanAtked()) { GActorNpcFight _npcFight = m_Hero.LockTarget as GActorNpcFight; if (_npcFight != null) @@ -477,7 +477,7 @@ else if (m_Hero.SelectTarget != null) { GActorNpcFight _npcFight = m_Hero.SelectTarget as GActorNpcFight; if (_npcFight != null) if (_npcFight != null && _npcFight.CanAtked()) { _radius = _npcFight.NpcConfig.ModelRadius; } Fight/Actor/Skill/AttackHandler.cs
@@ -491,6 +491,14 @@ } _aAtkSkillPer = _aAtkSkillPer * Constants.F_DELTA; Dictionary<int, int> _attrValues; if (Snxxz.UI.CalculateSkillGetAttrHurtUtility.Instance.TryGetAttrDictBySkill(skill.id, out _attrValues)) { foreach (var _per in _attrValues.Values) { _aAtkSkillPer += (_per * Constants.F_DELTA); } } // -------------- 公式计算 -------------- float _value1; Fight/Actor/State/SMB/STM_BaseAttack.cs
@@ -248,10 +248,12 @@ if (owner.ActorType == GameObjType.gotPlayer) { GActorPlayerBase _player = owner as GActorPlayerBase; _player.SwitchHeadNameBindNode(false); if (_player != null) { _player.SwitchHeadNameBindNode(false); _player.ShowOrHideWeapon(true); } animator.speed = 1; _player.ShowOrHideWeapon(true); #if UNITY_EDITOR string _content = string.Format("STM_BaseAttack => {0} 的技能: {1} 退出技能状态逻辑", owner.ServerInstID, cacheSkillID); @@ -259,7 +261,7 @@ #endif } if (_fight.OnSkillCompelete != null) if (_fight.OnSkillCompelete != null && m_CacheSkill != null) { _fight.OnSkillCompelete(m_CacheSkill.id); } @@ -269,7 +271,7 @@ if (owner is GA_Player || owner is GA_Hero) { if (owner.State == E_ActorState.CastSkill || (m_CacheSkill.id == 190 && owner.State == E_ActorState.Roll)) || (m_CacheSkill != null && m_CacheSkill.id == 190 && owner.State == E_ActorState.Roll)) { owner.State = E_ActorState.Idle; } @@ -290,13 +292,17 @@ for (int i = 0; i < m_CastedEffect.Count; ++i) { if (m_CastedEffect[i] == null) { continue; } m_CastedEffect[i].SetAnimatorSpeed(1); if (m_CastedEffect[i].config.stopImmediate == 1) if (m_CastedEffect[i].config != null && m_CastedEffect[i].config.stopImmediate == 1) { SFXPlayUtility.Instance.Release(m_CastedEffect[i]); } } m_CastedEffect.Clear(); #if UNITY_EDITOR if (RuntimeLogUtility.s_LogMoveDistance) @@ -792,8 +798,10 @@ protected void DesiceFightMove(GActorFight fightActor, SoConfigBase config) { m_NeedMove = config.curve != null m_NeedMove = config != null && config.curve != null && config.moveDuration > 0 && fightActor != null && StatusMgr.Instance.CanMove(fightActor.ServerInstID); if (m_NeedMove) @@ -801,7 +809,9 @@ bool _moveThrougthEnable = config.moveThrougthEnable; bool _forceMoveThrougth = config.forceMoveThrougthEnable; if (m_CacheSkill.skillInfo.config != null if (m_CacheSkill != null && m_CacheSkill.skillInfo != null && m_CacheSkill.skillInfo.config != null && m_CacheSkill.skillInfo.config.Skillactmark != GAStaticDefine.Act_Roll) { if (fightActor.SelectTarget != null Fight/GameActor/GA_Guard.cs
@@ -1,5 +1,5 @@ using System; using System; using System.Collections; using Snxxz.UI; using TableConfig; @@ -130,8 +130,8 @@ { deadModel.AllPlayerDieEvent -= AllPlayerDieEvent; deadModel.AllPlayerRebornEvent -= AllPlayerRebornEvent; DTC0429_tagObjResetPos.ResetPlayerPosEvent -= ResetPlayerPosEvent; DTC0102_tagCDBPlayer.afterPlayerDataInitializeEvent -= AfterPlayerDataInitializeEvent; DTC0429_tagObjResetPos.ResetPlayerPosEvent -= ResetPlayerPosEvent; DTC0102_tagCDBPlayer.afterPlayerDataInitializeEvent -= AfterPlayerDataInitializeEvent; DTCA112_tagMCDBPlayer.playerInitEvent -= PlayerInitEvent; if (IsHeroControl) { @@ -153,45 +153,45 @@ pickUpBehaviour = null; base.OnUnit(); } private void AfterPlayerDataInitializeEvent() { SnxxzGame.Instance.StartCoroutine(Co_RecheckPlayLifeState()); } public void PlayerInitEvent() { CheckResetGuardState(); } IEnumerator Co_RecheckPlayLifeState() { yield return null; CheckResetGuardState(); } void CheckResetGuardState() { if (guardState == GuardState.Inter) { var hero = PlayerDatas.Instance.hero; if (hero != null) { if (hero.ActorInfo != null && !hero.ActorInfo.serverDie) { IsPlayerDie = false; IsStateActive = true; if (m_Animator) { m_Animator.enabled = true; } SetPosition(hero.Pos.x / 2, hero.Pos.y / 2); } } } } } private void AfterPlayerDataInitializeEvent() { SnxxzGame.Instance.StartCoroutine(Co_RecheckPlayLifeState()); } public void PlayerInitEvent() { CheckResetGuardState(); } IEnumerator Co_RecheckPlayLifeState() { yield return null; CheckResetGuardState(); } void CheckResetGuardState() { if (guardState == GuardState.Inter) { var hero = PlayerDatas.Instance.hero; if (hero != null) { if (hero.ActorInfo != null && !hero.ActorInfo.serverDie) { IsPlayerDie = false; IsStateActive = true; if (m_Animator) { m_Animator.enabled = true; } SetPosition(hero.Pos.x / 2, hero.Pos.y / 2); } } } } private void ReleasePickUpBehaviour() { if (pickUpBehaviour != null) @@ -244,7 +244,7 @@ m_SFXController.transform.SetParent(mountPoint); m_SFXController.transform.localPosition = Vector3.zero; m_SFXController.transform.localPosition = Vector3.zero; m_SFXController.transform.localEulerAngles = Vector3.zero; } @@ -296,6 +296,25 @@ if (!result || prefab == null) { return; } if (m_Model) { if (NpcConfig != null) { GameObject _toDestroy = InstanceResourcesLoader.LoadNpc(NpcConfig.NPCID); if (_toDestroy) { GameObjectPoolManager.Instance.ReleaseGameObject(_toDestroy, m_Model); } } else { UnityEngine.Object.Destroy(m_Model); } m_Model = null; m_Animator = null; } GAMgr.Instance.RemoveNeedDestroyPrefab(prefab as GameObject); @@ -514,18 +533,18 @@ if (DropItemManager.CheckCanGuardPickUp(Root.position)) { var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID); if (dataMapId != 0) { var dungeonConfig = Config.Instance.Get<DungeonOpenTimeConfig>(dataMapId); if (dungeonConfig != null) { if (dungeonConfig.GuardPick == 0) { return false; } } } var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID); if (dataMapId != 0) { var dungeonConfig = Config.Instance.Get<DungeonOpenTimeConfig>(dataMapId); if (dungeonConfig != null) { if (dungeonConfig.GuardPick == 0) { return false; } } } if (guardState != GuardState.PickUp) { Fight/Stage/Dungeon/JadeDynastyTowerDungeonStage.cs
@@ -17,10 +17,26 @@ public override void Initialize() { base.Initialize(); var sceneRoot = GameObject.Find("Map113_Zxt"); if (sceneRoot != null) { m_TowerAnimator = sceneRoot.GetComponent<Animator>("Effect/wall"); m_ShowCamera = sceneRoot.GetComponent<Camera>("Effect/wall/Camera_Show"); m_ShowCamera.backgroundColor = CameraController.Instance.CameraObject.backgroundColor; m_ShowCamera.gameObject.SetActive(false); defaultShowCameraPosition = m_ShowCamera.transform.position; defaultShowCameraRotation = m_ShowCamera.transform.rotation; defaultFov = m_ShowCamera.fieldOfView; } } public override void UnInitialize() { CameraController.Instance.CameraObject.enabled = true; CameraManager.uiCamera.enabled = true; StopAllCoroutines(); base.UnInitialize(); } @@ -28,30 +44,98 @@ protected override void OnStageLoadFinish() { base.OnStageLoadFinish(); WindowCenter.Instance.Open<JadeDynastyTowerHintWin>(); var isBottom = model.IsBottomFloor(model.currentFloor); if (!isBottom && model.currentFloor > model.lastChallengeFloor) { PerformChallengeNextLevel(); } else { WindowCenter.Instance.Open<JadeDynastyTowerHintWin>(); model.RequestRefreshMonster(); } } public void PerformChallengeNextLevel() void PerformChallengeNextLevel() { WindowCenter.Instance.Close<DungeonGradeWin>(); WindowCenter.Instance.Close<MapNameHintWin>(); WindowCenter.Instance.Close<JadeDynastyTowerHintWin>(); WindowCenter.Instance.Close<DemonJarBossLifeBarWin>(); model.RequestRefreshMonster(); StartCoroutine("Co_PerformChallengeNextLevel"); } if (PlayerDatas.Instance.hero != null) IEnumerator Co_PerformChallengeNextLevel() { WindowCenter.Instance.Close<JadeDynastyTowerHintWin>(); SoundPlayer.Instance.PlayBackGroundMusicOneShot(258); var config = Config.Instance.Get<JadeDynastyTowerConfig>(model.currentFloor); if (config != null && config.floorIndex > 1) { PlayerDatas.Instance.hero.Behaviour.StartHandupAI(); m_ShowCamera.gameObject.SetActive(true); CameraController.Instance.CameraObject.enabled = false; CameraManager.uiCamera.enabled = false; m_ShowCamera.transform.position = CameraController.Instance.CameraObject.transform.position; m_ShowCamera.transform.rotation = CameraController.Instance.CameraObject.transform.rotation; m_ShowCamera.fieldOfView = CameraController.Instance.CameraObject.fieldOfView; yield return StartCoroutine(Co_CameraLerpTo(m_ShowCamera, defaultShowCameraPosition, defaultShowCameraRotation, defaultFov)); if (m_TowerAnimator != null) { m_TowerAnimator.Play("Fyt_fx_ani_move", 0, 0f); } yield return new WaitForSeconds(3.1f); yield return StartCoroutine(Co_CameraLerpTo(m_ShowCamera, CameraController.Instance.CameraObject.transform.position, CameraController.Instance.CameraObject.transform.rotation, CameraController.Instance.CameraObject.fieldOfView)); model.RequestRefreshMonster(); m_ShowCamera.gameObject.SetActive(false); CameraController.Instance.CameraObject.enabled = true; CameraManager.uiCamera.enabled = true; WindowCenter.Instance.Open<DungeonEndCoolDownWin>(); if (PlayerDatas.Instance.hero != null) { PlayerDatas.Instance.hero.Behaviour.StartHandupAI(); } var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID); var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(); SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music); WindowCenter.Instance.Open<MapNameHintWin>(); WindowCenter.Instance.Open<JadeDynastyTowerHintWin>(); } var mapConfig = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID); var mapResConfig = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig(); SoundPlayer.Instance.PlayBackGroundMusic(mapResConfig.Music); WindowCenter.Instance.Open<DungeonEndCoolDownWin>(); WindowCenter.Instance.Open<MapNameHintWin>(); WindowCenter.Instance.Open<JadeDynastyTowerHintWin>(); } IEnumerator Co_CameraLerpTo(Camera _camera, Vector3 _toPosition, Quaternion _toRotation, float _toFov) { var startPosition = _camera.transform.position; var startRotation = _camera.transform.rotation; var startFov = _camera.fieldOfView; var timer = 0f; var duration = 0.5f; while (timer < duration) { timer += Time.deltaTime; var t = Mathf.Clamp01(timer / duration); _camera.transform.position = Vector3.Lerp(startPosition, _toPosition, t); _camera.transform.rotation = Quaternion.Lerp(startRotation, _toRotation, t); _camera.fieldOfView = Mathf.Lerp(startFov, _toFov, t); yield return null; } _camera.transform.position = _toPosition; _camera.transform.rotation = _toRotation; } } Lua/Gen/FairyJadeInvestmentModelWrap.cs
@@ -415,7 +415,7 @@ { int gen_ret = gen_to_be_invoked.GetType( ); int gen_ret = gen_to_be_invoked.GetFairyJadeType( ); LuaAPI.xlua_pushinteger(L, gen_ret); System/FakeDungeon/FakeDemonJarDungeonStage.cs
@@ -250,7 +250,7 @@ mission.lineID = PlayerDatas.Instance.baseData.dungeonLineId; mission.hurtInfo = hurts; mission.remainHPPer = (int)(surplusTime / totalTime * 100f); mission.remainHPPer = (int)(surplusTime / totalTime * 1000000f); mission.hpReduceSpeed = (int)(10000 / totalTime); dungeonModel.UpdateFakeDungeonMission(DemonJarModel.DEMONJAR_MAPID, mission); System/FashionDress/FashionDressModel.cs
@@ -1,9 +1,9 @@ using System; using System.Collections; using System.Collections.Generic; using System.Collections; using System.Collections.Generic; using System.Linq; using TableConfig; using UnityEngine; using UnityEngine; namespace Snxxz.UI { [XLua.Hotfix] @@ -14,6 +14,7 @@ Dictionary<int, int> fashionDressLevelDict = new Dictionary<int, int>(); Dictionary<int, Dictionary<int, int>> cabinetPropertyDict = new Dictionary<int, Dictionary<int, int>>(); Dictionary<int, List<int>> fashionDressTypeDict = new Dictionary<int, List<int>>(); Dictionary<int, List<int>> fashionDressSuitTypeDict = new Dictionary<int, List<int>>(); Dictionary<int, Dictionary<int, List<int>>> fashionDressQualityDict = new Dictionary<int, Dictionary<int, List<int>>>(); const int FASHIONDRESS_REDPOINT_BASE = 10105; @@ -139,6 +140,7 @@ void ParseConfig() { { fashionDressSuitTypeDict.Clear(); var configs = Config.Instance.GetAllValues<FashionDressConfig>(); fashionDressLevelUpItems = new List<int>(); foreach (var config in configs) @@ -153,6 +155,18 @@ } list.Add(config.CoatID); } if (!fashionDressSuitTypeDict.ContainsKey(config.FashionSuitType)) { var list = new List<int>(); list.Add(config.CoatID); fashionDressSuitTypeDict.Add(config.FashionSuitType, list); } else { fashionDressSuitTypeDict[config.FashionSuitType].Add(config.CoatID); } if (!fashionDressLevelUpItems.Contains(config.UnlockItemID)) { fashionDressLevelUpItems.Add(config.UnlockItemID); @@ -278,6 +292,11 @@ public bool TryGetFashionDresses(int type, out List<int> list) { return fashionDressTypeDict.TryGetValue(type, out list); } public bool TryGetFashionIds(int suitType, out List<int> list) { return fashionDressSuitTypeDict.TryGetValue(suitType, out list); } public bool TryGetFashionDressProperty(int id, int level, out Dictionary<int, int> dict) @@ -593,5 +612,5 @@ return 0; } } } } System/FindPrecious/DemonJarBossLifeBarWin.cs
@@ -79,7 +79,7 @@ { if (inited) { var deltaHp = (long)(Time.deltaTime * model.mission.hpReduceSpeed * 0.0001f * BOSSHP_TOTAL); var deltaHp = (long)(Time.deltaTime * model.mission.hpReduceSpeed * 0.0001d * BOSSHP_TOTAL); currentHp = currentHp - deltaHp; if (currentHp <= 0) { @@ -109,16 +109,15 @@ { m_BossLifeBar.gameObject.SetActive(true); var npcConfig = Config.Instance.Get<NPCConfig>(TargetBriefInfo.selectedNpcId); currentHp = (long)(model.mission.remainHPPer * 0.01f * BOSSHP_TOTAL); m_BossLifeBar.SetBaseInfo(TargetBriefInfo.selectedNpcId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV); currentHp = (long)(model.mission.remainHPPer * 0.000001d * BOSSHP_TOTAL); m_BossLifeBar.SetBaseInfo(TargetBriefInfo.selectedNpcId, (ulong)currentHp, BOSSHP_TOTAL, npcConfig.NPCLV); inited = true; } private void UpdateServerRemainHP() { currentHp = (long)(model.mission.remainHPPer * 0.01f * BOSSHP_TOTAL); currentHp = (long)(model.mission.remainHPPer * 0.000001d * BOSSHP_TOTAL); } public void RefreshBossLifeBar() System/GeneralConfig/GeneralDefine.cs
@@ -1,288 +1,314 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using TableConfig; using System; using System.Text.RegularExpressions; using System.Linq; using Snxxz.UI; public class GeneralDefine { public static int greatMasterStartLV { get; private set; } public static int playerMaxLevel { get; private set; } public static float potentialUpSuccessRecommend { get; private set; } public static int[] kylinHomeCollectItems; public static List<int> dailyQuestOpenTime; public static int flyBootItemId { get; private set; } public static int teamReadyTime { get; private set; } public static int elderGodAreaAngerTotal { get; private set; } public static float petRandomSpeak { get; private set; } public static int[] openJobs { get; private set; } public static int playerNameLength { get; private set; } public static int guardDungeonCageNPCID { get; private set; } public static float guardBubbleInterval { get; private set; } public static List<int> autoOnHookMap { get; private set; } public static float autoRideHorse { get; private set; } public static Dictionary<int, string> equipPlaceNameDict { get; private set; } public static Dictionary<int, int> moneyDisplayIds { get; private set; } public static int expDisplayId { get; private set; } public static float xpGuideDelay { get; private set; } public static float xpGuideDuration { get; private set; } public static Dictionary<int, string> trailBossHeadIcons { get; private set; } public static Dictionary<int, string> godWeaponMobs { get; private set; } public static float ResetComAtkTime { get; private set; } public static int RotateSpeed { get; private set; } public static float CloseNpcDist { get; private set; } public static float FarawayNpcDist { get; private set; } public static List<int> SpecialNpcIDs { get; private set; } public static Dictionary<int, int> wingEquipLimits { get; private set; } public static float PetDanceInterval { get; private set; } public static float FuncNpcDanceInterval { get; private set; } public static float audioScaleWhenFullScreenOn { get; private set; } public static int ruinsTranscriptMapId { get; private set; } public static List<int> GuardianPickUpID { get; private set; } public static List<int> EarlierGetTreasure { get; private set; } public static int BossSound { get; private set; } public static Dictionary<int, int> iceCrystalMonsterScores { get; private set; } public static float PlayBossHurtInterval { get; private set; } public static List<int> NoXpDungeons { get; private set; } public static List<int> RandomJobs { get; private set; } public static int elderGodTalkingTime { get; private set; } public static int elderGodBigBoss { get; private set; } public static List<int> PassiveSkillShow { get; private set; } public static List<int> bossShuntMaps { get; private set; } public static int bossShuntDays { get; private set; } public static Dictionary<int, int[]> itemDropEffect = new Dictionary<int, int[]>(); public static Dictionary<int, int[]> xllyDropEffect = new Dictionary<int, int[]>(); public static Dictionary<int, int[]> xqryDropEffect = new Dictionary<int, int[]>(); public static Dictionary<int, List<int[]>> customDropEffect = new Dictionary<int, List<int[]>>(); public static Dictionary<int, int> dropEffectQuality = new Dictionary<int, int>(); public static Dictionary<int, int> BuffToHitEffect = new Dictionary<int, int>(); //参数int,int ,string 分别表示职业,转生等级,icon static Dictionary<int, Dictionary<int, string>> jobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); static Dictionary<int, Dictionary<int, string>> otherjobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); public static Dictionary<int, int> bossWearyValues = new Dictionary<int, int>(); public static Dictionary<int, Vector3> NpcPosOffset = new Dictionary<int, Vector3>(); public static Dictionary<int, string> propertyIconDict = new Dictionary<int, string>(); public static int demonJarHintLevelLimit { get; private set; } public static int demonJarHintLineId { get; private set; } public static int skillPanelUnLock { get; private set; } public static int dailyQuestRedpointLevelLimit { get; private set; } public static int lowHpRemind { get; private set; } public static int munekadolockLimit { get; private set; } public static int maxItemDropEffectCount { get; private set; } public static int[] autoBuyItemIds; public static int[] autoBuyItemPrices; public static List<int> neutralMaps = new List<int>(); public static List<int> neutralBossMaps = new List<int>(); public static int demonJarRedPoint { get; private set; } public static string LoadLV { get; private set; } public static float mainWinSkillResetTime { get; private set; } public static int OffLineTimeLackRemendLevelLimit { get; private set; } public static Vector3 heroDialogueOffset { get; private set; } public static Vector3 heroDialogueRotation { get; private set; } public static float heroDialogueScale { get; private set; } public static List<int> ancientGrandTotalAchievements { get; private set; } public static List<int> ancientContinueKillAchievements { get; private set; } public static int trialDungeonGroupChallengeTipLv { get; private set; } public static int prayerRedpointLimitLv { get; private set; } public static int demonJarLevelLimit { get; private set; } public static int fairyLandGuideId = 82; public static int specialGuide41Mission { get; private set; } public static int specialGuide41Achievement { get; private set; } public static int supremeRechargeVipLv { get; private set; } public static int rechargeRedpointLv { get; private set; } public static int rechargeRedpointMinLv { get; private set; } public static int runeTowerSweepBuyTimes { get; private set; } public static int runeTowerSweepBuyPrice { get; private set; } public static int teamMatchingTimeOut { get; private set; } public static List<int> inGameDownLoadLevelCheckPoints = null; public static List<int> inGameDownLoadTaskCheckPoints = null; public static int inGameDownLoadHighLevel { get; private set; } public static List<int> worldBossNoRebornRemindMaps = null; public static List<int> bossHomeNoRebornRemindMaps = null; public static List<int> elderGodNoRebornRemindMaps = null; public static List<int> demonJarNoRebornRemindMaps = null; public static List<int> dogzNoRebornRemindMaps = null; public static string[][] ModeDefaultConfig { get; private set; } public static int[][] PreloadSkillEffect { get; private set; } public static int[] RealmGroup { get; private set; } public static float PrefightAtkRange { get; private set; } public static Dictionary<int, string> multipleRealmImgDict { get; private set; } public static int inGameDownLoadHighestLevelPoint { get; private set; } public static List<int> dungeonCanUseMoneyIds { get; private set; } public static int dogzBoxLimit { get; private set; } public static Dictionary<int, int> dungeonRebornClientTimes { get; private set; } public static int[] CompareEquipPlaces { get; private set; } 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 int teamWorldCallInviteCount; public static List<Item> ancientKingAwards = new List<Item>(); public static int lowQualityEffectCount { get; private set; } public static int medQualityEffectCount { get; private set; } public static int highQualityEffectCount { get; private set; } public static int lowQualityPetCount { get; private set; } public static int medQualityPetCount { get; private set; } public static int highQualityPetCount { get; private set; } public static int lowQualityGuardCount { get; private set; } public static int medQualityGuardCount { get; private set; } public static int highQualityGuardCount { get; private set; } public static int lowQualityPetEffectCount { get; private set; } public static int medQualityPetEffectCount { get; private set; } public static int highQualityPetEffectCount { get; private set; } public static int lowQualityHorseEffectCount { get; private set; } public static int medQualityHorseEffectCount { get; private set; } public static int highQualityHorseEffectCount { get; private set; } public static int GatherSoulDZ { get; private set; } public static int fairyLandBuffCondition { get; private set; } public static int fairyLandBuffId { get; private set; } public static int achievementEarlierStageLevel { get; private set; } public static int DemonJarAutoTime { get; private set; } public static Dictionary<int, Dictionary<int, GA_NpcFightSgzcZZ.EquipRandomInfo>> SgzzRobotEquipDict { get; private set; } public static Dictionary<int, int> SgzcRealm { get; private set; } public static int crossServerOneVsOneOpenDay { get; private set; } public static void Init() { try { CompareEquipPlaces = GetIntArray("EquipUpType"); greatMasterStartLV = GetInt("GreatMasterStartLV"); playerMaxLevel = GetInt("PlayerMaxLV"); potentialUpSuccessRecommend = GetFloat("SPSkillType", 2) * 0.0001f; kylinHomeCollectItems = GetIntArray("KirinNpc", 2); dailyQuestOpenTime = GetTimeArray("ActionTime", 1); flyBootItemId = GetInt("TransportPay"); teamReadyTime = GetInt("TeamReadyTime"); playerNameLength = GetInt("RoleNameLength"); elderGodAreaAngerTotal = GetInt("AngryAdd", 4); petRandomSpeak = GetFloat("PetRandomSpeak"); guardDungeonCageNPCID = GetInt("GuardFBCageNPCID"); guardBubbleInterval = GetFloat("GuardFBCageNPCID", 3); autoRideHorse = GetFloat("AutoRideHorseTime") * Constants.F_DELTA; moneyDisplayIds = ConfigParse.GetDic<int, int>(GetInputString("MoneyDisplayModel", 1)); expDisplayId = GetInt("MoneyDisplayModel", 2); openJobs = GetIntArray("OpenJob"); xpGuideDelay = GetFloat("GuideConfig"); xpGuideDuration = GetFloat("GuideConfig", 2); ResetComAtkTime = GetFloat("AtkWaitingTime"); autoOnHookMap = new List<int>(GetIntArray("AutoOnHookMap")); GuardianPickUpID = new List<int>(GetIntArray("GuardianPickUpID")); RotateSpeed = GetInt("RoleTurnedAngle"); CloseNpcDist = GetFloat("ConversationDistanc", 2); FarawayNpcDist = GetFloat("ConversationDistanc"); SpecialNpcIDs = new List<int>(GetIntArray("SpecialCollectNpcs", 1)); PetDanceInterval = GetInt("PetDanceInterval") * Constants.F_GAMMA; FuncNpcDanceInterval = GetInt("PetDanceInterval", 2) * Constants.F_GAMMA; ruinsTranscriptMapId = GetInt("SpRewardMapID"); EarlierGetTreasure = new List<int>(GetIntArray("EarlierGetTreasure")); BossSound = GetInt("BossSound"); PlayBossHurtInterval = GetFloat("BossSound", 2); var jobHeadPortraitConfig1 = Config.Instance.Get<FuncConfigConfig>("Job1Head"); jobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical1); otherjobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical2); var jobHeadPortraitConfig2 = Config.Instance.Get<FuncConfigConfig>("Job2Head"); jobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical1); otherjobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical2); var jobHeadPortraitConfig3 = Config.Instance.Get<FuncConfigConfig>("Job3Head"); jobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical1); otherjobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical2); bossWearyValues = ConfigParse.GetDic<int, int>(GetInputString("KillBossCntLimit", 2)); wingEquipLimits = ConfigParse.GetDic<int, int>(GetInputString("WingRealmLimit", 1)); int i = 0; int[] equipPlaces = GetIntArray("EquipArea", 1); string[] equipPlacesNames = GetStringArray("EquipArea", 2); equipPlaceNameDict = new Dictionary<int, string>(); for (i = 0; i < equipPlaces.Length; i++) { if (!equipPlaceNameDict.ContainsKey(equipPlaces[i])) { equipPlaceNameDict.Add(equipPlaces[i], equipPlacesNames[i]); } else { DebugEx.LogError("EquipArea : 装备位置重复"); } } var _trailBossJson = LitJson.JsonMapper.ToObject(GetInputString("MuneKadoTrialBossHead", 1)); trailBossHeadIcons = new Dictionary<int, string>(); foreach (var _key in _trailBossJson.Keys) { var _npcId = int.Parse(_key); if (!trailBossHeadIcons.ContainsKey(_npcId)) { trailBossHeadIcons.Add(_npcId, _trailBossJson[_key].ToString()); } } var _godWeaponJson = LitJson.JsonMapper.ToObject(GetInputString("GodModel", 1)); godWeaponMobs = new Dictionary<int, string>(); foreach (var _key in _godWeaponJson.Keys) { var _godWeaponType = int.Parse(_key); if (!godWeaponMobs.ContainsKey(_godWeaponType)) { godWeaponMobs.Add(_godWeaponType, _godWeaponJson[_key].ToString()); } } audioScaleWhenFullScreenOn = GetFloat("AudioSound"); iceCrystalMonsterScores = ConfigParse.GetDic<int, int>(GetInputString("IceLodeNeedPoint", 2)); NoXpDungeons = new List<int>(GetIntArray("XpNoUseDungeon")); RandomJobs = new List<int>(GetIntArray("RandomJob")); elderGodTalkingTime = GetInt("ElderGodTalkingTime"); elderGodBigBoss = GetInt("ElderGodBigBoss"); PassiveSkillShow = new List<int>(GetIntArray("PassiveSkillShow")); FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("NpcPosOffset"); LitJson.JsonData _data = LitJson.JsonMapper.ToObject(func.Numerical1); foreach (var _key in _data.Keys) { int _npcID = int.Parse(_key); double[] _pos = new double[2]; _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>>(); using System.Collections; using System.Collections.Generic; using UnityEngine; using TableConfig; using System; using System.Text.RegularExpressions; using System.Linq; using Snxxz.UI; public class GeneralDefine { public static int greatMasterStartLV { get; private set; } public static int playerMaxLevel { get; private set; } public static float potentialUpSuccessRecommend { get; private set; } public static int[] kylinHomeCollectItems; public static List<int> dailyQuestOpenTime; public static int flyBootItemId { get; private set; } public static int teamReadyTime { get; private set; } public static int elderGodAreaAngerTotal { get; private set; } public static float petRandomSpeak { get; private set; } public static int[] openJobs { get; private set; } public static int playerNameLength { get; private set; } public static int guardDungeonCageNPCID { get; private set; } public static float guardBubbleInterval { get; private set; } public static List<int> autoOnHookMap { get; private set; } public static float autoRideHorse { get; private set; } public static Dictionary<int, string> equipPlaceNameDict { get; private set; } public static Dictionary<int, int> moneyDisplayIds { get; private set; } public static int expDisplayId { get; private set; } public static float xpGuideDelay { get; private set; } public static float xpGuideDuration { get; private set; } public static Dictionary<int, string> trailBossHeadIcons { get; private set; } public static Dictionary<int, string> godWeaponMobs { get; private set; } public static float ResetComAtkTime { get; private set; } public static int RotateSpeed { get; private set; } public static float CloseNpcDist { get; private set; } public static float FarawayNpcDist { get; private set; } public static List<int> SpecialNpcIDs { get; private set; } public static Dictionary<int, int> wingEquipLimits { get; private set; } public static float PetDanceInterval { get; private set; } public static float FuncNpcDanceInterval { get; private set; } public static float audioScaleWhenFullScreenOn { get; private set; } public static int ruinsTranscriptMapId { get; private set; } public static List<int> GuardianPickUpID { get; private set; } public static List<int> EarlierGetTreasure { get; private set; } public static int BossSound { get; private set; } public static Dictionary<int, int> iceCrystalMonsterScores { get; private set; } public static float PlayBossHurtInterval { get; private set; } public static List<int> NoXpDungeons { get; private set; } public static List<int> RandomJobs { get; private set; } public static int elderGodTalkingTime { get; private set; } public static int elderGodBigBoss { get; private set; } public static List<int> PassiveSkillShow { get; private set; } public static List<int> bossShuntMaps { get; private set; } public static int bossShuntDays { get; private set; } public static Dictionary<int, int[]> itemDropEffect = new Dictionary<int, int[]>(); public static Dictionary<int, int[]> xllyDropEffect = new Dictionary<int, int[]>(); public static Dictionary<int, int[]> xqryDropEffect = new Dictionary<int, int[]>(); public static Dictionary<int, List<int[]>> customDropEffect = new Dictionary<int, List<int[]>>(); public static Dictionary<int, int> dropEffectQuality = new Dictionary<int, int>(); public static Dictionary<int, int> BuffToHitEffect = new Dictionary<int, int>(); //参数int,int ,string 分别表示职业,转生等级,icon static Dictionary<int, Dictionary<int, string>> jobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); static Dictionary<int, Dictionary<int, string>> otherjobHeadPortrait = new Dictionary<int, Dictionary<int, string>>(); public static Dictionary<int, int> bossWearyValues = new Dictionary<int, int>(); public static Dictionary<int, Vector3> NpcPosOffset = new Dictionary<int, Vector3>(); public static Dictionary<int, string> propertyIconDict = new Dictionary<int, string>(); public static int demonJarHintLevelLimit { get; private set; } public static int demonJarHintLineId { get; private set; } public static int skillPanelUnLock { get; private set; } public static int dailyQuestRedpointLevelLimit { get; private set; } public static int lowHpRemind { get; private set; } public static int munekadolockLimit { get; private set; } public static int maxItemDropEffectCount { get; private set; } public static int[] autoBuyItemIds; public static int[] autoBuyItemPrices; public static List<int> neutralMaps = new List<int>(); public static List<int> neutralBossMaps = new List<int>(); public static int demonJarRedPoint { get; private set; } public static string LoadLV { get; private set; } public static float mainWinSkillResetTime { get; private set; } public static int OffLineTimeLackRemendLevelLimit { get; private set; } public static Vector3 heroDialogueOffset { get; private set; } public static Vector3 heroDialogueRotation { get; private set; } public static float heroDialogueScale { get; private set; } public static List<int> ancientGrandTotalAchievements { get; private set; } public static List<int> ancientContinueKillAchievements { get; private set; } public static int trialDungeonGroupChallengeTipLv { get; private set; } public static int prayerRedpointLimitLv { get; private set; } public static int demonJarLevelLimit { get; private set; } public static int fairyLandGuideId = 82; public static int specialGuide41Mission { get; private set; } public static int specialGuide41Achievement { get; private set; } public static int supremeRechargeVipLv { get; private set; } public static int rechargeRedpointLv { get; private set; } public static int rechargeRedpointMinLv { get; private set; } public static int runeTowerSweepBuyTimes { get; private set; } public static int runeTowerSweepBuyPrice { get; private set; } public static int teamMatchingTimeOut { get; private set; } public static List<int> inGameDownLoadLevelCheckPoints = null; public static List<int> inGameDownLoadTaskCheckPoints = null; public static int inGameDownLoadHighLevel { get; private set; } public static List<int> worldBossNoRebornRemindMaps = null; public static List<int> bossHomeNoRebornRemindMaps = null; public static List<int> elderGodNoRebornRemindMaps = null; public static List<int> demonJarNoRebornRemindMaps = null; public static List<int> dogzNoRebornRemindMaps = null; public static string[][] ModeDefaultConfig { get; private set; } public static int[][] PreloadSkillEffect { get; private set; } public static int[] RealmGroup { get; private set; } public static float PrefightAtkRange { get; private set; } public static Dictionary<int, string> multipleRealmImgDict { get; private set; } public static int inGameDownLoadHighestLevelPoint { get; private set; } public static List<int> dungeonCanUseMoneyIds { get; private set; } public static int dogzBoxLimit { get; private set; } public static Dictionary<int, int> dungeonRebornClientTimes { get; private set; } public static int[] CompareEquipPlaces { get; private set; } 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 int teamWorldCallInviteCount; public static List<Item> ancientKingAwards = new List<Item>(); public static int lowQualityEffectCount { get; private set; } public static int medQualityEffectCount { get; private set; } public static int highQualityEffectCount { get; private set; } public static int lowQualityPetCount { get; private set; } public static int medQualityPetCount { get; private set; } public static int highQualityPetCount { get; private set; } public static int lowQualityGuardCount { get; private set; } public static int medQualityGuardCount { get; private set; } public static int highQualityGuardCount { get; private set; } public static int lowQualityPetEffectCount { get; private set; } public static int medQualityPetEffectCount { get; private set; } public static int highQualityPetEffectCount { get; private set; } public static int lowQualityHorseEffectCount { get; private set; } public static int medQualityHorseEffectCount { get; private set; } public static int highQualityHorseEffectCount { get; private set; } public static int GatherSoulDZ { get; private set; } public static int fairyLandBuffCondition { get; private set; } public static int fairyLandBuffId { get; private set; } public static int achievementEarlierStageLevel { get; private set; } public static int DemonJarAutoTime { get; private set; } public static Dictionary<int, Dictionary<int, GA_NpcFightSgzcZZ.EquipRandomInfo>> SgzzRobotEquipDict { get; private set; } 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 Dictionary<int, List<int>> skillAttrIDDict { get; private set; } public static void Init() { try { CompareEquipPlaces = GetIntArray("EquipUpType"); greatMasterStartLV = GetInt("GreatMasterStartLV"); playerMaxLevel = GetInt("PlayerMaxLV"); potentialUpSuccessRecommend = GetFloat("SPSkillType", 2) * 0.0001f; kylinHomeCollectItems = GetIntArray("KirinNpc", 2); dailyQuestOpenTime = GetTimeArray("ActionTime", 1); flyBootItemId = GetInt("TransportPay"); teamReadyTime = GetInt("TeamReadyTime"); playerNameLength = GetInt("RoleNameLength"); elderGodAreaAngerTotal = GetInt("AngryAdd", 4); petRandomSpeak = GetFloat("PetRandomSpeak"); guardDungeonCageNPCID = GetInt("GuardFBCageNPCID"); guardBubbleInterval = GetFloat("GuardFBCageNPCID", 3); autoRideHorse = GetFloat("AutoRideHorseTime") * Constants.F_DELTA; moneyDisplayIds = ConfigParse.GetDic<int, int>(GetInputString("MoneyDisplayModel", 1)); expDisplayId = GetInt("MoneyDisplayModel", 2); openJobs = GetIntArray("OpenJob"); xpGuideDelay = GetFloat("GuideConfig"); xpGuideDuration = GetFloat("GuideConfig", 2); ResetComAtkTime = GetFloat("AtkWaitingTime"); autoOnHookMap = new List<int>(GetIntArray("AutoOnHookMap")); GuardianPickUpID = new List<int>(GetIntArray("GuardianPickUpID")); RotateSpeed = GetInt("RoleTurnedAngle"); CloseNpcDist = GetFloat("ConversationDistanc", 2); FarawayNpcDist = GetFloat("ConversationDistanc"); SpecialNpcIDs = new List<int>(GetIntArray("SpecialCollectNpcs", 1)); PetDanceInterval = GetInt("PetDanceInterval") * Constants.F_GAMMA; FuncNpcDanceInterval = GetInt("PetDanceInterval", 2) * Constants.F_GAMMA; ruinsTranscriptMapId = GetInt("SpRewardMapID"); EarlierGetTreasure = new List<int>(GetIntArray("EarlierGetTreasure")); BossSound = GetInt("BossSound"); PlayBossHurtInterval = GetFloat("BossSound", 2); var jobHeadPortraitConfig1 = Config.Instance.Get<FuncConfigConfig>("Job1Head"); jobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical1); otherjobHeadPortrait[1] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig1.Numerical2); var jobHeadPortraitConfig2 = Config.Instance.Get<FuncConfigConfig>("Job2Head"); jobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical1); otherjobHeadPortrait[2] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig2.Numerical2); var jobHeadPortraitConfig3 = Config.Instance.Get<FuncConfigConfig>("Job3Head"); jobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical1); otherjobHeadPortrait[3] = ConfigParse.GetDic<int, string>(jobHeadPortraitConfig3.Numerical2); bossWearyValues = ConfigParse.GetDic<int, int>(GetInputString("KillBossCntLimit", 2)); wingEquipLimits = ConfigParse.GetDic<int, int>(GetInputString("WingRealmLimit", 1)); int i = 0; int[] equipPlaces = GetIntArray("EquipArea", 1); string[] equipPlacesNames = GetStringArray("EquipArea", 2); equipPlaceNameDict = new Dictionary<int, string>(); for (i = 0; i < equipPlaces.Length; i++) { if (!equipPlaceNameDict.ContainsKey(equipPlaces[i])) { equipPlaceNameDict.Add(equipPlaces[i], equipPlacesNames[i]); } else { DebugEx.LogError("EquipArea : 装备位置重复"); } } var _trailBossJson = LitJson.JsonMapper.ToObject(GetInputString("MuneKadoTrialBossHead", 1)); trailBossHeadIcons = new Dictionary<int, string>(); foreach (var _key in _trailBossJson.Keys) { var _npcId = int.Parse(_key); if (!trailBossHeadIcons.ContainsKey(_npcId)) { trailBossHeadIcons.Add(_npcId, _trailBossJson[_key].ToString()); } } var skillPlusAttrIDJson = LitJson.JsonMapper.ToObject(GetInputString("SkillPlusAttrID", 2)); skillAttrIDDict = new Dictionary<int, List<int>>(); foreach(var key in skillPlusAttrIDJson.Keys) { int attrId = int.Parse(key); var skillIds = skillPlusAttrIDJson[key]; foreach (var skillId in skillIds) { int id = int.Parse(skillId.ToString()); if(!skillAttrIDDict.ContainsKey(id)) { List<int> list = new List<int>(); list.Add(attrId); skillAttrIDDict.Add(id,list); } else { skillAttrIDDict[id].Add(attrId); } } } var _godWeaponJson = LitJson.JsonMapper.ToObject(GetInputString("GodModel", 1)); godWeaponMobs = new Dictionary<int, string>(); foreach (var _key in _godWeaponJson.Keys) { var _godWeaponType = int.Parse(_key); if (!godWeaponMobs.ContainsKey(_godWeaponType)) { godWeaponMobs.Add(_godWeaponType, _godWeaponJson[_key].ToString()); } } audioScaleWhenFullScreenOn = GetFloat("AudioSound"); iceCrystalMonsterScores = ConfigParse.GetDic<int, int>(GetInputString("IceLodeNeedPoint", 2)); NoXpDungeons = new List<int>(GetIntArray("XpNoUseDungeon")); RandomJobs = new List<int>(GetIntArray("RandomJob")); elderGodTalkingTime = GetInt("ElderGodTalkingTime"); elderGodBigBoss = GetInt("ElderGodBigBoss"); PassiveSkillShow = new List<int>(GetIntArray("PassiveSkillShow")); FuncConfigConfig func = Config.Instance.Get<FuncConfigConfig>("NpcPosOffset"); LitJson.JsonData _data = LitJson.JsonMapper.ToObject(func.Numerical1); foreach (var _key in _data.Keys) { int _npcID = int.Parse(_key); double[] _pos = new double[2]; _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]; @@ -297,417 +323,427 @@ itemTypes.Add(itemType); } } } FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture"); LitJson.JsonData nxxdData = LitJson.JsonMapper.ToObject(nxxdImg.Numerical1); multipleRealmImgDict = new Dictionary<int, string>(); if (nxxdData.IsArray) { for (i = 0; i < nxxdData.Count; i++) { if (nxxdData[i].IsArray) { multipleRealmImgDict.Add(int.Parse(nxxdData[i][0].ToString()), nxxdData[i][1].ToString()); } } } bossShuntMaps = new List<int>(GetIntArray("BossShunt")); bossShuntDays = GetInt("BossShunt", 3); itemDropEffect.Clear(); func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffect"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); List<string> _keys = new List<string>(_data.Keys); for (i = 0; i < _keys.Count; ++i) { int[] _props = new int[3]; for (int j = 0; j < 3; ++j) { _props[j] = (int)_data[_keys[i]][j]; } itemDropEffect[int.Parse(_keys[i])] = _props; } xllyDropEffect.Clear(); _data = LitJson.JsonMapper.ToObject(func.Numerical2); _keys.Clear(); _keys.AddRange(_data.Keys); for (i = 0; i < _keys.Count; ++i) { int[] _props = new int[3]; for (int j = 0; j < 3; ++j) { _props[j] = (int)_data[_keys[i]][j]; } xllyDropEffect[int.Parse(_keys[i])] = _props; } xqryDropEffect.Clear(); _data = LitJson.JsonMapper.ToObject(func.Numerical3); _keys.Clear(); _keys.AddRange(_data.Keys); for (i = 0; i < _keys.Count; ++i) { int[] _props = new int[3]; for (int j = 0; j < 3; ++j) { _props[j] = (int)_data[_keys[i]][j]; } xqryDropEffect[int.Parse(_keys[i])] = _props; } dropEffectQuality.Clear(); func = Config.Instance.Get<FuncConfigConfig>("IeemEquipmentEffectQuality"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); _keys.Clear(); _keys.AddRange(_data.Keys); for (i = 0; i < _keys.Count; ++i) { dropEffectQuality[int.Parse(_keys[i])] = (int)_data[_keys[i]]; } customDropEffect.Clear(); func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffectItem"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); _keys.Clear(); _keys.AddRange(_data.Keys); int[] _tmp = null; List<int[]> _content = null; for (i = 0; i < _keys.Count; ++i) { _content = new List<int[]>(); foreach (LitJson.JsonData _values in _data[_keys[i]]) { if (_values.IsArray) { _tmp = new int[2]; _tmp[0] = (int)_values[0]; _tmp[1] = (int)_values[1]; } else { _tmp = new int[1]; _tmp[0] = (int)_values; } _content.Add(_tmp); } customDropEffect.Add(int.Parse(_keys[i]), _content); } BuffToHitEffect.Clear(); func = Config.Instance.Get<FuncConfigConfig>("BuffToHitEffect"); if (!string.IsNullOrEmpty(func.Numerical1) && !string.IsNullOrEmpty(func.Numerical2)) { string[] _buffs = func.Numerical1.Split('|'); string[] _effects = func.Numerical2.Split('|'); for (i = 0; i < _buffs.Length; ++i) { BuffToHitEffect[int.Parse(_buffs[i])] = int.Parse(_effects[i]); } } demonJarHintLevelLimit = GetInt("DemonJarFirstRemin"); demonJarHintLineId = GetInt("DemonJarFirstRemin", 2); skillPanelUnLock = GetInt("SkillPanelUnlock"); dailyQuestRedpointLevelLimit = GetInt("DailyQuestRedPoint"); lowHpRemind = GetInt("LowHpRemind"); autoBuyItemIds = GetIntArray("BuyItemPrice", 1); autoBuyItemPrices = GetIntArray("BuyItemPrice", 2); neutralMaps.AddRange(GetIntArray("MapLine", 4)); neutralBossMaps.AddRange(GetIntArray("BossListMapID")); var _propertyIconCfg = Config.Instance.Get<FuncConfigConfig>("PropertyIcon"); var _propertyIconJson = LitJson.JsonMapper.ToObject(_propertyIconCfg.Numerical1); foreach (var _key in _propertyIconJson.Keys) { var _property = int.Parse(_key); propertyIconDict.Add(_property, _propertyIconJson[_key].ToString()); } munekadolockLimit = GetInt("MunekadoLockLimit"); demonJarRedPoint = GetInt("DemonJarRedPoint"); LoadLV = GetInputString("LoadLV"); mainWinSkillResetTime = GetFloat("AutomaticSwitch"); OffLineTimeLackRemendLevelLimit = GetInt("TJGLevelLimit"); heroDialogueOffset = GetInputString("NpcHalfLength", 1).Vector3Parse(); heroDialogueRotation = GetInputString("NpcHalfLength", 2).Vector3Parse(); heroDialogueScale = GetFloat("NpcHalfLength", 3); var ancientConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattleTarget"); ancientGrandTotalAchievements = new List<int>(); ancientGrandTotalAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical1)); ancientContinueKillAchievements = new List<int>(); ancientContinueKillAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical2)); trialDungeonGroupChallengeTipLv = GetInt("SingleIntoFB"); prayerRedpointLimitLv = GetInt("PrayRedPoint"); demonJarLevelLimit = GetInt("DemonJarLevelLimit"); maxItemDropEffectCount = GetInt("ItemMaskEffect"); specialGuide41Mission = GetInt("SpecialGuide41", 1); specialGuide41Achievement = GetInt("SpecialGuide41", 2); supremeRechargeVipLv = GetInt("SupremeCTGVipLimit", 1); rechargeRedpointLv = GetInt("FirstPayRedPoint", 1); rechargeRedpointMinLv = GetInt("FirstPayRedPoint", 2); runeTowerSweepBuyTimes = GetInt("RuneTowerSweepBuy"); runeTowerSweepBuyPrice = GetInt("RuneTowerSweepBuy", 2); teamMatchingTimeOut = GetInt("TeamMatchingTimeOut"); inGameDownLoadLevelCheckPoints = new List<int>(GetIntArray("InGameDownLoad")); inGameDownLoadTaskCheckPoints = new List<int>(GetIntArray("InGameDownLoad", 2)); inGameDownLoadHighLevel = GetInt("InGameDownLoad", 3); worldBossNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 1)); bossHomeNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 2)); elderGodNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 3)); demonJarNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 4)); dogzNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 5)); if (ModeDefaultConfig == null) { func = Config.Instance.Get<FuncConfigConfig>("ModeDefault"); string[] _funcNpc = func.Numerical1.Split('|'); string[] _fightNpc = func.Numerical2.Split('|'); string[] _pet = func.Numerical3.Split('|'); string[] _horse = func.Numerical4.Split('|'); ModeDefaultConfig = new string[4][]; ModeDefaultConfig[0] = _funcNpc; ModeDefaultConfig[1] = _fightNpc; ModeDefaultConfig[2] = _pet; ModeDefaultConfig[3] = _horse; } if (RealmGroup == null) { func = Config.Instance.Get<FuncConfigConfig>("RealmGroup"); string[] _group = func.Numerical1.Split('|'); RealmGroup = new int[_group.Length]; for (int j = 0; j < _group.Length; ++j) { int.TryParse(_group[j], out RealmGroup[j]); } } func = Config.Instance.Get<FuncConfigConfig>("PrefightAtkRange"); PrefightAtkRange = float.Parse(func.Numerical1); inGameDownLoadHighestLevelPoint = GetInt("DownReward", 2); dungeonCanUseMoneyIds = new List<int>(GetIntArray("FBEnterTickeyAuto", 1)); dungeonRebornClientTimes = ConfigParse.GetDic<int, int>(GetInputString("DuplicatesRebornTime", 2)); dogzBoxLimit = GetInt("DogzBoxLimit"); fairyGrabBossMapLines = ConfigParse.GetDic<int, int>(GetInputString("MapLine", 2)); var grabBossMaps = fairyGrabBossMapLines.Keys.ToList(); foreach (var _key in grabBossMaps) { fairyGrabBossMapLines[_key] = fairyGrabBossMapLines[_key] - 1; } if (DropItemEffectMapID == null) { DropItemEffectMapID = new Dictionary<int, List<int>>(); } DropItemEffectMapID.Clear(); func = Config.Instance.Get<FuncConfigConfig>("DropItemEffectMapID"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); int _itemID; _keys.Clear(); _keys.AddRange(_data.Keys); for (int j = 0; j < _keys.Count; ++j) { if (int.TryParse(_keys[j].ToString(), out _itemID)) { if (!DropItemEffectMapID.ContainsKey(_itemID)) { DropItemEffectMapID.Add(_itemID, new List<int>()); } var _jsonMapIDs = _data[_keys[j]]; foreach (var _jsonMapID in _jsonMapIDs) { var _mapID = ((LitJson.IJsonWrapper)_jsonMapID).GetInt(); if (!DropItemEffectMapID[_itemID].Contains(_mapID)) { DropItemEffectMapID[_itemID].Add(_mapID); } } } } int[] mapIDs = GetIntArray("RebornAutoFightDungeon"); RebornAutoFightMapID = new List<int>(mapIDs); teamWorldCall = GetInputString("TeamWorldCall"); teamWorldCallInviteCount = GetInt("TeamWorldCall", 2); var ancientKingAwradConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattlefieldTopAward"); if (ancientKingAwradConfig != null) { var itemArray = LitJson.JsonMapper.ToObject<int[][]>(ancientKingAwradConfig.Numerical1); for (int k = 0; k < itemArray.Length; k++) { ancientKingAwards.Add(new Item() { id = itemArray[k][0], count = itemArray[k][1], bind = itemArray[k][2] == 1, }); } } func = Config.Instance.Get<FuncConfigConfig>("QualityEffectConfig"); lowQualityEffectCount = int.Parse(func.Numerical1); medQualityEffectCount = int.Parse(func.Numerical2); highQualityEffectCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityPetCountConfig"); lowQualityPetCount = int.Parse(func.Numerical1); medQualityPetCount = int.Parse(func.Numerical2); highQualityPetCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityGuardCountConfig"); lowQualityGuardCount = int.Parse(func.Numerical1); medQualityGuardCount = int.Parse(func.Numerical2); highQualityGuardCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityPetEffectCount"); lowQualityPetEffectCount = int.Parse(func.Numerical1); medQualityPetEffectCount = int.Parse(func.Numerical2); highQualityPetEffectCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityHorseEffectCount"); lowQualityHorseEffectCount = int.Parse(func.Numerical1); medQualityHorseEffectCount = int.Parse(func.Numerical2); highQualityHorseEffectCount = int.Parse(func.Numerical3); fairyLandBuffCondition = GetInt("XjmjAddHarm", 1); fairyLandBuffId = GetInt("XjmjAddHarm", 2); achievementEarlierStageLevel = GetInt("AchieveLV"); func = Config.Instance.Get<FuncConfigConfig>("PreloadSkillEffect"); PreloadSkillEffect = new int[2][]; PreloadSkillEffect[0] = GetIntArray("PreloadSkillEffect"); PreloadSkillEffect[1] = GetIntArray("PreloadSkillEffect", 2); DemonJarAutoTime = GetInt("DemonJarAutoTime"); if (SgzzRobotEquipDict == null) { SgzzRobotEquipDict = new Dictionary<int, Dictionary<int, GA_NpcFightSgzcZZ.EquipRandomInfo>>(); for (int job = 1; job <= 3; ++job) { string _jsonString = GetInputString("SGZCHelpBattleEquip", job); if (string.IsNullOrEmpty(_jsonString)) { continue; } var _jsonData = LitJson.JsonMapper.ToObject(_jsonString); var _jobDict = new Dictionary<int, GA_NpcFightSgzcZZ.EquipRandomInfo>(); for (i = 0; i < _jsonData.Count; ++i) { var _lvJson = _jsonData[i]; var _lv = (int)_lvJson["LV"]; if (!_jobDict.ContainsKey(_lv)) { var _equips = _lvJson["Equips"]; var _randEquip = new GA_NpcFightSgzcZZ.EquipRandomInfo(); _randEquip.randClothesItemIDs = new int[_equips[0].Count]; for (int j = 0; j < _equips[0].Count; ++j) { _randEquip.randClothesItemIDs[j] = (int)_equips[0][j]; } _randEquip.randWeaponItemIDs = new int[_equips[1].Count]; for (int j = 0; j < _equips[1].Count; ++j) { _randEquip.randWeaponItemIDs[j] = (int)_equips[1][j]; } _randEquip.randSecondaryItemIDs = new int[_equips[2].Count]; for (int j = 0; j < _equips[2].Count; ++j) { _randEquip.randSecondaryItemIDs[j] = (int)_equips[2][j]; } _randEquip.randWingItemIDs = new int[_equips[3].Count]; for (int j = 0; j < _equips[3].Count; ++j) { _randEquip.randWingItemIDs[j] = (int)_equips[3][j]; } _randEquip.godWeaponIDs = new int[_equips[4].Count]; for (int j = 0; j < _equips[4].Count; ++j) { _randEquip.godWeaponIDs[j] = (int)_equips[4][j]; } _jobDict.Add(_lv, _randEquip); } } SgzzRobotEquipDict.Add(job, _jobDict); } } GatherSoulDZ = GetInt("GatherSoulDZ"); if (SgzcRealm == null) { SgzcRealm = new Dictionary<int, int>(); var _lvArr = GetInputString("SGZCRobotRealm", 1).Split('|'); var _rLvArr = GetInputString("SGZCRobotRealm", 2).Split('|'); for (int j = 0; j < _lvArr.Length; ++j) { SgzcRealm[int.Parse(_lvArr[j])] = int.Parse(_rLvArr[j]); } } crossServerOneVsOneOpenDay = GetInt("CrossRealmCfg"); } catch (Exception ex) { Debug.LogError(ex); } } public static string GetJobHeadPortrait(int _job, int _ReincarnationLv) { if (jobHeadPortrait.ContainsKey(_job) && jobHeadPortrait[_job].ContainsKey(_ReincarnationLv)) { return jobHeadPortrait[_job][_ReincarnationLv]; } else { return string.Empty; } } public static string GetOtherJobHeadPortrait(int _job, int _ReincarnationLv) { if (otherjobHeadPortrait.ContainsKey(_job) && otherjobHeadPortrait[_job].ContainsKey(_ReincarnationLv)) { return otherjobHeadPortrait[_job][_ReincarnationLv]; } else { return string.Empty; } } } FuncConfigConfig nxxdImg = Config.Instance.Get<FuncConfigConfig>("NXXDPicture"); LitJson.JsonData nxxdData = LitJson.JsonMapper.ToObject(nxxdImg.Numerical1); multipleRealmImgDict = new Dictionary<int, string>(); if (nxxdData.IsArray) { for (i = 0; i < nxxdData.Count; i++) { if (nxxdData[i].IsArray) { multipleRealmImgDict.Add(int.Parse(nxxdData[i][0].ToString()), nxxdData[i][1].ToString()); } } } bossShuntMaps = new List<int>(GetIntArray("BossShunt")); bossShuntDays = GetInt("BossShunt", 3); itemDropEffect.Clear(); func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffect"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); List<string> _keys = new List<string>(_data.Keys); for (i = 0; i < _keys.Count; ++i) { int[] _props = new int[3]; for (int j = 0; j < 3; ++j) { _props[j] = (int)_data[_keys[i]][j]; } itemDropEffect[int.Parse(_keys[i])] = _props; } xllyDropEffect.Clear(); _data = LitJson.JsonMapper.ToObject(func.Numerical2); _keys.Clear(); _keys.AddRange(_data.Keys); for (i = 0; i < _keys.Count; ++i) { int[] _props = new int[3]; for (int j = 0; j < 3; ++j) { _props[j] = (int)_data[_keys[i]][j]; } xllyDropEffect[int.Parse(_keys[i])] = _props; } xqryDropEffect.Clear(); _data = LitJson.JsonMapper.ToObject(func.Numerical3); _keys.Clear(); _keys.AddRange(_data.Keys); for (i = 0; i < _keys.Count; ++i) { int[] _props = new int[3]; for (int j = 0; j < 3; ++j) { _props[j] = (int)_data[_keys[i]][j]; } xqryDropEffect[int.Parse(_keys[i])] = _props; } dropEffectQuality.Clear(); func = Config.Instance.Get<FuncConfigConfig>("IeemEquipmentEffectQuality"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); _keys.Clear(); _keys.AddRange(_data.Keys); for (i = 0; i < _keys.Count; ++i) { dropEffectQuality[int.Parse(_keys[i])] = (int)_data[_keys[i]]; } customDropEffect.Clear(); func = Config.Instance.Get<FuncConfigConfig>("ItemEquipmentEffectItem"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); _keys.Clear(); _keys.AddRange(_data.Keys); int[] _tmp = null; List<int[]> _content = null; for (i = 0; i < _keys.Count; ++i) { _content = new List<int[]>(); foreach (LitJson.JsonData _values in _data[_keys[i]]) { if (_values.IsArray) { _tmp = new int[2]; _tmp[0] = (int)_values[0]; _tmp[1] = (int)_values[1]; } else { _tmp = new int[1]; _tmp[0] = (int)_values; } _content.Add(_tmp); } customDropEffect.Add(int.Parse(_keys[i]), _content); } BuffToHitEffect.Clear(); func = Config.Instance.Get<FuncConfigConfig>("BuffToHitEffect"); if (!string.IsNullOrEmpty(func.Numerical1) && !string.IsNullOrEmpty(func.Numerical2)) { string[] _buffs = func.Numerical1.Split('|'); string[] _effects = func.Numerical2.Split('|'); for (i = 0; i < _buffs.Length; ++i) { BuffToHitEffect[int.Parse(_buffs[i])] = int.Parse(_effects[i]); } } demonJarHintLevelLimit = GetInt("DemonJarFirstRemin"); demonJarHintLineId = GetInt("DemonJarFirstRemin", 2); skillPanelUnLock = GetInt("SkillPanelUnlock"); dailyQuestRedpointLevelLimit = GetInt("DailyQuestRedPoint"); lowHpRemind = GetInt("LowHpRemind"); autoBuyItemIds = GetIntArray("BuyItemPrice", 1); autoBuyItemPrices = GetIntArray("BuyItemPrice", 2); neutralMaps.AddRange(GetIntArray("MapLine", 4)); neutralBossMaps.AddRange(GetIntArray("BossListMapID")); var _propertyIconCfg = Config.Instance.Get<FuncConfigConfig>("PropertyIcon"); var _propertyIconJson = LitJson.JsonMapper.ToObject(_propertyIconCfg.Numerical1); foreach (var _key in _propertyIconJson.Keys) { var _property = int.Parse(_key); propertyIconDict.Add(_property, _propertyIconJson[_key].ToString()); } munekadolockLimit = GetInt("MunekadoLockLimit"); demonJarRedPoint = GetInt("DemonJarRedPoint"); LoadLV = GetInputString("LoadLV"); mainWinSkillResetTime = GetFloat("AutomaticSwitch"); OffLineTimeLackRemendLevelLimit = GetInt("TJGLevelLimit"); heroDialogueOffset = GetInputString("NpcHalfLength", 1).Vector3Parse(); heroDialogueRotation = GetInputString("NpcHalfLength", 2).Vector3Parse(); heroDialogueScale = GetFloat("NpcHalfLength", 3); var ancientConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattleTarget"); ancientGrandTotalAchievements = new List<int>(); ancientGrandTotalAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical1)); ancientContinueKillAchievements = new List<int>(); ancientContinueKillAchievements.AddRange(ConfigParse.GetMultipleStr<int>(ancientConfig.Numerical2)); trialDungeonGroupChallengeTipLv = GetInt("SingleIntoFB"); prayerRedpointLimitLv = GetInt("PrayRedPoint"); demonJarLevelLimit = GetInt("DemonJarLevelLimit"); maxItemDropEffectCount = GetInt("ItemMaskEffect"); specialGuide41Mission = GetInt("SpecialGuide41", 1); specialGuide41Achievement = GetInt("SpecialGuide41", 2); supremeRechargeVipLv = GetInt("SupremeCTGVipLimit", 1); rechargeRedpointLv = GetInt("FirstPayRedPoint", 1); rechargeRedpointMinLv = GetInt("FirstPayRedPoint", 2); runeTowerSweepBuyTimes = GetInt("RuneTowerSweepBuy"); runeTowerSweepBuyPrice = GetInt("RuneTowerSweepBuy", 2); teamMatchingTimeOut = GetInt("TeamMatchingTimeOut"); inGameDownLoadLevelCheckPoints = new List<int>(GetIntArray("InGameDownLoad")); inGameDownLoadTaskCheckPoints = new List<int>(GetIntArray("InGameDownLoad", 2)); inGameDownLoadHighLevel = GetInt("InGameDownLoad", 3); worldBossNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 1)); bossHomeNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 2)); elderGodNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 3)); demonJarNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 4)); dogzNoRebornRemindMaps = new List<int>(GetIntArray("NoRebornRemindMap", 5)); if (ModeDefaultConfig == null) { func = Config.Instance.Get<FuncConfigConfig>("ModeDefault"); string[] _funcNpc = func.Numerical1.Split('|'); string[] _fightNpc = func.Numerical2.Split('|'); string[] _pet = func.Numerical3.Split('|'); string[] _horse = func.Numerical4.Split('|'); ModeDefaultConfig = new string[4][]; ModeDefaultConfig[0] = _funcNpc; ModeDefaultConfig[1] = _fightNpc; ModeDefaultConfig[2] = _pet; ModeDefaultConfig[3] = _horse; } if (RealmGroup == null) { func = Config.Instance.Get<FuncConfigConfig>("RealmGroup"); string[] _group = func.Numerical1.Split('|'); RealmGroup = new int[_group.Length]; for (int j = 0; j < _group.Length; ++j) { int.TryParse(_group[j], out RealmGroup[j]); } } func = Config.Instance.Get<FuncConfigConfig>("PrefightAtkRange"); PrefightAtkRange = float.Parse(func.Numerical1); inGameDownLoadHighestLevelPoint = GetInt("DownReward", 2); dungeonCanUseMoneyIds = new List<int>(GetIntArray("FBEnterTickeyAuto", 1)); dungeonRebornClientTimes = ConfigParse.GetDic<int, int>(GetInputString("DuplicatesRebornTime", 2)); dogzBoxLimit = GetInt("DogzBoxLimit"); fairyGrabBossMapLines = ConfigParse.GetDic<int, int>(GetInputString("MapLine", 2)); var grabBossMaps = fairyGrabBossMapLines.Keys.ToList(); foreach (var _key in grabBossMaps) { fairyGrabBossMapLines[_key] = fairyGrabBossMapLines[_key] - 1; } if (DropItemEffectMapID == null) { DropItemEffectMapID = new Dictionary<int, List<int>>(); } DropItemEffectMapID.Clear(); func = Config.Instance.Get<FuncConfigConfig>("DropItemEffectMapID"); _data = LitJson.JsonMapper.ToObject(func.Numerical1); int _itemID; _keys.Clear(); _keys.AddRange(_data.Keys); for (int j = 0; j < _keys.Count; ++j) { if (int.TryParse(_keys[j].ToString(), out _itemID)) { if (!DropItemEffectMapID.ContainsKey(_itemID)) { DropItemEffectMapID.Add(_itemID, new List<int>()); } var _jsonMapIDs = _data[_keys[j]]; foreach (var _jsonMapID in _jsonMapIDs) { var _mapID = ((LitJson.IJsonWrapper)_jsonMapID).GetInt(); if (!DropItemEffectMapID[_itemID].Contains(_mapID)) { DropItemEffectMapID[_itemID].Add(_mapID); } } } } int[] mapIDs = GetIntArray("RebornAutoFightDungeon"); RebornAutoFightMapID = new List<int>(mapIDs); teamWorldCall = GetInputString("TeamWorldCall"); teamWorldCallInviteCount = GetInt("TeamWorldCall", 2); var ancientKingAwradConfig = Config.Instance.Get<FuncConfigConfig>("ElderBattlefieldTopAward"); if (ancientKingAwradConfig != null) { var itemArray = LitJson.JsonMapper.ToObject<int[][]>(ancientKingAwradConfig.Numerical1); for (int k = 0; k < itemArray.Length; k++) { ancientKingAwards.Add(new Item() { id = itemArray[k][0], count = itemArray[k][1], bind = itemArray[k][2] == 1, }); } } func = Config.Instance.Get<FuncConfigConfig>("QualityEffectConfig"); lowQualityEffectCount = int.Parse(func.Numerical1); medQualityEffectCount = int.Parse(func.Numerical2); highQualityEffectCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityPetCountConfig"); lowQualityPetCount = int.Parse(func.Numerical1); medQualityPetCount = int.Parse(func.Numerical2); highQualityPetCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityGuardCountConfig"); lowQualityGuardCount = int.Parse(func.Numerical1); medQualityGuardCount = int.Parse(func.Numerical2); highQualityGuardCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityPetEffectCount"); lowQualityPetEffectCount = int.Parse(func.Numerical1); medQualityPetEffectCount = int.Parse(func.Numerical2); highQualityPetEffectCount = int.Parse(func.Numerical3); func = Config.Instance.Get<FuncConfigConfig>("QualityHorseEffectCount"); lowQualityHorseEffectCount = int.Parse(func.Numerical1); medQualityHorseEffectCount = int.Parse(func.Numerical2); highQualityHorseEffectCount = int.Parse(func.Numerical3); fairyLandBuffCondition = GetInt("XjmjAddHarm", 1); fairyLandBuffId = GetInt("XjmjAddHarm", 2); achievementEarlierStageLevel = GetInt("AchieveLV"); func = Config.Instance.Get<FuncConfigConfig>("PreloadSkillEffect"); PreloadSkillEffect = new int[2][]; PreloadSkillEffect[0] = GetIntArray("PreloadSkillEffect"); PreloadSkillEffect[1] = GetIntArray("PreloadSkillEffect", 2); DemonJarAutoTime = GetInt("DemonJarAutoTime"); if (SgzzRobotEquipDict == null) { SgzzRobotEquipDict = new Dictionary<int, Dictionary<int, GA_NpcFightSgzcZZ.EquipRandomInfo>>(); for (int job = 1; job <= 3; ++job) { string _jsonString = GetInputString("SGZCHelpBattleEquip", job); if (string.IsNullOrEmpty(_jsonString)) { continue; } var _jsonData = LitJson.JsonMapper.ToObject(_jsonString); var _jobDict = new Dictionary<int, GA_NpcFightSgzcZZ.EquipRandomInfo>(); for (i = 0; i < _jsonData.Count; ++i) { var _lvJson = _jsonData[i]; var _lv = (int)_lvJson["LV"]; if (!_jobDict.ContainsKey(_lv)) { var _equips = _lvJson["Equips"]; var _randEquip = new GA_NpcFightSgzcZZ.EquipRandomInfo(); _randEquip.randClothesItemIDs = new int[_equips[0].Count]; for (int j = 0; j < _equips[0].Count; ++j) { _randEquip.randClothesItemIDs[j] = (int)_equips[0][j]; } _randEquip.randWeaponItemIDs = new int[_equips[1].Count]; for (int j = 0; j < _equips[1].Count; ++j) { _randEquip.randWeaponItemIDs[j] = (int)_equips[1][j]; } _randEquip.randSecondaryItemIDs = new int[_equips[2].Count]; for (int j = 0; j < _equips[2].Count; ++j) { _randEquip.randSecondaryItemIDs[j] = (int)_equips[2][j]; } _randEquip.randWingItemIDs = new int[_equips[3].Count]; for (int j = 0; j < _equips[3].Count; ++j) { _randEquip.randWingItemIDs[j] = (int)_equips[3][j]; } _randEquip.godWeaponIDs = new int[_equips[4].Count]; for (int j = 0; j < _equips[4].Count; ++j) { _randEquip.godWeaponIDs[j] = (int)_equips[4][j]; } _jobDict.Add(_lv, _randEquip); } } SgzzRobotEquipDict.Add(job, _jobDict); } } GatherSoulDZ = GetInt("GatherSoulDZ"); if (SgzcRealm == null) { SgzcRealm = new Dictionary<int, int>(); var _lvArr = GetInputString("SGZCRobotRealm", 1).Split('|'); var _rLvArr = GetInputString("SGZCRobotRealm", 2).Split('|'); for (int j = 0; j < _lvArr.Length; ++j) { SgzcRealm[int.Parse(_lvArr[j])] = int.Parse(_rLvArr[j]); } } crossServerOneVsOneOpenDay = GetInt("CrossRealmCfg"); UISpringDecorate = GetInt("UISpringDecorate"); } catch (Exception ex) { Debug.LogError(ex); } } public static string GetJobHeadPortrait(int _job, int _ReincarnationLv) { if (jobHeadPortrait.ContainsKey(_job) && jobHeadPortrait[_job].ContainsKey(_ReincarnationLv)) { return jobHeadPortrait[_job][_ReincarnationLv]; } else { return string.Empty; } } public static List<int> GetAttrIdsBySkill(int _skillId) { if(skillAttrIDDict.ContainsKey(_skillId)) { return skillAttrIDDict[_skillId]; } return null; } public static string GetOtherJobHeadPortrait(int _job, int _ReincarnationLv) { if (otherjobHeadPortrait.ContainsKey(_job) && otherjobHeadPortrait[_job].ContainsKey(_ReincarnationLv)) { return otherjobHeadPortrait[_job][_ReincarnationLv]; } else { return string.Empty; } } public static PackType GetPackTypeByItemType(int itemType) { foreach(var key in itemPutInPackDict.Keys) @@ -719,149 +755,149 @@ } } return PackType.rptItem; } private static int GetInt(string _key, int _index = 1) { var result = 0; int.TryParse(GetInputString(_key, _index), out result); return result; } private static float GetFloat(string _key, int _index = 1) { var result = 0f; float.TryParse(GetInputString(_key, _index), out result); return result; } private static bool GetBool(string _key, int _index = 1) { var result = false; bool.TryParse(GetInputString(_key, _index), out result); return result; } private static int[] GetIntArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new int[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { int.TryParse(stringArray[i], out result[i]); } return result; } private static string[] GetStringArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new string[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { result[i] = stringArray[i]; } return result; } private static float[] GetFloatArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new float[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { float.TryParse(stringArray[i], out result[i]); } return result; } private static bool[] GetBoolArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new bool[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { bool.TryParse(stringArray[i], out result[i]); } return result; } private static List<int> GetTimeArray(string _key, int _index = 1) { var configContent = GetInputString(_key, _index); var stringArray = configContent.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); var timeList = new List<int>(); for (int i = 0; i < stringArray.Length; i++) { var input = stringArray[i]; var matches = Regex.Matches(input, "[0-9]{1,2}"); var hour = matches.Count > 0 ? int.Parse(matches[0].Value) : 0; var minute = matches.Count > 1 ? int.Parse(matches[1].Value) : 0; timeList.Add(hour * 60 + minute); } return timeList; } private static string GetInputString(string _key, int _index = 1) { var config = Config.Instance.Get<FuncConfigConfig>(_key); var inputString = string.Empty; switch (_index) { case 1: inputString = config.Numerical1; break; case 2: inputString = config.Numerical2; break; case 3: inputString = config.Numerical3; break; case 4: inputString = config.Numerical4; break; case 5: inputString = config.Numerical5; break; } return inputString; } } } private static int GetInt(string _key, int _index = 1) { var result = 0; int.TryParse(GetInputString(_key, _index), out result); return result; } private static float GetFloat(string _key, int _index = 1) { var result = 0f; float.TryParse(GetInputString(_key, _index), out result); return result; } private static bool GetBool(string _key, int _index = 1) { var result = false; bool.TryParse(GetInputString(_key, _index), out result); return result; } private static int[] GetIntArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new int[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { int.TryParse(stringArray[i], out result[i]); } return result; } private static string[] GetStringArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new string[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { result[i] = stringArray[i]; } return result; } private static float[] GetFloatArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new float[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { float.TryParse(stringArray[i], out result[i]); } return result; } private static bool[] GetBoolArray(string _key, int _index = 1) { var inputString = GetInputString(_key, _index); var stringArray = inputString.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); if (stringArray.Length == 0) { return null; } var result = new bool[stringArray.Length]; for (int i = 0; i < stringArray.Length; i++) { bool.TryParse(stringArray[i], out result[i]); } return result; } private static List<int> GetTimeArray(string _key, int _index = 1) { var configContent = GetInputString(_key, _index); var stringArray = configContent.Split(StringUtility.splitSeparator, StringSplitOptions.RemoveEmptyEntries); var timeList = new List<int>(); for (int i = 0; i < stringArray.Length; i++) { var input = stringArray[i]; var matches = Regex.Matches(input, "[0-9]{1,2}"); var hour = matches.Count > 0 ? int.Parse(matches[0].Value) : 0; var minute = matches.Count > 1 ? int.Parse(matches[1].Value) : 0; timeList.Add(hour * 60 + minute); } return timeList; } private static string GetInputString(string _key, int _index = 1) { var config = Config.Instance.Get<FuncConfigConfig>(_key); var inputString = string.Empty; switch (_index) { case 1: inputString = config.Numerical1; break; case 2: inputString = config.Numerical2; break; case 3: inputString = config.Numerical3; break; case 4: inputString = config.Numerical4; break; case 5: inputString = config.Numerical5; break; } return inputString; } } System/JadeDynastyKnapSack/JadeDynastyEquipWin.cs
@@ -1,6 +1,7 @@ using System; using UnityEngine; using UnityEngine.UI; using System.Collections; namespace Snxxz.UI { @@ -45,6 +46,12 @@ SetDisplay(); } protected override void OnActived() { base.OnActived(); StartCoroutine(UpdateLookItem()); } protected override void OnAfterOpen() { @@ -56,6 +63,7 @@ playerPack.RefreshItemCountAct -= UpdateJadeDynastyItem; UI3DModelExhibition.Instance.StopShow(); equipModel.ClearLookItemModel(); StopAllCoroutines(); } protected override void OnAfterClose() @@ -69,7 +77,6 @@ CreateItemLine(); UpdatePlayerUI3DModel(); UpdateFightPower(); UpdateLookItem(); TimeDownMgr.CoolTimeData data; if (TimeDownMgr.Instance.Get(TimeDownMgr.CoolTimeType.BagSort, out data)) { @@ -86,14 +93,16 @@ } } public void UpdateLookItem() public IEnumerator UpdateLookItem() { if (equipModel.jumpIndex < 0) return; int jumpIndex = equipModel.jumpIndex; jumpIndex = jumpIndex > 2 ? jumpIndex - 2 : jumpIndex; itemCtrl.JumpIndex(jumpIndex); itemCtrl.m_Scorller.RefreshActiveCellViews(); if (equipModel.jumpIndex > 0) { yield return WaitingForSecondConst.WaitMS100; int jumpIndex = equipModel.jumpIndex; jumpIndex = jumpIndex > 2 ? jumpIndex - 2 : jumpIndex; itemCtrl.JumpIndex(jumpIndex); itemCtrl.m_Scorller.RefreshActiveCellViews(); } } private void CreateItemLine() System/JadeDynastyTower/JadeDynastyTowerModel.cs
@@ -15,6 +15,7 @@ const int REDPOINTID_03 = 21503; const int FUNCTIONID = 164; public int lastChallengeFloor { get; private set; } public int highestPassFloor { get; private set; } public int currentFloor { get { @@ -130,7 +131,7 @@ public void SetOpenJadeDynastyTowerWinDirty() { if (specialUnLockFloor==0) if (specialUnLockFloor == 0) { openJadeDynastyTower = true; } @@ -178,6 +179,7 @@ public void UpdateHighestPassFloor(HB213_tagMCZhuXianTowerInfo info) { lastChallengeFloor = (int)info.LastFloor; var oldRecorder = highestPassFloor; highestPassFloor = (int)info.Floor; if (serverInited && highestPassFloor > oldRecorder) @@ -223,12 +225,6 @@ public void OnMapInitOk() { switch (PlayerDatas.Instance.baseData.MapID) { case DATA_MAPID: RequestRefreshMonster(); break; } } private void UpateRedpoint() System/JadeDynastyTower/JadyDynastyTowerVictoryWin.cs
@@ -70,25 +70,8 @@ protected override void DrawExitTimer(int seconds) { 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 ChallengeNextRuneTower() { var dungeonStage = StageManager.Instance.CurrentStage as JadeDynastyTowerDungeonStage; dungeonStage.PerformChallengeNextLevel(); dungeonModel.UpdateCoolDown(DungeonCoolDownType.LeaveMap, 0); dungeonModel.UpdateCoolDown(DungeonCoolDownType.TowerTake, 0); CloseClick(); m_AwardTimer.text = Language.Get("JadeDynastyRewardTime", Mathf.Clamp(seconds, 0, int.MaxValue)); m_ExitTimer.text = Language.Get("DemonDungeonExit"); } private void DisplayAwardAndExitButton() System/KnapSack/Logic/BoxInfoWin.cs
@@ -50,6 +50,8 @@ [SerializeField] CanvasGroup tipAlpha; [SerializeField] ModelShowPerfab modelShow; private List<GameObject> tempObjlist = new List<GameObject>(); ItemTipsModel _itemTipsModel; @@ -186,6 +188,18 @@ CreateFuncBtn(); RefreshRemainTime(itemTipsModel.curAttrData.guid); bool isShowModel = itemTipsModel.IsShowModel(itemTipsModel.curAttrData.itemId, modelShow); if (isShowModel) { bgObj.anchoredPosition3D = new Vector3(197, 0, 0); modelShow.gameObject.SetActive(true); } else { modelShow.gameObject.SetActive(false); bgObj.anchoredPosition3D = Vector3.zero; } } private void CheckUselimit() @@ -346,7 +360,7 @@ //itemTipsModel.SetCommonTipPos(bgObj); bottomPart.gameObject.SetActive(false); bottomPart.gameObject.SetActive(true); bgObj.localPosition = Vector3.zero; //bgObj.localPosition = Vector3.zero; tipAlpha.alpha = 1; } System/KnapSack/Logic/EquipTip.cs
@@ -904,6 +904,8 @@ private void SetBottomUI() { if (itemAttrData == null) return; switch (itemAttrData.itemConfig.EquipPlace) { case 1: System/KnapSack/Logic/ItemInfoWin.cs
@@ -80,8 +80,6 @@ Color32 conditionColor = new Color32(255, 244, 205, 255); Color32 conditionRedColor = new Color32(255, 1, 1, 255); Dictionary<int, int> petSkillDict; Dictionary<int, List<int>> mountSkillDict; protected override void BindController() { @@ -131,8 +129,6 @@ private void InitUI() { petSkillDict = null; mountSkillDict = null; if (itemTipsModel.curAttrData == null) return; @@ -169,32 +165,16 @@ CreateFuncBtn(); RefreshRemainTime(itemTipsModel.curAttrData.guid); switch (itemTipsModel.curAttrData.itemConfig.Type) bool isShowModel = itemTipsModel.IsShowModel(itemTipsModel.curAttrData.itemId,modelShow); if(isShowModel) { case 125: bgObj.anchoredPosition3D = new Vector3(197,0,0); modelShow.gameObject.SetActive(true); PetInfoConfig petInfo = itemTipsModel.unlockPetDict[itemTipsModel.curAttrData.itemConfig.EffectValueA1]; petSkillDict = itemTipsModel.GetPetSkillDict(itemTipsModel.curAttrData.itemConfig.EffectValueA1); modelShow.SetModelShow(petInfo.ID, ModelShowType.pet, Language.Get("TreasureEffect103"), petInfo.ShowFightPower); break; case 124: bgObj.anchoredPosition3D = new Vector3(197, 0, 0); modelShow.gameObject.SetActive(true); HorseConfig horseConfig = itemTipsModel.unlockMountDict[itemTipsModel.curAttrData.itemConfig.EffectValueA1]; mountSkillDict = itemTipsModel.GetMountSkillDict(itemTipsModel.curAttrData.itemConfig.EffectValueA1); modelShow.SetModelShow(horseConfig.Model, ModelShowType.mount, Language.Get("TreasureEffect103"), horseConfig.ShowFightPower); break; case 82: case 83: bgObj.anchoredPosition3D = new Vector3(197, 0, 0); modelShow.gameObject.SetActive(true); modelShow.SetModelShow(itemTipsModel.curAttrData.itemConfig.EffectValueA1, ModelShowType.FashionDress, Language.Get("TreasureEffect103")); break; default: modelShow.gameObject.SetActive(false); bgObj.anchoredPosition3D = Vector3.zero; break; bgObj.anchoredPosition3D = new Vector3(197, 0, 0); modelShow.gameObject.SetActive(true); } else { modelShow.gameObject.SetActive(false); bgObj.anchoredPosition3D = Vector3.zero; } } System/KnapSack/Logic/ItemTipsModel.cs
@@ -75,7 +75,7 @@ { get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); } } FashionDressModel fashionDress { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } } DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } } public override void Init() @@ -2734,6 +2734,175 @@ return shareNumDes; } #endregion #region 判断是否展示模型 public Dictionary<int, int> showModelAttrDict = new Dictionary<int, int>(); public bool IsShowModel(int itemId,ModelShowPerfab showPerfab) { var config = Config.Instance.Get<ItemConfig>(itemId); if (config == null) return false; int fightPower = 0; switch (config.Type) { case 125: PetInfoConfig petInfo = unlockPetDict[config.EffectValueA1]; fightPower = petInfo.ShowFightPower; showPerfab.SetModelShow(petInfo.ID, ModelShowType.pet, Language.Get("TreasureEffect103"),fightPower); return true; case 124: HorseConfig horseConfig = unlockMountDict[config.EffectValueA1]; fightPower = horseConfig.ShowFightPower; showPerfab.SetModelShow(horseConfig.Model, ModelShowType.mount, Language.Get("TreasureEffect103"),fightPower); return true; } bool isFashion = TryGetFashionFightPower(config,out fightPower); if(isFashion) { showPerfab.SetModelShow(itemId, ModelShowType.FashionDress, Language.Get("TreasureEffect103"),fightPower); return true; } return false; } private bool TryGetFashionFightPower(ItemConfig itemConfig,out int fightPower) { showModelAttrDict.Clear(); fightPower = 0; if (itemConfig == null) return false; int fashionType = 0; int fashionId = 0; bool isFashion = TryGetItemFashionData(itemConfig.ID,out fashionType,out fashionId); if(isFashion) { List<int> fashionIds = null; fashionDress.TryGetFashionIds(fashionType, out fashionIds); if (fashionId == 0) { if (fashionIds != null) { foreach (var id in fashionIds) { Dictionary<int, int> dict = null; fashionDress.TryGetFashionDressProperty(id, 1, out dict); if (dict != null) { foreach (var attrId in dict.Keys) { var attrValue = dict[attrId]; if (!showModelAttrDict.ContainsKey(attrId)) { showModelAttrDict.Add(attrId, attrValue); } else { showModelAttrDict[attrId] += attrValue; } } } } } } else { Dictionary<int, int> dict = null; fashionDress.TryGetFashionDressProperty(fashionId, 1, out dict); if (dict != null) { foreach (var attrId in dict.Keys) { var attrValue = dict[attrId]; if (!showModelAttrDict.ContainsKey(attrId)) { showModelAttrDict.Add(attrId, attrValue); } else { showModelAttrDict[attrId] += attrValue; } } } } fightPower = UIHelper.GetFightPower(showModelAttrDict); return true; } return false; } public bool TryGetItemFashionData(int itemId,out int fashionType,out int fashionId) { fashionType = 0; fashionId = 0; Dictionary<int, List<int>> effectDict = null; GetItemEffectDict(itemId, out effectDict); foreach (var key in effectDict.Keys) { var valueList = effectDict[key]; if (key == 244) { fashionType = valueList[0]; fashionId = valueList[1]; return true; } } return false; } private void GetItemEffectDict(int itemId,out Dictionary<int,List<int>> dict) { var config = Config.Instance.Get<ItemConfig>(itemId); dict = new Dictionary<int, List<int>>(); if (config == null) return; if(config.Effect1 != 0) { List<int> valuelist = new List<int>(); valuelist.Add(config.EffectValueA1); valuelist.Add(config.EffectValueB1); valuelist.Add(config.EffectValueC1); dict.Add(config.Effect1,valuelist); } if(config.Effect2 != 0) { List<int> valuelist = new List<int>(); valuelist.Add(config.EffectValueA2); valuelist.Add(config.EffectValueB2); valuelist.Add(config.EffectValueC2); dict.Add(config.Effect2, valuelist); } if (config.Effect3 != 0) { List<int> valuelist = new List<int>(); valuelist.Add(config.EffectValueA3); valuelist.Add(config.EffectValueB3); valuelist.Add(config.EffectValueC3); dict.Add(config.Effect3, valuelist); } if (config.Effect4 != 0) { List<int> valuelist = new List<int>(); valuelist.Add(config.EffectValueA4); valuelist.Add(config.EffectValueB4); valuelist.Add(config.EffectValueC4); dict.Add(config.Effect4, valuelist); } if (config.Effect5 != 0) { List<int> valuelist = new List<int>(); valuelist.Add(config.EffectValueA5); valuelist.Add(config.EffectValueB5); valuelist.Add(config.EffectValueC5); dict.Add(config.Effect5, valuelist); } } #endregion } public class ItemAttrData System/KnapSack/Logic/ModelShowPerfab.cs
@@ -14,6 +14,7 @@ ModelShowType showType; FashionDressModel fashionDressModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } } ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } MagicianModel godWeaponModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } @@ -38,6 +39,7 @@ titleText.text = title; this.showType = showType; var job = PlayerDatas.Instance.baseData.Job; switch (showType) { case ModelShowType.treasure: @@ -47,11 +49,28 @@ UI3DModelExhibition.Instance.ShowHourse(id, modelImg); break; case ModelShowType.pet: var config = Config.Instance.Get<NPCConfig>(id); UI3DModelExhibition.Instance.ShowNPC(id, config.UIModeLOffset, config.UIModelRotation, modelImg); var npcConfig = Config.Instance.Get<NPCConfig>(id); UI3DModelExhibition.Instance.ShowNPC(id, npcConfig.UIModeLOffset, npcConfig.UIModelRotation, modelImg); break; case ModelShowType.FashionDress: UI3DModelExhibition.Instance.ShowOtherPlayer(modelImg,SetFashionDressData(id)); var itemConfig = Config.Instance.Get<ItemConfig>(id); if(itemConfig != null) { int fashionType = 0; int fashionId = 0; bool isFashion = tipsModel.TryGetItemFashionData(itemConfig.ID, out fashionType, out fashionId); if(isFashion) { List<int> fashionIds = null; fashionDressModel.TryGetFashionIds(fashionType, out fashionIds); if(fashionIds != null && fashionIds.Count > 0) { UI3DModelExhibition.Instance.ShowOtherPlayer(modelImg, SetFashionDressData(fashionIds)); } } } break; } @@ -68,76 +87,79 @@ } } public UI3DPlayerExhibitionData SetFashionDressData(int fashionId) public UI3DPlayerExhibitionData SetFashionDressData(List<int> fashionIds) { var job = PlayerDatas.Instance.baseData.Job; var playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>(); //var playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>(); var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes); var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID; //var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes); //var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID; var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon); var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID; //var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon); //var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID; var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing); var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID; //var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing); //var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID; var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2); var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID; FashionDress fashionDress = null; bool isFashion = fashionDressModel.TryGetFashionDress(fashionId,out fashionDress); //var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2); //var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID; var fashionClothesId = 0; var fashionWeaponId = 0; var fashionSecondaryId = 0; if(isFashion) foreach(var fashionId in fashionIds) { int itemId = fashionDress.requireLevelUpItem; var itemConfig = Config.Instance.Get<ItemConfig>(itemId); switch(fashionDress.fashionDressType) FashionDress fashionDress = null; bool isFashion = fashionDressModel.TryGetFashionDress(fashionId, out fashionDress); if (isFashion) { case 1: fashionClothesId = fashionDress.GetEquipItemId(); break; case 2: fashionWeaponId = fashionDress.GetEquipItemId(); break; case 3: fashionSecondaryId = fashionDress.GetEquipItemId(); break; } } int _suitLevel = 0; if (clothes != null) { if (clothes.itemInfo.IsSuite == 1) { if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0) int itemId = fashionDress.requireLevelUpItem; var itemConfig = Config.Instance.Get<ItemConfig>(itemId); switch (fashionDress.fashionDressType) { _suitLevel = clothes.GetUseDataModel(30)[0]; case 1: fashionClothesId = fashionDress.GetEquipItemId(); break; case 2: fashionWeaponId = fashionDress.GetEquipItemId(); break; case 3: fashionSecondaryId = fashionDress.GetEquipItemId(); break; } } } Dictionary<int, int> dict = null; EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, out dict); //int _suitLevel = 0; //ItemUseDataKey //if (clothes != null) //{ // if (clothes.itemInfo.IsSuite == 1) // { // if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0) // { // _suitLevel = clothes.GetUseDataModel(30)[0]; // } // } //} //Dictionary<int, int> dict = null; //EquipShowSwitch.IsGodWeaponEffectOn(PlayerDatas.Instance.baseData.equipShowSwitch, out dict); UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData() { job = job, clothesId = clothesId, suitLevel = _suitLevel, weaponId = weaponId, wingsId = wingsId, secondaryId = secondaryId, //clothesId = clothesId, //suitLevel = _suitLevel, //weaponId = weaponId, //wingsId = wingsId, //secondaryId = secondaryId, fashionClothesId = fashionClothesId, fashionWeaponId = fashionWeaponId, fashionSecondaryId = fashionSecondaryId, isDialogue = false, godWeapons = dict //godWeapons = dict }; return data; } System/KnapSack/Logic/PackModelInterface.cs
@@ -479,6 +479,11 @@ Equation.Instance.AddKeyValue("AtkSpeedC", 0); } DebugEx.Log("评分:" + Equation.Instance.Eval<double>(_equipGSFormula.Numerical1)); if(type == PackType.rptDeleted) { type = GeneralDefine.GetPackTypeByItemType(tagChinModel.Type); } switch(type) { case PackType.rptDogzEquip: System/KnapSack/Logic/SelectBoxItemCell.cs
@@ -33,16 +33,25 @@ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(id); this.ItemId = id; nameText.text = itemConfig.ItemName; ItemCellModel cellModel = new ItemCellModel(id, false, (ulong)BoxModel.selectDict[id],0,"",PackType.rptDeleted,true); ItemCellModel cellModel = new ItemCellModel(id, true, (ulong)BoxModel.selectDict[id],0,"",PackType.rptDeleted,true); itemBaisc.Init(cellModel); if (itemConfig.Effect1 == 220) { id = itemConfig.EffectValueA1; } int haveCnt = playerPack.GetItemCountByID(PackType.rptItem,id); if(haveCnt <= 0) var packType = GeneralDefine.GetPackTypeByItemType(itemConfig.Type); int haveCnt = 0; switch(packType) { haveCnt = ModelCenter.Instance.GetModel<RuneModel>().GetRuneCountById(id); case PackType.rptRunePack: haveCnt = ModelCenter.Instance.GetModel<RuneModel>().GetRuneCountById(id); break; case PackType.rptGatherSoul: haveCnt = ModelCenter.Instance.GetModel<VirtualPackModel>().GetItemCountById(packType,id); break; default: haveCnt = playerPack.GetItemCountByID(packType, id); break; } haveCntText.text = haveCnt.ToString(); SetIsChoose(false); System/Login/ServerListCenter.cs
@@ -272,6 +272,7 @@ public void SetServerListPlayer(ServerInfoPlayer serverInfoPlayer) { this.serverInfoPlayer = serverInfoPlayer; ProcessRecentServerData(); FiltrateDefaultServerAndServerGroup(); } System/MainInterfacePanel/HighSettingFadeInFadeOut.cs
@@ -55,6 +55,7 @@ CrossServerOneVsOneRewardModel m_CrossServerRewardModel; CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } } OpenServiceAchievementModel OpenServerModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } SpringFestivalModel springFestival { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } public void Init() { if (LatencyTimeList.Count <= 0) @@ -84,6 +85,7 @@ impactRankModel.inImpactRankUpdate += InImpactRankUpdate; OpenServerModel.IsOpenEvent += IsOpenEvent; OpenServerModel.IsPreviewTimeUpdate += IsOpenEvent; OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent; } public void Unit() @@ -100,6 +102,12 @@ impactRankModel.inImpactRankUpdate -= InImpactRankUpdate; OpenServerModel.IsOpenEvent -= IsOpenEvent; OpenServerModel.IsPreviewTimeUpdate -= IsOpenEvent; OperationTimeHepler.Instance.operationAdvanceEvent -= OperationAdvanceEvent; } private void OperationAdvanceEvent(Operation obj) { Classify(); } private void IsOpenEvent() @@ -119,18 +127,13 @@ private void operationEndEvent(Operation arg1, int arg2) { if (arg1 == Operation.FairyCeremony) { Classify(); } Classify(); } private void operationStartEvent(Operation arg1, int arg2) { if (arg1 == Operation.FairyCeremony) { Classify(); } Classify(); } private void UpdateRedpoint(int redPointID) @@ -493,22 +496,7 @@ highBtnRecord.IsNagaaki = false; } } if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } } else @@ -536,23 +524,7 @@ highBtnRecord.IsNagaaki = false; } } if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } } } @@ -561,186 +533,97 @@ if (GroupLowIndexList.Contains(highBtnRecord.Index)) { int IndexOf = GroupLowIndexList.IndexOf(highBtnRecord.Index); if (IndexOf == 0) switch (IndexOf) { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))//精灵盛典 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 1) { var _funcOrder = 0; if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//精彩活动 { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index)) case 0: if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony))//精灵盛典 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 1: if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.NewYearFairyCeremony))//精灵盛典 { SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 2: var _funcOrder = 0; if (OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))//精彩活动 { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index)) { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } } } break; case 3: bool Isopen = impactRankModel.IsInImpactRank; if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//全民冲榜 { SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 4: bool Is_open = OpenServerModel.IsOpenFeatures(); bool _isOpen = springFestival.IsOpenFeatures(); if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && (Is_open || _isOpen))//7天寻礼 { SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 5: bool Isopen5 = OpenServerActivityCenter.Instance.IsActivityOpen(14); if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen5)//限时抢购 { SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 6: if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//限时礼包 { SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 7: bool Isopen7 = OpenServerActivityCenter.Instance.IsActivityOpen(4); if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen7)//限时特惠 { SetTranInBox(m_GroupIndex_Low.GetChild(i), highBtnRecord); } break; case 8: break; default: break; } else if (IndexOf == 2) { bool Isopen = impactRankModel.IsInImpactRank; if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//全民冲榜 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 3) { bool Isopen = OpenServerModel.IsOpen; if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//7天寻礼 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 4) { bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(14); if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时抢购 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 5) { if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && limitedTimePackageItemModel.IsExpired())//限时礼包 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } else if (IndexOf == 6) { bool Isopen = OpenServerActivityCenter.Instance.IsActivityOpen(4); if (!AnimationFadeOutDicLow.ContainsKey(highBtnRecord.Index) && Isopen)//限时特惠 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = m_GroupIndex_Low.GetChild(i); selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } } //else if (IndexOf == 7) //{ //} } } } } private void SetTranInBox(Transform tran, HighBtnRecord highBtnRecord)//下层按钮设置层数 { if (AnimationFadeOutDicLow.Count < 6)//------第二层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = tran; selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicLow.Add(highBtnRecord.Index, selectCaseRequest); } else//------第三层 { SelectCaseRequest selectCaseRequest = new SelectCaseRequest(); selectCaseRequest.Tran = tran; selectCaseRequest.IsNagaaki = highBtnRecord.IsNagaaki; selectCaseRequest.Index = highBtnRecord.Index; AnimationFadeOutDicThree.Add(highBtnRecord.Index, selectCaseRequest); } } private void PositionReduction()//还原位置(把盒子中的位置全部重新拉出来) { if (AnimationFadeOutDicTop.Count > 0)//上层 System/MainInterfacePanel/HighSettingTip.cs
@@ -53,6 +53,7 @@ [SerializeField] Button m_FlashRushBtn;//限时抢购 [SerializeField] Button m_CrossServerBtn;//跨服1V1按钮 [SerializeField] Button m_OpenServiceBtn;//周狂欢按钮 [SerializeField] Button m_NewYearBtn;//新年盛典 private bool _bool = true; private int swicthCdTime = 0; private bool IsFadeOut = true; @@ -96,6 +97,7 @@ m_FlashRushBtn.AddListener(OnClickFlashRushBtn); m_CrossServerBtn.AddListener(OnClickCrossServerBtn); m_OpenServiceBtn.AddListener(OnClickOpenServiceBtn); m_NewYearBtn.AddListener(OnClickNewYearBtn); if (_bool) { ColseButton(); @@ -151,6 +153,7 @@ _RuneTaBtn.onClick.RemoveAllListeners(); m_FlashSaleBtn.RemoveAllListeners(); m_AllThePeopleBtn.RemoveAllListeners(); m_NewYearBtn.RemoveAllListeners(); CoroutineMgr.Instance.MainHighTipCdTimeEvent -= OnMainHighTipCdTime; FunctionUnlockFlyObjectTarget.IsPlayerUiEffect -= IsPlayerUiEffect; FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange; @@ -390,6 +393,12 @@ WindowCenter.Instance.Open<AchievementActivityWin>(); } void OnClickNewYearBtn() { WindowCenter.Instance.Close<MainInterfaceWin>(); WindowCenter.Instance.Open<NewYearFairylandCeremonyWin>(); } public void ShowButton()//向上 { System/Message/RichMoveEvent.cs
@@ -121,7 +121,7 @@ //} //else //{ MoveToMapPos(_mapId, x, y, line); MoveToMapPos(_mapId, x, y, line); //} } break; @@ -211,7 +211,8 @@ yield break; } while (_hero.SkillMgr.CurCastSkill != null && while (_hero != null && _hero.SkillMgr.CurCastSkill != null && _hero.SkillMgr.CurCastSkill.SkillCompelete == false) { yield return null; @@ -219,6 +220,11 @@ { yield break; } } if (_hero == null) { yield break; } MapTransferUtility.Instance.MoveToNPC(id); @@ -233,11 +239,18 @@ yield break; } while (_hero.SkillMgr.CurCastSkill != null && while (_hero != null && _hero.SkillMgr.CurCastSkill != null && _hero.SkillMgr.CurCastSkill.SkillCompelete == false) { yield return null; } if (_hero == null) { yield break; } pos.y = _hero.Pos.y; _hero.MoveToPosition(pos); } System/NewYearFairylandCeremony/NewYearCeremonyCoolTime.cs
@@ -21,7 +21,7 @@ private void RefreshSecond() { int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony); int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.NewYearFairyCeremony); if (seconds > 0) { m_Time.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>"); System/NewYearFairylandCeremony/NewYearCeremonyFirepartyWin.cs
@@ -14,9 +14,9 @@ [SerializeField] CommonItemBaisc fireItem; [SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>(); List<FairylandCeremonyModel.AwardItem> itemlist; List<NewYearFairylandCeremonyModel.AwardItem> itemlist; ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } } StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } } @@ -73,7 +73,7 @@ if (i < itemlist.Count) { itemBaiscs[i].gameObject.SetActive(true); FairylandCeremonyModel.AwardItem itemData = itemlist[i]; NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i]; ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind); itemBaiscs[i].Init(cellModel); itemBaiscs[i].cellBtn.RemoveAllListeners(); @@ -94,7 +94,7 @@ private void RefreshSecond() { int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony); int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.NewYearFairyCeremony); if (seconds > 0) { remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>"); System/NewYearFairylandCeremony/NewYearCeremonyOutOfPrintWin.cs
@@ -18,7 +18,7 @@ [SerializeField] List<CommonItemBaisc> thirdItemlist = new List<CommonItemBaisc>(); ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } KingFairyModel kingFairyModel { get { return ModelCenter.Instance.GetModel<KingFairyModel>(); } } protected override void BindController() { @@ -55,7 +55,7 @@ private void Init() { ceremonyModel.SendGetRankInfo(PlayerRankData.RankType.Def_BT_FCCostGold); ceremonyModel.SendGetRankInfo(PlayerRankData.RankType.Def_BT_NewFCCostGold); SetRankAward(firstItemlist,ceremonyModel.GetRankAwardByLv(1)); SetRankAward(secondItemlist, ceremonyModel.GetRankAwardByLv(2)); SetRankAward(thirdItemlist, ceremonyModel.GetRankAwardByLv(3)); @@ -66,14 +66,14 @@ private void OnRefreshRankList(int type) { if (type != (int)PlayerRankData.RankType.Def_BT_FCCostGold) return; if (type != (int)PlayerRankData.RankType.Def_BT_NewFCCostGold) return; RefreshRankInfo(); } private void RefreshRankInfo() { List<PlayerRankData.RankData> list = PlayerDatas.Instance.rank.GetRankList((int)PlayerRankData.RankType.Def_BT_FCCostGold); List<PlayerRankData.RankData> list = PlayerDatas.Instance.rank.GetRankList((int)PlayerRankData.RankType.Def_BT_NewFCCostGold); firstNameText.text = Language.Get("CeremoneyOutOfPrint"); secondNameText.text = Language.Get("CeremoneyOutOfPrint"); thirdNameText.text = Language.Get("CeremoneyOutOfPrint"); @@ -123,7 +123,7 @@ private void RefreshSecond() { int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony); int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.NewYearFairyCeremony); if(seconds > 0) { remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>"); @@ -135,7 +135,7 @@ } private void SetRankAward(List<CommonItemBaisc> baiscs,List<FairylandCeremonyModel.AwardItem> list) private void SetRankAward(List<CommonItemBaisc> baiscs,List<NewYearFairylandCeremonyModel.AwardItem> list) { if (list == null) return; @@ -144,7 +144,7 @@ if (i < list.Count) { baiscs[i].gameObject.SetActive(true); FairylandCeremonyModel.AwardItem itemData = list[i]; NewYearFairylandCeremonyModel.AwardItem itemData = list[i]; ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount,itemData.isBind); baiscs[i].Init(cellModel); baiscs[i].cellBtn.RemoveAllListeners(); System/NewYearFairylandCeremony/NewYearCeremonyPeopleToHiWin.cs
@@ -12,9 +12,9 @@ [SerializeField] ScrollerController taskCtrl; [SerializeField] Text hiPointText; List<AllPeoplePartyConfig> taskConfigs; List<AllPeoplePartyAwardConfig> awardConfigs; FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } List<NewAllPeoplePartyConfig> taskConfigs; List<NewAllPeoplePartyAwardConfig> awardConfigs; NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } int presentAwardIndex = 0; @@ -80,7 +80,7 @@ private void RefreshTaskCell(ScrollerDataType type, CellView cell) { ToHiTaskCell taskCell = cell.GetComponent<ToHiTaskCell>(); NewYearToHiTaskCell taskCell = cell.GetComponent<NewYearToHiTaskCell>(); if (taskCell == null) return; taskCell.Init(taskConfigs[cell.index]); @@ -105,7 +105,7 @@ private void RefreshAwardCell(ScrollerDataType type, CellView cell) { ToHiAwardCell awardCell = cell.GetComponent<ToHiAwardCell>(); NewYearToHiAwardCell awardCell = cell.GetComponent<NewYearToHiAwardCell>(); if (awardCell == null) return; awardCell.Init(awardConfigs[cell.index]); System/NewYearFairylandCeremony/NewYearCeremonyRechargeGiftWin.cs
@@ -15,9 +15,9 @@ [SerializeField] Text remainTimeText; [SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>(); List<FairylandCeremonyModel.AwardItem> itemlist; List<NewYearFairylandCeremonyModel.AwardItem> itemlist; ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } } protected override void BindController() @@ -64,7 +64,7 @@ if(i < itemlist.Count) { itemBaiscs[i].gameObject.SetActive(true); FairylandCeremonyModel.AwardItem itemData = itemlist[i]; NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i]; ItemCellModel cellModel = new ItemCellModel(itemData.itemId,true, (ulong)itemData.itemCount, itemData.isBind); itemBaiscs[i].Init(cellModel); itemBaiscs[i].cellBtn.RemoveAllListeners(); @@ -86,7 +86,7 @@ private void RefreshSecond() { int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.FairyCeremony); int seconds = OperationTimeHepler.Instance.GetOperationSurplusTime(Operation.NewYearFairyCeremony); if (seconds > 0) { remainTimeText.text = StringUtility.Contact("<color=#8DDC11FF>", TimeUtility.SecondsToHMS(seconds), "</color>"); @@ -101,15 +101,15 @@ { switch (ceremonyModel.receiveState) { case FairylandCeremonyModel.ReceiveState.NoReach: case NewYearFairylandCeremonyModel.ReceiveState.NoReach: receiveBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial(); receiveBtnText.text = "领取礼包"; break; case FairylandCeremonyModel.ReceiveState.Reach: case NewYearFairylandCeremonyModel.ReceiveState.Reach: receiveBtnImg.material = MaterialUtility.GetUIDefaultGraphicMaterial(); receiveBtnText.text = "领取礼包"; break; case FairylandCeremonyModel.ReceiveState.Already: case NewYearFairylandCeremonyModel.ReceiveState.Already: receiveBtnImg.material = MaterialUtility.GetDefaultSpriteGrayMaterial(); receiveBtnText.text = "已领取"; break; @@ -122,21 +122,21 @@ switch (ceremonyModel.receiveState) { case FairylandCeremonyModel.ReceiveState.NoReach: case NewYearFairylandCeremonyModel.ReceiveState.NoReach: SysNotifyMgr.Instance.ShowTip("FairylandCermonyRecharge1"); break; case FairylandCeremonyModel.ReceiveState.Reach: case NewYearFairylandCeremonyModel.ReceiveState.Reach: bool isGrid = playerPack.GetReaminGridCount(PackType.rptItem) - itemlist.Count >= 0 ? true : false; if (isGrid) { ceremonyModel.SendReceiveAward(GotServerRewardType.Def_RewardType_FCRecharge,0); ceremonyModel.SendReceiveAward(GotServerRewardType.Def_RewardType_NewFairyCRecharge, 0); } else { SysNotifyMgr.Instance.ShowTip("BagFull"); } break; case FairylandCeremonyModel.ReceiveState.Already: case NewYearFairylandCeremonyModel.ReceiveState.Already: SysNotifyMgr.Instance.ShowTip("FairylandCermonyRecharge2"); break; } System/NewYearFairylandCeremony/NewYearFairylandCeremonyModel.cs
@@ -9,132 +9,12 @@ 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); } } } } ParseFuncConfig(); ParseAllPeoplePartyConfig(); ParseUniquenessArriveConfig(); //OperationTimeHepler.Instance.operationEndEvent += OnActiveEnd; } @@ -165,14 +45,14 @@ } #region 处理服务端数据 public int worldLv { get; private set;} public void GetServerActiveInfo(HAC09_tagGCFairyCeremonyInfo info) public void GetServerActiveInfo(HAC0B_tagGCNewFairyCeremonyInfo info) { worldLv = info.WorldLV; OperationTimeHepler.Instance.RefreshFairyCeremonyInfo(info); OperationTimeHepler.Instance.RefreshNewYearFairyCeremonyInfo(info); } public Action RefreshRechargeStateAct; public void GetServerRechargeInfo(HAA14_tagMCXJSDRecharge info) public void GetServerRechargeInfo(HAA22_tagMCNewXJSDRecharge info) { switch(info.State) { @@ -202,7 +82,7 @@ public Action<int> RefreshHiPointAct; public Action RefreshHiAwardStateAct; public void GetServerPeopleInfo(HAA15_tagMCAllPeoplePartyInfo info) public void GetServerPeopleInfo(HAA23_tagMCNewAllPeoplePartyInfo info) { peopleAwardRecordDict.Clear(); sumHiPoint = (int)info.CurPoint; @@ -257,7 +137,7 @@ private void OnActiveEnd(Operation type, int arg2) { if (type != Operation.FairyCeremony) return; if (type != Operation.NewYearFairyCeremony) return; peopleTaskRecordDict.Clear(); sumHiPoint = 0; @@ -283,6 +163,149 @@ #endregion #region 处理本地数据 #region 解析功能配置表 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>(); Dictionary<int, Dictionary<int, List<AwardItem>>> fireGiftsDict = new Dictionary<int, Dictionary<int, List<AwardItem>>>(); private void ParseFuncConfig() { FuncConfigConfig lvConfig = Config.Instance.Get<FuncConfigConfig>("NewCeremonyWorldLv"); 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>("NewCeremonyRecharge"); 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>("NewCeremonyFireParty"); 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>("NewCeremonyFireAward"); 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); } } } } } #endregion #region 解析全民来嗨 List<NewAllPeoplePartyConfig> allPeoples = new List<NewAllPeoplePartyConfig>(); List<NewAllPeoplePartyAwardConfig> allPeopleAwards = new List<NewAllPeoplePartyAwardConfig>(); Dictionary<int, Dictionary<int, List<AwardItem>>> jobToHiAwardDict = new Dictionary<int, Dictionary<int, List<AwardItem>>>(); private void ParseAllPeoplePartyConfig() { allPeoples = Config.Instance.GetAllValues<NewAllPeoplePartyConfig>(); allPeopleAwards = Config.Instance.GetAllValues<NewAllPeoplePartyAwardConfig>(); 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); } } } } } #endregion #region 解析绝版降临 Dictionary<string, Dictionary<int, List<AwardItem>>> rankAwardDict = new Dictionary<string, Dictionary<int, List<AwardItem>>>(); private void ParseUniquenessArriveConfig() { List<NewUniquenessArriveConfig> arriveConfigs = Config.Instance.GetAllValues<NewUniquenessArriveConfig>(); 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); } } } } } #endregion public int GetWorldLvIndex(CeremonyType type) { if(typeLvDict.ContainsKey(type)) @@ -338,8 +361,8 @@ return false; } List<AllPeoplePartyConfig> openTasklist = new List<AllPeoplePartyConfig>(); public List<AllPeoplePartyConfig> GetPeoplePartTasklist() List<NewAllPeoplePartyConfig> openTasklist = new List<NewAllPeoplePartyConfig>(); public List<NewAllPeoplePartyConfig> GetPeoplePartTasklist() { openTasklist.Clear(); for(int i = 0; i < allPeoples.Count; i++) @@ -353,7 +376,7 @@ return openTasklist; } private int CompareByTimes(AllPeoplePartyConfig start,AllPeoplePartyConfig end) private int CompareByTimes(NewAllPeoplePartyConfig start, NewAllPeoplePartyConfig end) { bool startIsComplte = PeopleTaskComplete(start); bool endIsComplte = PeopleTaskComplete(end); @@ -366,7 +389,7 @@ return 0; } public bool PeopleTaskComplete(AllPeoplePartyConfig partyConfig) public bool PeopleTaskComplete(NewAllPeoplePartyConfig partyConfig) { if (GetPeopleTaskTimesById(partyConfig.ID) >= partyConfig.TotalTimes) { @@ -375,8 +398,8 @@ return false; } List<AllPeoplePartyAwardConfig> worldAwardlist = new List<AllPeoplePartyAwardConfig>(); public List<AllPeoplePartyAwardConfig> GetPeoplePartAwardlist() List<NewAllPeoplePartyAwardConfig> worldAwardlist = new List<NewAllPeoplePartyAwardConfig>(); public List<NewAllPeoplePartyAwardConfig> GetPeoplePartAwardlist() { worldAwardlist.Clear(); int index = GetWorldLvIndex(CeremonyType.WholePeople); @@ -391,7 +414,7 @@ return worldAwardlist; } public int CompareByIndex(AllPeoplePartyAwardConfig start,AllPeoplePartyAwardConfig end) public int CompareByIndex(NewAllPeoplePartyAwardConfig start, NewAllPeoplePartyAwardConfig end) { int startIndex = start.Index; int endIndex = end.Index; @@ -434,16 +457,16 @@ #endregion #region 红点逻辑处理 public const int FairyCeremony_RedKey = 212; public const int FairyCeremony_RedKey = 216; public Redpoint fairyCeremonyRedp = new Redpoint(MainRedDot.RedPoint_UpFuncBase,FairyCeremony_RedKey); public const int CeremonyRecharge_RedKey = 21201; public const int CeremonyRecharge_RedKey = 21601; public Redpoint rechargeRedp = new Redpoint(FairyCeremony_RedKey,CeremonyRecharge_RedKey); public const int RechargeReceiveBtn_RedKey = 2120101; public const int RechargeReceiveBtn_RedKey = 2160101; public Redpoint receiveBtnRedp = new Redpoint(CeremonyRecharge_RedKey, RechargeReceiveBtn_RedKey); public void CheckRechargeRed() { if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony)) return; if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.NewYearFairyCeremony)) return; if(receiveState == ReceiveState.Reach) { @@ -455,12 +478,12 @@ } } public const int CeremonyPeople_RedKey = 21203; public const int CeremonyPeople_RedKey = 21603; public Redpoint peopleRedp = new Redpoint(FairyCeremony_RedKey, CeremonyPeople_RedKey); public void CheckPeoplePartyRed() { if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.FairyCeremony)) return; if (!OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.NewYearFairyCeremony)) return; int index = 0; if(IsPeopleAwardRecive(out index)) System/NewYearFairylandCeremony/NewYearFairylandCeremonyWin.cs
@@ -15,7 +15,7 @@ [SerializeField] Button rightBtn; [SerializeField] Button closeBtn; FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } protected override void BindController() { @@ -87,11 +87,11 @@ CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyOutOfPrintWin>(); WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyOutOfPrintWin>(); } else { WindowCenter.Instance.Open<CeremonyOutOfPrintWin>(); WindowCenter.Instance.Open<NewYearCeremonyOutOfPrintWin>(); } functionOrder = 3; } @@ -101,11 +101,11 @@ CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyPeopleToHiWin>(); WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyPeopleToHiWin>(); } else { WindowCenter.Instance.Open<CeremonyPeopleToHiWin>(); WindowCenter.Instance.Open<NewYearCeremonyPeopleToHiWin>(); } functionOrder = 2; } @@ -115,11 +115,11 @@ CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyFirepartyWin>(); WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyFirepartyWin>(); } else { WindowCenter.Instance.Open<CeremonyFirepartyWin>(); WindowCenter.Instance.Open<NewYearCeremonyFirepartyWin>(); } functionOrder = 1; } @@ -129,18 +129,18 @@ CloseChildWin(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<CeremonyRechargeGiftWin>(); WindowCenter.Instance.OpenWithoutAnimation<NewYearCeremonyRechargeGiftWin>(); } else { WindowCenter.Instance.Open<CeremonyRechargeGiftWin>(); WindowCenter.Instance.Open<NewYearCeremonyRechargeGiftWin>(); } functionOrder = 0; } private void CloseChildWin() { var children = WindowConfig.Get().FindChildWindows("FairylandCeremonyWin"); var children = WindowConfig.Get().FindChildWindows(this.GetType().Name); foreach (var window in children) { WindowCenter.Instance.Close(window); System/NewYearFairylandCeremony/NewYearToHiAwardCell.cs
@@ -15,12 +15,12 @@ [SerializeField] GameObject alreadyImg; [SerializeField] List<CommonItemBaisc> itemBaiscs = new List<CommonItemBaisc>(); List<FairylandCeremonyModel.AwardItem> itemlist; List<NewYearFairylandCeremonyModel.AwardItem> itemlist; ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } FairylandCeremonyModel.ReceiveState receiveState = FairylandCeremonyModel.ReceiveState.NoReach; NewYearFairylandCeremonyModel.ReceiveState receiveState = NewYearFairylandCeremonyModel.ReceiveState.NoReach; PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } } FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } AllPeoplePartyAwardConfig awardConfig; NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } NewAllPeoplePartyAwardConfig awardConfig; private void OnEnable() { @@ -31,7 +31,7 @@ { ceremonyModel.RefreshHiAwardStateAct -= SetAwardState; } public void Init(AllPeoplePartyAwardConfig awardConfig) public void Init(NewAllPeoplePartyAwardConfig awardConfig) { this.awardConfig = awardConfig; titleText.text = Language.Get("CeremoneyToHiAward", awardConfig.NeedPoint); @@ -41,7 +41,7 @@ if (i < itemlist.Count) { itemBaiscs[i].gameObject.SetActive(true); FairylandCeremonyModel.AwardItem itemData = itemlist[i]; NewYearFairylandCeremonyModel.AwardItem itemData = itemlist[i]; ItemCellModel cellModel = new ItemCellModel(itemData.itemId, true,(ulong)itemData.itemCount, itemData.isBind); itemBaiscs[i].Init(cellModel); itemBaiscs[i].cellBtn.RemoveAllListeners(); @@ -66,17 +66,17 @@ if(ceremonyModel.GetPeopleAwardRecordByIndex(awardConfig.Index)) { receiveState = FairylandCeremonyModel.ReceiveState.Already; receiveState = NewYearFairylandCeremonyModel.ReceiveState.Already; } else { if(ceremonyModel.sumHiPoint >= awardConfig.NeedPoint) { receiveState = FairylandCeremonyModel.ReceiveState.Reach; receiveState = NewYearFairylandCeremonyModel.ReceiveState.Reach; } else { receiveState = FairylandCeremonyModel.ReceiveState.NoReach; receiveState = NewYearFairylandCeremonyModel.ReceiveState.NoReach; } } RefreshAwardStateUI(); @@ -87,18 +87,18 @@ receiveBtn.RemoveAllListeners(); switch (receiveState) { case FairylandCeremonyModel.ReceiveState.NoReach: case NewYearFairylandCeremonyModel.ReceiveState.NoReach: noReachImg.SetActive(true); alreadyImg.SetActive(false); receiveBtn.gameObject.SetActive(false); break; case FairylandCeremonyModel.ReceiveState.Reach: case NewYearFairylandCeremonyModel.ReceiveState.Reach: noReachImg.SetActive(false); alreadyImg.SetActive(false); receiveBtn.gameObject.SetActive(true); receiveBtn.AddListener(OnReceiveGift); break; case FairylandCeremonyModel.ReceiveState.Already: case NewYearFairylandCeremonyModel.ReceiveState.Already: noReachImg.SetActive(false); alreadyImg.SetActive(true); receiveBtn.gameObject.SetActive(false); @@ -111,7 +111,7 @@ bool isGrid = playerPack.GetReaminGridCount(PackType.rptItem) - itemlist.Count >= 0 ? true : false; if (isGrid) { ceremonyModel.SendReceiveAward(GotServerRewardType.Def_RewardType_FCParty, awardConfig.Index); ceremonyModel.SendReceiveAward(GotServerRewardType.Def_RewardType_NewFairyCParty, awardConfig.Index); } else { System/NewYearFairylandCeremony/NewYearToHiTaskCell.cs
@@ -14,8 +14,8 @@ [SerializeField] Button gobtn; [SerializeField] GameObject completeImg; AllPeoplePartyConfig taskConfig; FairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<FairylandCeremonyModel>(); } } NewAllPeoplePartyConfig taskConfig; NewYearFairylandCeremonyModel ceremonyModel { get { return ModelCenter.Instance.GetModel<NewYearFairylandCeremonyModel>(); } } private void OnEnable() { @@ -27,7 +27,7 @@ ceremonyModel.RefreshHiPointAct -= OnRefreshProgress; } public void Init(AllPeoplePartyConfig taskConfig) public void Init(NewAllPeoplePartyConfig taskConfig) { activeNameText.gameObject.SetActive(false); this.taskConfig = taskConfig; System/OpenServerActivity/AchievementActivityWin.cs
@@ -9,7 +9,8 @@ using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { namespace Snxxz.UI { //成就活动面板 public class AchievementActivityWin : Window { @@ -20,6 +21,9 @@ [SerializeField] Button _LeftBtn; [SerializeField] Button _RightBtn; [SerializeField] FunctionButton m_OpenServiceAchievementBtn;//周狂欢 [SerializeField] FunctionButton m_SpringFestival;//春节活动 OpenServiceAchievementModel openServiceAchievementModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } SpringFestivalModel springFestivalModel { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } protected override void BindController() { } @@ -30,16 +34,25 @@ _LeftBtn.AddListener(OnClickLeftBtn); _RightBtn.AddListener(OnClickRight); m_OpenServiceAchievementBtn.AddListener(OpenServiceAchievementButton); m_SpringFestival.AddListener(SpringFestivalButton); } protected override void OnPreOpen() { OperationTimeHepler.Instance.operationStartEvent += operationStartEvent; IsButtonNumber(); if (WindowCenter.Instance.IsOpen<MainInterfaceWin>()) { WindowCenter.Instance.Close<MainInterfaceWin>(); } functionOrder = 0; if (openServiceAchievementModel.IsOpenFeatures()) { functionOrder = 0; } else if (springFestivalModel.IsOpenFeatures()) { functionOrder = 1; } } protected override void OnActived() @@ -47,10 +60,18 @@ FuncBtnGroup.TriggerByOrder(functionOrder); } protected override void OnAfterOpen() { } { OperationTimeHepler.Instance.operationStartEvent -= operationStartEvent; } private void operationStartEvent(Operation arg1, int arg2) { if (arg1 == Operation.SpringFestival || arg1== Operation.OpenServiceAchievement) { IsButtonNumber(); } } protected override void OnPreClose() { CloseChild(); @@ -84,6 +105,10 @@ { WindowCenter.Instance.CloseImmediately<OpenServiceAchievementWin>(); } if (WindowCenter.Instance.IsOpen<SpringFestivalWin>()) { WindowCenter.Instance.CloseImmediately<SpringFestivalWin>(); } } private void OpenServiceAchievementButton() @@ -99,8 +124,39 @@ } functionOrder = 0; } private void SpringFestivalButton() { CloseChild(); if (windowState == WindowState.Opened) { WindowCenter.Instance.OpenWithoutAnimation<SpringFestivalWin>(); } else { WindowCenter.Instance.Open<SpringFestivalWin>(true); } functionOrder = 1; } #endregion private void IsButtonNumber() { if (openServiceAchievementModel.IsOpenFeatures()) { m_OpenServiceAchievementBtn.gameObject.SetActive(true); } else { m_OpenServiceAchievementBtn.gameObject.SetActive(false); } if (springFestivalModel.IsOpenFeatures()) { m_SpringFestival.gameObject.SetActive(true); } else { m_SpringFestival.gameObject.SetActive(false); } } } } System/OpenServerActivity/EntryInformationCell.cs
New file @@ -0,0 +1,34 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, December 10, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; namespace Snxxz.UI { [XLua.Hotfix] public class EntryInformationCell:MonoBehaviour { [SerializeField] ItemCell m_ItemCell; [SerializeField] Text m_Text1; [SerializeField] Text m_Text2; [SerializeField] Button m_Button; [SerializeField] Text m_ButtonText; LoginRewardModel m_LoginRewardModel; LoginRewardModel loginRewardModel { get { return m_LoginRewardModel ?? (m_LoginRewardModel = ModelCenter.Instance.GetModel<LoginRewardModel>()); } } public Button mButton { get { return m_Button; } set { m_Button = value; } } public void GetDisplayInformation(int id) { } } } System/OpenServerActivity/EntryInformationCell.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 2df4f76a8cbf84e4d820e06234d5a875 timeCreated: 1544409750 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/EventDaysTime.cs
New file @@ -0,0 +1,23 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 21, 2019 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace Snxxz.UI { public class EventDaysTime: OperationBase { public int GetInDayNow() { return base.IndexOfDays(TimeUtility.ServerNow); } } } System/OpenServerActivity/EventDaysTime.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: c1691eb2a2ee9604b86be65cb98bfca3 timeCreated: 1548038322 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/HolidayHomingIcon.cs
New file @@ -0,0 +1,69 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 28, 2019 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; using System; using TableConfig; namespace Snxxz.UI { public class HolidayHomingIcon : MonoBehaviour { [SerializeField] Image m_Icon; private string Iconkey1 = string.Empty; private string Iconkey2 = string.Empty; OpenServiceAchievementModel openServiceAchievementModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } SpringFestivalModel springFestivalModel { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } private void Awake() { OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent; OperationTimeHepler.Instance.dayResetEvent -= DayResetEvent; OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent; OperationTimeHepler.Instance.dayResetEvent += DayResetEvent; var funconfig = Config.Instance.Get<FuncConfigConfig>("HolidayHomingIcon"); Iconkey1 = funconfig.Numerical1; Iconkey2 = funconfig.Numerical2; } private void OnEnable() { SetIcon(); } private void SetIcon() { if (openServiceAchievementModel.IsOpenFeatures()) { m_Icon.SetSprite(Iconkey1); } else if (springFestivalModel.IsOpenFeatures()) { m_Icon.SetSprite(Iconkey2); } } private void DayResetEvent(int obj) { if (obj == (int)Operation.OpenServiceAchievement || obj == (int)Operation.SpringFestival) { SetIcon(); } } private void OperationStartEvent(Operation arg1, int arg2) { if (arg1 == Operation.OpenServiceAchievement || arg1 == Operation.SpringFestival) { SetIcon(); } } } } System/OpenServerActivity/HolidayHomingIcon.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 7f574cca031dd7e4e93d6ace04260f95 timeCreated: 1548658770 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/LogInDayNumber.cs
New file @@ -0,0 +1,61 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Friday, December 07, 2018 //-------------------------------------------------------- using UnityEngine; using System.Collections; using UnityEngine.UI; namespace Snxxz.UI { //登录奖励天数标签 [XLua.Hotfix] public class LogInDayNumber:MonoBehaviour { [SerializeField] Button m_DayNumberBtn; [SerializeField] ImageEx m_DayNumberImage; [SerializeField] ImageEx m_SelectedImage; [SerializeField] GameObject m_Obj1; [SerializeField] Text m_DayText1; [SerializeField] GameObject m_Obj2; [SerializeField] Text m_DayText2; LoginRewardModel m_LoginRewardModel; LoginRewardModel loginRewardModel { get { return m_LoginRewardModel ?? (m_LoginRewardModel = ModelCenter.Instance.GetModel<LoginRewardModel>()); } } public Button DayNumberBtn { get { return m_DayNumberBtn; } set { m_DayNumberBtn = value; } } public void SetInDayNumber(int day,int clockDayNow) { if (day == clockDayNow) { m_SelectedImage.gameObject.SetActive(true); } else { m_SelectedImage.gameObject.SetActive(false); } if (day > loginRewardModel.DayNow) { m_SelectedImage.gray = true; m_DayNumberImage.gray = true; m_Obj1.SetActive(false); m_Obj2.SetActive(true); m_DayText2.text = (day + 1).ToString(); } else { m_SelectedImage.gray = false; m_DayNumberImage.gray = false; m_Obj1.SetActive(true); m_Obj2.SetActive(false); m_DayText1.text= (day + 1).ToString(); } } } } System/OpenServerActivity/LogInDayNumber.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 8df633ca001b5e24298dcad5c878087d timeCreated: 1544167978 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/LoginRewardModel.cs
New file @@ -0,0 +1,278 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, December 10, 2018 //-------------------------------------------------------- using System; using System.Collections.Generic; using TableConfig; using Snxxz.UI; //登录奖励 [XLua.LuaCallCSharp] public class LoginRewardModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk { public event Action LoginAwardInfoUpdate;//领奖记录变更 public Dictionary<int, WeekPartyDayInfoClass> LoginAwardInfoDic = new Dictionary<int, WeekPartyDayInfoClass>();//领奖信息 public Dictionary<int, WeekPartyDayClass> LoginAwardDayDic = new Dictionary<int, WeekPartyDayClass>();//每天的奖励信息 public Dictionary<int, WeekPartyActionClass> LoginAwardDic = new Dictionary<int, WeekPartyActionClass>();//活动模板信息 public Dictionary<int, Redpoint> RedPointDic = new Dictionary<int, Redpoint>();//红点 public int DayNow = 0;//当前天 public int SelectedNow = 0;//获取选择天 public int LimitLV = 0;//限制等级 private const int Redpoint_key = 6666;//登录奖励红点 public Redpoint redPointStre = new Redpoint(666, Redpoint_key); public override void Init() { } public void OnBeforePlayerDataInitialize() { LoginAwardInfoDic.Clear(); } public void OnPlayerLoginOk() { GetDay(); SetRedPoint(); } public override void UnInit() { } public void LoginAwardInfo(HAA0C_tagMCActLoginAwardInfo info)//登录奖励活动信息 { LimitLV = info.LimitLV; LoginAwardDayDic.Clear(); LoginAwardDic.Clear(); for (int i = 0; i < info.DayCnt; i++)//每天的奖励信息 { int Index = i; var dayInfo = info.DayInfoList[i]; WeekPartyDayClass loginAwardDay = new WeekPartyDayClass(); loginAwardDay.TemplateList = new int[dayInfo.ActCnt]; for (int k = 0; k < dayInfo.ActCnt; k++) { loginAwardDay.TemplateList[k] = dayInfo.TemplateList[k]; } if (LoginAwardDayDic.ContainsKey(Index)) { LoginAwardDayDic[Index] = loginAwardDay; } else { LoginAwardDayDic.Add(Index, loginAwardDay); } } for (int i = 0; i < info.TCount; i++)// 活动模板信息 { var ActionInfo = info.ActionInfo[i]; var templateID = (int)ActionInfo.TemplateID; WeekPartyActionClass loginAward = new WeekPartyActionClass(); loginAward.TemplateID = (int)ActionInfo.TemplateID; loginAward.ActionType = (int)ActionInfo.ActionType; loginAward.TotalTimes = (int)ActionInfo.TotalTimes; loginAward.SingleTimes = (int)ActionInfo.SingleTimes; loginAward.WeekPartyItem = new WeekPartyItemClass[ActionInfo.Count]; for (int z = 0; z < ActionInfo.Count; z++) { var item = ActionInfo.ItemInfo[z]; WeekPartyItemClass loginAwardItem = new WeekPartyItemClass(); loginAwardItem.ItemID = (int)item.ItemID; loginAwardItem.ItemCnt = (int)item.ItemCnt; loginAwardItem.IsBind = item.IsBind; loginAward.WeekPartyItem[z] = loginAwardItem; } if (LoginAwardDic.ContainsKey(templateID)) { LoginAwardDic[templateID] = loginAward; } else { LoginAwardDic.Add(templateID, loginAward); } } } public void LoginAwardPlayerInfo(HAA0D_tagMCActLoginAwardPlayerInfo info)//登录奖励玩家活动信息 { for (int i = 0; i < info.Count; i++) { var Dayinfo = info.DayInfoList[i]; WeekPartyDayInfoClass loginAwardPlayerClass = new WeekPartyDayInfoClass(); var dayindex = (int)Dayinfo.DayIndex; loginAwardPlayerClass.DayIndex = dayindex; if (LoginAwardInfoDic.ContainsKey(dayindex)) { var dit = LoginAwardInfoDic[dayindex]; dit.DayIndex = dayindex; for (int j = 0; j < Dayinfo.ACount; j++) { var taskList = Dayinfo.TaskList[j]; int Index = dit.ActionType.FindIndex(s => s.TemplateID == taskList.TemplateID); if (Index != -1) { dit.ActionType[Index].CurTimes = taskList.CurTimes; dit.ActionType[Index].GotTimes = taskList.GotTimes; } else { ActionTypeClass ActionType = new ActionTypeClass(); ActionType.TemplateID = taskList.TemplateID; ActionType.CurTimes = taskList.CurTimes; ActionType.GotTimes = taskList.GotTimes; dit.ActionType.Add(ActionType); } } LoginAwardInfoDic[dayindex] = dit; } else { loginAwardPlayerClass.ActionType = new List<ActionTypeClass>(); for (int k = 0; k < Dayinfo.ACount; k++) { var Task = Dayinfo.TaskList[k]; ActionTypeClass ActionType = new ActionTypeClass(); ActionType.TemplateID = Task.TemplateID; ActionType.CurTimes = Task.CurTimes; ActionType.GotTimes = Task.GotTimes; loginAwardPlayerClass.ActionType.Add(ActionType); } LoginAwardInfoDic.Add(dayindex, loginAwardPlayerClass); } } SetRedPoint(); if (LoginAwardInfoUpdate != null) { LoginAwardInfoUpdate(); } } public int GetRewardNumber(int Day, int ID)//获取领奖次数 { int Num = 0; if (LoginAwardInfoDic.ContainsKey(Day)) { var loginAward = LoginAwardInfoDic[Day]; for (int i = 0; i < loginAward.ActionType.Count; i++) { var ActionType = loginAward.ActionType[i]; if (ID == ActionType.TemplateID) { Num = ActionType.GotTimes; } } } return Num; } public int GetCarryOutNum(int Day,int ID)//获取已完成次数 { int Num = 0; if (LoginAwardInfoDic.ContainsKey(Day)) { var loginAward = LoginAwardInfoDic[Day]; for (int i = 0; i < loginAward.ActionType.Count; i++) { var ActionType = loginAward.ActionType[i]; if (ID == ActionType.TemplateID) { Num = ActionType.CurTimes; } } } return Num; } public void SendLoginAwardInfo(int day, int temdayplateID)//领取奖励 { CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward(); getReward.RewardType = (byte)GotServerRewardType.Def_RewardType_ActLoginAwardAct; getReward.DataEx = (uint)day; string StrID = temdayplateID.ToString(); getReward.DataExStrLen = (byte)StrID.Length; getReward.DataExStr = StrID; GameNetSystem.Instance.SendInfo(getReward); } private void SetRedPoint()//红点设置 { SetRedPointID(); foreach (var key in RedPointDic.Keys) { RedPointDic[key].state = RedPointState.None; } foreach (var key in RedPointDic.Keys) { RedPointDic[key].state = SetRedPointState(key); } } private void SetRedPointID()//设置红点ID { if (RedPointDic.Count > 0) { return; } foreach (var key in LoginAwardInfoDic.Keys) { int RedPoint = Redpoint_key * 10 + key; if (!RedPointDic.ContainsKey(key)) { Redpoint redPointMountStare = new Redpoint(Redpoint_key, RedPoint); RedPointDic.Add(key, redPointMountStare); } } } private RedPointState SetRedPointState(int day)//红点状态设置 { if (!LoginAwardDayDic.ContainsKey(day) || !LoginAwardInfoDic.ContainsKey(day)) { return RedPointState.None; } WeekPartyDayClass loginAward = new WeekPartyDayClass(); foreach (var key in LoginAwardDayDic.Keys) { if (key == day) { loginAward = LoginAwardDayDic[key]; } } for (int i = 0; i < loginAward.TemplateList.Length; i++) { var TemplateID = loginAward.TemplateList[i]; if (LoginAwardDic.ContainsKey(TemplateID)) { var LoginAward = LoginAwardDic[TemplateID]; int number = LoginAward.TotalTimes / LoginAward.SingleTimes; int rewardNum = GetRewardNumber(day, TemplateID);//已领奖次数 int carryOutNum = GetCarryOutNum(day, TemplateID);//已完成次数 int TaypeNumber = 0; if (carryOutNum - rewardNum > 0) { TaypeNumber = (carryOutNum - rewardNum) / LoginAward.SingleTimes; } if (TaypeNumber > 0 && rewardNum < number) { return RedPointState.GetReward; } } } return RedPointState.None; } private void GetDay() { OperationBase operationBase; if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.LoginReward, out operationBase)) { DayNow = (operationBase as EventDaysTime).GetInDayNow(); } } } System/OpenServerActivity/LoginRewardModel.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 57fcce9a94d2fc743bc2d1f6ef954fa3 timeCreated: 1544410332 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/LoginRewardWin.cs
New file @@ -0,0 +1,148 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Friday, December 07, 2018 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { [XLua.Hotfix] public class LoginRewardWin : Window { //登录奖励 #region Built-in [SerializeField] ScrollerController m_ScrollerController_1; [SerializeField] ScrollerController m_ScrollerController_2; LoginRewardModel m_LoginRewardModel; LoginRewardModel loginRewardModel { get { return m_LoginRewardModel ?? (m_LoginRewardModel = ModelCenter.Instance.GetModel<LoginRewardModel>()); } } List<int> SortList = new List<int>(); protected override void BindController() { m_ScrollerController_1.OnRefreshCell += OnRefreshGridCell_1; m_ScrollerController_2.OnRefreshCell += OnRefreshGridCell_2; } protected override void AddListeners() { } protected override void OnPreOpen() { ChooseDay(); OnCreateGridLineCell_1(m_ScrollerController_1); OnCreateGridLineCell_2(m_ScrollerController_2); if (loginRewardModel.SelectedNow >= 3) { m_ScrollerController_1.JumpIndex(loginRewardModel.SelectedNow); } } protected override void OnAfterOpen() { loginRewardModel.LoginAwardInfoUpdate += LoginAwardInfoUpdate; } protected override void OnPreClose() { } protected override void OnAfterClose() { loginRewardModel.LoginAwardInfoUpdate -= LoginAwardInfoUpdate; } private void LoginAwardInfoUpdate() { m_ScrollerController_1.m_Scorller.RefreshActiveCellViews(); m_ScrollerController_2.m_Scorller.RefreshActiveCellViews(); } #endregion void OnCreateGridLineCell_1(ScrollerController gridCtrl) { gridCtrl.Refresh(); foreach (var key in loginRewardModel.LoginAwardDayDic.Keys) { gridCtrl.AddCell(ScrollerDataType.Header, key); } gridCtrl.Restart(); } private void OnRefreshGridCell_1(ScrollerDataType type, CellView cell) { int Index = cell.index; LogInDayNumber logInDayNumber = cell.GetComponent<LogInDayNumber>(); logInDayNumber.SetInDayNumber(Index, loginRewardModel.SelectedNow); logInDayNumber.DayNumberBtn.SetListener(()=> { if (loginRewardModel.SelectedNow != Index) { loginRewardModel.SelectedNow = Index; m_ScrollerController_1.m_Scorller.RefreshActiveCellViews();//刷新可见 OnCreateGridLineCell_2(m_ScrollerController_2); } }); } void OnCreateGridLineCell_2(ScrollerController gridCtrl) { gridCtrl.Refresh(); for (int i = 0; i < 10; i++) { gridCtrl.AddCell(ScrollerDataType.Header, i); } gridCtrl.Restart(); } private void OnRefreshGridCell_2(ScrollerDataType type, CellView cell) { int Index = cell.index; EntryInformationCell entryInformationCell = cell.GetComponent<EntryInformationCell>(); entryInformationCell.GetDisplayInformation(1); entryInformationCell.mButton.SetListener(()=> { // m_ScrollerController_2.m_Scorller.RefreshActiveCellViews();//刷新可见 }); } public void ChooseDay()//选择天 { foreach (var key in loginRewardModel.RedPointDic.Keys)//红点选择可领取的天 { if (loginRewardModel.RedPointDic[key].state == RedPointState.GetReward) { loginRewardModel.SelectedNow = key; return; } } loginRewardModel.SelectedNow = loginRewardModel.DayNow; } private void ToAddSorting() { SortList.Clear(); foreach (var key in loginRewardModel.LoginAwardDayDic.Keys) { if (key == loginRewardModel.SelectedNow) { var loginReward = loginRewardModel.LoginAwardDayDic[key]; for (int i = 0; i < loginReward.TemplateList.Length; i++) { var TemplateId = loginReward.TemplateList[i]; SortList.Add(TemplateId); } } } SortList.Sort(Compare); } int Compare(int x, int y)//数组排列 { return 1; } } } System/OpenServerActivity/LoginRewardWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: aba0dd26d09942440ae9339e4ef4120f timeCreated: 1544166304 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/OpenServiceAchievementModel.cs
@@ -433,6 +433,7 @@ } private void SetRedPointId()//设置红点ID { if (RedPointDic.Count >= 7) { return; } RedPointDic.Clear(); foreach (var key in WeekPartyDayInfoDic.Keys) { @@ -626,6 +627,13 @@ } return _bool; } public bool IsOpenFeatures() { bool Isbool = false; Isbool = (OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.OpenServiceAchievement) || OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.OpenServiceAchievement)); return Isbool; } } System/OpenServerActivity/SpringFestivalCell.cs
New file @@ -0,0 +1,257 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, January 22, 2019 //-------------------------------------------------------- using EnhancedUI.EnhancedScroller; using System.Collections; using System.Collections.Generic; using TableConfig; using UnityEngine; using UnityEngine.UI; using System; namespace Snxxz.UI { [XLua.Hotfix] public class SpringFestivalCell : ScrollerUI { [SerializeField] Text m_TextA; [SerializeField] Text m_TextB; [SerializeField] Text m_TextC; [SerializeField] Transform m_ItemList; [SerializeField] Button m_Btn; [SerializeField] Text m_BtnText; [SerializeField] GameObject m_Miss;//错过 [SerializeField] GameObject m_Reach;//未达成 [SerializeField] GameObject m_Draw;//已领取 [SerializeField] Text m_TextNumber;//已领取次数 SpringFestivalModel model { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } ItemTipsModel _itemTipsModel; ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } } public override void Refresh(CellView cell) { int ID = cell.index; var config = Config.Instance.Get<WeekPartyConfig>(ID); if (config == null || !model.SpringFestivalDic.ContainsKey(ID)) { return; } var SpringFestival = model.SpringFestivalDic[ID]; int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数 int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数 int number = SpringFestival.TotalTimes / SpringFestival.SingleTimes; var RemainingNum = 0; if (SpringFestival.TotalTimes - rewardNum > 0) { RemainingNum = (SpringFestival.TotalTimes - rewardNum) / SpringFestival.SingleTimes; } if (SpringFestival.TotalTimes - carryOutNum > 0 && RemainingNum > 0) { m_TextA.text = Language.Get("OSA_1", RemainingNum); } else { m_TextA.text = Language.Get("OSA_4"); } if (config.ActionType == 20) { m_TextB.text = string.Format(config.Description, (model.SelectedNow + 1)); } else { m_TextB.text = string.Format(config.Description, SpringFestival.SingleTimes); } m_TextC.text = Language.Get("OSA_2", SpringFestival.Point); for (int i = 0; i < m_ItemList.childCount; i++) { GameObject Obj = m_ItemList.GetChild(i).gameObject; ItemCell itemCell = Obj.GetComponent<ItemCell>(); if (i < SpringFestival.WeekPartyItem.Length) { Obj.SetActive(true); var Item = SpringFestival.WeekPartyItem[i]; ItemCellModel cellModel = new ItemCellModel(Item.ItemID, true, (ulong)Item.ItemCnt, Item.IsBind); itemCell.Init(cellModel); itemCell.cellBtn.SetListener(() => { ItemAttrData attrData = new ItemAttrData(Item.ItemID, false, (ulong)Item.ItemCnt, -1, Item.IsBind); itemTipsModel.SetItemTipsModel(attrData); }); } else { Obj.SetActive(false); } } bool IsOpenPreviewTime = OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.SpringFestival); if (model.SelectedNow != model.DayNow || IsOpenPreviewTime) { if (model.SelectedNow > model.DayNow || IsOpenPreviewTime)//还未到达的天数 { m_Btn.gameObject.SetActive(false); m_TextNumber.gameObject.SetActive(false); m_Miss.SetActive(false); m_Reach.SetActive(false); m_Draw.SetActive(false); } else//已过的天数 { int TaypeNumber = 0; if (carryOutNum - rewardNum > 0) { TaypeNumber = (carryOutNum - rewardNum) / SpringFestival.SingleTimes; } if (TaypeNumber > 0)//可领 { m_TextNumber.gameObject.SetActive(true); m_TextNumber.text = SetText(ID); m_Btn.gameObject.SetActive(true); UIEffect uieffect = m_Btn.GetComponent<UIEffect>(); uieffect.Play(); m_BtnText.text = Language.Get("RealmPractice109");//领取 m_Miss.SetActive(false); m_Reach.SetActive(false); m_Draw.SetActive(false); m_Btn.SetListener(() => { bool _bool = model.IsOpenFeatures(); if (_bool) { model.SendGetSpringFestival(model.SelectedNow, ID); } else { SysNotifyMgr.Instance.ShowTip("SevenDayOver2"); } }); } else { if (rewardNum >= number)//已经领完 { m_TextNumber.gameObject.SetActive(false); m_Btn.gameObject.SetActive(false); m_Miss.SetActive(false); m_Reach.SetActive(false); m_Draw.SetActive(true); } else//未到达 { m_TextNumber.gameObject.SetActive(false); m_Btn.gameObject.SetActive(false); m_Miss.SetActive(false); m_Reach.SetActive(true); m_Draw.SetActive(false); } } } } else//当前天 { int TaypeNumber = 0; if (carryOutNum - rewardNum > 0) { TaypeNumber = (carryOutNum - rewardNum) / SpringFestival.SingleTimes; } if (TaypeNumber > 0)//可领 { m_TextNumber.gameObject.SetActive(true); m_TextNumber.text = SetText(ID); m_Btn.gameObject.SetActive(true); UIEffect uieffect = m_Btn.GetComponent<UIEffect>(); uieffect.Play(); m_BtnText.text = Language.Get("RealmPractice109");//领取 m_Miss.SetActive(false); m_Reach.SetActive(false); m_Draw.SetActive(false); m_Btn.SetListener(() => { bool _bool = model.IsOpenFeatures(); if (_bool) { model.SendGetSpringFestival(model.SelectedNow, ID); } else { SysNotifyMgr.Instance.ShowTip("SevenDayOver2"); } }); } else { if (rewardNum >= SpringFestival.TotalTimes)//已经领完 { m_TextNumber.gameObject.SetActive(false); m_Btn.gameObject.SetActive(false); m_Miss.SetActive(false); m_Reach.SetActive(false); m_Draw.SetActive(true); } else//未到达(前往) { m_TextNumber.gameObject.SetActive(true); m_TextNumber.text = SetText(ID); m_Btn.gameObject.SetActive(true); m_BtnText.text = Language.Get("RealmPractice108");//前往 UIEffect uieffect = m_Btn.GetComponent<UIEffect>(); uieffect.Stop(); m_Miss.SetActive(false); m_Reach.SetActive(false); m_Draw.SetActive(false); m_Btn.SetListener(() => { WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump); }); } } } } string SetText(int ID) { string str = string.Empty; var SpringFestival = model.SpringFestivalDic[ID]; int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数 int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数 var config = Config.Instance.Get<WeekPartyConfig>(ID); if (config != null && config.SpecialDisplayType == 1) { if (carryOutNum > 0) { str = "1/1"; } else { str = "0/1"; } return str; } int TaypeNumber = 0; if (carryOutNum - rewardNum > 0) { TaypeNumber = (carryOutNum - rewardNum) / SpringFestival.SingleTimes; } if (TaypeNumber > 0) { str = SpringFestival.SingleTimes + "/" + SpringFestival.SingleTimes; return str; } else { int type = carryOutNum % SpringFestival.SingleTimes; str = type + "/" + SpringFestival.SingleTimes; } return str; } } } System/OpenServerActivity/SpringFestivalCell.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 44a71fdc1fc45a7448e87c4942d0db7c timeCreated: 1548146393 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/SpringFestivalItem.cs
New file @@ -0,0 +1,93 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Tuesday, January 22, 2019 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TableConfig; namespace Snxxz.UI { [XLua.Hotfix] public class SpringFestivalItem : MonoBehaviour { [SerializeField] Text m_Text_A; [SerializeField] Image m_BGM; [SerializeField] Image m_ImageShow; [SerializeField] Text m_TextPoint; [SerializeField] Button m_ReceiveBtn; [SerializeField] GameObject m_IsReachImage; [SerializeField] GameObject m_IsDrawImage; SpringFestivalModel model { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } public void SetReward(int day, WeekPartyItemClass item, int index, int Type) { var holidayHomingPointConfig = Config.Instance.Get<HolidayHomingPointConfig>(item.ItemID); if (holidayHomingPointConfig != null) { m_Text_A.text = holidayHomingPointConfig.name; if (Type == 1) { m_ImageShow.SetSprite(holidayHomingPointConfig.ImageType1); } else { m_ImageShow.SetSprite(holidayHomingPointConfig.ImageType2); } m_ImageShow.SetNativeSize(); } int Point = model.GetPoint(day); m_TextPoint.text = Language.Get("OSA_3", item.NeedPoint); bool IsBool = model.IsDayReward(model.SelectedNow, index); if (model.SelectedNow > model.DayNow) { m_ReceiveBtn.gameObject.SetActive(false); m_IsReachImage.SetActive(false); m_IsDrawImage.SetActive(false); } else { if (Point >= item.NeedPoint && !IsBool)//可领 { m_ReceiveBtn.gameObject.SetActive(true); m_ReceiveBtn.SetListener(() => { bool _bool = model.IsOpenFeatures(); if (_bool) { model.SendGetSpringFestivalPoint(model.SelectedNow, item.NeedPoint); } else { SysNotifyMgr.Instance.ShowTip("SevenDayOver2"); } }); m_IsReachImage.SetActive(false); m_IsDrawImage.SetActive(false); } else if (Point >= item.NeedPoint && IsBool)//已领 { m_ReceiveBtn.gameObject.SetActive(false); m_IsReachImage.SetActive(false); m_IsDrawImage.SetActive(true); } else if (item.NeedPoint > Point) { m_ReceiveBtn.gameObject.SetActive(false); m_IsReachImage.SetActive(true); m_IsDrawImage.SetActive(false); } } } } } System/OpenServerActivity/SpringFestivalItem.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 09255ebe0b6808b4188754d0f5f4df1f timeCreated: 1548145610 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/SpringFestivalModel.cs
New file @@ -0,0 +1,389 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 21, 2019 //-------------------------------------------------------- using System; using System.Collections.Generic; using TableConfig; using Snxxz.UI; using System.Linq; [XLua.LuaCallCSharp] //春节活动巡礼 public class SpringFestivalModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk { public Dictionary<int, WeekPartyDayInfoClass> SpringFestivalInfoDic = new Dictionary<int, WeekPartyDayInfoClass>();//每天领取奖励信息 public event Action SpringFestivalRewardUpdate;//领奖记录变化 public Dictionary<int, WeekPartyDayClass> SpringFestivalDayDic = new Dictionary<int, WeekPartyDayClass>();//每天的奖励信息 public Dictionary<int, WeekPartyActionClass> SpringFestivalDic = new Dictionary<int, WeekPartyActionClass>();//活动模板总信息 public Dictionary<int, Redpoint> RedPointDic = new Dictionary<int, Redpoint>();//红点 private const int Redpoint_key1 = 21402;//周狂欢红点 public Redpoint redPointStre1 = new Redpoint(214, Redpoint_key1); public int LimitLV = 0;//限制等级 private int _SelectedNow = 0; public int SelectedNow//选中天 { get { return _SelectedNow; } set { _SelectedNow = value; } } private int _DayNow = 0; public int DayNow//当前天 { get { return _DayNow; } set { _DayNow = value; } } public override void Init() { } public void OnBeforePlayerDataInitialize() { SpringFestivalInfoDic.Clear(); } public void OnPlayerLoginOk() { GetDayNow(); OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent; OperationTimeHepler.Instance.dayResetEvent -= DayResetEvent; OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent; OperationTimeHepler.Instance.dayResetEvent += DayResetEvent; } public override void UnInit() { } private void DayResetEvent(int obj) { if (obj == (int)Operation.OpenServiceAchievement) { GetDayNow(); } } private void OperationStartEvent(Operation arg1, int arg2) { if (arg1 == Operation.OpenServiceAchievement) { GetDayNow(); } } public void SpringFestivalInfo(HAA21_tagMCFeastWeekPartyPlayerInfo info)//每天领奖信息 { for (int i = 0; i < info.Count; i++) { var DayInfo = info.DayInfoList[i]; WeekPartyDayInfoClass WeekPartyDayInfo = new WeekPartyDayInfoClass(); WeekPartyDayInfo.DayIndex = (int)DayInfo.DayIndex; WeekPartyDayInfo.Point = (int)DayInfo.Point; WeekPartyDayInfo.AwardRecord = (int)DayInfo.AwardRecord; if (SpringFestivalInfoDic.ContainsKey((int)DayInfo.DayIndex)) { var dit = SpringFestivalInfoDic[(int)DayInfo.DayIndex]; dit.DayIndex = (int)DayInfo.DayIndex; dit.Point = (int)DayInfo.Point; dit.AwardRecord = (int)DayInfo.AwardRecord; for (int j = 0; j < DayInfo.ACount; j++) { var taskList = DayInfo.TaskList[j]; int Index = dit.ActionType.FindIndex(s => s.TemplateID == taskList.TemplateID); if (Index != -1) { dit.ActionType[Index].CurTimes = (int)taskList.CurTimes; dit.ActionType[Index].GotTimes = (int)taskList.GotTimes; } else { ActionTypeClass ActionType = new ActionTypeClass(); ActionType.TemplateID = taskList.TemplateID; ActionType.CurTimes = (int)taskList.CurTimes; ActionType.GotTimes = (int)taskList.GotTimes; dit.ActionType.Add(ActionType); } } SpringFestivalInfoDic[(int)DayInfo.DayIndex] = dit; } else { WeekPartyDayInfo.ActionType = new List<ActionTypeClass>(); for (int k = 0; k < DayInfo.ACount; k++) { var Task = DayInfo.TaskList[k]; ActionTypeClass ActionType = new ActionTypeClass(); ActionType.TemplateID = Task.TemplateID; ActionType.CurTimes = (int)Task.CurTimes; ActionType.GotTimes = (int)Task.GotTimes; WeekPartyDayInfo.ActionType.Add(ActionType); } SpringFestivalInfoDic.Add((int)DayInfo.DayIndex, WeekPartyDayInfo); } } GetDayNow(); SetRedPoint(); if (SpringFestivalRewardUpdate != null) { SpringFestivalRewardUpdate(); } } public void SpringFestivalTemplate(HAA20_tagMCFeastWeekPartyInfo info)//每天模板信息 { LimitLV = info.LimitLV; for (int i = 0; i < info.DayCnt; i++) { int Index = i; var DayInfo = info.DayInfoList[i]; WeekPartyDayClass WeekPartyDay = new WeekPartyDayClass(); WeekPartyDay.TemplateList = new int[DayInfo.ActCnt]; for (int k = 0; k < DayInfo.ActCnt; k++) { WeekPartyDay.TemplateList[k] = DayInfo.TemplateList[k]; } WeekPartyDay.WeekPartyItem = new WeekPartyItemClass[DayInfo.PCount]; for (int p = 0; p < DayInfo.PCount; p++) { WeekPartyItemClass WeekPartyItem = new WeekPartyItemClass(); var Item = DayInfo.PItemInfo[p]; WeekPartyItem.NeedPoint = Item.NeedPoint; WeekPartyItem.ItemID = (int)Item.ItemID; WeekPartyItem.ItemCnt = (int)Item.ItemCnt; WeekPartyItem.IsBind = (int)Item.IsBind; WeekPartyDay.WeekPartyItem[p] = WeekPartyItem; } if (SpringFestivalDayDic.ContainsKey(Index)) { SpringFestivalDayDic[Index] = WeekPartyDay; } else { SpringFestivalDayDic.Add(Index, WeekPartyDay); } }// 每天模板 for (int i = 0; i < info.TCount; i++) { var ActionInfo = info.ActionInfo[i]; WeekPartyActionClass WeekPartyAction = new WeekPartyActionClass(); WeekPartyAction.TemplateID = (int)ActionInfo.TemplateID; WeekPartyAction.ActionType = (int)ActionInfo.ActionType; WeekPartyAction.TotalTimes = (int)ActionInfo.TotalTimes; WeekPartyAction.SingleTimes = (int)ActionInfo.SingleTimes; WeekPartyAction.Point = (int)ActionInfo.Point; WeekPartyAction.WeekPartyItem = new WeekPartyItemClass[ActionInfo.Count]; for (int z = 0; z < ActionInfo.Count; z++) { var item = ActionInfo.ItemInfo[z]; WeekPartyItemClass WeekPartyItem = new WeekPartyItemClass(); WeekPartyItem.ItemID = (int)item.ItemID; WeekPartyItem.ItemCnt = (int)item.ItemCnt; WeekPartyItem.IsBind = item.IsBind; WeekPartyItem.NeedPoint = 0; WeekPartyAction.WeekPartyItem[z] = WeekPartyItem; } if (SpringFestivalDic.ContainsKey((int)ActionInfo.TemplateID)) { SpringFestivalDic[(int)ActionInfo.TemplateID] = WeekPartyAction; } else { SpringFestivalDic.Add((int)ActionInfo.TemplateID, WeekPartyAction); } }// 活动模板信息 SetRedPoint(); } public int GetRewardNumber(int Day, int ID)//获取领奖次数 { int Num = 0; if (SpringFestivalInfoDic.ContainsKey(Day)) { var SpringFestivalDay = SpringFestivalInfoDic[Day]; for (int i = 0; i < SpringFestivalDay.ActionType.Count; i++) { var ActionType = SpringFestivalDay.ActionType[i]; if (ID == ActionType.TemplateID) { Num = ActionType.GotTimes; } } } return Num; } public int GetCarryOutNum(int Day, int ID)//获取已完成次数 { int Num = 0; if (SpringFestivalInfoDic.ContainsKey(Day)) { var SpringFestival = SpringFestivalInfoDic[Day]; for (int i = 0; i < SpringFestival.ActionType.Count; i++) { var ActionType = SpringFestival.ActionType[i]; if (ID == ActionType.TemplateID) { Num = ActionType.CurTimes; } } } return Num; } public int GetPoint(int day)//获取某一天的积分 { int Point = 0; if (SpringFestivalInfoDic.ContainsKey(day)) { Point = SpringFestivalInfoDic[day].Point; } return Point; } public void SendGetSpringFestival(int day, int temdayplateID)//领取春节活动奖励 { CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward(); getReward.RewardType = (byte)GotServerRewardType.Def_RewardType_FeastWeekPartyAct; getReward.DataEx = (uint)day; string StrID = temdayplateID.ToString(); getReward.DataExStrLen = (byte)StrID.Length; getReward.DataExStr = StrID; GameNetSystem.Instance.SendInfo(getReward); } public void SendGetSpringFestivalPoint(int day, int point)//领取春节积分奖励 { CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward(); getReward.RewardType = (byte)GotServerRewardType.Def_RewardType_FeastWeekPartyPoint; getReward.DataEx = (uint)day; string StrID = point.ToString(); getReward.DataExStrLen = (byte)StrID.Length; getReward.DataExStr = StrID; GameNetSystem.Instance.SendInfo(getReward); } public bool IsDayReward(int day, int index)//是否领取奖励 { bool _bool = false; int AwardRecord = 0; foreach (var key in SpringFestivalInfoDic.Keys) { if (key == day) { AwardRecord = SpringFestivalInfoDic[key].AwardRecord; } } _bool = MathUtility.GetBitValue((uint)AwardRecord, (ushort)index); return _bool; } private void SetRedPoint()//红点设置 { SetRedPointId(); foreach (var key in RedPointDic.Keys) { RedPointDic[key].state = RedPointState.None; } foreach (var key in RedPointDic.Keys) { RedPointDic[key].state = SetRedPointState(key); } } private void SetRedPointId()//设置红点ID { if (RedPointDic.Count >= 7) { return; } RedPointDic.Clear(); foreach (var key in SpringFestivalInfoDic.Keys) { int RedPoint = Redpoint_key1 * 10 + key; if (!RedPointDic.ContainsKey(key)) { Redpoint redPointMountStare = new Redpoint(Redpoint_key1, RedPoint); RedPointDic.Add(key, redPointMountStare); } } } private RedPointState SetRedPointState(int day)//红点状态设置 { if (!SpringFestivalDayDic.ContainsKey(day) || !SpringFestivalInfoDic.ContainsKey(day) || day>DayNow) { return RedPointState.None; } WeekPartyDayClass WeekPartyDay = new WeekPartyDayClass(); int point = SpringFestivalInfoDic[day].Point; foreach (var key in SpringFestivalDayDic.Keys) { if (key == day) { WeekPartyDay = SpringFestivalDayDic[key]; } } for (int i = 0; i < WeekPartyDay.WeekPartyItem.Length; i++)//积分奖励 { var item = WeekPartyDay.WeekPartyItem[i]; int type = i; bool IsBool = IsDayReward(day, type); if (point >= item.NeedPoint && !IsBool) { return RedPointState.GetReward; } } for (int i = 0; i < WeekPartyDay.TemplateList.Length; i++) { var TemplateID = WeekPartyDay.TemplateList[i]; if (SpringFestivalDic.ContainsKey(TemplateID)) { var WeekPartyAction = SpringFestivalDic[TemplateID]; int number = WeekPartyAction.TotalTimes / WeekPartyAction.SingleTimes; int rewardNum = GetRewardNumber(day, TemplateID);//已领奖次数 int carryOutNum = GetCarryOutNum(day, TemplateID);//已完成次数 int TaypeNumber = 0; if (carryOutNum - rewardNum > 0) { TaypeNumber = (carryOutNum - rewardNum) / WeekPartyAction.SingleTimes; } if (TaypeNumber > 0 && rewardNum < number) { return RedPointState.GetReward; } } } return RedPointState.None; } public void GetDayNow() { OperationBase operationBase; if (OperationTimeHepler.Instance.TryGetOperationTime(Operation.SpringFestival, out operationBase)) { int inday = (operationBase as EventDaysTime).GetInDayNow(); if (inday >= 0 && inday < 7) { _DayNow = inday; } else if (inday >= 7) { _DayNow = 6; } } } public bool IsOpenFeatures() { bool Isbool = false; Isbool = (OperationTimeHepler.Instance.SatisfyOpenCondition(Operation.SpringFestival) || OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.SpringFestival)); return Isbool; } } System/OpenServerActivity/SpringFestivalModel.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: e745d55fc89be58489c27c9c7b292b0a timeCreated: 1548042965 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/OpenServerActivity/SpringFestivalWin.cs
New file @@ -0,0 +1,410 @@ //-------------------------------------------------------- // [Author]: 第二世界 // [ Date ]: Monday, January 21, 2019 //-------------------------------------------------------- using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TableConfig; using EnhancedUI.EnhancedScroller; namespace Snxxz.UI { [XLua.Hotfix] public class SpringFestivalWin : Window { //春节巡礼 #region Built-in [SerializeField] ScrollerController m_ScrollerController1;//天 [SerializeField] ScrollerController m_ScrollerController2;//列表 [SerializeField] Text m_TextIntegral;//当前积分 [SerializeField] GameObject m_One; [SerializeField] GameObject m_Two; [SerializeField] SpringFestivalItem m_SpringFestivalItemA; [SerializeField] SpringFestivalItem m_SpringFestivalItemA1; [SerializeField] SpringFestivalItem m_SpringFestivalItemB1; [SerializeField] Image m_ImgeBgm1; [SerializeField] Image m_ImgeBgm2; DailyQuestModel dailymodel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } } OpenServiceAchievementModel OpenServicemodel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } SpringFestivalModel model { get { return ModelCenter.Instance.GetModel<SpringFestivalModel>(); } } List<int> SortList = new List<int>(); List<WeekPartyItemClass> ItemDayList = new List<WeekPartyItemClass>(); private string bgmKey1 = string.Empty; private string bgmKey2 = string.Empty; protected override void BindController() { m_ScrollerController1.OnRefreshCell += OnRefreshGridCell_1; m_ScrollerController2.OnRefreshCell += OnRefreshGridCell_2; var config = Config.Instance.Get<FuncConfigConfig>("HolidayTourBackground"); bgmKey1 = config.Numerical1; bgmKey2 = config.Numerical2; } protected override void AddListeners() { } protected override void OnPreOpen() { m_ImgeBgm1.SetSprite(bgmKey1); m_ImgeBgm2.SetSprite(bgmKey2); ChooseDay(); SetTextIntegral(); OnCreateGridLineCell1(m_ScrollerController1); OnCreateGridLineCell2(m_ScrollerController2); if (model.SelectedNow >= 5) { m_ScrollerController1.JumpIndex(5); } } protected override void OnAfterOpen() { OperationTimeHepler.Instance.operationStartEvent += OperationStartEvent; OperationTimeHepler.Instance.dayResetEvent += DayResetEvent; model.SpringFestivalRewardUpdate += SpringFestivalRewardUpdate; } protected override void OnPreClose() { OperationTimeHepler.Instance.operationStartEvent -= OperationStartEvent; model.SpringFestivalRewardUpdate -= SpringFestivalRewardUpdate; OperationTimeHepler.Instance.dayResetEvent -= DayResetEvent; } private void DayResetEvent(int obj) { if (obj == (int)Operation.OpenServiceAchievement) { model.GetDayNow(); GetPointRewardObj();//获取积分领奖信息 m_ScrollerController1.m_Scorller.RefreshActiveCellViews();//刷新可见 m_ScrollerController2.m_Scorller.RefreshActiveCellViews();//刷新可见 } } private void OperationStartEvent(Operation arg1, int arg2) { if (arg1 == Operation.OpenServiceAchievement) { model.GetDayNow(); GetPointRewardObj();//获取积分领奖信息 m_ScrollerController1.m_Scorller.RefreshActiveCellViews();//刷新可见 m_ScrollerController2.m_Scorller.RefreshActiveCellViews();//刷新可见 } } protected override void OnAfterClose() { } #endregion private void SpringFestivalRewardUpdate() { model.GetDayNow(); GetPointRewardObj();//获取积分领奖信息 m_ScrollerController1.m_Scorller.RefreshActiveCellViews();//刷新可见 m_ScrollerController2.m_Scorller.RefreshActiveCellViews();//刷新可见 } void OnCreateGridLineCell1(ScrollerController gridCtrl) { gridCtrl.Refresh(); foreach (var key in model.SpringFestivalDayDic.Keys) { gridCtrl.AddCell(ScrollerDataType.Header, key); } gridCtrl.Restart(); } private void OnRefreshGridCell_1(ScrollerDataType type, CellView cell) { int Index = cell.index; ButtonEx Btn = cell.GetComponent<ButtonEx>(); GameObject SelectedObj = cell.transform.Find("Image_XZ").gameObject;//选中 GameObject SelectedObj1 = cell.transform.Find("Image_XZ1").gameObject;//选中 ImageEx SelectedImageEx = SelectedObj.GetComponent<ImageEx>(); GameObject Unselected = cell.transform.Find("Image_WXZ").gameObject;//未选中 ImageEx UnselectedIm = Unselected.GetComponent<ImageEx>(); GameObject Lock = cell.transform.Find("Lock").gameObject;//锁 GameObject IsNotGary = cell.transform.Find("Obj1").gameObject; Text IsNotGary_text = IsNotGary.transform.Find("DayText").GetComponent<Text>(); GameObject Gary = cell.transform.Find("Obj2").gameObject; Text Gary_text = Gary.transform.Find("DayText").GetComponent<Text>(); RedpointBehaviour redPoint = cell.transform.Find("RedPoint").GetComponent<RedpointBehaviour>();//红点 if (model.RedPointDic.ContainsKey(Index)) { redPoint.redpointId = model.RedPointDic[Index].id; } if (Index <= model.DayNow) { SelectedImageEx.gray = false; Unselected.SetActive(true); UnselectedIm.gray = false; SelectedObj.SetActive(false); SelectedObj1.SetActive(false); Lock.SetActive(false); IsNotGary.SetActive(true); Gary.SetActive(false); IsNotGary_text.text = (Index + 1).ToString(); } else { Unselected.SetActive(true); UnselectedIm.gray = true; SelectedObj.SetActive(false); SelectedObj1.SetActive(false); Lock.SetActive(true); IsNotGary.SetActive(false); Gary.SetActive(true); Gary_text.text = (Index + 1).ToString(); } if (Index == model.SelectedNow) { if (Index > model.DayNow) { SelectedImageEx.gray = true; IsNotGary.SetActive(false); Gary.SetActive(true); Lock.SetActive(true); } else { SelectedImageEx.gray = false; IsNotGary.SetActive(true); Gary.SetActive(false); Lock.SetActive(false); } SelectedObj.SetActive(true); SelectedObj1.SetActive(true); Unselected.SetActive(false); IsNotGary_text.text = (Index + 1).ToString(); } Btn.SetListener(() => { if (Index != model.SelectedNow) { model.SelectedNow = Index;//选中天 SetTextIntegral(); OnCreateGridLineCell2(m_ScrollerController2); m_ScrollerController1.m_Scorller.RefreshActiveCellViews();//刷新可见 } }); } private string InDayStr(int Day) { string DaySte = string.Empty; DaySte = Language.Get("SignIn_4", Day); return DaySte; } void OnCreateGridLineCell2(ScrollerController gridCtrl) { ToAddSorting();//排序 GetPointRewardObj();//获取积分领奖信息 gridCtrl.Refresh(); for (int i = 0; i < SortList.Count; i++) { gridCtrl.AddCell(ScrollerDataType.Header, SortList[i]); } gridCtrl.Restart(); } private void OnRefreshGridCell_2(ScrollerDataType type, CellView cell) { } private void ToAddSorting() { SortList.Clear(); int Weekday = OpenServicemodel.GetWeekDay(model.SelectedNow); var quests = dailymodel.GetQuestByWeekTime(Weekday); List<int> dailyIdlist = new List<int>(); foreach (var key in quests.Keys) { var _list = quests[key]; for (int i = 0; i < _list.Count; i++) { dailyIdlist.Add(_list[i]); } } foreach (var key in model.SpringFestivalDayDic.Keys) { if (key == model.SelectedNow) { for (int i = 0; i < model.SpringFestivalDayDic[key].TemplateList.Length; i++) { var TemplateId = model.SpringFestivalDayDic[key].TemplateList[i]; var config = Config.Instance.Get<HolidayHomingConfig>(TemplateId); if (config == null) { continue; } if (config.DailyQusetId != 0) { if (dailyIdlist.Contains(config.DailyQusetId)) { SortList.Add(TemplateId); } } else { SortList.Add(TemplateId); } } } } SortList.Sort(Compare); } int Compare(int x, int y)//数组排列 { bool havex1 = IsReceive(x); bool havey1 = IsReceive(y); if (havex1.CompareTo(havey1) != 0) { return -havex1.CompareTo(havey1); } bool havex2 = Undone(x); bool havey2 = Undone(y); if (havex2.CompareTo(havey2) != 0) { return -havex2.CompareTo(havey2); } bool havex3 = Completed(x); bool havey3 = Completed(y); if (havex3.CompareTo(havey3) != 0) { return -havex3.CompareTo(havey3); } int havex4 = SizeId(x); int havey4 = SizeId(y); if (havex4.CompareTo(havey4) != 0) { return havex4.CompareTo(havey4); } return 1; } private bool IsReceive(int ID)//可领取 { bool Bool = false; if (model.SpringFestivalDic.ContainsKey(ID)) { var SpringFestival = model.SpringFestivalDic[ID]; int number = SpringFestival.TotalTimes / SpringFestival.SingleTimes; int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数 int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数 int TaypeNumber = 0; if (carryOutNum - rewardNum > 0) { TaypeNumber = (carryOutNum - rewardNum) / SpringFestival.SingleTimes; } if (TaypeNumber > 0) { Bool = true; } } return Bool; } private bool Undone(int ID)//未完成 { bool Bool = false; if (model.SpringFestivalDic.ContainsKey(ID)) { var SpringFestival = model.SpringFestivalDic[ID]; int number = SpringFestival.TotalTimes / SpringFestival.SingleTimes; int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数 int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数 if (SpringFestival.TotalTimes > rewardNum) { Bool = true; } } return Bool; } private bool Completed(int ID)//已领取 { bool Bool = false; if (model.SpringFestivalDic.ContainsKey(ID)) { var SpringFestival = model.SpringFestivalDic[ID]; int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数 int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数 if (rewardNum >= SpringFestival.TotalTimes) { Bool = true; } } return Bool; } private int SizeId(int ID) { int index = 1; var config = Config.Instance.Get<HolidayHomingConfig>(ID); if (config != null) { index = config.order; } return index; } private void SetTextIntegral()//获取当前积分 { int Point = model.GetPoint(model.SelectedNow); m_TextIntegral.text = Point.ToString(); } private void GetPointRewardObj() { ItemDayList.Clear(); foreach (var key in model.SpringFestivalDayDic.Keys) { if (key == model.SelectedNow) { for (int i = 0; i < model.SpringFestivalDayDic[key].WeekPartyItem.Length; i++) { ItemDayList.Add(model.SpringFestivalDayDic[key].WeekPartyItem[i]); } } } if (ItemDayList.Count > 1) { m_One.SetActive(false); m_Two.SetActive(true); m_SpringFestivalItemA1.SetReward(model.SelectedNow, ItemDayList[0], 0, 2); m_SpringFestivalItemB1.SetReward(model.SelectedNow, ItemDayList[1], 1, 2); } else { m_One.SetActive(true); m_Two.SetActive(false); m_SpringFestivalItemA.SetReward(model.SelectedNow, ItemDayList[0], 0, 1); } } private void ChooseDay()//选择天 { foreach (var key in model.RedPointDic.Keys)//红点选择可领取的天 { if (model.RedPointDic[key].state == RedPointState.GetReward) { model.SelectedNow = key; return; } } model.SelectedNow = model.DayNow; } } } System/OpenServerActivity/SpringFestivalWin.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 3f29b1e883e6d9b4d8eeac6532685502 timeCreated: 1548041885 licenseType: Free MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Strengthening/GodBeastSlidingList.cs
@@ -196,6 +196,10 @@ var itemModel = BackpackDic[key]; GodBeastBagClass godBeastBagClass = new GodBeastBagClass(); godBeastBagClass.ItemId = itemModel.itemId; if (itemModel.itemId == 5417) { continue; } godBeastBagClass.Index = key; if (itemModel.chinItemModel.Type != 70) { System/Treasure/TreasureData.cs
@@ -342,7 +342,18 @@ } if (IsHighestStage && FuncOpen.Instance.IsFuncOpen(82)) { humanState = HumanTreasureState.Potential; foreach (var potential in potentials) { var config = Config.Instance.Get<SkillConfig>(potential.id); var level = potential.level; var isMax = level >= config.SkillMaxLV; if (!isMax) { humanState = HumanTreasureState.Potential; return; } } humanState = HumanTreasureState.Complete; } else { System/Treasure/TreasureModel.cs
@@ -706,6 +706,10 @@ if (treasure.GetPotential(config.SkillTypeID) != null) { treasure.UpdatePotentialLevel(config.SkillTypeID, config.SkillLV); if (treasure is HumanTreasure) { (treasure as HumanTreasure).UpdateTreasureState(); } if (potentialLevelUpdate != null) { potentialLevelUpdate(config.SkillTypeID, config.SkillLV); System/Vip/FairyJadeInvestmentModel.cs
@@ -147,7 +147,7 @@ IsUpdateBool = true; IsOk = true; InvestmentAmount(); BinningType = GetType(); BinningType = GetFairyJadeType(); InvestmentRedPoint(); IsShowRedPointSimple(); PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= Updatefighting; @@ -540,7 +540,7 @@ } } public int GetType()//获取投资类型 public int GetFairyJadeType()//获取投资类型 { int type = 3; bool Isbool = true; System/Vip/FairyJadeInvestmentWin.cs
@@ -67,7 +67,7 @@ protected override void OnPreOpen() { fairyJadeInvestmentModel.BinningType = fairyJadeInvestmentModel.GetType(); fairyJadeInvestmentModel.BinningType = fairyJadeInvestmentModel.GetFairyJadeType(); SetText(); int InvestGold = fairyJadeInvestmentModel.GetInvestGold(); if (InvestGold < fairyJadeInvestmentModel.RecordSelectNumberMax) System/Welfare/OperationTimeHepler.cs
@@ -426,6 +426,37 @@ } /// <summary> /// 春节仙界盛典 /// </summary> /// <param name="info"></param> public void RefreshNewYearFairyCeremonyInfo(HAC0B_tagGCNewFairyCeremonyInfo package) { OperationBase operation = null; operationDict.TryGetValue(Operation.NewYearFairyCeremony, out operation); if (string.IsNullOrEmpty(package.StartDate) || string.IsNullOrEmpty(package.EndtDate)) { ForceStopOperation(Operation.NewYearFairyCeremony); } else { if (operation == null) { operation = new OperationBase(); operationDict.Add(Operation.NewYearFairyCeremony, operation); } operation.Reset(); operation.startDate = ParseOperationDate(package.StartDate); operation.endDate = ParseOperationDate(package.EndtDate); operation.limitLv = package.LimitLV; operation.resetType = package.ResetType; if (operationTimeUpdateEvent != null) { operationTimeUpdateEvent(Operation.NewYearFairyCeremony); } } } /// <summary> /// N倍修行点 /// </summary> /// <param name="package"></param> @@ -457,6 +488,97 @@ } } } /// <summary> /// 登录奖励 /// </summary> /// <param name="package"></param> public void RefreshLoginReward(HAA0C_tagMCActLoginAwardInfo package) { OperationBase operation = null; operationDict.TryGetValue(Operation.LoginReward, out operation); if (string.IsNullOrEmpty(package.StartDate) || string.IsNullOrEmpty(package.EndtDate)) { ForceStopOperation(Operation.LoginReward); } else { if (operation == null) { operation = new EventDaysTime(); operationDict.Add(Operation.LoginReward, operation); } operation.Reset(); operation.startDate = ParseOperationDate(package.StartDate); operation.endDate = ParseOperationDate(package.EndtDate); operation.limitLv = package.LimitLV; operation.dayReset = package.IsDayReset == 1; operation.resetType = package.ResetType; operation.inAdvanceMinute = package.AdvanceMinutes; if (operationTimeUpdateEvent != null) { operationTimeUpdateEvent(Operation.LoginReward); } } } /// <summary> /// 春节巡礼 /// </summary> /// <param name="package"></param> public void SpringFestival(HAA20_tagMCFeastWeekPartyInfo package) { OperationBase operation = null; operationDict.TryGetValue(Operation.SpringFestival, out operation); if (string.IsNullOrEmpty(package.StartDate) || string.IsNullOrEmpty(package.EndtDate)) { ForceStopOperation(Operation.SpringFestival); } else { if (operation == null) { operation = new EventDaysTime(); operationDict.Add(Operation.SpringFestival, operation); } operation.Reset(); operation.startDate = ParseOperationDate(package.StartDate); operation.endDate = ParseOperationDate(package.EndtDate); operation.limitLv = package.LimitLV; operation.dayReset = package.IsDayReset == 1; operation.resetType = package.ResetType; operation.inAdvanceMinute = package.AdvanceMinutes; if (operationTimeUpdateEvent != null) { operationTimeUpdateEvent(Operation.SpringFestival); } } } public void OpenServiceAchievement(HAA0A_tagMCWeekPartyInfo package) { OperationBase operation = null; operationDict.TryGetValue(Operation.OpenServiceAchievement, out operation); if (string.IsNullOrEmpty(package.StartDate) || string.IsNullOrEmpty(package.EndtDate)) { ForceStopOperation(Operation.OpenServiceAchievement); } else { if (operation == null) { operation = new EventDaysTime(); operationDict.Add(Operation.OpenServiceAchievement, operation); } operation.Reset(); operation.startDate = ParseOperationDate(package.StartDate); operation.endDate = ParseOperationDate(package.EndtDate); operation.limitLv = package.LimitLV; operation.dayReset = package.IsDayReset == 1; operation.resetType = package.ResetType; operation.inAdvanceMinute = package.AdvanceMinutes; if (operationTimeUpdateEvent != null) { operationTimeUpdateEvent(Operation.OpenServiceAchievement); } } /// <summary> /// 节日红包 @@ -805,7 +927,11 @@ FlashRushToBuy, //限时抢购 WishingWellInfo, //许愿池 AccumulateRecharge,//累计充值 LoginReward,//登录奖励 FestivalRedpack,//节日红包 NewYearFairyCeremony, //春节仙界盛典 SpringFestival,//春节巡礼 OpenServiceAchievement,//七日巡礼 max, } } System/WindowBase/ModelCenter.cs
@@ -221,11 +221,13 @@ RegisterModel<CrossServerBossModel>(); RegisterModel<OpenServiceAchievementModel>(); RegisterModel<FashionDressModel>(); RegisterModel<LoginRewardModel>(); RegisterModel<JadeDynastyBossModel>(); RegisterModel<JadeDynastyDecomposeModel>(); RegisterModel<JadeDynastyTowerModel>(); RegisterModel<JadeDynastyEquipModel>(); RegisterModel<FestivalRedpackModel>(); RegisterModel<NewYearFairylandCeremonyModel>(); inited = true; } UI/Effect/SpringDecorate.cs
New file @@ -0,0 +1,31 @@ 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); } } } } UI/Effect/SpringDecorate.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: 2f22490435e43864f8b21928175f09be timeCreated: 1548641856 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Utility/CalculateSkillGetAttrHurtUtility.cs
New file @@ -0,0 +1,81 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Snxxz.UI { public class CalculateSkillGetAttrHurtUtility : Singleton<CalculateSkillGetAttrHurtUtility> { PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } } private Dictionary<int, int> legendAttrDict = new Dictionary<int, int>(); public CalculateSkillGetAttrHurtUtility() { playerPack.RefreshItemCountAct += UpdateItem; UpdateSkillHurt(); } private void UpdateItem(PackType type, int index, int id) { switch(type) { case PackType.rptJadeDynastyEquip: UpdateSkillHurt(); break; } } private void UpdateSkillHurt() { legendAttrDict.Clear(); SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptJadeDynastyEquip); if (singlePack == null) return; var dict = singlePack.GetPackModelIndexDict(); foreach (var model in dict.Values) { var legendIds = model.GetUseDataModel((int)ItemUseDataKey.Def_IudetLegendAttrID); var legendValues = model.GetUseDataModel((int)ItemUseDataKey.Def_IudetLegendAttrValue); if (legendIds != null && legendValues != null) { for(int i = 0; i < legendIds.Count; i++) { int attrId = legendIds[i]; int attrValue = legendValues[i]; switch ((AttrEnum)attrId) { case AttrEnum.SkillAddPerA: case AttrEnum.SkillAddPerB: case AttrEnum.SkillAddPerC: case AttrEnum.SkillAddPerD: case AttrEnum.SkillAddPerE: case AttrEnum.SkillAddPerF: case AttrEnum.SkillAddPerG: legendAttrDict.Add(attrId,attrValue); break; } } } } } public bool TryGetAttrDictBySkill(int _skillId,out Dictionary<int,int> attrDict) { attrDict = new Dictionary<int, int>(); var attrIds = GeneralDefine.GetAttrIdsBySkill(_skillId); if(attrIds != null) { foreach(var attrId in attrIds) { if(legendAttrDict.ContainsKey(attrId)) { int attrValue = legendAttrDict[attrId]; attrDict.Add(attrId,attrValue); } } } return attrDict.Count > 0; } } } Utility/CalculateSkillGetAttrHurtUtility.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: ecbf942a2ef2bbb4aa8611c3b8c091cf timeCreated: 1548665434 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: Utility/EnumHelper.cs
@@ -327,7 +327,7 @@ GatherSoulDungeon = 30, CrossServerPk = 31, JadeDynastyBoss = 32, JadeDynastyTower=33, JadeDynastyTower = 33, } public enum ActivityPrepareType @@ -1262,7 +1262,11 @@ Def_RewardType_IceLodeStar = 19, //冰晶矿脉星级奖励19 Def_RewardType_WeekPartyAct = 20, //领取周狂欢活动奖励20 Def_RewardType_WeekPartyPoint = 21,// 领取周狂欢积分奖励21 Def_RewardType_ActLoginAwardAct = 22,// 领取登录奖励活动奖励22 Def_RewardType_NewFairyCRecharge = 23, // 新仙界盛典充值大礼23 Def_RewardType_NewFairyCParty = 24, // 新仙界盛典全民来嗨24 Def_RewardType_FeastWeekPartyAct = 25, //领取节日巡礼活动奖励25 Def_RewardType_FeastWeekPartyPoint = 26, //领取节日巡礼积分奖励26 } public enum MapType