Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2 文件已重命名
63个文件已修改
57个文件已添加
| | |
| | | {
|
| | | // 登记相应的数据体及对应的数据转逻辑类
|
| | | Register(typeof(HB102_tagMCClothesCoatSkinState), typeof(DTCB102_tagMCClothesCoatSkinState));
|
| | | Register(typeof(HA112_tagMCDBPlayer), typeof(DTCA112_tagMCDBPlayer));
|
| | | Register(typeof(HC106_tagMCEnterCrossServerError), typeof(DTCC106_tagMCEnterCrossServerError));
|
| | | Register(typeof(HC105_tagMCStartEnterCrossServer), typeof(DTCC105_tagMCStartEnterCrossServer));
|
| | | Register(typeof(HC104_tagMCPrepareEnterCrossServer), typeof(DTCC104_tagMCPrepareEnterCrossServer));
|
| | | Register(typeof(HC103_tagMCCrossRealmPKPlayerHisSeasonInfo), typeof(DTCC103_tagMCCrossRealmPKPlayerHisSeasonInfo));
|
| | | Register(typeof(HA31E_tagMCGatherSoulHoleInfo), typeof(DTCA31E_tagMCGatherSoulHoleInfo));
|
| | | Register(typeof(HAA1D_tagMCActTotalRechargeInfo), typeof(DTCAA1D_tagMCActTotalRechargeInfo));
|
| | |
| | | Register(typeof(HB204_tagMCIceLodeInfo), typeof(DTCB204_tagMCIceLodeInfo));
|
| | | Register(typeof(HB204_tagMCIceLodeInfo), typeof(DTCB204_tagMCIceLodeInfo));
|
| | | Register(typeof(HA806_tagMCMysticalShopTimeInfo), typeof(DTCA806_tagMCMysticalShopTimeInfo));
|
| | | Register(typeof(HAA0A_tagMCWeekPartyInfo), typeof(DTCAA0A_tagMCWeekPartyInfo));
|
| | | Register(typeof(HAA0B_tagMCWeekPartyPlayerInfo), typeof(DTCAA0B_tagMCWeekPartyPlayerInfo));
|
| | | }
|
| | |
|
| | | private static void Register(Type _pack, Type _business)
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, January 05, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class CrossServerBossConfig : ConfigBase { |
| | | |
| | | public int NPCID { get ; private set ; } |
| | | public int MonsterType { get ; private set ; } |
| | | public int[] RareItemID; |
| | | public string PortraitID { get ; private set; } |
| | | |
| | | public override string getKey() |
| | | { |
| | | return NPCID.ToString(); |
| | | } |
| | | |
| | | public override void Parse() { |
| | | try |
| | | { |
| | | NPCID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0; |
| | | |
| | | MonsterType=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0; |
| | | |
| | | string[] RareItemIDStringArray = rawContents[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | RareItemID = new int[RareItemIDStringArray.Length]; |
| | | for (int i=0;i<RareItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(RareItemIDStringArray[i],out RareItemID[i]); |
| | | } |
| | | |
| | | PortraitID = rawContents[3].Trim(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 25f738f8dea153a42a5f05b4c7748da8 |
| | | timeCreated: 1546666991 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, January 10, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using UnityEngine; |
| | | using System; |
| | | |
| | | namespace TableConfig { |
| | | |
| | | |
| | | public partial class WeekPartyConfig : 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 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; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 59a36668b02da3d4fb47cbc1579228be |
| | | timeCreated: 1547105026 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | AddAsyncTask<GatherSoulComposeConfig>();
|
| | | AddAsyncTask<KingTreasureConfig>();
|
| | | AddAsyncTask<KingTreasureItemConfig>();
|
| | | AddAsyncTask<FashionDressConfig>();
|
| | | AddAsyncTask<CrossServerBossConfig>();
|
| | | AddAsyncTask<WeekPartyConfig>();
|
| | | AddAsyncTask<FashionDressCabinetConfig>();
|
| | | AddAsyncTask<FashionDressConfig>();
|
| | |
|
| | | while (!AllCompleted())
|
| | | {
|
| | |
| | | public class PlayerBaseData
|
| | | {
|
| | |
|
| | | PartDataBuf mainServerDataBuf = new PartDataBuf();//
|
| | | public ushort mainServerMapIdRecord = 0;
|
| | |
|
| | | public string AccID; //_KEY_i_帐号名, 该角色所在的帐号的用户名
|
| | | public uint PlayerID; //_IDT_
|
| | |
| | | public int BasicsDefense;//基础防御
|
| | | public int BasicsScoreAHit;//基础命中
|
| | | public int BasicsDodge;//基础闪避
|
| | | public long treasurePotentialSp
|
| | | {
|
| | | get
|
| | | {
|
| | | public long treasurePotentialSp {
|
| | | get {
|
| | | return ExAttr8 * (long)100000000 + ExAttr7;
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | public void UpdateData(H0102_tagCDBPlayer _serverInfo)
|
| | | {
|
| | | AccID = _serverInfo.AccID;
|
| | | PlayerID = _serverInfo.PlayerID;
|
| | | PlayerName = _serverInfo.PlayerName.Trim().Replace(" ", "");
|
| | | AccState = _serverInfo.AccState;
|
| | | GMLevel = _serverInfo.GMLevel;
|
| | | Sex = _serverInfo.Sex;
|
| | | Job = _serverInfo.Job;
|
| | | LV = _serverInfo.LV;
|
| | | LVEx = _serverInfo.LVEx;
|
| | | LV2 = _serverInfo.LV2;
|
| | | ExpPoint = _serverInfo.ExpPoint;
|
| | | TotalExp = _serverInfo.TotalExp;
|
| | | Family = _serverInfo.Family;
|
| | | FamilyName = _serverInfo.FamilyName.Trim().Replace(" ", "");
|
| | | Gold = _serverInfo.Gold;
|
| | | GoldPaper = _serverInfo.GoldPaper;
|
| | | Silver = _serverInfo.Silver;
|
| | | SilverPaper = _serverInfo.SilverPaper;
|
| | | MapID = _serverInfo.MapID;
|
| | | PosX = _serverInfo.PosX;
|
| | | PosY = _serverInfo.PosY;
|
| | | State = _serverInfo.State;
|
| | | XP = _serverInfo.XP;
|
| | | FreePoint = _serverInfo.FreePoint;
|
| | | FreeSkillPoint = _serverInfo.FreeSkillPoint;
|
| | | STR = _serverInfo.STR;
|
| | | PNE = _serverInfo.PNE;
|
| | | PHY = _serverInfo.PHY;
|
| | | CON = _serverInfo.CON;
|
| | | Setting = _serverInfo.Setting;
|
| | | AttackMode = _serverInfo.AttackMode;
|
| | | FBID = _serverInfo.FBID;
|
| | | ExAttr1 = _serverInfo.ExAttr1;
|
| | | ExAttr2 = _serverInfo.ExAttr2;
|
| | | dungeonLineId = (int)_serverInfo.ExAttr3;
|
| | | ExAttr4 = _serverInfo.ExAttr4;
|
| | | ExAttr5 = _serverInfo.ExAttr5;
|
| | | realmLevel = _serverInfo.OfficialRank;
|
| | | VIPLv = _serverInfo.VIPLv;
|
| | | ExAttr6 = _serverInfo.ExAttr6;
|
| | | ExAttr7 = _serverInfo.ExAttr7;
|
| | | ExAttr8 = _serverInfo.ExAttr8;
|
| | | ExAttr9 = _serverInfo.ExAttr9;
|
| | | bubbleId = _serverInfo.ExAttr10;
|
| | | ExAttr11 = _serverInfo.ExAttr11;
|
| | | ExAttr12 = _serverInfo.ExAttr12;
|
| | | ExAttr13 = _serverInfo.ExAttr13;
|
| | | ExAttr14 = _serverInfo.ExAttr14;
|
| | | HappyPoint = _serverInfo.HappyPoint;
|
| | | faction = _serverInfo.Faction;
|
| | | coinPointTotal = _serverInfo.ChangeCoinPointTotal;
|
| | | godWeaponLV_1 = (int)_serverInfo.ExAttr15;
|
| | | godWeaponLV_2 = (int)_serverInfo.ExAttr16;
|
| | | godWeaponLV_3 = (int)_serverInfo.ExAttr17;
|
| | | godWeaponLV_4 = (int)_serverInfo.ExAttr18;
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | AccID = _serverInfo.AccID;
|
| | | PlayerID = _serverInfo.PlayerID;
|
| | | PlayerName = _serverInfo.PlayerName.Trim().Replace(" ", "");
|
| | | AccState = _serverInfo.AccState;
|
| | | GMLevel = _serverInfo.GMLevel;
|
| | | Sex = _serverInfo.Sex;
|
| | | Job = _serverInfo.Job;
|
| | | LV = _serverInfo.LV;
|
| | | LVEx = _serverInfo.LVEx;
|
| | | LV2 = _serverInfo.LV2;
|
| | | ExpPoint = _serverInfo.ExpPoint;
|
| | | TotalExp = _serverInfo.TotalExp;
|
| | | Family = _serverInfo.Family;
|
| | | FamilyName = _serverInfo.FamilyName.Trim().Replace(" ", "");
|
| | | Gold = _serverInfo.Gold;
|
| | | GoldPaper = _serverInfo.GoldPaper;
|
| | | Silver = _serverInfo.Silver;
|
| | | SilverPaper = _serverInfo.SilverPaper;
|
| | | MapID = _serverInfo.MapID;
|
| | | mainServerMapIdRecord = MapID;
|
| | | PosX = _serverInfo.PosX;
|
| | | PosY = _serverInfo.PosY;
|
| | | State = _serverInfo.State;
|
| | | XP = _serverInfo.XP;
|
| | | FreePoint = _serverInfo.FreePoint;
|
| | | FreeSkillPoint = _serverInfo.FreeSkillPoint;
|
| | | STR = _serverInfo.STR;
|
| | | PNE = _serverInfo.PNE;
|
| | | PHY = _serverInfo.PHY;
|
| | | CON = _serverInfo.CON;
|
| | | Setting = _serverInfo.Setting;
|
| | | AttackMode = _serverInfo.AttackMode;
|
| | | FBID = _serverInfo.FBID;
|
| | | ExAttr1 = _serverInfo.ExAttr1;
|
| | | ExAttr2 = _serverInfo.ExAttr2;
|
| | | dungeonLineId = (int)_serverInfo.ExAttr3;
|
| | | ExAttr4 = _serverInfo.ExAttr4;
|
| | | ExAttr5 = _serverInfo.ExAttr5;
|
| | | realmLevel = _serverInfo.OfficialRank;
|
| | | VIPLv = _serverInfo.VIPLv;
|
| | | ExAttr6 = _serverInfo.ExAttr6;
|
| | | ExAttr7 = _serverInfo.ExAttr7;
|
| | | ExAttr8 = _serverInfo.ExAttr8;
|
| | | ExAttr9 = _serverInfo.ExAttr9;
|
| | | bubbleId = _serverInfo.ExAttr10;
|
| | | ExAttr11 = _serverInfo.ExAttr11;
|
| | | ExAttr12 = _serverInfo.ExAttr12;
|
| | | ExAttr13 = _serverInfo.ExAttr13;
|
| | | ExAttr14 = _serverInfo.ExAttr14;
|
| | | HappyPoint = _serverInfo.HappyPoint;
|
| | | faction = _serverInfo.Faction;
|
| | | coinPointTotal = _serverInfo.ChangeCoinPointTotal;
|
| | | godWeaponLV_1 = (int)_serverInfo.ExAttr15;
|
| | | godWeaponLV_2 = (int)_serverInfo.ExAttr16;
|
| | | godWeaponLV_3 = (int)_serverInfo.ExAttr17;
|
| | | godWeaponLV_4 = (int)_serverInfo.ExAttr18;
|
| | | }
|
| | | else
|
| | | {
|
| | | PlayerName = _serverInfo.PlayerName.Trim().Replace(" ", "");
|
| | | MapID = _serverInfo.MapID;
|
| | | dungeonLineId = (int)_serverInfo.ExAttr3;
|
| | | FBID = _serverInfo.FBID;
|
| | | PosX = _serverInfo.PosX;
|
| | | PosY = _serverInfo.PosY;
|
| | | }
|
| | |
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | {
|
| | |
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.ActorInfo.familyID = Family;
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.CrossSever)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (_serverInfo.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | mainServerDataBuf.PlayerName = PlayerName;
|
| | | mainServerDataBuf.MapID = MapID;
|
| | | mainServerDataBuf.FBID = FBID;
|
| | | mainServerDataBuf.dungeonLineId = dungeonLineId;
|
| | | mainServerDataBuf.PosX = PosX;
|
| | | mainServerDataBuf.PosY = PosY;
|
| | | mainServerDataBuf.HP = HP;
|
| | | }
|
| | | }
|
| | |
|
| | | public void ApplyMainServerDataBuf()
|
| | | public void UpdateData(HA112_tagMCDBPlayer serverInfo)
|
| | | {
|
| | | PlayerName = mainServerDataBuf.PlayerName;
|
| | | MapID = mainServerDataBuf.MapID;
|
| | | FBID = mainServerDataBuf.FBID;
|
| | | dungeonLineId = mainServerDataBuf.dungeonLineId;
|
| | | PosX = mainServerDataBuf.PosX;
|
| | | PosY = mainServerDataBuf.PosY;
|
| | | HP = mainServerDataBuf.HP;
|
| | | AccID = serverInfo.AccID;
|
| | | PlayerID = serverInfo.PlayerID;
|
| | | PlayerName = serverInfo.PlayerName.Trim().Replace(" ", "");
|
| | | AccState = serverInfo.AccState;
|
| | | GMLevel = serverInfo.GMLevel;
|
| | | Sex = serverInfo.Sex;
|
| | | Job = serverInfo.Job;
|
| | | LV = serverInfo.LV;
|
| | | LVEx = serverInfo.LVEx;
|
| | | LV2 = serverInfo.LV2;
|
| | | ExpPoint = serverInfo.ExpPoint;
|
| | | TotalExp = serverInfo.TotalExp;
|
| | | Family = serverInfo.Family;
|
| | | FamilyName = serverInfo.FamilyName.Trim().Replace(" ", "");
|
| | | Gold = serverInfo.Gold;
|
| | | GoldPaper = serverInfo.GoldPaper;
|
| | | Silver = serverInfo.Silver;
|
| | | SilverPaper = serverInfo.SilverPaper;
|
| | | MapID = serverInfo.MapID;
|
| | | if (serverInfo.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | mainServerMapIdRecord = MapID;
|
| | | }
|
| | | PosX = serverInfo.PosX;
|
| | | PosY = serverInfo.PosY;
|
| | | State = serverInfo.State;
|
| | | XP = serverInfo.XP;
|
| | | FreePoint = serverInfo.FreePoint;
|
| | | FreeSkillPoint = serverInfo.FreeSkillPoint;
|
| | | STR = serverInfo.STR;
|
| | | PNE = serverInfo.PNE;
|
| | | PHY = serverInfo.PHY;
|
| | | CON = serverInfo.CON;
|
| | | AttackMode = serverInfo.AttackMode;
|
| | | FBID = serverInfo.FBID;
|
| | | ExAttr1 = serverInfo.ExAttr1;
|
| | | ExAttr2 = serverInfo.ExAttr2;
|
| | | dungeonLineId = (int)serverInfo.ExAttr3;
|
| | | ExAttr4 = serverInfo.ExAttr4;
|
| | | ExAttr5 = serverInfo.ExAttr5;
|
| | | realmLevel = serverInfo.OfficialRank;
|
| | | VIPLv = serverInfo.VIPLv;
|
| | | ExAttr6 = serverInfo.ExAttr6;
|
| | | ExAttr7 = serverInfo.ExAttr7;
|
| | | ExAttr8 = serverInfo.ExAttr8;
|
| | | ExAttr9 = serverInfo.ExAttr9;
|
| | | bubbleId = serverInfo.ExAttr10;
|
| | | ExAttr11 = serverInfo.ExAttr11;
|
| | | ExAttr12 = serverInfo.ExAttr12;
|
| | | ExAttr13 = serverInfo.ExAttr13;
|
| | | ExAttr14 = serverInfo.ExAttr14;
|
| | | HappyPoint = serverInfo.HappyPoint;
|
| | | faction = serverInfo.Faction;
|
| | | coinPointTotal = serverInfo.ChangeCoinPointTotal;
|
| | | godWeaponLV_1 = (int)serverInfo.ExAttr15;
|
| | | godWeaponLV_2 = (int)serverInfo.ExAttr16;
|
| | | godWeaponLV_3 = (int)serverInfo.ExAttr17;
|
| | | godWeaponLV_4 = (int)serverInfo.ExAttr18;
|
| | | HP = serverInfo.HP;
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.ActorInfo.serverDie = mainServerDataBuf.heroServerDie;
|
| | | PlayerDatas.Instance.hero.ActorInfo.ResetHp((int)serverInfo.HP);
|
| | | }
|
| | | }
|
| | |
|
| | | public void RecordMainServerData(bool isMainServerData, PlayerDataRefresh playerDataType, uint value)
|
| | | {
|
| | | if (!isMainServerData)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | switch (playerDataType)
|
| | | {
|
| | | case PlayerDataRefresh.PlayerName:
|
| | | break;
|
| | | case PlayerDataRefresh.MapID:
|
| | | mainServerDataBuf.MapID = (ushort)value;
|
| | | break;
|
| | | case PlayerDataRefresh.FBID:
|
| | | mainServerDataBuf.FBID = (byte)value;
|
| | | break;
|
| | | case PlayerDataRefresh.ExAttr3:
|
| | | mainServerDataBuf.dungeonLineId = (byte)value;
|
| | | break;
|
| | | case PlayerDataRefresh.PosX:
|
| | | mainServerDataBuf.PosX = (ushort)value;
|
| | | break;
|
| | | case PlayerDataRefresh.PosY:
|
| | | mainServerDataBuf.PosY = (ushort)value;
|
| | | break;
|
| | | case PlayerDataRefresh.HP:
|
| | | mainServerDataBuf.HP = value;
|
| | | break;
|
| | | default:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | public void RecordMainServerDie(bool isMainServerData, bool serverDie)
|
| | | {
|
| | | mainServerDataBuf.heroServerDie = serverDie;
|
| | | }
|
| | |
|
| | | public class PartDataBuf
|
| | | {
|
| | | public string PlayerName;
|
| | | public ushort MapID;
|
| | | public byte FBID;
|
| | | public int dungeonLineId;
|
| | | public ushort PosX;
|
| | | public ushort PosY;
|
| | | public uint HP;
|
| | | public bool heroServerDie;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void UpdatePlayerData(HA112_tagMCDBPlayer data)
|
| | | {
|
| | | baseData.UpdateData(data);
|
| | | if (InitPlayerInfoEvent != null)
|
| | | {
|
| | | InitPlayerInfoEvent();
|
| | | }
|
| | | }
|
| | |
|
| | | public void FightRefreshPlayerHp(uint hp)
|
| | | {
|
| | | RefreshProperty(false, PlayerDataRefresh.HP, hp);
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.MapID:
|
| | | baseData.MapID = (ushort)value;
|
| | | baseData.RecordMainServerData(isMainServerData, _type, value);
|
| | | if (isMainServerData)
|
| | | {
|
| | | baseData.mainServerMapIdRecord = baseData.MapID;
|
| | | }
|
| | | break;
|
| | | case PlayerDataRefresh.PosX:
|
| | | baseData.PosX = (ushort)value;//角色坐标x
|
| | | baseData.RecordMainServerData(isMainServerData, _type, value);
|
| | | break;
|
| | | case PlayerDataRefresh.PosY:
|
| | | baseData.PosY = (ushort)value;//角色坐标y
|
| | | baseData.RecordMainServerData(isMainServerData, _type, value);
|
| | | break;
|
| | | case PlayerDataRefresh.State:
|
| | | baseData.State = (byte)value;
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.HP:
|
| | | baseData.HP = value;
|
| | | baseData.RecordMainServerData(isMainServerData, _type, value);
|
| | | break;
|
| | | case PlayerDataRefresh.MaxMP:
|
| | | extersion.MaxMP = (int)value;
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.FBID:
|
| | | baseData.FBID = (byte)value;
|
| | | baseData.RecordMainServerData(isMainServerData, _type, value);
|
| | | break;
|
| | | case PlayerDataRefresh.FamilyLV:
|
| | | break;
|
| | |
| | | break;
|
| | | case PlayerDataRefresh.ExAttr3:
|
| | | baseData.dungeonLineId = (int)value;
|
| | | baseData.RecordMainServerData(isMainServerData, _type, value);
|
| | | break;
|
| | | case PlayerDataRefresh.ExAttr4:
|
| | | baseData.ExAttr4 = value;
|
| | |
| | | var oldExAttr5 = baseData.ExAttr5;
|
| | | baseData.ExAttr5 = value;
|
| | |
|
| | | if (oldExAttr5 == 1 && value == 0)
|
| | | if (oldExAttr5 > 2 && value <= 2)
|
| | | {
|
| | | if (GameNetSystem.Instance.crossServerConnected_Loigc)
|
| | | {
|
| | | GameNetSystem.Instance.crossServerConnected_Loigc = false;
|
| | | LoadingWin.targetMapResId = 1;
|
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | GameNetSystem.Instance.Reconnect();
|
| | |
|
| | | var sendInfo = new CA108_tagCMRefreshMainServerRole();
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | baseData.MapID = baseData.mainServerMapIdRecord;
|
| | | StageManager.Instance.Load<DungeonStage>(baseData.MapID, GameNetSystem.SocketType.CrossSever, true);
|
| | | extersion.pkState = 0;
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | UpdateRedpoint();
|
| | | beforeRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | serverInited = true;
|
| | |
|
| | | var realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | bool satisfyChallenge = false;
|
| | | if (config != null)
|
| | | {
|
| | | satisfyChallenge = realmPoint >= config.NeedPoint;
|
| | | }
|
| | | if (realmDungeonState && !satisfyChallenge)
|
| | | {
|
| | | realmDungeonState = false;
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A1 08 刷新主服角色信息 #tagCMRefreshMainServerRole |
| | | |
| | | public class CA108_tagCMRefreshMainServerRole : GameNetPackBasic |
| | | { |
| | | |
| | | public CA108_tagCMRefreshMainServerRole() |
| | | { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xA108; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 00ad780b301cfe1409358305dd0909f3 |
| | | timeCreated: 1546926663 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // C1 05 进入跨服地图 #tagCMEnterCrossServer |
| | | |
| | | public class CC105_tagCMEnterCrossServer : GameNetPackBasic |
| | | { |
| | | public uint DataMapID; |
| | | |
| | | public CC105_tagCMEnterCrossServer() |
| | | { |
| | | combineCmd = (ushort)0x03FE; |
| | | _cmd = (ushort)0xC105; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | WriteBytes(DataMapID, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 26afd66a72c637343b3db35186a77c4a |
| | | timeCreated: 1546828716 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | if ((PlayerDataRefresh)vNetData.RefreshType == PlayerDataRefresh.HP) |
| | | { |
| | | bool _sync = false; |
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne()) |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetData.socketType == GameNetSystem.SocketType.CrossSever) |
| | | { |
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (vNetData.socketType == GameNetSystem.SocketType.Main)
|
| | | {
|
| | | PlayerDatas.Instance.baseData.RecordMainServerDie(true, false);
|
| | | }
|
| | |
|
| | | DeadModel.RebornSuccess(vNetData);
|
| | |
|
| | | GActorPlayerBase _player = GAMgr.Instance.GetBySID(vNetData.PlayerID) as GActorPlayerBase;
|
| | |
| | |
|
| | | H0609_tagPlayerDie vNetData = vNetPack as H0609_tagPlayerDie;
|
| | |
|
| | | if (vNetData.socketType==GameNetSystem.SocketType.Main)
|
| | | {
|
| | | PlayerDatas.Instance.baseData.RecordMainServerDie(true,true);
|
| | | }
|
| | |
|
| | | DeadModel.PlayerDie(vNetData.PlayerID);
|
| | |
|
| | | GActorPlayerBase _player = GAMgr.Instance.GetBySID(vNetData.PlayerID) as GActorPlayerBase;
|
| | |
| | | #endif
|
| | |
|
| | | // 跨服竞技场不检测反击逻辑
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if(CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | return;
|
| | | }
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 08, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | |
| | | public class DTCA112_tagMCDBPlayer : DtcBasic |
| | | { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HA112_tagMCDBPlayer; |
| | | |
| | | PlayerDatas.Instance.UpdatePlayerData(package); |
| | | |
| | | var hero = PlayerDatas.Instance.hero; |
| | | if (hero != null && !hero.ActorInfo.serverDie) |
| | | { |
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID; |
| | | hero.RequestName(); |
| | | hero.SwitchRedName(StatusMgr.Instance.IsExist(playerId, StatusMgr.Instance.redNameBuffID)); |
| | | hero.IdleImmediate(); |
| | | hero.State = E_ActorState.Idle; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 8fbe251d30665354a83e20401553ce87 |
| | | timeCreated: 1546927075 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | |
| | | if (objId == PlayerDatas.Instance.PlayerId) |
| | | { |
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne()) |
| | | if (CrossServerUtility.IsCrossServer()) |
| | | { |
| | | if (vNetDatas.socketType == GameNetSystem.SocketType.CrossSever) |
| | | { |
| | |
| | |
|
| | | int _effectID = 1040;
|
| | |
|
| | | if(CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if(CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | _effectID = 5206;
|
| | | }
|
| | |
| | | public class DTCA714_tagMCNPCCntList : DtcBasic { |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | |
| | | var package = vNetPack as HA714_tagMCNPCCntList; |
| | | |
| | | model.UpdateMonsterSurplusInfo(package); |
| | | |
| | | crossServerBossModel.UpdateMonsterSurplusInfo(package); |
| | | } |
| | | |
| | | } |
| | |
| | | { |
| | | |
| | | DogzDungeonModel model { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HA904_tagGCDogzNPCRefreshTime; |
| | | model.UpdateBoxOrEliteRefreshTime(package); |
| | | crossServerBossModel.UpdateBoxOrEliteRefreshTime(package); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // AA 0A 周狂欢活动信息 #tagMCWeekPartyInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCAA0A_tagMCWeekPartyInfo : DtcBasic {
OpenServiceAchievementModel model { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HAA0A_tagMCWeekPartyInfo vNetData = vNetPack as HAA0A_tagMCWeekPartyInfo;
if (vNetData == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | model.WeekPartyInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 72692874cbc2b764695a9f3d16eaa2ef |
| | | timeCreated: 1546914880 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // AA 0B 周狂欢玩家活动信息 #tagMCWeekPartyPlayerInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCAA0B_tagMCWeekPartyPlayerInfo : DtcBasic {
|
| | |
|
| | | OpenServiceAchievementModel model { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HAA0B_tagMCWeekPartyPlayerInfo vNetData = vNetPack as HAA0B_tagMCWeekPartyPlayerInfo;
if (vNetData == null)
|
| | | {
|
| | | return;
|
| | | }
model.WeekPartyPlayerInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 58aba46fc0042c3418fb8532a50ab92d |
| | | timeCreated: 1546914879 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | // C0 05 跨服PK赛季排行榜 #tagGCCrossRealmPKBillboardInfo
|
| | |
|
| | | public class DTCC005_tagGCCrossRealmPKBillboardInfo : DtcBasic
|
| | | {
CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | {
CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | |
| | |
|
| | | public class DTCC102_tagMCCrossRealmPKAwardState : DtcBasic {
|
| | |
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HC102_tagMCCrossRealmPKAwardState vNetData = vNetPack as HC102_tagMCCrossRealmPKAwardState;
crossServerRewardModel.CrossRealmPKAwardState(vNetData);
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 07, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCC104_tagMCPrepareEnterCrossServer : DtcBasic |
| | | { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HC104_tagMCPrepareEnterCrossServer; |
| | | |
| | | var config = DTCA127_tagMCStartChangeMap.GetMapResourcesConfig((int)package.DataMapID, 0); |
| | | LoadingWin.targetMapResId = config.ID; |
| | | WindowCenter.Instance.Open<LoadingWin>(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2b44152c29267a4479cd732d48140bfa |
| | | timeCreated: 1546825242 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 07, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCC105_tagMCStartEnterCrossServer : DtcBasic |
| | | { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HC105_tagMCStartEnterCrossServer; |
| | | |
| | | CrossServerLogin.Instance.CrossServerBossLogin(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0786c842fa939b84498b5b6c424da049 |
| | | timeCreated: 1546825318 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 07, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Snxxz.UI; |
| | | |
| | | public class DTCC106_tagMCEnterCrossServerError : DtcBasic |
| | | { |
| | | |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | | { |
| | | base.Done(vNetPack); |
| | | var package = vNetPack as HC106_tagMCEnterCrossServerError; |
| | | |
| | | WindowCenter.Instance.Close<LoadingWin>(); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1e3fdd726a350964a94b756e1ed8e167 |
| | | timeCreated: 1546825349 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A1 12 玩家初始化 #tagMCDBPlayer |
| | | |
| | | public class HA112_tagMCDBPlayer : GameNetPackBasic |
| | | { |
| | | public string AccID; //帐号名, 该角色所在的帐号的用户名 |
| | | public uint PlayerID; |
| | | public string PlayerName; //size = 14 |
| | | public byte AccState; //0: 未创建, 1: 创建OK,正常登录 2:封号 3:已删除 |
| | | public byte GMLevel; //GM等级, 0:不是GM >=1 : GM的等级 |
| | | public byte Sex; //性别 |
| | | public byte Job; //职业, 0.新手 1.游侠 2.战士 3.弓箭手 4.术士 5.道士 |
| | | public ushort ReincarnationLv; // 转生等级 |
| | | public ushort LV; //等级 |
| | | public ushort LVEx; //玩家等级副本,用于转生 |
| | | public ushort LV2; //大师等级 |
| | | public uint ExpPoint; //扩充经验点数 |
| | | public uint TotalExp; //总经验 |
| | | public uint Family; //家族 |
| | | public string FamilyName; //家族名称 |
| | | public int TeamHornor; //组队荣誉 |
| | | public int FamilyHornor; //家族荣耀 |
| | | public int FamilyActiveValue; //家族活跃度 |
| | | public int LastWeekFamilyActiveValue; //上周家族活跃度 |
| | | public int CountryHornor; //本周国家功勋值 |
| | | public int CountryLastWeekHornor; //上周国家功勋值 |
| | | public uint Mate; |
| | | public uint Gold; //金子 |
| | | public uint GoldPaper; //金票 |
| | | public uint Silver; //银子 |
| | | public uint SilverPaper; //银票 |
| | | public uint FightPoint; //战斗值 |
| | | public uint HappyPoint; //脱机挂时长(秒) |
| | | public byte LineID; //角色所在线路 |
| | | public ushort MapID; //角色所在地图 |
| | | public ushort PosX; //角色坐标 |
| | | public ushort PosY; |
| | | public ushort RebornMapID; //重生点地图ID |
| | | public ushort RebornPosX; |
| | | public ushort RebornPosY; |
| | | public byte State; //角色状态 0.正常在线1.脱机挂在线 2脱机挂死亡 |
| | | public uint HP; //当前HP |
| | | public uint XP; //当前XP |
| | | public ushort HPRestoreSetting; //少于这个值%自动喝血 |
| | | public ushort MPRestoreSetting; //少于这个值%自动喝魔 |
| | | public uint FreePoint; //未分配点数 |
| | | public uint FreeSkillPoint; //未分配的技能点 |
| | | public int BaseSTR; //裸体力量 |
| | | public int BasePNE; //裸体真元 |
| | | public int BasePHY; //裸体筋骨 |
| | | public int BaseCON; //裸体体魄 |
| | | public int STR; //力量 |
| | | public int PNE; //真元 |
| | | public int PHY; //筋骨 |
| | | public int CON; //体魄 |
| | | public ushort PKValue; //衡量PK能力的一项属性,由攻防计算而得 |
| | | public byte BackpackLV; //背包等级 |
| | | public byte WarehouseLV; //仓库等级 |
| | | public uint TeamID; //队伍ID |
| | | public byte UseGoldType; //默认用金子/金票 类型为MoneyType |
| | | public byte UseSilverType; //默认用的银子/银票 |
| | | public byte AttackMode; //攻击模式 |
| | | public uint LastWeekOnlineTime; //上周在线时间 |
| | | public byte FBID; //fb id |
| | | public byte FamilyLV; //家族等级 |
| | | public uint FriendFavor; //好友人气值 |
| | | public uint Energy; //精力值 |
| | | public uint EquipShowSwitch; //装备显示开关 |
| | | public uint LuckValue; //幸运值 |
| | | public uint ExAttr1; //扩展属性1,各项目专用 |
| | | public uint ExAttr2; //扩展属性2,各项目专用 |
| | | public uint ExAttr3; //扩展属性3,各项目专用 |
| | | public uint ExAttr4; //扩展属性4,各项目专用 |
| | | public uint ExAttr5; //扩展属性5,各项目专用 |
| | | public byte Faction; //阵营 |
| | | public uint InfamyValue; //恶名值 |
| | | public byte OfficialRank; //官阶,官职等级 |
| | | public uint ChangeCoinPointTotal; //兑换的点数总计 |
| | | public byte VIPLv; //VIP等级 |
| | | public byte VIPLvForPhone; //移动VIP等级 |
| | | public uint ExAttr6; //扩展属性6,各项目专用 |
| | | public uint ExAttr7; //扩展属性7,各项目专用 |
| | | public uint ExAttr8; //扩展属性8,各项目专用 |
| | | public uint ExAttr9; //扩展属性9,各项目专用 |
| | | public uint ExAttr10; //扩展属性10,各项目专用 |
| | | public uint ModelMark; // 变形模型mark |
| | | public uint ExAttr11; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr12; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr13; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr14; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint OperateInfo; //玩家附加运营商信息 |
| | | public string Operate; //所属运营商平台名 |
| | | public uint ServerID; //所属区服ID |
| | | public uint ExAttr15; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr16; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr17; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr18; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr19; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | public uint ExAttr20; //预留的扩展属性字段,用来存放项目特定的属性 |
| | | |
| | | public HA112_tagMCDBPlayer() |
| | | { |
| | | _cmd = (ushort)0xA112; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out AccID, vBytes, NetDataType.Chars, 65); |
| | | TransBytes(out PlayerID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out PlayerName, vBytes, NetDataType.Chars, 33); |
| | | TransBytes(out AccState, vBytes, NetDataType.BYTE); |
| | | TransBytes(out GMLevel, vBytes, NetDataType.BYTE); |
| | | TransBytes(out Sex, vBytes, NetDataType.BYTE); |
| | | TransBytes(out Job, vBytes, NetDataType.BYTE); |
| | | TransBytes(out ReincarnationLv, vBytes, NetDataType.WORD); |
| | | TransBytes(out LV, vBytes, NetDataType.WORD); |
| | | TransBytes(out LVEx, vBytes, NetDataType.WORD); |
| | | TransBytes(out LV2, vBytes, NetDataType.WORD); |
| | | TransBytes(out ExpPoint, vBytes, NetDataType.DWORD); |
| | | TransBytes(out TotalExp, vBytes, NetDataType.DWORD); |
| | | TransBytes(out Family, vBytes, NetDataType.DWORD); |
| | | TransBytes(out FamilyName, vBytes, NetDataType.Chars, 33); |
| | | TransBytes(out TeamHornor, vBytes, NetDataType.Int); |
| | | TransBytes(out FamilyHornor, vBytes, NetDataType.Int); |
| | | TransBytes(out FamilyActiveValue, vBytes, NetDataType.Int); |
| | | TransBytes(out LastWeekFamilyActiveValue, vBytes, NetDataType.Int); |
| | | TransBytes(out CountryHornor, vBytes, NetDataType.Int); |
| | | TransBytes(out CountryLastWeekHornor, vBytes, NetDataType.Int); |
| | | TransBytes(out Mate, vBytes, NetDataType.DWORD); |
| | | TransBytes(out Gold, vBytes, NetDataType.DWORD); |
| | | TransBytes(out GoldPaper, vBytes, NetDataType.DWORD); |
| | | TransBytes(out Silver, vBytes, NetDataType.DWORD); |
| | | TransBytes(out SilverPaper, vBytes, NetDataType.DWORD); |
| | | TransBytes(out FightPoint, vBytes, NetDataType.DWORD); |
| | | TransBytes(out HappyPoint, vBytes, NetDataType.DWORD); |
| | | TransBytes(out LineID, vBytes, NetDataType.BYTE); |
| | | TransBytes(out MapID, vBytes, NetDataType.WORD); |
| | | TransBytes(out PosX, vBytes, NetDataType.WORD); |
| | | TransBytes(out PosY, vBytes, NetDataType.WORD); |
| | | TransBytes(out RebornMapID, vBytes, NetDataType.WORD); |
| | | TransBytes(out RebornPosX, vBytes, NetDataType.WORD); |
| | | TransBytes(out RebornPosY, vBytes, NetDataType.WORD); |
| | | TransBytes(out State, vBytes, NetDataType.BYTE); |
| | | TransBytes(out HP, vBytes, NetDataType.DWORD); |
| | | TransBytes(out XP, vBytes, NetDataType.DWORD); |
| | | TransBytes(out HPRestoreSetting, vBytes, NetDataType.WORD); |
| | | TransBytes(out MPRestoreSetting, vBytes, NetDataType.WORD); |
| | | TransBytes(out FreePoint, vBytes, NetDataType.DWORD); |
| | | TransBytes(out FreeSkillPoint, vBytes, NetDataType.DWORD); |
| | | TransBytes(out BaseSTR, vBytes, NetDataType.Int); |
| | | TransBytes(out BasePNE, vBytes, NetDataType.Int); |
| | | TransBytes(out BasePHY, vBytes, NetDataType.Int); |
| | | TransBytes(out BaseCON, vBytes, NetDataType.Int); |
| | | TransBytes(out STR, vBytes, NetDataType.Int); |
| | | TransBytes(out PNE, vBytes, NetDataType.Int); |
| | | TransBytes(out PHY, vBytes, NetDataType.Int); |
| | | TransBytes(out CON, vBytes, NetDataType.Int); |
| | | TransBytes(out PKValue, vBytes, NetDataType.WORD); |
| | | TransBytes(out BackpackLV, vBytes, NetDataType.BYTE); |
| | | TransBytes(out WarehouseLV, vBytes, NetDataType.BYTE); |
| | | TransBytes(out TeamID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out UseGoldType, vBytes, NetDataType.BYTE); |
| | | TransBytes(out UseSilverType, vBytes, NetDataType.BYTE); |
| | | TransBytes(out AttackMode, vBytes, NetDataType.BYTE); |
| | | TransBytes(out LastWeekOnlineTime, vBytes, NetDataType.DWORD); |
| | | TransBytes(out FBID, vBytes, NetDataType.BYTE); |
| | | TransBytes(out FamilyLV, vBytes, NetDataType.BYTE); |
| | | TransBytes(out FriendFavor, vBytes, NetDataType.DWORD); |
| | | TransBytes(out Energy, vBytes, NetDataType.DWORD); |
| | | TransBytes(out EquipShowSwitch, vBytes, NetDataType.DWORD); |
| | | TransBytes(out LuckValue, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr1, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr2, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr3, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr4, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr5, vBytes, NetDataType.DWORD); |
| | | TransBytes(out Faction, vBytes, NetDataType.BYTE); |
| | | TransBytes(out InfamyValue, vBytes, NetDataType.DWORD); |
| | | TransBytes(out OfficialRank, vBytes, NetDataType.BYTE); |
| | | TransBytes(out ChangeCoinPointTotal, vBytes, NetDataType.DWORD); |
| | | TransBytes(out VIPLv, vBytes, NetDataType.BYTE); |
| | | TransBytes(out VIPLvForPhone, vBytes, NetDataType.BYTE); |
| | | TransBytes(out ExAttr6, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr7, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr8, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr9, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr10, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ModelMark, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr11, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr12, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr13, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr14, vBytes, NetDataType.DWORD); |
| | | TransBytes(out OperateInfo, vBytes, NetDataType.DWORD); |
| | | TransBytes(out Operate, vBytes, NetDataType.Chars, 15); |
| | | TransBytes(out ServerID, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr15, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr16, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr17, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr18, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr19, vBytes, NetDataType.DWORD); |
| | | TransBytes(out ExAttr20, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 419df965f5258b8418569878ad174b5b |
| | | timeCreated: 1546926744 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // AA 0A 周狂欢活动信息 #tagMCWeekPartyInfo
|
| | |
|
| | | public class HAA0A_tagMCWeekPartyInfo : GameNetPackBasic {
|
| | | public string StartDate; // 开始日期 y-m-d
|
| | | public string EndtDate; // 结束日期 y-m-d
|
| | | public byte IsDayReset; //是否每天重置
|
| | | public byte ResetType; // 重置类型,0-0点重置;1-5点重置
|
| | | public ushort LimitLV; // 限制等级
|
| | | public byte DayCnt; // 天数
|
| | | public tagMCWeekPartyDayInfo[] DayInfoList; // 每天模板
|
| | | public byte TCount; // 模板数
|
| | | public tagMCWeekPartyAction[] ActionInfo; // 活动模板信息
|
| | |
|
| | | public HAA0A_tagMCWeekPartyInfo () {
|
| | | _cmd = (ushort)0xAA0A;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out StartDate, vBytes, NetDataType.Chars, 10);
|
| | | TransBytes (out EndtDate, vBytes, NetDataType.Chars, 10);
|
| | | 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 tagMCWeekPartyDayInfo[DayCnt];
|
| | | for (int i = 0; i < DayCnt; i ++) {
|
| | | DayInfoList[i] = new tagMCWeekPartyDayInfo();
|
| | | 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 tagMCWeekPartyItem[DayInfoList[i].PCount];
|
| | | for (int j = 0; j < DayInfoList[i].PCount; j ++) {
|
| | | DayInfoList[i].PItemInfo[j] = new tagMCWeekPartyItem();
|
| | | 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 tagMCWeekPartyAction[TCount];
|
| | | for (int i = 0; i < TCount; i ++) {
|
| | | ActionInfo[i] = new tagMCWeekPartyAction();
|
| | | TransBytes (out ActionInfo[i].TemplateID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out ActionInfo[i].ActionType, vBytes, NetDataType.WORD);
|
| | | TransBytes (out ActionInfo[i].TotalTimes, vBytes, NetDataType.BYTE);
|
| | | 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 tagMCWeekPartyItem[ActionInfo[i].Count];
|
| | | for (int j = 0; j < ActionInfo[i].Count; j ++) {
|
| | | ActionInfo[i].ItemInfo[j] = new tagMCWeekPartyItem();
|
| | | 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 tagMCWeekPartyItem {
|
| | | public ushort NeedPoint; // 领奖需要积分
|
| | | public uint ItemID; // 物品ID
|
| | | public ushort ItemCnt; // 物品数量
|
| | | public byte IsBind; // 是否绑定
|
| | | }
|
| | |
|
| | | public struct tagMCWeekPartyAction {
|
| | | public uint TemplateID; // 模板ID
|
| | | public ushort ActionType; // 活动类别
|
| | | public byte TotalTimes; // 可完成的总次数,0表示不限次数
|
| | | public uint SingleTimes; // 单次领奖需要的次数
|
| | | public uint Point; // 单次领奖积分
|
| | | public byte Count; // 物品数
|
| | | public tagMCWeekPartyItem[] ItemInfo; // 物品信息
|
| | | }
|
| | |
|
| | | public struct tagMCWeekPartyDayInfo {
|
| | | public byte ActCnt; // 数量
|
| | | public ushort[] TemplateList; // 模板列表
|
| | | public byte PCount; // 物品数
|
| | | public tagMCWeekPartyItem[] PItemInfo; // 物品信息
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 105a5325e78cad84baafa89fb8522311 |
| | | timeCreated: 1546914879 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // AA 0B 周狂欢玩家活动信息 #tagMCWeekPartyPlayerInfo
|
| | |
|
| | | public class HAA0B_tagMCWeekPartyPlayerInfo : GameNetPackBasic {
|
| | | public byte Count;
|
| | | public tagMCWeekPartyDayPlayerInfo[] DayInfoList; //活动完成次数信息
|
| | |
|
| | | public HAA0B_tagMCWeekPartyPlayerInfo () {
|
| | | _cmd = (ushort)0xAA0B;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Count, vBytes, NetDataType.BYTE);
|
| | | DayInfoList = new tagMCWeekPartyDayPlayerInfo[Count];
|
| | | for (int i = 0; i < Count; i ++) {
|
| | | DayInfoList[i] = new tagMCWeekPartyDayPlayerInfo();
|
| | | 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 tagMCWeekPartyTaskInfo[DayInfoList[i].ACount];
|
| | | for (int j = 0; j < DayInfoList[i].ACount; j ++) {
|
| | | DayInfoList[i].TaskList[j] = new tagMCWeekPartyTaskInfo();
|
| | | 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 tagMCWeekPartyDayPlayerInfo {
|
| | | public uint DayIndex; //第X天
|
| | | public uint Point; //积分
|
| | | public uint AwardRecord; //积分领奖记录
|
| | | public uint ACount; //任务条目数
|
| | | public tagMCWeekPartyTaskInfo[] TaskList; //活动完成次数信息
|
| | | }
|
| | |
|
| | | public struct tagMCWeekPartyTaskInfo {
|
| | | public ushort TemplateID; // 模板ID
|
| | | public ushort CurTimes; //已完成次数
|
| | | public ushort GotTimes; //已领取次数
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 1ed838c254d198840b0c0e9e5da66eaa |
| | | timeCreated: 1546914879 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // C1 04 准备进入跨服服务器 #tagMCPrepareEnterCrossServer |
| | | |
| | | public class HC104_tagMCPrepareEnterCrossServer : GameNetPackBasic |
| | | { |
| | | public uint DataMapID; |
| | | |
| | | public HC104_tagMCPrepareEnterCrossServer() |
| | | { |
| | | _cmd = (ushort)0xC104; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | TransBytes(out DataMapID, vBytes, NetDataType.DWORD); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 98f4a5e04472dfb45bcb0f4a45cba533 |
| | | timeCreated: 1546825028 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // C1 05 开始进入跨服服务器 #tagMCStartEnterCrossServer |
| | | |
| | | public class HC105_tagMCStartEnterCrossServer : GameNetPackBasic |
| | | { |
| | | |
| | | public HC105_tagMCStartEnterCrossServer() |
| | | { |
| | | _cmd = (ushort)0xC105; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 906cd1341ae793e41914fe9c4ba3d064 |
| | | timeCreated: 1546825109 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // C1 06 进入跨服服务器错误 #tagMCEnterCrossServerError |
| | | |
| | | public class HC106_tagMCEnterCrossServerError : GameNetPackBasic |
| | | { |
| | | |
| | | public HC106_tagMCEnterCrossServerError() |
| | | { |
| | | _cmd = (ushort)0xC106; |
| | | } |
| | | |
| | | public override void ReadFromBytes(byte[] vBytes) |
| | | { |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 85615312c67a6db4abf5d1adacad3aff |
| | | timeCreated: 1546825157 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | string _chkKey = (PlayerDatas.Instance.baseData.MapID * 100 + PlayerDatas.Instance.baseData.dungeonLineId).ToString();
|
| | |
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | _chkKey = (PlayerDatas.Instance.baseData.MapID * 100).ToString();
|
| | | }
|
| | |
| | | // 未到达路点则寻路至路点
|
| | | if (_chkDistSqrt > .25f)
|
| | | {
|
| | | _hero.MoveToPosition(m_PointList[m_Index], 0, CrossServerRewardModel.IsCrossServerOneVsOne());
|
| | | _hero.MoveToPosition(m_PointList[m_Index], 0, CrossServerUtility.IsCrossServerOneVsOne());
|
| | | }
|
| | | // 到达路点就去往下一个路点
|
| | | else
|
| | |
| | | #if UNITY_EDITOR
|
| | | && RuntimeLogUtility.s_forceAutoFight
|
| | | #endif
|
| | | && !CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | && !CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | if (!aiHandler.IsAuto() && !BossShowModel.Instance.BossShowing)
|
| | | {
|
| | |
| | | MapModel _model = ModelCenter.Instance.GetModel<MapModel>();
|
| | | GActor _npc = null;
|
| | | // 加入判断是否世界BOSS判断
|
| | | var _worldBoss = Config.Instance.Get<WorldBossConfig>(npcID);
|
| | | var dogzBoss = Config.Instance.Get<DogzDungeonConfig>(npcID);
|
| | | var isWorldBoss = Config.Instance.ContainKey<WorldBossConfig>(npcID);
|
| | | var isDogzBoss = Config.Instance.ContainKey<DogzDungeonConfig>(npcID);
|
| | | var isCrossServerBoss = Config.Instance.ContainKey<CrossServerBossConfig>(npcID);
|
| | |
|
| | | if (_findLocation)
|
| | | {
|
| | | var _mapConfig = Config.Instance.Get<MapConfig>(_npcLocation.mapId);
|
| | | // 中立地图
|
| | | if (_mapConfig.Camp == 5 && (_worldBoss != null || dogzBoss != null))
|
| | | if (_mapConfig.Camp == 5 && (isWorldBoss || isDogzBoss||isCrossServerBoss))
|
| | | {
|
| | | if (_npcLocation.mapId == PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | FairyGrabBossConfig _fairyBoss = Config.Instance.Get<FairyGrabBossConfig>(npcID);
|
| | | bool _isBoss = _worldBoss != null || _fairyBoss != null || dogzBoss != null;
|
| | | var isFairyBoss = Config.Instance.ContainKey<FairyGrabBossConfig>(npcID);
|
| | | bool _isBoss = isWorldBoss || isDogzBoss || isCrossServerBoss|| isFairyBoss ;
|
| | | if (_isBoss && _findLocation)
|
| | | {
|
| | | // Debug.LogFormat("目标是boss");
|
| | |
| | | LineID = lineID,
|
| | | ExData1 = (uint)_npcId
|
| | | };
|
| | | GameNetSystem.Instance.SendInfo(_transfer);
|
| | |
|
| | | if (GameNetSystem.Instance.crossServerSocketConnected)
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(_transfer);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(_transfer);
|
| | | }
|
| | |
|
| | | return true;
|
| | | }
|
| | |
| | | {
|
| | | C0701_tagPickUpItem _proto = new C0701_tagPickUpItem();
|
| | | _proto.MapItemID = (uint)m_MapItemIdList[i];
|
| | | GameNetSystem.Instance.SendInfo(_proto);
|
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(_proto);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(_proto);
|
| | | }
|
| | |
|
| | | //Debug.LogFormat("发送捡起物品: {0}的包", m_MapItemIdList[i]);
|
| | | //ReleaseClientID(m_MapItemIdList[i]);
|
| | |
| | | CA312_tagCMGuardPickupItem _proto = new CA312_tagCMGuardPickupItem();
|
| | | _proto.MapItemID = guardSendPickList.ToArray();
|
| | | _proto.ItemCount = (ushort)_proto.MapItemID.Length;
|
| | | GameNetSystem.Instance.SendInfo(_proto);
|
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(_proto);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(_proto);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | WindowCenter.Instance.Open<AntiAddictionWin>();
|
| | | }
|
| | |
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | _hero.SkillMgr.ResetAllCD();
|
| | | }
|
| | |
| | |
|
| | | private void OnEnterNormalDungeon()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 0)
|
| | | if (!CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonFightWin>();
|
| | | }
|
| | |
| | | #endif |
| | | } |
| | | |
| | | public CrossServerRewardModel __Gen_Delegate_Imp20(object p0) |
| | | public CrossServerOneVsOneRewardModel __Gen_Delegate_Imp20(object p0) |
| | | { |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| | | lock (luaEnv.luaEnvLock) |
| | |
| | | ObjectTranslator translator = luaEnv.translator; |
| | | translator.PushAny(L, p0); |
| | | |
| | | PCall(L, 1, 1, errFunc); |
| | | |
| | | |
| | | CrossServerRewardModel __gen_ret = (CrossServerRewardModel)translator.GetObject(L, errFunc + 1, typeof(CrossServerRewardModel)); |
| | | PCall(L, 1, 1, errFunc);
|
| | |
|
| | |
|
| | | CrossServerOneVsOneRewardModel __gen_ret = (CrossServerOneVsOneRewardModel)translator.GetObject(L, errFunc + 1, typeof(CrossServerOneVsOneRewardModel)); |
| | | LuaAPI.lua_settop(L, errFunc - 1); |
| | | return __gen_ret; |
| | | #if THREAD_SAFE || HOTFIX_ENABLE |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a545fb3dcf719304fa74180c10219375 |
| | | folderAsset: yes |
| | | timeCreated: 1542357825 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bb0295723b3e9fb4681333e248097405 |
| | | folderAsset: yes |
| | | timeCreated: 1546854019 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using Snxxz.UI; |
| | | |
| | | public class CrossServerUtility |
| | | { |
| | | |
| | | public static bool IsCrossServer() |
| | | { |
| | | return PlayerDatas.Instance.baseData.ExAttr5 > 2; |
| | | } |
| | | |
| | | public static bool IsCrossServerOneVsOne() |
| | | { |
| | | var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>(); |
| | | var dataMapId = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID); |
| | | return PlayerDatas.Instance.baseData.ExAttr5 > 2 |
| | | && dataMapId == CrossServerOneVsOneModel.CrossServerDataMapId; |
| | | } |
| | | |
| | | public static bool IsCrossServerBoss() |
| | | { |
| | | return PlayerDatas.Instance.baseData.ExAttr5 > 2 |
| | | && PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID; |
| | | } |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a5a48fcf6258c9144878499021c783b8 |
| | | timeCreated: 1546854095 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9f314fdc4b006d248adffdc9c625e5b9 |
| | | folderAsset: yes |
| | | timeCreated: 1546655032 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.Hotfix] |
| | | public class CrossServerBossBoxBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_BigBoxCount; |
| | | [SerializeField] Text m_SmallBoxCount; |
| | | [SerializeField] RawImage m_RawImage; |
| | | |
| | | CrossServerBossModel model { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | |
| | | public void Display() |
| | | { |
| | | timer = 0f; |
| | | var config = Config.Instance.Get<NPCConfig>(model.bigBoxNpcId); |
| | | UI3DModelExhibition.Instance.ShowNPC(model.bigBoxNpcId, config.UIModeLOffset, config.UIModelRotation, m_RawImage); |
| | | DisplayBoxSurplusInfo(); |
| | | model.boxSurplusChangeEvent += OnBoxInfoUpdate; |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | model.boxSurplusChangeEvent -= OnBoxInfoUpdate; |
| | | UI3DModelExhibition.Instance.StopShow(); |
| | | } |
| | | |
| | | private void OnBoxInfoUpdate() |
| | | { |
| | | DisplayBoxSurplusInfo(); |
| | | } |
| | | |
| | | private void DisplayBoxSurplusInfo() |
| | | { |
| | | var boxInfo = model.dogzDungeonBox; |
| | | m_BigBoxCount.text = boxInfo.bigBoxSurplus.ToString(); |
| | | m_BigBoxCount.color = UIHelper.GetUIColor(boxInfo.bigBoxSurplus > 0 ? TextColType.White : TextColType.Red); |
| | | m_SmallBoxCount.text = boxInfo.smallBoxSurplus.ToString(); |
| | | m_SmallBoxCount.color = UIHelper.GetUIColor(boxInfo.smallBoxSurplus > 0 ? TextColType.White : TextColType.Red); |
| | | } |
| | | |
| | | float timer = 0f; |
| | | private void LateUpdate() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (timer > 30) |
| | | { |
| | | timer = 0f; |
| | | model.RequestBoxSurplusInfo(); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: fd93527350eb34b45bb89ef8ff14a008 |
| | | timeCreated: 1534563273 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.Hotfix] |
| | | public class CrossServerBossBreifInfoBehaviour : FindPreciousBossBriefInfoBehaviour |
| | | { |
| | | |
| | | [SerializeField] Image m_Attention; |
| | | |
| | | protected override int selectedBossId { |
| | | get { |
| | | return model.selectedBoss; |
| | | } |
| | | set { |
| | | model.selectedBoss = value; |
| | | } |
| | | } |
| | | |
| | | protected override InteractorableState interactorableState { |
| | | get { |
| | | var selected = selectedBossId == bossId; |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(bossId); |
| | | var dieOrLocked = false; |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | dieOrLocked = model.dogzDungeonBox.bigBoxSurplus <= 0; |
| | | break; |
| | | case 3: |
| | | dieOrLocked = model.dogzDungeonElite.eliteSurplus <= 0; |
| | | break; |
| | | case 4: |
| | | dieOrLocked = !model.IsBossUnLocked(bossId) || !findPreciousModel.IsBossAlive(bossId); |
| | | break; |
| | | } |
| | | |
| | | if (!dieOrLocked) |
| | | { |
| | | return selected ? InteractorableState.NormalSelected : InteractorableState.NormalUnSelected; |
| | | } |
| | | else |
| | | { |
| | | return selected ? InteractorableState.DieOrLockedSelected : InteractorableState.DieOrLockedUnSelected; |
| | | } |
| | | } |
| | | set { |
| | | base.interactorableState = value; |
| | | } |
| | | } |
| | | |
| | | protected override bool isUnLocked { |
| | | get { |
| | | return model.IsBossUnLocked(bossId); |
| | | } |
| | | } |
| | | |
| | | CrossServerBossModel model { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | |
| | | public override void Display(object _data) |
| | | { |
| | | base.Display(_data); |
| | | |
| | | m_Attention.gameObject.SetActive(findPreciousModel.IsBossSubscribed(bossId)); |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(bossId); |
| | | var npcConfig = Config.Instance.Get<NPCConfig>(bossId); |
| | | |
| | | DrawBossBaseInfo(config.PortraitID, npcConfig.charName, npcConfig.NPCLV, npcConfig.ClientRealm); |
| | | UpdateBossRebornCoolDown(isUnLocked); |
| | | UpdateBossPortrait(interactorableState); |
| | | OnSelected(bossId); |
| | | |
| | | model.boxSurplusChangeEvent -= OnBoxInfoUpdate; |
| | | model.eliteSurplusChangeEvent -= OnGuardInfoUpdate; |
| | | model.dogzDungeonBox.refreshTimeEvent -= OnBoxRefreshTimeChange; |
| | | model.dogzDungeonElite.refreshTimeEvent -= OnEliteRefreshTimeChange; |
| | | |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | model.dogzDungeonBox.refreshTimeEvent += OnBoxRefreshTimeChange; |
| | | model.boxSurplusChangeEvent += OnBoxInfoUpdate; |
| | | break; |
| | | case 3: |
| | | model.dogzDungeonElite.refreshTimeEvent += OnEliteRefreshTimeChange; |
| | | model.eliteSurplusChangeEvent += OnGuardInfoUpdate; |
| | | break; |
| | | } |
| | | |
| | | model.bossSelectedEvent -= OnSelected; |
| | | model.bossSelectedEvent += OnSelected; |
| | | } |
| | | |
| | | public override void Dispose() |
| | | { |
| | | base.Dispose(); |
| | | model.bossSelectedEvent -= OnSelected; |
| | | model.boxSurplusChangeEvent -= OnBoxInfoUpdate; |
| | | model.eliteSurplusChangeEvent -= OnGuardInfoUpdate; |
| | | model.dogzDungeonBox.refreshTimeEvent -= OnBoxRefreshTimeChange; |
| | | model.dogzDungeonElite.refreshTimeEvent -= OnEliteRefreshTimeChange; |
| | | } |
| | | |
| | | protected override void UpdateBossRebornCoolDown(bool _isUnLocked) |
| | | { |
| | | if (_isUnLocked) |
| | | { |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(bossId); |
| | | var refreshTime = TimeUtility.ServerNow; |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | refreshTime = model.dogzDungeonBox.refreshTime; |
| | | break; |
| | | case 3: |
| | | refreshTime = model.dogzDungeonElite.refreshTime; |
| | | break; |
| | | case 4: |
| | | FindPreciousModel.BossInfo bossInfo; |
| | | if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo) && !bossInfo.IsBossAlive()) |
| | | { |
| | | refreshTime = bossInfo.refreshTime; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | if (refreshTime > TimeUtility.ServerNow) |
| | | { |
| | | m_CoolDown.Begin((int)(refreshTime - TimeUtility.ServerNow).TotalSeconds, OnBossCoolDownCompleted); |
| | | } |
| | | else |
| | | { |
| | | m_CoolDown.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_CoolDown.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | |
| | | |
| | | private void OnBoxRefreshTimeChange() |
| | | { |
| | | UpdateBossRebornCoolDown(isUnLocked); |
| | | } |
| | | |
| | | private void OnEliteRefreshTimeChange() |
| | | { |
| | | UpdateBossRebornCoolDown(isUnLocked); |
| | | } |
| | | |
| | | private void OnGuardInfoUpdate() |
| | | { |
| | | UpdateBossPortrait(interactorableState); |
| | | } |
| | | |
| | | private void OnBoxInfoUpdate() |
| | | { |
| | | UpdateBossPortrait(interactorableState); |
| | | } |
| | | |
| | | |
| | | protected override void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm) |
| | | { |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | m_BossName.text = Language.Get("DogzMap1"); |
| | | m_BossLevel.text = string.Empty; |
| | | break; |
| | | case 3: |
| | | m_BossName.text = Language.Get("DogzMap2"); |
| | | m_BossLevel.text = string.Empty; |
| | | break; |
| | | case 4: |
| | | m_BossName.text = _name; |
| | | m_BossLevel.text = Language.Get("Z1024", _level); |
| | | break; |
| | | } |
| | | |
| | | m_Portrait.SetSprite(_icon); |
| | | m_Portrait.SetNativeSize(); |
| | | |
| | | if (m_Realm != null && m_RealmContainer != null) |
| | | { |
| | | if (Config.Instance.ContainKey<RealmConfig>(_realm)) |
| | | { |
| | | m_RealmContainer.gameObject.SetActive(true); |
| | | var realmConfig = Config.Instance.Get<RealmConfig>(_realm); |
| | | if (realmConfig != null) |
| | | { |
| | | m_Realm.SetSprite(realmConfig.Img); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_RealmContainer.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void OnSelected(int _bossId) |
| | | { |
| | | UpdateBossNameLevelFont(interactorableState); |
| | | } |
| | | |
| | | protected override void OnSubscribe(int _bossId) |
| | | { |
| | | base.OnSubscribe(_bossId); |
| | | if (bossId != _bossId) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | m_Attention.gameObject.SetActive(findPreciousModel.IsBossSubscribed(bossId)); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 37dc9df1ef268f749aefe00b2248ba8f |
| | | timeCreated: 1534559500 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.Hotfix] |
| | | public class CrossServerBossEliteMonsterBehaviour : MonoBehaviour |
| | | { |
| | | [SerializeField] Text m_Elite; |
| | | [SerializeField] RawImage m_RawImage; |
| | | |
| | | CrossServerBossModel model { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | |
| | | public void Display() |
| | | { |
| | | timer = 0f; |
| | | var config = Config.Instance.Get<NPCConfig>(model.eliteMonsters[0]); |
| | | UI3DModelExhibition.Instance.ShowNPC(model.eliteMonsters[0], config.UIModeLOffset, config.UIModelRotation, m_RawImage); |
| | | DisplayGuardSurplusInfo(); |
| | | model.eliteSurplusChangeEvent += OnGuardInfoUpdate; |
| | | } |
| | | |
| | | public void Dispose() |
| | | { |
| | | model.eliteSurplusChangeEvent -= OnGuardInfoUpdate; |
| | | UI3DModelExhibition.Instance.StopShow(); |
| | | } |
| | | |
| | | private void OnGuardInfoUpdate() |
| | | { |
| | | DisplayGuardSurplusInfo(); |
| | | } |
| | | |
| | | private void DisplayGuardSurplusInfo() |
| | | { |
| | | var guard = model.dogzDungeonElite; |
| | | m_Elite.text = guard.eliteSurplus.ToString(); |
| | | m_Elite.color = UIHelper.GetUIColor(guard.eliteSurplus > 0 ? TextColType.White : TextColType.Red); |
| | | } |
| | | |
| | | float timer = 0f; |
| | | private void LateUpdate() |
| | | { |
| | | timer += Time.deltaTime; |
| | | if (timer > 30f) |
| | | { |
| | | timer = 0f; |
| | | model.RequestEliteSurplusInfo(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cb252ef23aa597c4f828e8e54087f660 |
| | | timeCreated: 1534563304 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using TableConfig; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.Hotfix] |
| | | [XLua.LuaCallCSharp] |
| | | public class CrossServerBossModel : Model |
| | | { |
| | | public const int DATA_MAPID = 32020; |
| | | public const int REDPOINT = 77002; |
| | | |
| | | List<int> sortedBossIds = new List<int>(); |
| | | Dictionary<int, CrossServerBossData> bosses = new Dictionary<int, CrossServerBossData>(); |
| | | |
| | | public int bigBoxNpcId = 0; |
| | | public int smallBoxNpcId = 0; |
| | | public List<int> eliteMonsters = new List<int>(); |
| | | |
| | | int m_SelectedBoss = 0; |
| | | public int selectedBoss { |
| | | get { |
| | | return this.m_SelectedBoss; |
| | | } |
| | | set { |
| | | if (this.m_SelectedBoss != value) |
| | | { |
| | | this.m_SelectedBoss = value; |
| | | if (bossSelectedEvent != null) |
| | | { |
| | | bossSelectedEvent(value); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_BigBoxCollectCount = 0; |
| | | public int bigBoxCollectCount { |
| | | get { return m_BigBoxCollectCount; } |
| | | set { |
| | | if (m_BigBoxCollectCount != value) |
| | | { |
| | | m_BigBoxCollectCount = value; |
| | | if (bigBoxCollectCountChangeEvent != null) |
| | | { |
| | | bigBoxCollectCountChangeEvent(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | int m_SmallBoxCollectCount = 0; |
| | | public int smallBoxCollectCount { |
| | | get { return m_SmallBoxCollectCount; } |
| | | set { m_SmallBoxCollectCount = value; } |
| | | } |
| | | |
| | | public int wearyValue { |
| | | get { |
| | | return dogzDungeonModel.wearyValue; |
| | | } |
| | | } |
| | | |
| | | public event Action<int> bossSelectedEvent; |
| | | public event Action bossWearyValueChangeEvent; |
| | | public event Action bigBoxCollectCountChangeEvent; |
| | | public event Action boxSurplusChangeEvent; |
| | | public event Action eliteSurplusChangeEvent; |
| | | |
| | | public DogzDungeonBox dogzDungeonBox = new DogzDungeonBox(); |
| | | public DogzDungeonElite dogzDungeonElite = new DogzDungeonElite(); |
| | | public Redpoint redpoint = new Redpoint(FindPreciousModel.LOOTPRECIOUs_REDPOINTID, REDPOINT); |
| | | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } } |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | | TeamModel teamModel { get { return ModelCenter.Instance.GetModel<TeamModel>(); } } |
| | | |
| | | public override void Init() |
| | | { |
| | | ParseConfig(); |
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange; |
| | | } |
| | | |
| | | public override void UnInit() |
| | | { |
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFunctionStateChange; |
| | | } |
| | | |
| | | public void RequestEnter() |
| | | { |
| | | var sendInfo = new CC105_tagCMEnterCrossServer(); |
| | | sendInfo.DataMapID = DATA_MAPID; |
| | | |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public bool CanEnter(out int error) |
| | | { |
| | | var mapId = PlayerDatas.Instance.baseData.MapID; |
| | | var mapConfig = Config.Instance.Get<MapConfig>(mapId); |
| | | if (mapConfig.MapFBType != (int)MapType.OpenCountry) |
| | | { |
| | | error = 1; |
| | | return false; |
| | | } |
| | | |
| | | if (teamModel.isMatching) |
| | | { |
| | | error = 2; |
| | | return false; |
| | | } |
| | | |
| | | if (teamModel.teamPrepare.isPreparing) |
| | | { |
| | | error = 3; |
| | | return false; |
| | | } |
| | | |
| | | if (CrossServerLogin.Instance.IsEnterCrossServerPreparing()) |
| | | { |
| | | error = 4; |
| | | return false; |
| | | } |
| | | |
| | | var deadModel = ModelCenter.Instance.GetModel<PlayerDeadModel>(); |
| | | if (deadModel.playerIsDie) |
| | | { |
| | | error = 5; |
| | | return false; |
| | | } |
| | | |
| | | error = 0; |
| | | return true; |
| | | } |
| | | |
| | | public void ProcessEnterError(int error) |
| | | { |
| | | switch (error) |
| | | { |
| | | case 1: |
| | | SysNotifyMgr.Instance.ShowTip("InDungeon_CantGo"); |
| | | break; |
| | | case 2: |
| | | SysNotifyMgr.Instance.ShowTip("CrossMap1"); |
| | | break; |
| | | case 3: |
| | | SysNotifyMgr.Instance.ShowTip("CrossMap2"); |
| | | break; |
| | | case 4: |
| | | SysNotifyMgr.Instance.ShowTip("CrossMap3"); |
| | | break; |
| | | case 5: |
| | | SysNotifyMgr.Instance.ShowTip("CrossMap4"); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | public void RequestExit() |
| | | { |
| | | var match = new CC104_tagCMExitCrossRealm(); |
| | | GameNetSystem.Instance.SendToCrossServer(match); |
| | | } |
| | | |
| | | public bool TryGetBossData(int bossId, out CrossServerBossData data) |
| | | { |
| | | return bosses.TryGetValue(bossId, out data); |
| | | } |
| | | |
| | | public List<int> GetNpcIds() |
| | | { |
| | | var npcIds = new List<int>(); |
| | | npcIds.Add(bigBoxNpcId); |
| | | npcIds.Add(eliteMonsters[0]); |
| | | npcIds.AddRange(bosses.Keys); |
| | | |
| | | return npcIds; |
| | | } |
| | | |
| | | public List<int> GetBosses() |
| | | { |
| | | return new List<int>(bosses.Keys); |
| | | } |
| | | |
| | | public int GetRecommendNpc() |
| | | { |
| | | if (bigBoxCollectCount < GeneralDefine.dogzBoxLimit) |
| | | { |
| | | return bigBoxNpcId; |
| | | } |
| | | |
| | | if (wearyValue < GeneralDefine.bossWearyValues[2]) |
| | | { |
| | | var playerLevel = PlayerDatas.Instance.baseData.LV; |
| | | for (int i = sortedBossIds.Count - 1; i >= 0; i--) |
| | | { |
| | | var bossId = sortedBossIds[i]; |
| | | var npcConfig = Config.Instance.Get<NPCConfig>(bossId); |
| | | if (IsBossUnLocked(bossId) && findPreciousModel.IsBossAlive(bossId) && playerLevel >= npcConfig.NPCLV) |
| | | { |
| | | return bossId; |
| | | } |
| | | } |
| | | |
| | | return sortedBossIds[0]; |
| | | } |
| | | |
| | | return eliteMonsters[0]; |
| | | } |
| | | |
| | | public int GetRecommendKillElite() |
| | | { |
| | | var Elite = dogzDungeonElite.GetAliveElite(); |
| | | if (Elite == 0) |
| | | { |
| | | Elite = eliteMonsters[0]; |
| | | } |
| | | |
| | | return Elite; |
| | | } |
| | | |
| | | public bool IsBossUnLocked(int _bossId) |
| | | { |
| | | if (_bossId == bigBoxNpcId || _bossId == smallBoxNpcId) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains(_bossId)) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return bosses.ContainsKey(_bossId) && bosses[_bossId].isUnLocked; |
| | | } |
| | | |
| | | public void RequestBoxAndEliteSurplusInfo() |
| | | { |
| | | var sendInfo = new CA227_tagCMQueryNPCCntInfo(); |
| | | sendInfo.MapID = DATA_MAPID; |
| | | sendInfo.LineID = 0; |
| | | var stringArray = new string[eliteMonsters.Count + 2]; |
| | | for (int i = 0; i < eliteMonsters.Count; i++) |
| | | { |
| | | stringArray[i] = eliteMonsters[i].ToString(); |
| | | } |
| | | |
| | | stringArray[eliteMonsters.Count] = bigBoxNpcId.ToString(); |
| | | stringArray[eliteMonsters.Count + 1] = smallBoxNpcId.ToString(); |
| | | |
| | | sendInfo.NPCIDList = string.Format("[{0}]", string.Join(",", stringArray)); |
| | | sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void RequestBoxSurplusInfo() |
| | | { |
| | | var sendInfo = new CA227_tagCMQueryNPCCntInfo(); |
| | | sendInfo.MapID = DATA_MAPID; |
| | | sendInfo.LineID = (ushort)PlayerDatas.Instance.baseData.dungeonLineId; |
| | | sendInfo.NPCIDList = string.Format("[{0},{1}]", bigBoxNpcId, smallBoxNpcId); |
| | | sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void RequestEliteSurplusInfo() |
| | | { |
| | | var sendInfo = new CA227_tagCMQueryNPCCntInfo(); |
| | | sendInfo.MapID = DATA_MAPID; |
| | | sendInfo.LineID = 0; |
| | | var stringArray = new string[eliteMonsters.Count]; |
| | | for (int i = 0; i < stringArray.Length; i++) |
| | | { |
| | | stringArray[i] = eliteMonsters[i].ToString(); |
| | | } |
| | | |
| | | sendInfo.NPCIDList = string.Format("[{0}]", string.Join(",", stringArray)); |
| | | sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length; |
| | | GameNetSystem.Instance.SendInfo(sendInfo); |
| | | } |
| | | |
| | | public void UpdateMonsterSurplusInfo(HA714_tagMCNPCCntList _npcInfoes) |
| | | { |
| | | if (_npcInfoes.MapID != DATA_MAPID) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | var updatedBigBox = false; |
| | | var updatedSmallBox = false; |
| | | var updatedEliteNpcIds = new List<int>(); |
| | | |
| | | for (int i = 0; i < _npcInfoes.NPCInfoList.Length; i++) |
| | | { |
| | | var npcInfo = _npcInfoes.NPCInfoList[i]; |
| | | if (npcInfo.NPCID == bigBoxNpcId) |
| | | { |
| | | dogzDungeonBox.bigBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedBigBox = true; |
| | | } |
| | | |
| | | if (npcInfo.NPCID == smallBoxNpcId) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = (int)npcInfo.Cnt; |
| | | updatedSmallBox = true; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains((int)npcInfo.NPCID)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteInfo((int)npcInfo.NPCID, (int)npcInfo.Cnt); |
| | | updatedEliteNpcIds.Add((int)npcInfo.NPCID); |
| | | } |
| | | } |
| | | |
| | | if (!updatedBigBox) |
| | | { |
| | | dogzDungeonBox.bigBoxSurplus = 0; |
| | | } |
| | | |
| | | if (!updatedSmallBox) |
| | | { |
| | | dogzDungeonBox.smallBoxSurplus = 0; |
| | | } |
| | | |
| | | if (boxSurplusChangeEvent != null) |
| | | { |
| | | boxSurplusChangeEvent(); |
| | | } |
| | | |
| | | foreach (var item in eliteMonsters) |
| | | { |
| | | if (!updatedEliteNpcIds.Contains(item)) |
| | | { |
| | | dogzDungeonElite.UpdateEliteInfo(item, 0); |
| | | } |
| | | } |
| | | |
| | | if (eliteSurplusChangeEvent != null) |
| | | { |
| | | eliteSurplusChangeEvent(); |
| | | } |
| | | } |
| | | |
| | | public void UpdateBoxOrEliteRefreshTime(HA904_tagGCDogzNPCRefreshTime _refreshTimes) |
| | | { |
| | | var containBox = false; |
| | | var boxRefreshSecond = 0; |
| | | |
| | | var containElite = false; |
| | | var eliteRefreshSecond = 0; |
| | | |
| | | for (int i = 0; i < _refreshTimes.InfoList.Length; i++) |
| | | { |
| | | var info = _refreshTimes.InfoList[i]; |
| | | if (bigBoxNpcId == info.NPCID || smallBoxNpcId == info.NPCID) |
| | | { |
| | | containBox = true; |
| | | boxRefreshSecond = (int)info.RefreshSecond; |
| | | } |
| | | |
| | | if (eliteMonsters.Contains((int)info.NPCID)) |
| | | { |
| | | containElite = true; |
| | | eliteRefreshSecond = (int)info.RefreshSecond; |
| | | } |
| | | } |
| | | |
| | | if (containBox) |
| | | { |
| | | dogzDungeonBox.UpdateBoxRefreshTime(boxRefreshSecond); |
| | | } |
| | | |
| | | if (containElite) |
| | | { |
| | | dogzDungeonElite.UpdateEliteRefreshTime(eliteRefreshSecond); |
| | | } |
| | | |
| | | if (WindowCenter.Instance.IsOpen("CrossServerBossWin")) |
| | | { |
| | | if (containBox) |
| | | { |
| | | RequestBoxSurplusInfo(); |
| | | } |
| | | |
| | | if (containElite) |
| | | { |
| | | RequestEliteSurplusInfo(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void OnPlayerLoginOk() |
| | | { |
| | | UpdateRedpoint(); |
| | | } |
| | | |
| | | private void OnFunctionStateChange(int id) |
| | | { |
| | | if (id == 160) |
| | | { |
| | | UpdateRedpoint(); |
| | | } |
| | | } |
| | | |
| | | private void UpdateRedpoint() |
| | | { |
| | | if (!FuncOpen.Instance.IsFuncOpen(160)) |
| | | { |
| | | redpoint.count = 0; |
| | | } |
| | | else |
| | | { |
| | | var wearyValueLimit = GeneralDefine.bossWearyValues[2]; |
| | | redpoint.count = wearyValueLimit - wearyValue; |
| | | } |
| | | |
| | | redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None; |
| | | } |
| | | |
| | | private void ParseConfig() |
| | | { |
| | | var configs = Config.Instance.GetAllValues<CrossServerBossConfig>(); |
| | | foreach (var config in configs) |
| | | { |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | bigBoxNpcId = config.NPCID; |
| | | break; |
| | | case 2: |
| | | smallBoxNpcId = config.NPCID; |
| | | break; |
| | | case 3: |
| | | eliteMonsters.Add(config.NPCID); |
| | | break; |
| | | case 4: |
| | | bosses[config.NPCID] = new CrossServerBossData(config.NPCID); |
| | | sortedBossIds.Add(config.NPCID); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | sortedBossIds.Sort(CrossServerBossData.LevelCompare); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | public class CrossServerBossBox |
| | | { |
| | | public int bigBoxSurplus; |
| | | public int smallBoxSurplus; |
| | | public DateTime refreshTime { get; private set; } |
| | | |
| | | public event Action refreshTimeEvent; |
| | | |
| | | public void UpdateBoxInfo(int _big, int _small) |
| | | { |
| | | bigBoxSurplus = _big; |
| | | smallBoxSurplus = _small; |
| | | } |
| | | |
| | | public void UpdateBoxRefreshTime(int _seconds) |
| | | { |
| | | refreshTime = TimeUtility.ServerNow + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); |
| | | if (refreshTimeEvent != null) |
| | | { |
| | | refreshTimeEvent(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public class CrossServerBossElite |
| | | { |
| | | public Dictionary<int, int> eliteCounts = new Dictionary<int, int>(); |
| | | public int eliteSurplus { |
| | | get { |
| | | var count = 0; |
| | | foreach (var eliteCount in eliteCounts.Values) |
| | | { |
| | | count += eliteCount; |
| | | } |
| | | return count; |
| | | } |
| | | } |
| | | |
| | | public DateTime refreshTime { get; private set; } |
| | | public event Action refreshTimeEvent; |
| | | |
| | | public void UpdateEliteInfo(int _npcId, int _count) |
| | | { |
| | | eliteCounts[_npcId] = _count; |
| | | } |
| | | |
| | | public void UpdateEliteRefreshTime(int _seconds) |
| | | { |
| | | refreshTime = TimeUtility.ServerNow + new TimeSpan(_seconds * TimeSpan.TicksPerSecond); |
| | | if (refreshTimeEvent != null) |
| | | { |
| | | refreshTimeEvent(); |
| | | } |
| | | } |
| | | |
| | | public int GetAliveElite() |
| | | { |
| | | foreach (var EliteCount in eliteCounts) |
| | | { |
| | | if (EliteCount.Value > 0) |
| | | { |
| | | return EliteCount.Key; |
| | | } |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | public class CrossServerBossData |
| | | { |
| | | public int id { get; private set; } |
| | | public bool isUnLocked { |
| | | get { |
| | | return true; |
| | | } |
| | | } |
| | | |
| | | public CrossServerBossData(int _id) |
| | | { |
| | | this.id = _id; |
| | | } |
| | | |
| | | public static int LevelCompare(int a, int b) |
| | | { |
| | | var configA = Config.Instance.Get<NPCConfig>(a); |
| | | var configB = Config.Instance.Get<NPCConfig>(b); |
| | | |
| | | return configA.NPCLV < configB.NPCLV ? -1 : 1; |
| | | } |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 39c608dea53ef08439826b594547513b |
| | | timeCreated: 1546655057 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Saturday, August 18, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | [XLua.Hotfix] |
| | | public class CrossServerBossWin : Window |
| | | { |
| | | [SerializeField] CyclicScroll m_Bosses; |
| | | [SerializeField] CrossServerBossBoxBehaviour m_BoxBehaviour; |
| | | [SerializeField] CrossServerBossEliteMonsterBehaviour m_EliteMonsterBehaviour; |
| | | [SerializeField] BossIntroduceBehaviour m_BossIntroduce; |
| | | |
| | | [SerializeField] Button m_Goto; |
| | | [SerializeField] ImageEx m_ImageGoto; |
| | | [SerializeField] Button m_KillRecord; |
| | | [SerializeField] Transform m_SurpassLevel; |
| | | [SerializeField] ToggleButton m_Subscribe; |
| | | |
| | | [SerializeField] RectTransform m_ContainerBoxCollectWeary; |
| | | [SerializeField] TextEx m_BoxCollectWearyValue; |
| | | [SerializeField] RectTransform m_ContainerBossKillWeary; |
| | | [SerializeField] TextEx m_BossKillWearyValue; |
| | | |
| | | CrossServerBossModel model { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } } |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } } |
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } } |
| | | |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_Goto.AddListener(GotoKillBoss); |
| | | m_KillRecord.AddListener(ShowKillRecords); |
| | | m_Subscribe.AddListener(SwitchSubscribeBoss); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | model.bossSelectedEvent += OnBossSelected; |
| | | findPreciousModel.bossSubscribeChangeEvent += OnSubscribeBoss; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | model.bossSelectedEvent -= OnBossSelected; |
| | | findPreciousModel.bossSubscribeChangeEvent -= OnSubscribeBoss; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnActived() |
| | | { |
| | | base.OnActived(); |
| | | ShowBosses(); |
| | | model.RequestBoxAndEliteSurplusInfo(); |
| | | } |
| | | #endregion |
| | | |
| | | private void ShowBosses() |
| | | { |
| | | var bosses = model.GetNpcIds(); |
| | | model.selectedBoss = model.GetRecommendNpc(); |
| | | m_Bosses.Init(bosses); |
| | | m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss)); |
| | | |
| | | DisplayItemDropTip(model.selectedBoss); |
| | | DisplayBossBaseInfo(model.selectedBoss); |
| | | DisplayWearyValue(model.selectedBoss); |
| | | } |
| | | |
| | | private void ShowKillRecords() |
| | | { |
| | | findPreciousModel.ViewKillRecordsBoss = model.selectedBoss; |
| | | WindowCenter.Instance.Open<KillRecordsWin>(); |
| | | } |
| | | |
| | | private void SwitchSubscribeBoss() |
| | | { |
| | | if (findPreciousModel.IsBossSubscribed(model.selectedBoss)) |
| | | { |
| | | findPreciousModel.RequestDeSubscribeBoss(model.selectedBoss); |
| | | } |
| | | else |
| | | { |
| | | findPreciousModel.RequestSubscribeBoss(model.selectedBoss, false); |
| | | } |
| | | } |
| | | |
| | | private void GotoKillBoss() |
| | | { |
| | | var error = 0; |
| | | if ( model.CanEnter(out error) ) |
| | | { |
| | | if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID) |
| | | { |
| | | WindowJumpMgr.Instance.ClearJumpData(); |
| | | WindowCenter.Instance.Close<CrossServerWin>(); |
| | | WindowCenter.Instance.Open<MainInterfaceWin>(); |
| | | |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | break; |
| | | case 4: |
| | | MapTransferUtility.Instance.MoveToNPC(model.selectedBoss); |
| | | break; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | model.RequestEnter(); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | model.ProcessEnterError(error); |
| | | } |
| | | } |
| | | |
| | | private void OnSubscribeBoss(int _bossId) |
| | | { |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss); |
| | | } |
| | | |
| | | private void OnBossSelected(int _bossId) |
| | | { |
| | | DisplayItemDropTip(_bossId); |
| | | DisplayBossBaseInfo(_bossId); |
| | | DisplayWearyValue(_bossId); |
| | | } |
| | | |
| | | private void DisplayBossBaseInfo(int _bossId) |
| | | { |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(_bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | m_KillRecord.gameObject.SetActive(false); |
| | | m_BossIntroduce.Dispose(); |
| | | m_BossIntroduce.gameObject.SetActive(false); |
| | | m_EliteMonsterBehaviour.Dispose(); |
| | | m_EliteMonsterBehaviour.gameObject.SetActive(false); |
| | | m_BoxBehaviour.gameObject.SetActive(true); |
| | | m_BoxBehaviour.Display(); |
| | | break; |
| | | case 3: |
| | | m_KillRecord.gameObject.SetActive(false); |
| | | m_BossIntroduce.Dispose(); |
| | | m_BossIntroduce.gameObject.SetActive(false); |
| | | m_BoxBehaviour.gameObject.SetActive(false); |
| | | m_BoxBehaviour.Dispose(); |
| | | |
| | | m_EliteMonsterBehaviour.gameObject.SetActive(true); |
| | | m_EliteMonsterBehaviour.Display(); |
| | | break; |
| | | case 4: |
| | | m_KillRecord.gameObject.SetActive(true); |
| | | m_BoxBehaviour.Dispose(); |
| | | m_BoxBehaviour.gameObject.SetActive(false); |
| | | m_EliteMonsterBehaviour.Dispose(); |
| | | m_EliteMonsterBehaviour.gameObject.SetActive(false); |
| | | |
| | | m_BossIntroduce.gameObject.SetActive(true); |
| | | m_BossIntroduce.Display(_bossId, true); |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayItemDropTip(int _bossId) |
| | | { |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | m_SurpassLevel.gameObject.SetActive(false); |
| | | break; |
| | | case 4: |
| | | var npcDropConfig = Config.Instance.Get<NPCDropItemConfig>(_bossId); |
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayWearyValue(int _bossId) |
| | | { |
| | | var config = Config.Instance.Get<CrossServerBossConfig>(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | m_ContainerBoxCollectWeary.gameObject.SetActive(true); |
| | | m_ContainerBossKillWeary.gameObject.SetActive(false); |
| | | var bigBoxCollectCountLimit = GeneralDefine.dogzBoxLimit; |
| | | m_BoxCollectWearyValue.text = StringUtility.Contact(model.bigBoxCollectCount, "/", bigBoxCollectCountLimit); |
| | | m_BoxCollectWearyValue.colorType = model.bigBoxCollectCount >= bigBoxCollectCountLimit ? TextColType.Red : TextColType.DarkGreen; |
| | | break; |
| | | case 3: |
| | | case 4: |
| | | m_ContainerBoxCollectWeary.gameObject.SetActive(false); |
| | | m_ContainerBossKillWeary.gameObject.SetActive(true); |
| | | var wearyValueLimit = GeneralDefine.bossWearyValues[2]; |
| | | m_BossKillWearyValue.text = Language.Get("WorldBoss_Endurance0", wearyValueLimit - model.wearyValue); |
| | | m_BossKillWearyValue.colorType = model.wearyValue >= wearyValueLimit ? TextColType.Red : TextColType.DarkGreen; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 348cda1bebe122948b82c7a60df7dc4b |
| | | timeCreated: 1534559453 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | {
|
| | | public string PkResultLocalSaveKey { get; private set; }
|
| | | public List<CrossServerOneVsOnePkResult> localSaveResults { get; private set; }
|
| | | CrossServerRewardModel rewardModel { get { return ModelCenter.Instance.GetModel<CrossServerRewardModel>(); } }
|
| | | CrossServerOneVsOneRewardModel rewardModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>(); } }
|
| | | public event Action UpdateDayAwardsEvent;
|
| | | public const int CrossServerDataMapId = 32010;
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
| | |
|
| | | private void UpdateFBHelp()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 != 1) return;
|
| | | if (!CrossServerUtility.IsCrossServer()) return;
|
| | |
|
| | | var hero = PlayerDatas.Instance.hero;
|
| | | var mission = dungeonModel.mission;
|
| | |
| | | CC101_tagCMCrossRealmPKMatch match = new CC101_tagCMCrossRealmPKMatch();
|
| | | match.Type = (byte)type;
|
| | | GameNetSystem.Instance.SendInfo(match);
|
| | | CrossServerRewardModel.PkType = buffDatas.PkType;
|
| | | CrossServerOneVsOneRewardModel.PkType = buffDatas.PkType;
|
| | | }
|
| | |
|
| | | public void SendBuyMatchCount()
|
| | |
| | | public bool TryGetMatchTip()
|
| | | {
|
| | | int mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | bool isCrossDungeon = PlayerDatas.Instance.baseData.ExAttr5 == 1;
|
| | | bool isCrossDungeon = CrossServerUtility.IsCrossServer();
|
| | | if(isCrossDungeon)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("CrossMatching3");
|
| File was renamed from System/CrossServerOneVsOne/CrossServerRewardModel.cs |
| | |
| | | DanLVAwardState = 3,
|
| | | SeasonAwardState = 4,
|
| | | }
|
| | | public class CrossServerRewardModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | |
|
| | | [XLua.Hotfix]
|
| | | public class CrossServerOneVsOneRewardModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | CrossServerOneVsOneModel crossServerModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>(); } }
|
| | | public Dictionary<int, SeasonAwardClass> SegmentRewardDic = new Dictionary<int, SeasonAwardClass>();//段位奖励
|
| | |
| | |
|
| | | private void UpdatePkResultEvent()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)//副本结算界面
|
| | | if (CrossServerUtility.IsCrossServer())//副本结算界面
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<CrossServerOneVsOneRoundWin>())
|
| | | {
|
| | |
| | | c103.AwardType = (byte)_cross;
|
| | | c103.AwardData = (byte)Index;
|
| | | GameNetSystem.Instance.SendInfo(c103);
|
| | | }
|
| | |
|
| | | public static bool IsCrossServerOneVsOne()//是否再跨服副本中
|
| | | {
|
| | | return PlayerDatas.Instance.baseData.ExAttr5 == 1;
|
| | | }
|
| | |
|
| | | public void ViewCrossPKBillboard(int ZoneID, int SeasonID)//(赛区,赛季) 查看跨服竞技场赛季排行榜
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class CrossServerOneVsOneWin : Window
|
| | | {
|
| | | [SerializeField] Image headImg;
|
| | |
| | | public static int funcId = 0;
|
| | | CrossServerOneVsOnePlayerInfo playerInfo;
|
| | | CrossServerWin crossServerWin;
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | namespace Snxxz.UI {
|
| | |
|
| | | [XLua.Hotfix] |
| | | public class CrossServerSettlementWin : Window |
| | | { |
| | | [SerializeField] GameObject m_BackFailure; |
| | |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CrossServerRewardModel.SetPkType();
|
| | | Buffmodel.PkType = CrossServerRewardModel.PkType; |
| | | CrossServerOneVsOneRewardModel.SetPkType();
|
| | | Buffmodel.PkType = CrossServerOneVsOneRewardModel.PkType; |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | |
| | | #endregion |
| | | private void ExitDungeon()
|
| | | {
|
| | | CrossServerRewardModel.ExitCrossRealm();
|
| | | CrossServerOneVsOneRewardModel.ExitCrossRealm();
|
| | | CloseClick();
|
| | | } |
| | | |
| | |
| | | m_SessionObj.SetActive(true);
|
| | | m_SessionTxt.text = crossServerModel.pkResultInfo.WinStreak.ToString();
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.DanLV != CrossServerRewardModel.PkDanLvNow)
|
| | | if (crossServerModel.pkResultInfo.DanLV != CrossServerOneVsOneRewardModel.PkDanLvNow)
|
| | | {
|
| | | var config1 = Config.Instance.Get<CrossServerArenaConfig>(CrossServerRewardModel.PkDanLvNow);
|
| | | var config1 = Config.Instance.Get<CrossServerArenaConfig>(CrossServerOneVsOneRewardModel.PkDanLvNow);
|
| | | m_SegmentObj.SetActive(true);
|
| | | m_SegmentTxt1.text = config1.Name;
|
| | | var config2 = Config.Instance.Get<CrossServerArenaConfig>(crossServerModel.pkResultInfo.DanLV);
|
| | |
| | | {
|
| | | m_SessionObj1.SetActive(false);
|
| | | }
|
| | | if (crossServerModel.pkResultInfo.DanLV != CrossServerRewardModel.PkDanLvNow)
|
| | | if (crossServerModel.pkResultInfo.DanLV != CrossServerOneVsOneRewardModel.PkDanLvNow)
|
| | | {
|
| | | var config1 = Config.Instance.Get<CrossServerArenaConfig>(CrossServerRewardModel.PkDanLvNow);
|
| | | var config1 = Config.Instance.Get<CrossServerArenaConfig>(CrossServerOneVsOneRewardModel.PkDanLvNow);
|
| | | m_SegmentObj1.SetActive(true);
|
| | | m_Segment_Txt1.text = config1.Name;
|
| | | var config2 = Config.Instance.Get<CrossServerArenaConfig>(crossServerModel.pkResultInfo.DanLV);
|
| | |
| | | private void ClickBossFunc()
|
| | | {
|
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open<CrossServerBossWin>();
|
| | | }
|
| | |
|
| | | private void ClickArenaFunc()
|
| | |
| | |
|
| | | CrossServerOneVsOneModel crossServerModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>(); } }
|
| | | ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
|
| | | CrossServerRewardModel rewardModel { get { return ModelCenter.Instance.GetModel<CrossServerRewardModel>(); } }
|
| | | CrossServerOneVsOneRewardModel rewardModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>(); } }
|
| | |
|
| | | CrossServerOneVsOneModel.AwardType awardType;
|
| | | float height = 0;
|
| | |
| | | protected override void OnPreOpen() |
| | | { |
| | | positionType = CrossServerLogin.Instance.oneVsOnePlayerData.myBornPoint; |
| | | CrossServerRewardModel.PkDanLvNow = CrossServerOneVsOnePlayerInfo.Instance.DanLV;
|
| | | CrossServerOneVsOneRewardModel.PkDanLvNow = CrossServerOneVsOnePlayerInfo.Instance.DanLV;
|
| | | PlayerDatas.Instance.PlayerDataRefreshInfoEvent += Updatefighting;//数据的刷新(h0418) |
| | | GA_Player.s_OnRefreshLife += OnRefreshPlayerLifeBar; |
| | | if (PlayerDatas.Instance.hero != null)
|
| | |
| | | [SerializeField] Text m_SegmentTxt;
|
| | | [SerializeField] Text m_IntegralTxt;
|
| | | [SerializeField] Image m_RealmImage;
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | RoleParticularModel roleParticularModel { get { return ModelCenter.Instance.GetModel<RoleParticularModel>(); } }
|
| | | public override void Refresh(CellView cell)
|
| | | {
|
| | |
| | | [SerializeField] ScrollerController m_ScrollerController2;
|
| | | [SerializeField] Text m_Text_A;
|
| | | CrossServerOneVsOneModel crossServerModel { get { return ModelCenter.Instance.GetModel<CrossServerOneVsOneModel>(); } }
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | private int NeedDanLv = 0; |
| | | #region Built-in |
| | | protected override void BindController() |
| | |
| | | [SerializeField] Text m_Segmenttext;//段位
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | public Button ReceiveBtn
|
| | | {
|
| | | get { return m_ReceiveBtn; }
|
| | |
| | | public class SeasonRewardWin : Window |
| | | { |
| | | [SerializeField] ScrollerController m_ScrollerController; |
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | List<int> SortList = new List<int>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | |
| | | [SerializeField] GameObject m_IsMissImage;//已错过
|
| | | ItemTipsModel _itemTipsModel;
|
| | | ItemTipsModel itemTipsModel { get { return _itemTipsModel ?? (_itemTipsModel = ModelCenter.Instance.GetModel<ItemTipsModel>()); } }
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | private int _Id = 0; |
| | | public void Start()
|
| | | {
|
| | |
| | | public class SegmentRewardWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | List<SeasonAwardClass> ListSort = new List<SeasonAwardClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class DailyQuestModel : Model, IPlayerLoginOk, IBeforePlayerDataInitialize, IMapInitOk
|
| | | {
|
| | |
|
| | | const int DAILYQUEST_REDPOINTID = 78000;
|
| | | const int EVERYDAY_REDPOINTID = 78001;
|
| | | const int TIMELIMIT_REDPOINTID = 78002;
|
| | |
| | |
|
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | | ElderGodAreaModel elderGodAreadModel { get { return ModelCenter.Instance.GetModel<ElderGodAreaModel>(); } }
|
| | | CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } }
|
| | |
|
| | | int dataMapId = 0;
|
| | | bool bossesInited = false;
|
| | |
| | | m_Liquid.gameObject.SetActive(false);
|
| | | var dataMapId = model.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | m_ExitDungeon.gameObject.SetActive(dataMapId != DemonJarModel.DEMONJAR_MAPID
|
| | | && !CrossServerRewardModel.IsCrossServerOneVsOne());
|
| | | && !CrossServerUtility.IsCrossServerOneVsOne());
|
| | | m_ContainerAncient.gameObject.SetActive(dataMapId == 31160);
|
| | | m_BossInfosContainer.gameObject.SetActive(dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID || dataMapId == BossHomeModel.BOSSHOME_MAPID);
|
| | | m_BossInfosContainer.gameObject.SetActive(
|
| | | dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID |
| | | || dataMapId == BossHomeModel.BOSSHOME_MAPID);
|
| | |
|
| | | m_GatherSoulDungeonBehaviour.gameObject.SetActive(dataMapId == GatherSoulDungeonModel.DUNGEON_MAPID);
|
| | | switch (dataMapId)
|
| | | {
|
| | |
| | | {
|
| | | if (_ok)
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | if (dataMapId==CrossServerBossModel.DATA_MAPID)
|
| | | {
|
| | | var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>();
|
| | | crossServerBossModel.RequestExit();
|
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | }
|
| | | }
|
| | | );
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (CrossServerUtility.IsCrossServerBoss())
|
| | | {
|
| | | _error = 6;
|
| | | return false;
|
| | | }
|
| | |
|
| | | _error = 0;
|
| | | return true;
|
| | | }
|
| | |
| | | case 5:
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(dungeonConfig.TicketID);
|
| | | break;
|
| | | case 6:
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | static void OnShowBossLifeBar(uint _instanceId, int _npcId, bool _show)
|
| | | {
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne() && _show)
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne() && _show)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | static void OnRefreshBossLifeBar(uint _instanceId, int _npcId, ulong _hp, ulong _maxHp)
|
| | | {
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | static void OnShowPlayerLifeBar(uint _instanceId, bool _show)
|
| | | {
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne() && _show)
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne() && _show)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | static void OnRefreshPlayerLifeBar(uint _instanceId, ulong _hp, ulong _maxHp)
|
| | | {
|
| | | if (CrossServerRewardModel.IsCrossServerOneVsOne())
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | |
|
| | | bool InCrossServer()
|
| | | {
|
| | | return PlayerDatas.Instance.baseData.ExAttr5 == 1;
|
| | | return CrossServerUtility.IsCrossServer();
|
| | | }
|
| | |
|
| | | bool TryGetStartTime(out DateTime time)
|
| | |
| | | case FindPreciousType.DogzDungeon:
|
| | | undoubtedlyRewards = Config.Instance.Get<DogzDungeonConfig>(bossId).RareItemID;
|
| | | break;
|
| | | case FindPreciousType.CrossServerBoss:
|
| | | undoubtedlyRewards = Config.Instance.Get<CrossServerBossConfig>(bossId).RareItemID;
|
| | | break;
|
| | | }
|
| | |
|
| | | if (m_UndoubtedlyRewardGroup != null)
|
| | |
| | | DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
|
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | | DogzDungeonModel dogzDungeonModel { get { return ModelCenter.Instance.GetModel<DogzDungeonModel>(); } }
|
| | | CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } }
|
| | |
|
| | | private void OnEnable()
|
| | | {
|
| | |
| | | break;
|
| | | case FindPreciousType.DogzDungeon:
|
| | | GotoKillDogzDungeonBoss(bossId);
|
| | | break;
|
| | | case FindPreciousType.CrossServerBoss:
|
| | | GotoKillCrossServerBoss(bossId);
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void GotoKillCrossServerBoss(int _bossId)
|
| | | {
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var mapConfig = Config.Instance.Get<MapConfig>(mapId);
|
| | |
|
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry)
|
| | | {
|
| | | if (mapId == CrossServerBossModel.DATA_MAPID)
|
| | | {
|
| | | var config = Config.Instance.Get<CrossServerBossConfig>(_bossId);
|
| | | switch (config.MonsterType)
|
| | | {
|
| | | case 1:
|
| | | case 2:
|
| | | case 3:
|
| | | break;
|
| | | case 4:
|
| | | MapTransferUtility.Instance.MoveToNPC(_bossId);
|
| | | break;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | crossServerBossModel.RequestEnter();
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("InDungeon_CantGo");
|
| | | }
|
| | | }
|
| | |
|
| | | private void EnterBossHome(int _floor, int _bossId)
|
| | | {
|
| | | var error = 0;
|
| | |
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class PackSendQuestMgr : Singleton<PackSendQuestMgr>
|
| | | |
| | |
|
| | | {
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack
|
| | |
| | | case 83:
|
| | | var fashionModel = ModelCenter.Instance.GetModel<FashionDressModel>();
|
| | | fashionModel.jumpFashionDress = useItemModel.chinItemModel.EffectValueA1;
|
| | | WindowCenter.Instance.Open<RolePanel>(false,5);
|
| | | return;
|
| | | break;
|
| | | }
|
| | | if (useItemModel.itemId == 951)
|
| | | {
|
| | |
| | | {
|
| | | Dispose();
|
| | |
|
| | | var flashClothes = 0;
|
| | | var flashWeapon = 0;
|
| | | var flashSecondary = 0;
|
| | | var clothesItemId = 0;
|
| | | var weaponItemId = 0;
|
| | | var wingsItemId = 0;
|
| | | var secondaryItemId = 0;
|
| | | var _suitLevel = 0;
|
| | | var suitLevel = 0;
|
| | | var equipInfos = PlayerDatas.Instance.loginInfo.EquipInfo;
|
| | | for (int i = 0; i < equipInfos.Length; i++)
|
| | | {
|
| | | var equipInfo = equipInfos[i];
|
| | | switch ((RoleEquipType)equipInfo.ItemPlace)
|
| | | {
|
| | | case RoleEquipType.retFashionClothes:
|
| | | flashClothes = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon:
|
| | | flashWeapon = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retFashionWeapon2:
|
| | | flashSecondary = (int)equipInfo.ItemID;
|
| | | break;
|
| | | case RoleEquipType.retWeapon:
|
| | | weaponItemId = (int)equipInfo.ItemID;
|
| | | break;
|
| | |
| | | Dictionary<int, List<int>> _userDataDict = ConfigParse.Analysis(equipInfo.UserData);
|
| | | if (_userDataDict.ContainsKey(30))
|
| | | {
|
| | | _suitLevel = _userDataDict[30][0];
|
| | | suitLevel = _userDataDict[30][0];
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | var data = new UI3DPlayerExhibitionData()
|
| | | {
|
| | | job = PlayerDatas.Instance.loginInfo.Job,
|
| | | clothesId = clothesItemId,
|
| | | suitLevel = _suitLevel,
|
| | | weaponId = weaponItemId,
|
| | | clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
|
| | | suitLevel = suitLevel,
|
| | | weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
|
| | | wingsId = wingsItemId,
|
| | | secondaryId = secondaryItemId,
|
| | | secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
|
| | | godWeapons = new Dictionary<int, int>() {
|
| | | { 1, (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
|
| | | { 2, (int)PlayerDatas.Instance.loginInfo.ExAttr16},
|
| | |
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix]
|
| | | public class CrossServerLogin : Singleton<CrossServerLogin>
|
| | | {
|
| | | bool m_Busy = false;
|
| | |
| | | return oneVsOnePlayerData.IsCrossServerOneVsOneEntering();
|
| | | }
|
| | |
|
| | |
|
| | | public void CrossServerBossLogin()
|
| | | {
|
| | | var loginModel = ModelCenter.Instance.GetModel<LoginModel>();
|
| | | var account = loginModel.accountBuf;
|
| | | var ip = GameNetSystem.Instance.crossServerData.ip;
|
| | | var port = GameNetSystem.Instance.crossServerData.port;
|
| | |
|
| | | WindowCenter.Instance.Open<LoadingWin>();
|
| | | AccountLogin(account, ip, port, false);
|
| | | }
|
| | |
|
| | | public void AccountLogin(string account, string ip, int gamePort, bool reconnectBackGround)
|
| | | {
|
| | | if (Application.internetReachability == NetworkReachability.NotReachable)
|
| | |
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | | CoinTaskTipModel m_CoinTaskTip;
|
| | | CoinTaskTipModel coinTaskTip { get { return m_CoinTaskTip ?? (m_CoinTaskTip = ModelCenter.Instance.GetModel<CoinTaskTipModel>()); } }
|
| | |
|
| | | CrossServerBossModel crossServerBossModel { get { return ModelCenter.Instance.GetModel<CrossServerBossModel>(); } }
|
| | |
|
| | | public void Init()
|
| | | {
|
| | | OneKeyList.Clear();
|
| | |
| | | OnHeroHandupAIStopPassive();
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | _FriendsBtn.gameObject.SetActive(!CrossServerUtility.IsCrossServer());
|
| | | }
|
| | |
|
| | | public void OnAfterOpen()
|
| | |
| | |
|
| | | private void MailCountChange()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | _MailBtn.gameObject.SetActive(false);
|
| | | return;
|
| | |
| | |
|
| | | WindowCenter.Instance.Open<SettingUpWin>(false, 3);
|
| | | }
|
| | |
|
| | | private void TaskButton()
|
| | | {
|
| | |
|
| | |
| | | coinTaskTip.IsPopup = false;
|
| | | }
|
| | | }
|
| | |
|
| | | private void TeamBtn()
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | |
| | | private IEnumerator PopupPanel()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS1500;
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)//在跨服竞技场不打开
|
| | | if (CrossServerUtility.IsCrossServer())//在跨服竞技场不打开
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
| | | private IEnumerator FairyAuTaskPanel()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS1500;
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)//在跨服竞技场不打开
|
| | | if (CrossServerUtility.IsCrossServer())//在跨服竞技场不打开
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
| | | OSGiftModel osGiftModel { get { return ModelCenter.Instance.GetModel<OSGiftModel>(); } }
|
| | | LimitedTimePackageItemClassModel limitedTimePackageItemModel { get { return ModelCenter.Instance.GetModel<LimitedTimePackageItemClassModel>(); } }
|
| | | ImpactRankModel impactRankModel { get { return ModelCenter.Instance.GetModel<ImpactRankModel>(); } }
|
| | | CrossServerRewardModel m_CrossServerRewardModel;
|
| | | CrossServerRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerRewardModel>()); } }
|
| | | CrossServerOneVsOneRewardModel m_CrossServerRewardModel;
|
| | | CrossServerOneVsOneRewardModel crossServerRewardModel { get { return m_CrossServerRewardModel ?? (m_CrossServerRewardModel = ModelCenter.Instance.GetModel<CrossServerOneVsOneRewardModel>()); } }
|
| | | OpenServiceAchievementModel OpenServerModel { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
|
| | | public void Init()
|
| | | {
|
| | | if (LatencyTimeList.Count <= 0)
|
| | |
| | | OperationTimeHepler.Instance.operationEndEvent += operationEndEvent;
|
| | | limitedTimePackageItemModel.UpdateLimitedTimePackageItem += UpdateLimitedTimePackageItem;
|
| | | impactRankModel.inImpactRankUpdate += InImpactRankUpdate;
|
| | | OpenServerModel.IsOpenEvent += IsOpenEvent;
|
| | | }
|
| | |
|
| | | public void Unit()
|
| | |
| | | OperationTimeHepler.Instance.operationEndEvent -= operationEndEvent;
|
| | | limitedTimePackageItemModel.UpdateLimitedTimePackageItem -= UpdateLimitedTimePackageItem;
|
| | | impactRankModel.inImpactRankUpdate -= InImpactRankUpdate;
|
| | | OpenServerModel.IsOpenEvent -= IsOpenEvent;
|
| | | }
|
| | |
|
| | | private void IsOpenEvent()
|
| | | {
|
| | | Classify();
|
| | | }
|
| | |
|
| | | private void InImpactRankUpdate()
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | else if (IndexOf == 7)
|
| | | {
|
| | | 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);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Button m_AllThePeopleBtn;//全民冲榜
|
| | | [SerializeField] Button m_FlashRushBtn;//限时抢购
|
| | | [SerializeField] Button m_CrossServerBtn;//跨服1V1按钮
|
| | | [SerializeField] Button m_OpenServiceBtn;//周狂欢按钮
|
| | | private bool _bool = true;
|
| | | private int swicthCdTime = 0;
|
| | | private bool IsFadeOut = true;
|
| | |
| | | m_AllThePeopleBtn.AddListener(OnClickmAllThePeopleBtn);
|
| | | m_FlashRushBtn.AddListener(OnClickFlashRushBtn);
|
| | | m_CrossServerBtn.AddListener(OnClickCrossServerBtn);
|
| | | m_OpenServiceBtn.AddListener(OnClickOpenServiceBtn);
|
| | | if (_bool)
|
| | | {
|
| | | ColseButton();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | void OnClickOpenServiceBtn()
|
| | | {
|
| | | WindowCenter.Instance.Open<AchievementActivityWin>();
|
| | |
|
| | | }
|
| | | public void ShowButton()//向上
|
| | | {
|
| | |
|
| | |
| | | var bosses = ModelCenter.Instance.GetModel<DogzDungeonModel>().GetBosses();
|
| | | m_BossBriefInfos.Display(bosses);
|
| | | }
|
| | | else if (PlayerDatas.Instance.baseData.MapID == CrossServerBossModel.DATA_MAPID)
|
| | | {
|
| | | var bosses = ModelCenter.Instance.GetModel<CrossServerBossModel>().GetBosses();
|
| | | m_BossBriefInfos.Display(bosses);
|
| | | }
|
| | | else
|
| | | {
|
| | | var bosses = ModelCenter.Instance.GetModel<WorldBossModel>().GetWorldBosses(PlayerDatas.Instance.baseData.MapID);
|
| | |
| | | m_RedpackGetSfx.StopImediatly();
|
| | | }
|
| | | var requireRedpack = (OSEnvelopeModel.CanGetEnvelope()
|
| | | || redPacket.IsRedBagGetBool) && PlayerDatas.Instance.baseData.ExAttr5 != 1;
|
| | | || redPacket.IsRedBagGetBool) && !CrossServerUtility.IsCrossServer();
|
| | | if (requireRedpack)
|
| | | {
|
| | | m_RedBag.gameObject.SetActive(true);
|
| | |
| | | bool IsBossBool = MapArea.IsInMapArea(PlayerDatas.Instance.hero.CurMapArea, MapArea.E_Type.Boss);//是否在Boss区域
|
| | | int Line = 0;
|
| | | fairyGrabBossModel.TryGetFairyGrabBossLine(out Line);
|
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && Line== PlayerDatas.Instance.baseData.FBID)
|
| | | { |
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && Line == PlayerDatas.Instance.baseData.FBID)
|
| | | {
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)0);
|
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | | return;
|
| | |
| | | }
|
| | | if (PlayerDatas.Instance.baseData.MapID == 10040 && IsBossBool && Line != PlayerDatas.Instance.baseData.FBID)//逍遥城普通Boss区域处理
|
| | | {
|
| | | |
| | |
|
| | | DTCA202_tagMCAttackMode.Send_SwitchAttackMode((E_AttackMode)5);
|
| | | onMainModel.AreaState = Buffmodel.PkType;
|
| | | return;
|
| | |
| | |
|
| | | private void UpdateDungeonAssistImag()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | DungeonAssistImg.gameObject.SetActive(false);
|
| | | return;
|
| | |
| | |
|
| | | private void UpdateMysticalPurchaseImag()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | MysticalPurchaseImg.gameObject.SetActive(false);
|
| | | return;
|
| | |
| | |
|
| | | private void UpdateWishAwardImag()
|
| | | {
|
| | | if(PlayerDatas.Instance.baseData.ExAttr5 == 1)
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | WishingAwardImg.gameObject.SetActive(false);
|
| | | return;
|
| | |
| | | private void IsShowTaskPanel()//是否显示任务面板
|
| | | {
|
| | | var inDungeon = IsDungeon();
|
| | | var IsCrossServerOneVsOne = PlayerDatas.Instance.baseData.ExAttr5 == 1;
|
| | | if (inDungeon || fairyGrabBossModel.grabBossHintOpen || IsCrossServerOneVsOne)
|
| | | if (inDungeon || fairyGrabBossModel.grabBossHintOpen || CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | m_TaskAndTeamTip.SetActive(false);
|
| | | m_TaskSwithButton.gameObject.SetActive(false);
|
| | |
| | |
|
| | | private void IsCrossServerOneVsOne()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)//是否再跨服副本中
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne())//是否再跨服副本中
|
| | | {
|
| | | WindowCenter.Instance.Open<FightingPKWin>();
|
| | | m_HeadPortraitTip.gameObject.SetActive(false);
|
| | |
| | | public class MapSwitchingBehaviour:MonoBehaviour {
|
| | | [SerializeField] Button m_Btn_MapSwitch;
|
| | | List<int> MapIdList = new List<int>();
|
| | |
|
| | | DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | public void InitAwake()
|
| | |
| | | if (isOk)
|
| | | {
|
| | | MapTransferUtility.Instance.Clear();
|
| | | model.ExitCurrentDungeon();
|
| | | if (CrossServerUtility.IsCrossServerBoss()) |
| | | { |
| | | var crossServerBossModel = ModelCenter.Instance.GetModel<CrossServerBossModel>(); |
| | | crossServerBossModel.RequestExit(); |
| | | }
|
| | | else
|
| | | {
|
| | | model.ExitCurrentDungeon();
|
| | | }
|
| | | }
|
| | | });
|
| | | } |
| | |
| | | public int TaskAutoLv = 0;
|
| | | public int TaskAutoTime = 0;
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack
|
| | | {
|
| | | PlayerPackModel playerPack {
|
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | private PlayerPackModel m_PlayerBackModel;
|
| | | private PlayerPackModel PlayerBackModel
|
| | | {
|
| | | get
|
| | | {
|
| | | private PlayerPackModel PlayerBackModel {
|
| | | get {
|
| | | return m_PlayerBackModel ?? (m_PlayerBackModel = ModelCenter.Instance.GetModel<PlayerPackModel>());
|
| | | }
|
| | | }
|
| | |
| | | {
|
| | | yield break;
|
| | | }
|
| | |
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
|
| | | if (BountyDic.ContainsKey(_taskID) || FairyAuDic.ContainsKey(_taskID))
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS800;//缓冲一秒再进行
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, January 09, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | //成就活动面板 |
| | | public class AchievementActivityWin : Window |
| | | { |
| | | |
| | | #region Built-in |
| | | [SerializeField] FunctionButtonGroup FuncBtnGroup;
|
| | | [SerializeField] Button _CloseBtn;
|
| | | [SerializeField] Button _LeftBtn;
|
| | | [SerializeField] Button _RightBtn; |
| | | [SerializeField] FunctionButton m_OpenServiceAchievementBtn;//周狂欢 |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | _CloseBtn.AddListener(OnClickClose);
|
| | | _LeftBtn.AddListener(OnClickLeftBtn);
|
| | | _RightBtn.AddListener(OnClickRight); |
| | | m_OpenServiceAchievementBtn.AddListener(OpenServiceAchievementButton); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<MainInterfaceWin>())
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | } |
| | | functionOrder = 0;
|
| | | |
| | | } |
| | | |
| | | protected override void OnActived()
|
| | | {
|
| | | FuncBtnGroup.TriggerByOrder(functionOrder);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | CloseChild();
|
| | | if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | |
| | | public void OnClickClose()
|
| | | {
|
| | | Close();
|
| | | } |
| | | public void OnClickLeftBtn()
|
| | | {
|
| | | FuncBtnGroup.TriggerLast();
|
| | | } |
| | | |
| | | public void OnClickRight()
|
| | | {
|
| | | FuncBtnGroup.TriggerNext();
|
| | | }
|
| | |
|
| | | void CloseChild()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<OpenServiceAchievementWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<OpenServiceAchievementWin>();
|
| | | }
|
| | | } |
| | | |
| | | private void OpenServiceAchievementButton()
|
| | | {
|
| | | CloseChild();
|
| | | if (windowState == WindowState.Opened)
|
| | | {
|
| | | WindowCenter.Instance.OpenWithoutAnimation<OpenServiceAchievementWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<OpenServiceAchievementWin>(true);
|
| | | }
|
| | | functionOrder = 0;
|
| | | } |
| | | #endregion |
| | |
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3d89f97ebb8d8bf4ba18dd39af06835f |
| | | timeCreated: 1547026414 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 08, 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 OpenServiceAchievementCell : 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;//已领取次数
|
| | | OpenServiceAchievementModel model { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
|
| | | 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.WeekPartyDayInfoDic.ContainsKey(model.SelectedNow) || !model.WeekPartyActionDic.ContainsKey(ID))
|
| | | {
|
| | | return;
|
| | | }
|
| | | var WeekPartyAction = model.WeekPartyActionDic[ID];
|
| | | int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数
|
| | | int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数
|
| | | int number = WeekPartyAction.TotalTimes / WeekPartyAction.SingleTimes;
|
| | | if (number - rewardNum > 0)
|
| | | {
|
| | | m_TextA.text = Language.Get("OSA_1", (number - rewardNum));
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TextA.text = Language.Get("OSA_4");
|
| | | }
|
| | | m_TextB.text = string.Format(config.Description,1);
|
| | | m_TextC.text = Language.Get("OSA_2", WeekPartyAction.Point);
|
| | | for (int i = 0; i < m_ItemList.childCount; i++)
|
| | | {
|
| | | GameObject Obj = m_ItemList.GetChild(i).gameObject;
|
| | | ItemCell itemCell = Obj.GetComponent<ItemCell>();
|
| | | if (i < WeekPartyAction.WeekPartyItem.Length)
|
| | | {
|
| | | Obj.SetActive(true);
|
| | | var Item = WeekPartyAction.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);
|
| | | }
|
| | | }
|
| | | if (model.SelectedNow != model.DayNow)
|
| | | {
|
| | | if (model.SelectedNow > model.DayNow)//还未到达的天数
|
| | | {
|
| | | 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) / WeekPartyAction.SingleTimes;
|
| | | }
|
| | | if (TaypeNumber > 0)//可领
|
| | | {
|
| | | m_TextNumber.gameObject.SetActive(true);
|
| | | m_TextNumber.text = carryOutNum + "/" + number;
|
| | | 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(() =>
|
| | | {
|
| | | model.SendGetWeekParty(model.SelectedNow, ID);
|
| | | DebugEx.LogError("-----------------------------");
|
| | | });
|
| | | }
|
| | | 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) / WeekPartyAction.SingleTimes;
|
| | | }
|
| | | if (TaypeNumber > 0)//可领
|
| | | {
|
| | | m_TextNumber.gameObject.SetActive(true);
|
| | | m_TextNumber.text = carryOutNum + "/" + number;
|
| | | 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(() =>
|
| | | {
|
| | | model.SendGetWeekParty(model.SelectedNow, ID);
|
| | | DebugEx.LogError("-----------------------------");
|
| | | });
|
| | | }
|
| | | 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(true);
|
| | | m_TextNumber.text = carryOutNum + "/" + number;
|
| | | 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);
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4496751da23fc9a4398c7108cb98aa34 |
| | | timeCreated: 1546914150 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, January 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using Snxxz.UI;
|
| | | using System.Linq;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class ActionTypeClass
|
| | | {
|
| | | public int TemplateID; // 模板ID
|
| | | public int CurTimes; //已完成次数
|
| | | public int GotTimes; //已领取次数
|
| | | }
|
| | | public class WeekPartyDayInfoClass
|
| | | {
|
| | | public int DayIndex;//第X天
|
| | | public int Point;//积分
|
| | | public int AwardRecord;//领奖记录
|
| | | public ActionTypeClass[] ActionType;//领奖信息
|
| | | }
|
| | | public class TimeDayClass
|
| | | {
|
| | | public int Year;
|
| | | public int Month;
|
| | | public int Day;
|
| | | public string TimeStr;
|
| | | }
|
| | | public class WeekPartyItemClass
|
| | | {
|
| | | public int NeedPoint; // 领奖需要积分
|
| | | public int ItemID; // 物品ID
|
| | | public int ItemCnt; // 物品数量
|
| | | public int IsBind; // 是否绑定
|
| | | }
|
| | |
|
| | | public class WeekPartyDayClass
|
| | | {
|
| | | public int Day;
|
| | | public int[] TemplateList;// 模板列表
|
| | | public WeekPartyItemClass[] WeekPartyItem;//奖励列表
|
| | | }
|
| | |
|
| | | public class WeekPartyActionClass//模板信息
|
| | | {
|
| | | public int TemplateID; // 模板ID
|
| | | public int ActionType; // 活动类别
|
| | | public int TotalTimes; // 可完成的总次数,0表示不限次数
|
| | | public int SingleTimes; // 单次领奖需要的次数
|
| | | public int Point; // 单次领奖积分
|
| | | public WeekPartyItemClass[] WeekPartyItem;//物品奖励列表
|
| | |
|
| | | }
|
| | | public class OpenServiceAchievementModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public Dictionary<int, WeekPartyDayInfoClass> WeekPartyDayInfoDic = new Dictionary<int, WeekPartyDayInfoClass>();//每天领取奖励信息
|
| | | public event Action WeekPartyDayInfoUpdate;//领奖记录变更
|
| | | public TimeDayClass[] TimeDayBeginAndOver = new TimeDayClass[2];//开始和结束时间
|
| | | public int LimitLV = 0;//限制等级
|
| | | public Dictionary<int, WeekPartyDayClass> WeekPartyDayDic = new Dictionary<int, WeekPartyDayClass>();//每天的奖励信息
|
| | | public Dictionary<int, WeekPartyActionClass> WeekPartyActionDic = new Dictionary<int, WeekPartyActionClass>();//活动模板信息
|
| | | public Dictionary<int, Redpoint> RedPointDic = new Dictionary<int, Redpoint>();//红点
|
| | | public event Action WeekPartyUpdate;//活动信息变更
|
| | | private const int Redpoint_key = 214;//周狂欢红点
|
| | | public Redpoint redPointStre = new Redpoint(2, Redpoint_key);
|
| | | private const int Redpoint_key1 = 21401;//周狂欢红点
|
| | | public Redpoint redPointStre1 = new Redpoint(214, Redpoint_key1);
|
| | | private int _SelectedNow = 0;
|
| | | private int ResetType = 0;// 重置类型,0-0点重置;1-5点重置
|
| | | public event Action IsOpenEvent;
|
| | | public int SelectedNow//选中天
|
| | | {
|
| | | get { return _SelectedNow; }
|
| | | set { _SelectedNow = value; }
|
| | | }
|
| | |
|
| | | private int _DayNow = 0;
|
| | | public int DayNow//当前天
|
| | | {
|
| | | get { return _DayNow; }
|
| | | set { _DayNow = value; }
|
| | | }
|
| | |
|
| | | private bool _IsOpen = false;//功能是否开启
|
| | | public bool IsOpen
|
| | | {
|
| | | get { return _IsOpen; }
|
| | | set { _IsOpen = value; }
|
| | | }
|
| | | public override void Init()
|
| | | {
|
| | | |
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent;
|
| | | }
|
| | |
|
| | | private void secondEvent()
|
| | | {
|
| | | GetIsOpen();//判断功能是否开启
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void WeekPartyPlayerInfo(HAA0B_tagMCWeekPartyPlayerInfo 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;
|
| | | WeekPartyDayInfo.ActionType = new ActionTypeClass[DayInfo.ACount];
|
| | | 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;
|
| | | WeekPartyDayInfo.ActionType[k] = ActionType;
|
| | | }
|
| | | if (WeekPartyDayInfoDic.ContainsKey((int)DayInfo.DayIndex))
|
| | | {
|
| | | WeekPartyDayInfoDic[(int)DayInfo.DayIndex] = WeekPartyDayInfo;
|
| | | }
|
| | | else
|
| | | {
|
| | | WeekPartyDayInfoDic.Add((int)DayInfo.DayIndex, WeekPartyDayInfo);
|
| | | }
|
| | | }
|
| | | GetDayNow();//获取当前天数
|
| | | SetRedPoint();
|
| | | if (WeekPartyDayInfoUpdate != null)
|
| | | {
|
| | | WeekPartyDayInfoUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public void WeekPartyInfo(HAA0A_tagMCWeekPartyInfo info)
|
| | | {
|
| | | ResetType = info.ResetType;
|
| | | string[] dateArray = info.StartDate.Split('-');
|
| | | if (dateArray != null && dateArray.Length == 3)
|
| | | {
|
| | | TimeDayClass TimeDay = new TimeDayClass();
|
| | | TimeDay.Year = int.Parse(dateArray[0].Trim());
|
| | | TimeDay.Month = int.Parse(dateArray[1].Trim());
|
| | | TimeDay.Day = int.Parse(dateArray[2].Trim());
|
| | | TimeDay.TimeStr = info.StartDate;
|
| | | TimeDayBeginAndOver[0] = TimeDay;
|
| | | }
|
| | | string[] dateArrayO = info.EndtDate.Split('-');
|
| | | if (dateArrayO != null && dateArrayO.Length == 3)
|
| | | {
|
| | | TimeDayClass TimeDay = new TimeDayClass();
|
| | | TimeDay.Year = int.Parse(dateArrayO[0].Trim());
|
| | | TimeDay.Month = int.Parse(dateArrayO[1].Trim());
|
| | | TimeDay.Day = int.Parse(dateArrayO[2].Trim());
|
| | | TimeDay.TimeStr = info.EndtDate;
|
| | | TimeDayBeginAndOver[1] = TimeDay;
|
| | | }
|
| | | 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 (WeekPartyDayDic.ContainsKey(Index))
|
| | | {
|
| | | WeekPartyDayDic[Index] = WeekPartyDay;
|
| | | }
|
| | | else
|
| | | {
|
| | | WeekPartyDayDic.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 (WeekPartyActionDic.ContainsKey((int)ActionInfo.TemplateID))
|
| | | {
|
| | | WeekPartyActionDic[(int)ActionInfo.TemplateID] = WeekPartyAction;
|
| | | }
|
| | | else
|
| | | {
|
| | | WeekPartyActionDic.Add((int)ActionInfo.TemplateID, WeekPartyAction);
|
| | | }
|
| | | }// 活动模板信息
|
| | | GetDayNow();
|
| | | SetRedPoint();
|
| | | if (WeekPartyUpdate != null)
|
| | | {
|
| | | WeekPartyUpdate();
|
| | | }
|
| | |
|
| | | }
|
| | | public int GetRewardNumber(int Day, int ID)//获取领奖次数
|
| | | {
|
| | | int Num = -1;
|
| | | if (WeekPartyDayInfoDic.ContainsKey(Day))
|
| | | {
|
| | | var WeekPartyDay = WeekPartyDayInfoDic[Day];
|
| | |
|
| | | for (int i = 0; i < WeekPartyDay.ActionType.Length; i++)
|
| | | {
|
| | | var ActionType = WeekPartyDay.ActionType[i];
|
| | | if (ID == ActionType.TemplateID)
|
| | | {
|
| | | Num = ActionType.GotTimes;
|
| | | }
|
| | | }
|
| | | }
|
| | | return Num;
|
| | | }
|
| | | public int GetCarryOutNum(int Day, int ID)//获取已完成次数
|
| | | {
|
| | | int Num = 0;
|
| | | if (WeekPartyDayInfoDic.ContainsKey(Day))
|
| | | {
|
| | | var WeekPartyDay = WeekPartyDayInfoDic[Day];
|
| | |
|
| | | for (int i = 0; i < WeekPartyDay.ActionType.Length; i++)
|
| | | {
|
| | | var ActionType = WeekPartyDay.ActionType[i];
|
| | | if (ID == ActionType.TemplateID)
|
| | | {
|
| | | Num = ActionType.CurTimes;
|
| | | }
|
| | | }
|
| | | }
|
| | | return Num;
|
| | | }
|
| | |
|
| | | public int GetPoint(int day)//获取某一天的积分
|
| | | {
|
| | | int Point = 0;
|
| | | if (WeekPartyDayInfoDic.ContainsKey(day))
|
| | | {
|
| | | Point = WeekPartyDayInfoDic[day].Point;
|
| | | }
|
| | | return Point;
|
| | | }
|
| | |
|
| | | public void GetDayNow()//获取活动第几天
|
| | | {
|
| | | int Day = 0;
|
| | | var time = TimeDayBeginAndOver[0];
|
| | | if (TimeDayBeginAndOver.Length <= 0 || time == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | int hour = 0;
|
| | | if (ResetType == 0)
|
| | | {
|
| | | hour = 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | hour = 5;
|
| | | }
|
| | | DateTime time1 = new DateTime(time.Year, time.Month, time.Day, hour,0,0);
|
| | | DateTime time2 = new DateTime(TimeUtility.ServerNow.Year, TimeUtility.ServerNow.Month, TimeUtility.ServerNow.Day, TimeUtility.ServerNow.Hour, TimeUtility.ServerNow.Minute, TimeUtility.ServerNow.Second);
|
| | | TimeSpan ts = time2.Subtract(time1);
|
| | | Day = (int)ts.TotalDays;
|
| | | DebugEx.LogError("输出当前的天数" + Day);
|
| | | DayNow = Day;
|
| | | }
|
| | |
|
| | | public void SendGetWeekParty(int day, int temdayplateID)//领取周狂欢活动奖励
|
| | | {
|
| | | CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward();
|
| | | getReward.RewardType = (byte)GotServerRewardType.Def_RewardType_WeekPartyAct;
|
| | | getReward.DataEx = (uint)day;
|
| | | string StrID = temdayplateID.ToString();
|
| | | getReward.DataExStrLen = (byte)StrID.Length;
|
| | | getReward.DataExStr = StrID;
|
| | | GameNetSystem.Instance.SendInfo(getReward);
|
| | | }
|
| | | public void SendGetWeekPartyPoint(int day, int point)//领取周狂欢积分奖励
|
| | | {
|
| | | CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward();
|
| | | getReward.RewardType = (byte)GotServerRewardType.Def_RewardType_WeekPartyPoint;
|
| | | 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 WeekPartyDayInfoDic.Keys)
|
| | | {
|
| | | if (key == day)
|
| | | {
|
| | | AwardRecord = WeekPartyDayInfoDic[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 > 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | foreach (var key in WeekPartyDayInfoDic.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 (!WeekPartyDayDic.ContainsKey(day) || !WeekPartyDayInfoDic.ContainsKey(day))
|
| | | {
|
| | | return RedPointState.None;
|
| | | }
|
| | | WeekPartyDayClass WeekPartyDay = new WeekPartyDayClass();
|
| | | int point = WeekPartyDayInfoDic[day].Point;
|
| | | foreach (var key in WeekPartyDayDic.Keys)
|
| | | {
|
| | | if (key == day)
|
| | | {
|
| | | WeekPartyDay = WeekPartyDayDic[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.Simple;
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < WeekPartyDay.TemplateList.Length; i++)
|
| | | {
|
| | | var TemplateID = WeekPartyDay.TemplateList[i];
|
| | | if (WeekPartyActionDic.ContainsKey(TemplateID))
|
| | | {
|
| | | var WeekPartyAction = WeekPartyActionDic[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)
|
| | | {
|
| | | return RedPointState.Simple;
|
| | | }
|
| | | }
|
| | | }
|
| | | return RedPointState.None;
|
| | | }
|
| | |
|
| | | public int GetWeekDay(int dayIndex)//获取周几
|
| | | {
|
| | | int weekDay = 1;
|
| | | var time = TimeDayBeginAndOver[0];
|
| | | if (TimeDayBeginAndOver.Length <= 0 || time == null)
|
| | | {
|
| | | return weekDay;
|
| | | }
|
| | | DateTime time1 = new DateTime(time.Year, time.Month, time.Day);
|
| | | var time2= time1.AddDays(dayIndex);
|
| | | var dt = time2.DayOfWeek.ToString();
|
| | | switch (dt)
|
| | | {
|
| | | case "Monday":
|
| | | weekDay = 1;
|
| | | break;
|
| | | case "Tuesday":
|
| | | weekDay = 2;
|
| | | break;
|
| | | case "Wednesday":
|
| | | weekDay = 3;
|
| | | break;
|
| | | case "Thursday":
|
| | | weekDay = 4;
|
| | | break;
|
| | | case "Friday":
|
| | | weekDay = 5;
|
| | | break;
|
| | | case "Saturday":
|
| | | weekDay = 6;
|
| | | break;
|
| | | case "Sunday":
|
| | | weekDay = 0;
|
| | | break;
|
| | | }
|
| | | return weekDay;
|
| | | }
|
| | |
|
| | | public void GetIsOpen()
|
| | | {
|
| | | var time1 = TimeDayBeginAndOver[0];
|
| | | var time2 = TimeDayBeginAndOver[1];
|
| | | if (TimeDayBeginAndOver.Length <= 0 || time1 == null || time2 == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | int hour = 0;
|
| | | if (ResetType == 0)
|
| | | {
|
| | | hour = 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | hour = 5;
|
| | | }
|
| | | DateTime timeStar = new DateTime(time1.Year, time1.Month, time1.Day, hour,0,0);
|
| | | DateTime timeEnd = new DateTime(time2.Year, time2.Month, time2.Day, hour, 0, 0);
|
| | | DateTime timeNow= new DateTime(TimeUtility.ServerNow.Year, TimeUtility.ServerNow.Month, TimeUtility.ServerNow.Day, TimeUtility.ServerNow.Hour, TimeUtility.ServerNow.Minute, TimeUtility.ServerNow.Second);
|
| | | int PlayerLv = PlayerDatas.Instance.baseData.LV;
|
| | | if (PlayerLv >= LimitLV && timeNow >= timeStar && timeNow < timeEnd && !_IsOpen)
|
| | | {
|
| | | _IsOpen = true;
|
| | | if (IsOpenEvent != null)
|
| | | {
|
| | | IsOpenEvent();
|
| | | }
|
| | |
|
| | | }
|
| | | if (timeNow > timeEnd && _IsOpen)
|
| | | {
|
| | | _IsOpen = false;
|
| | | if (IsOpenEvent != null)
|
| | | {
|
| | | IsOpenEvent();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 47b6c129d29b8ca468b66b208c1da32c |
| | | timeCreated: 1546914598 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, January 07, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | using EnhancedUI.EnhancedScroller; |
| | | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | //开服成就
|
| | | [XLua.Hotfix] |
| | | public class OpenServiceAchievementWin : Window |
| | | { |
| | | [SerializeField] ScrollerController m_ScrollerController1;//天 |
| | | [SerializeField] ScrollerController m_ScrollerController2;//列表 |
| | | [SerializeField] Button m_CloseBtn; |
| | | [SerializeField] Text m_TextIntegral;//当前积分
|
| | | [SerializeField] GameObject m_One;
|
| | | [SerializeField] GameObject m_Two;
|
| | |
|
| | | [SerializeField] OpenServiceItem m_OpenServiceItemA;
|
| | | [SerializeField] OpenServiceItem m_OpenServiceItemA1;
|
| | | [SerializeField] OpenServiceItem m_OpenServiceItemB1;
|
| | |
|
| | | #region Built-in |
| | | OpenServiceAchievementModel model { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } }
|
| | | DailyQuestModel dailymodel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
|
| | | List<int> SortList = new List<int>(); |
| | | List<WeekPartyItemClass> ItemDayList = new List<WeekPartyItemClass>(); |
| | | protected override void BindController() |
| | | { |
| | | m_ScrollerController1.OnRefreshCell += OnRefreshGridCell_1; |
| | | m_ScrollerController2.OnRefreshCell += OnRefreshGridCell_2; |
| | | }
|
| | |
|
| | |
|
| | | protected override void AddListeners() |
| | | { |
| | | m_CloseBtn.AddListener(() => { Close(); }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | model.SelectedNow = model.DayNow;
|
| | | SetTextIntegral();
|
| | | OnCreateGridLineCell1(m_ScrollerController1);
|
| | | OnCreateGridLineCell2(m_ScrollerController2); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | model.WeekPartyDayInfoUpdate += WeekPartyDayInfoUpdate; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | model.WeekPartyDayInfoUpdate -= WeekPartyDayInfoUpdate; |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | private void WeekPartyDayInfoUpdate()//列表刷新
|
| | | {
|
| | | m_ScrollerController1.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | m_ScrollerController2.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | }
|
| | | #endregion |
| | | void OnCreateGridLineCell1(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | foreach (var key in model.WeekPartyDayDic.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;//选中
|
| | | 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)
|
| | | {
|
| | | 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)
|
| | | {
|
| | | SelectedObj.SetActive(true);
|
| | | SelectedObj1.SetActive(true);
|
| | | Unselected.SetActive(false);
|
| | | Lock.SetActive(false);
|
| | | IsNotGary.SetActive(true);
|
| | | Gary.SetActive(false);
|
| | | IsNotGary_text.text = (Index + 1).ToString();
|
| | | }
|
| | | Btn.SetListener(() =>
|
| | | {
|
| | | if (Index != model.SelectedNow && Index<= model.DayNow)
|
| | | {
|
| | | 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 = model.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.WeekPartyDayDic.Keys)
|
| | | {
|
| | | if (key == model.SelectedNow)
|
| | | {
|
| | | for (int i = 0; i < model.WeekPartyDayDic[key].TemplateList.Length; i++)
|
| | | {
|
| | | var TemplateId = model.WeekPartyDayDic[key].TemplateList[i];
|
| | | var config = Config.Instance.Get<WeekPartyConfig>(TemplateId);
|
| | | if (config == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (config.DailyQusetId != 0)
|
| | | {
|
| | | if (dailyIdlist.Contains(config.DailyQusetId))
|
| | | {
|
| | | SortList.Add(TemplateId);
|
| | | }
|
| | | // var Dailyquse = Config.Instance.Get<DailyQuestConfig>(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.WeekPartyActionDic.ContainsKey(ID))
|
| | | {
|
| | | var WeekPartyAction = model.WeekPartyActionDic[ID];
|
| | | int number = WeekPartyAction.TotalTimes / WeekPartyAction.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) / WeekPartyAction.SingleTimes;
|
| | | }
|
| | | if (TaypeNumber > 0)
|
| | | {
|
| | | Bool = true;
|
| | | }
|
| | | }
|
| | | return Bool;
|
| | | } |
| | | private bool Undone(int ID)//未完成
|
| | | {
|
| | | bool Bool = false;
|
| | | if (model.WeekPartyActionDic.ContainsKey(ID))
|
| | | {
|
| | | var WeekPartyAction = model.WeekPartyActionDic[ID];
|
| | | int number = WeekPartyAction.TotalTimes / WeekPartyAction.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) / WeekPartyAction.SingleTimes;
|
| | | }
|
| | | if (TaypeNumber <= 0)
|
| | | {
|
| | | Bool = true;
|
| | | }
|
| | | }
|
| | | return Bool;
|
| | | } |
| | | private bool Completed(int ID)//已领取
|
| | | {
|
| | | bool Bool = false;
|
| | | if (model.WeekPartyActionDic.ContainsKey(ID))
|
| | | {
|
| | | var WeekPartyAction = model.WeekPartyActionDic[ID];
|
| | | int number = WeekPartyAction.TotalTimes / WeekPartyAction.SingleTimes;
|
| | | int rewardNum = model.GetRewardNumber(model.SelectedNow, ID);//已领奖次数
|
| | | int carryOutNum = model.GetCarryOutNum(model.SelectedNow, ID);//已完成次数
|
| | | if (rewardNum > number)
|
| | | {
|
| | | Bool = true;
|
| | | }
|
| | | }
|
| | | return Bool;
|
| | | } |
| | | private int SizeId(int ID)
|
| | | {
|
| | | int index = 1;
|
| | | var config = Config.Instance.Get<WeekPartyConfig>(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.WeekPartyDayDic.Keys)
|
| | | {
|
| | | if (key == model.SelectedNow)
|
| | | {
|
| | | for (int i = 0; i < model.WeekPartyDayDic[key].WeekPartyItem.Length; i++)
|
| | | {
|
| | | ItemDayList.Add(model.WeekPartyDayDic[key].WeekPartyItem[i]);
|
| | | }
|
| | | }
|
| | | }
|
| | | if (ItemDayList.Count > 1)
|
| | | {
|
| | | m_One.SetActive(false);
|
| | | m_Two.SetActive(true);
|
| | | m_OpenServiceItemA1.SetReward(model.SelectedNow, ItemDayList[0],0);
|
| | | m_OpenServiceItemB1.SetReward(model.SelectedNow, ItemDayList[1],1);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_One.SetActive(true);
|
| | | m_Two.SetActive(false);
|
| | | m_OpenServiceItemA.SetReward(model.SelectedNow, ItemDayList[0], 0);
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a3ac1f2d21d751d44b6ccc8660a4514d |
| | | timeCreated: 1546852387 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, January 09, 2019 |
| | | //-------------------------------------------------------- |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix] |
| | | public class OpenServiceItem : 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; |
| | | OpenServiceAchievementModel model { get { return ModelCenter.Instance.GetModel<OpenServiceAchievementModel>(); } } |
| | | public void SetReward(int day, WeekPartyItemClass item, int index)
|
| | | {
|
| | |
|
| | | 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(() =>
|
| | | {
|
| | | model.SendGetWeekPartyPoint(model.SelectedNow, item.NeedPoint);
|
| | | });
|
| | | 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);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0b9e5e0dad0ffd24c91131cd43d537a2 |
| | | timeCreated: 1547014454 |
| | | licenseType: Free |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | using System.Text;
|
| | |
|
| | | [XLua.LuaCallCSharp]
|
| | | public class PlayerDeadModel : Model, IBeforePlayerDataInitialize,IPlayerLoginOk
|
| | | public class PlayerDeadModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public int[]dungeonKillArray { get; private set; }
|
| | | public int deadBuffId { get; private set;}
|
| | | public int maxDeadBuffLV { get; private set;}
|
| | | public int[] dungeonKillArray { get; private set; }
|
| | | public int deadBuffId { get; private set; }
|
| | | public int maxDeadBuffLV { get; private set; }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | public bool isBossKill = false;
|
| | | public float duplicatesRebornTime = 0;
|
| | | private Dictionary<int, int> duplicatesRebornDict;
|
| | | public bool playerIsDie
|
| | | {
|
| | | public bool playerIsDie {
|
| | | get {
|
| | |
|
| | | if(PlayerDatas.Instance.hero != null)
|
| | | if (PlayerDatas.Instance.hero != null)
|
| | | {
|
| | | return PlayerDatas.Instance.hero.ActorInfo.serverDie;
|
| | | }
|
| | |
| | | private DungeonOpenTimeConfig _dungeonOpenTimeModel;
|
| | |
|
| | | public bool IsCanReborn { get; private set; }
|
| | | public bool localBossState { get; private set;}
|
| | | public bool localBossState { get; private set; }
|
| | | public string killerName { get; private set; }
|
| | | public bool isKillByPlayer { get; private set; }
|
| | | public int npcRealmLv { get; private set; }
|
| | |
| | | }
|
| | | break;
|
| | | case "GeRen_chenxin_279029":
|
| | | if(infolist.Count > 0)
|
| | | if (infolist.Count > 0)
|
| | | {
|
| | | WorldBossConfig bossConfig = Config.Instance.Get<WorldBossConfig>(int.Parse(infolist[0].ToString()));
|
| | | NPCConfig nPCConfig = Config.Instance.Get<NPCConfig>(int.Parse(infolist[0].ToString()));
|
| | | if(nPCConfig != null)
|
| | | if (nPCConfig != null)
|
| | | {
|
| | | killerName = nPCConfig.charName;
|
| | | npcRealmLv = nPCConfig.Realm;
|
| | | }
|
| | | if(bossConfig != null)
|
| | | if (bossConfig != null)
|
| | | {
|
| | | localBossState = true;
|
| | | }
|
| | |
| | | break;
|
| | | case "RobotKill_1":
|
| | | if (infolist.Count > 1)
|
| | | { |
| | | {
|
| | | int objId = int.Parse(infolist[0].ToString());
|
| | | int npcId = int.Parse(infolist[1].ToString());
|
| | | killerName = activityModel.GetAncientRobotName(objId,npcId);
|
| | | killerName = activityModel.GetAncientRobotName(objId, npcId);
|
| | | isKillByPlayer = false;
|
| | | }
|
| | | |
| | |
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | public bool CheckIsRealmSuppress(out StringBuilder builder)
|
| | | {
|
| | | builder = new StringBuilder();
|
| | | if(npcRealmLv > PlayerDatas.Instance.baseData.realmLevel)
|
| | | if (npcRealmLv > PlayerDatas.Instance.baseData.realmLevel)
|
| | | {
|
| | | var curRealmConfig = Config.Instance.Get<RealmConfig>(npcRealmLv);
|
| | | builder.AppendFormat("<Img img={0}/>", curRealmConfig.Img);
|
| | |
| | | autoRebornTime = RebornConditions[3];
|
| | | }
|
| | |
|
| | | if(!WindowCenter.Instance.IsOpen<RebornWin>())
|
| | | if (!WindowCenter.Instance.IsOpen<RebornWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<RebornWin>();
|
| | | }
|
| | |
| | |
|
| | | TimeDownMgr.Instance.Begin(TimeDownMgr.CoolTimeType.DuplicatesReborn, this.duplicatesRebornTime, RefreshDuplicatesRebornCD);
|
| | |
|
| | | switch(PlayerDatas.Instance.baseData.MapID)
|
| | | switch (PlayerDatas.Instance.baseData.MapID)
|
| | | {
|
| | | case 31150:
|
| | | if (dungeonModel.mission.score >= 100)
|
| | | {
|
| | | if(!WindowCenter.Instance.IsOpen<ElderGodAreaExitWin>())
|
| | | if (!WindowCenter.Instance.IsOpen<ElderGodAreaExitWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<ElderGodAreaExitWin>();
|
| | | }
|
| | |
| | | }
|
| | | break;
|
| | | case 31110:
|
| | | if(dungeonModel.mission.leaderID != playerId)
|
| | | if (dungeonModel.mission.leaderID != playerId)
|
| | | {
|
| | | if (!WindowCenter.Instance.IsOpen<ReliveWin>())
|
| | | {
|
| | |
| | | if (config != null)
|
| | | {
|
| | | m_RealmIcon.SetSprite(config.Img);
|
| | | m_RealmIcon.SetNativeSize();
|
| | | }
|
| | | DisplaySfx(realmLv);
|
| | | }
|
| | |
| | | if (i == start)
|
| | | {
|
| | | rect.anchoredPosition = new Vector2(m_StartRealmPositionx, 0);
|
| | | leftRatio = (m_StartRealmPositionx + m_RealmStages[0].GetWidth(i) / 2) / m_ContainerPoint.rect.width;
|
| | | leftRatio = (m_StartRealmPositionx + m_RealmStages[0].GetWidth(i)) / m_ContainerPoint.rect.width;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | rect.anchoredPosition = new Vector2(positionx, 0);
|
| | | if (i == realmLevel)
|
| | | {
|
| | | leftRatio = (positionx + m_RealmStages[0].GetWidth(i) / 2) / m_ContainerPoint.rect.width;
|
| | | leftRatio = (positionx + m_RealmStages[0].GetWidth(i)) / m_ContainerPoint.rect.width;
|
| | | }
|
| | | }
|
| | | m_RealmStages[index].gameObject.SetActive(true);
|
| | |
| | | {
|
| | | rect.pivot = middleCenter;
|
| | | rect.anchoredPosition = new Vector2(m_EndRealmPositionx, 0);
|
| | | rightRatio = Mathf.Abs(m_EndRealmPositionx) / m_ContainerPoint.rect.width;
|
| | | rightRatio = Mathf.Abs(m_EndRealmPositionx - m_BigRealmBottomWidth / 2) / m_ContainerPoint.rect.width;
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | rect.anchoredPosition = new Vector2(positionx, 0);
|
| | | if (i == realmLevel + 1)
|
| | | {
|
| | | rightRatio = (Mathf.Abs(positionx) + m_RealmStages[0].GetWidth(i) / 2) / m_ContainerPoint.rect.width;
|
| | | rightRatio = (Mathf.Abs(positionx) + m_RealmStages[0].GetWidth(i)) / m_ContainerPoint.rect.width;
|
| | | }
|
| | | }
|
| | | m_RealmStages[index].gameObject.SetActive(true);
|
| | |
| | | /// </summary>
|
| | | private void AutoDrugSetting()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1) return;
|
| | | if (CrossServerUtility.IsCrossServerOneVsOne()) return;
|
| | |
|
| | | float hpPercent = Mathf.RoundToInt((float)PlayerDatas.Instance.baseData.HP / PlayerDatas.Instance.extersion.MaxHP * 100);
|
| | | if (hpPercent <= HangUpSetModel.Instance.GetHpSet())
|
| | |
| | |
|
| | | private void OnInvitationsChange()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.ExAttr5 == 1)
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | m_Invitations.gameObject.SetActive(false);
|
| | | }
|
| | |
| | | RegisterModel<MysticalPurchaseModel>();
|
| | | RegisterModel<FuncSwitchModel>();
|
| | | RegisterModel<CrossServerOneVsOneModel>();
|
| | | RegisterModel<CrossServerRewardModel>();
|
| | | RegisterModel<CrossServerOneVsOneRewardModel>();
|
| | | RegisterModel<GatheringSoulModel>();
|
| | | RegisterModel<VirtualPackModel>();
|
| | | RegisterModel<GatherSoulComposeModel>();
|
| | | RegisterModel<GatherSoulDungeonModel>();
|
| | | RegisterModel<KingTreasureModel>();
|
| | | RegisterModel<CrossServerBossModel>();
|
| | | RegisterModel<OpenServiceAchievementModel>();
|
| | | RegisterModel<FashionDressModel>();
|
| | | inited = true;
|
| | | }
|
| | |
| | | case JumpUIType.RoleFunc4:
|
| | | case JumpUIType.GatherSoul272:
|
| | | case JumpUIType.GatherSoul273:
|
| | | case JumpUIType.FashionDress280:
|
| | | SetJumpLogic<RolePanel>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.KnapSackFunc1:
|
| | |
| | | CrossServerOneVsOne277 = 277, //跨服赛季段位奖励界面
|
| | | CrossServerOneVsOne278 = 278, //跨服赛季赛季奖励界面
|
| | | CrossServerOneVsOne279 = 279, //跨服赛季荣誉商店界面
|
| | | FashionDress280 = 280, //时装功能界面
|
| | | DhszTs = 1001,//定海神针功法提升界面
|
| | | HyqTs = 1002,//皓月枪功法提升界面
|
| | | GyzTs = 1003,//鬼牙刃功法提升界面
|
| | |
| | | m_MapLineSwitch.gameObject.SetActive(false);
|
| | |
|
| | | var config = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | m_WorldMap.gameObject.SetActive(config.MapFBType == (int)MapType.OpenCountry);
|
| | | m_WorldMap.gameObject.SetActive(!CrossServerUtility.IsCrossServer() && config.MapFBType == (int)MapType.OpenCountry);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | var mapConfig = Config.Instance.Get<MapConfig>(mapId);
|
| | | m_MapName.text = mapConfig.Name;
|
| | |
|
| | | m_MapLineSwitch.gameObject.SetActive(mapId == PlayerDatas.Instance.baseData.MapID);
|
| | | m_MapLineSwitch.gameObject.SetActive(!CrossServerUtility.IsCrossServer() && mapId == PlayerDatas.Instance.baseData.MapID);
|
| | | var grabBossLine = 0;
|
| | | fairyGrabBossModel.TryGetFairyGrabBossLine(out grabBossLine);
|
| | | if (grabBossLine != 0 && PlayerDatas.Instance.baseData.FBID == grabBossLine)
|
| | |
| | | C320C_tagCGMCMD gmCmd = new C320C_tagCGMCMD();
|
| | | gmCmd.Cmd = "KillScreenNPC";
|
| | | gmCmd.CmdLen = 13;
|
| | | GameNetSystem.Instance.SendInfo(gmCmd);
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | GameNetSystem.Instance.SendToCrossServer(gmCmd);
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNetSystem.Instance.SendInfo(gmCmd);
|
| | | }
|
| | | }
|
| | |
|
| | | if (StageManager.Instance.CurrentStage != null)
|
| | |
| | | }
|
| | |
|
| | | UpdateNpcRebornTime(_npcId);
|
| | | m_FuncTxt.gameObject.SetActive(PlayerDatas.Instance.baseData.FBID != 0);
|
| | | m_FuncTxt.gameObject.SetActive(!CrossServerUtility.IsCrossServer() && PlayerDatas.Instance.baseData.FBID != 0);
|
| | | m_FuncTxt.text = Language.Get("BossReborn_Transfer");
|
| | | }
|
| | |
|
| | | private void OnClickNpcReborn(E_NpcType _npcType, int _npcId, uint arg3)
|
| | | {
|
| | | if (CrossServerUtility.IsCrossServer())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | if (_npcType != E_NpcType.Func)
|
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | var _cfg = BossInfoConfig.GetBossInfoByStoneId(_npcId);
|
| | | if (_cfg != null)
|
| | | {
|
| | |
| | | ElderGodArea = 3,
|
| | | DemonJar = 4,
|
| | | DogzDungeon = 5,
|
| | | CrossServerBoss=6,
|
| | | None = 99,
|
| | | }
|
| | |
|
| | |
| | | Def_RewardType_WishingWell = 16,// 许愿池奖励16
|
| | | Def_RewardType_OpenFunc = 17,//功能预告奖励
|
| | | Def_RewardType_TotalRecharge = 18,//累计充值奖励
|
| | | Def_RewardType_IceLodeStar, //冰晶矿脉星级奖励19
|
| | | Def_RewardType_IceLodeStar=19, //冰晶矿脉星级奖励19
|
| | | Def_RewardType_WeekPartyAct=20, //领取周狂欢活动奖励20
|
| | | Def_RewardType_WeekPartyPoint=21,// 领取周狂欢积分奖励21
|
| | |
|
| | | }
|
| | |
|