Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: 第二世界
|
| | | // [ Date ]: Tuesday, August 28, 2018
|
| | | // [ Date ]: Friday, September 28, 2018
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using UnityEngine;
|
| | |
| | | public int[] Job3;
|
| | | public int KillHurtMin { get ; private set ; }
|
| | | public int KillHurtMax { get ; private set ; }
|
| | | public string RewardDescription { get ; private set; } |
| | |
|
| | | public override string getKey()
|
| | | {
|
| | |
| | | KillHurtMin=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
|
| | |
|
| | | KillHurtMax=IsNumeric(rawContents[14]) ? int.Parse(rawContents[14]):0;
|
| | | |
| | | RewardDescription = rawContents[15].Trim();
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 7e442059ea96745478dd5787f9e84ef5 |
| | | timeCreated: 1535448421 |
| | | timeCreated: 1538136681 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | case 31230: |
| | | |
| | | break; |
| | | case 31160: |
| | | BattleHint.Instance.UpdateDungeonHelp(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | |
| | | GActorPlayerBase _player = GAMgr.Instance.GetBySID(vNetData.PlayerID) as GActorPlayerBase;
|
| | | if (_player != null)
|
| | | {
|
| | | var titleId = PlayerDatas.Instance.baseData.MapID == 31160 ? 0 : vNetData.GradID;//上古战场不显示称号
|
| | | _player.SwitchTitle(titleId);
|
| | | //var titleId = PlayerDatas.Instance.baseData.MapID == 31160 ? 0 : vNetData.GradID;//上古战场不显示称号
|
| | | _player.SwitchTitle(vNetData.GradID);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | |
| | | bool m_ShowFakeLine = false; |
| | | public bool showFakeLine { |
| | | get { return m_ShowFakeLine; } |
| | | set { m_ShowFakeLine = value; } |
| | | get { |
| | | if (TimeUtility.OpenDay < GeneralConfig.Instance.bossShuntDays |
| | | && GeneralConfig.Instance.neutralMaps.Contains(PlayerDatas.Instance.baseData.MapID)) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return m_ShowFakeLine; |
| | | } |
| | | set { |
| | | m_ShowFakeLine = value; |
| | | } |
| | | } |
| | | |
| | | public BossFakeLineUtility() |
| | |
| | | |
| | | public void RecordSawStone(int npcId, int lineId) |
| | | { |
| | | var bossInfo = BossInfoConfig.GetBossInfoByStoneId(npcId); |
| | | if (bossInfo != null) |
| | | { |
| | | if (HasSawLineBossRecently(bossInfo.NPCID, lineId)) |
| | | { |
| | | bossSawRecorder.Clear(); |
| | | } |
| | | } |
| | | |
| | | stoneSawRecorder.Record(npcId, lineId, Time.realtimeSinceStartup); |
| | | } |
| | | |
| | |
| | | |
| | | public void RecordSawBoss(int bossId, int lineId) |
| | | { |
| | | if (HasSawLineStoneRecently(bossId, lineId)) |
| | | { |
| | | stoneSawRecorder.Clear(); |
| | | } |
| | | |
| | | bossSawRecorder.Record(bossId, lineId, Time.realtimeSinceStartup); |
| | | } |
| | | |
| | |
| | | if (Time.realtimeSinceStartup - m_ChkOpenAutoEscapeTime > 2f)
|
| | | {
|
| | | int _dgDataID = dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
|
| | | var dungeonOpen = Config.Instance.Get<DungeonOpenTimeConfig>(_dgDataID);
|
| | |
|
| | | if (dungeonOpen != null)
|
| | | if (Config.Instance.ContainKey<DungeonOpenTimeConfig>(_dgDataID))
|
| | | {
|
| | | var dungeonOpen = Config.Instance.Get<DungeonOpenTimeConfig>(_dgDataID);
|
| | | if (dungeonOpen.DoFight == 1)
|
| | | {
|
| | | forceAutoFight = true;
|
| | |
| | | var titleModel = ModelCenter.Instance.GetModel<TitleModel>();
|
| | | var _title = titleModel.GetTitleEquip();
|
| | | uint _titleID = 0;
|
| | | if (_title != null && titleModel.IsTitleGain(_title.id)
|
| | | && PlayerDatas.Instance.baseData.MapID != 31160)//上古战场不显示称号
|
| | | if (_title != null && titleModel.IsTitleGain(_title.id))//上古战场不显示称号
|
| | | {
|
| | | _titleID = (uint)_title.id;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | base.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON);
|
| | | CheckAncientHeadUp();
|
| | | }
|
| | |
|
| | | public sealed override void SwitchRedName(bool on)
|
| | |
| | | m_HeadUpName = HeadUpName.RequireHeadUpName(HeadUpName.Pattern.Player, MP_Name, 0, CameraController.Instance.CameraObject);
|
| | | }
|
| | |
|
| | | var titleId = PlayerDatas.Instance.baseData.MapID == 31160 ? 0 : ActorInfo.titleID;
|
| | | m_HeadUpName.SetPlayerInfo((int)ActorInfo.realm, titleId, ActorInfo.PlayerName, ActorInfo.familyName, m_H0434.State == 1);
|
| | | m_HeadUpName.SetPlayerInfo((int)ActorInfo.realm, ActorInfo.titleID, ActorInfo.PlayerName, ActorInfo.familyName, m_H0434.State == 1);
|
| | |
|
| | | if (StatusMgr.Instance.IsExist(ServerInstID, StatusMgr.Instance.bossBelongBuffID))
|
| | | {
|
| | |
| | | }
|
| | |
|
| | | base.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON);
|
| | | CheckAncientHeadUp();
|
| | | }
|
| | |
|
| | | public sealed override void SwitchRedName(bool on)
|
| | |
| | |
|
| | | public JobSetupConfig JobSetup { get; protected set; }
|
| | |
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | public override int NextAction
|
| | | {
|
| | | get
|
| | |
| | | MovingState = E_MovingState.Normal;
|
| | |
|
| | | SystemSetting.Instance.qualityLevelChangeEvent += OnGameQualityChange;
|
| | | dungeonModel.updateMissionEvent += CheckAncientHeadUp;
|
| | | base.OnInit(package);
|
| | | }
|
| | |
|
| | |
| | | JobSetup = null;
|
| | |
|
| | | SystemSetting.Instance.qualityLevelChangeEvent -= OnGameQualityChange;
|
| | | dungeonModel.updateMissionEvent -= CheckAncientHeadUp;
|
| | |
|
| | | base.OnUnit();
|
| | | }
|
| | |
| | | UpdateRush();
|
| | | }
|
| | |
|
| | | public void CheckAncientHeadUp()
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.MapID == 31160)
|
| | | {
|
| | | var help = dungeonModel.mission;
|
| | | SwitchAncientKing(help.topPlayerID == ServerInstID);
|
| | | SwitchAncientEnemy(help.enemyID == ServerInstID && ServerInstID != PlayerDatas.Instance.baseData.PlayerID);
|
| | | }
|
| | | else
|
| | | {
|
| | | SwitchAncientKing(false);
|
| | | SwitchAncientEnemy(false);
|
| | | }
|
| | | }
|
| | | //public void CheckAncientHeadUp()
|
| | | //{
|
| | | // if (PlayerDatas.Instance.baseData.MapID == 31160)
|
| | | // {
|
| | | // var help = dungeonModel.mission;
|
| | | // SwitchAncientKing(help.topPlayerID == ServerInstID);
|
| | | // SwitchAncientEnemy(help.enemyID == ServerInstID && ServerInstID != PlayerDatas.Instance.baseData.PlayerID);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // SwitchAncientKing(false);
|
| | | // SwitchAncientEnemy(false);
|
| | | // }
|
| | | //}
|
| | |
|
| | | #region 装备穿戴相关
|
| | |
|
| | |
| | |
|
| | | m_FabaoEffect = SFXPlayUtility.Instance.PlayWithEulerAngle(1051, new Vector3(129.98f, 51.548f, 33.13f), new Vector3(0, -90.81f, 0));
|
| | |
|
| | | if (PlayerDatas.Instance.hero!=null)
|
| | | {
|
| | | PlayerDatas.Instance.hero.MoveToPosition(m_SecondTransferStartPos);
|
| | | }
|
| | |
|
| | | DebugEx.Log("第四个对话结束...");
|
| | | }
|
| | |
|
| | |
| | | _hero.IdleImmediate();
|
| | |
|
| | | _hero.SetFairyLeagueHeadUp(PlayerDatas.Instance.baseData.MapID == FairyLeagueModel.FAIRY_LEAGUE_DUNGEON);
|
| | | _hero.CheckAncientHeadUp();
|
| | | var titleId = 0;
|
| | | if (PlayerDatas.Instance.baseData.MapID != 31160)
|
| | | {
|
| | | var titelModel = ModelCenter.Instance.GetModel<TitleModel>();
|
| | | var title = titelModel.GetTitleEquip();
|
| | | titleId = title != null && titelModel.IsTitleGain(title.id) ? title.id : 0;
|
| | | }
|
| | | _hero.SwitchTitle((uint)titleId);
|
| | | //_hero.CheckAncientHeadUp();
|
| | | //var titleId = 0;
|
| | | //if (PlayerDatas.Instance.baseData.MapID != 31160)
|
| | | //{
|
| | | // var titelModel = ModelCenter.Instance.GetModel<TitleModel>();
|
| | | // var title = titelModel.GetTitleEquip();
|
| | | // titleId = title != null && titelModel.IsTitleGain(title.id) ? title.id : 0;
|
| | | //}
|
| | | //_hero.SwitchTitle((uint)titleId);
|
| | |
|
| | | // 判断buff
|
| | | if (StatusMgr.Instance.IsExist(PlayerDatas.Instance.PlayerId, StatusMgr.Instance.redNameBuffID))
|
| | |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | namespace Snxxz.UI
|
| | | {
|
| | | |
| | | |
| | | public class ActivitySettleWin : Window |
| | |
| | | [SerializeField] Button rewardGetBtn; |
| | | |
| | | DungeonModel m_DungeonModel; |
| | | DungeonModel dungeonModel { |
| | | get { |
| | | DungeonModel dungeonModel
|
| | | {
|
| | | get
|
| | | {
|
| | | return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); |
| | | } |
| | | } |
| | |
| | | |
| | | void ShowActivityReward() |
| | | { |
| | | foreach (var item in achieveItemCells) { |
| | | foreach (var item in achieveItemCells)
|
| | | {
|
| | | item.gameObject.SetActive(false); |
| | | } |
| | | foreach (var item in activityItemCells) { |
| | | foreach (var item in activityItemCells)
|
| | | {
|
| | | item.gameObject.SetActive(false); |
| | | } |
| | | var actiivityItems = dungeonModel.dungeonResult.itemInfo; |
| | | bool hasReward = actiivityItems != null && actiivityItems.Length > 0; |
| | | container_ActivityReward.gameObject.SetActive(hasReward); |
| | | activityNullReawrd.SetActive(!hasReward); |
| | | if (hasReward) { |
| | | for (int i = 0; i < actiivityItems.Length; i++) { |
| | | if (hasReward)
|
| | | {
|
| | | for (int i = 0; i < actiivityItems.Length; i++)
|
| | | {
|
| | | if (i < activityItemCells.Count)
|
| | | {
|
| | | activityItemCells[i].gameObject.SetActive(true); |
| | | ItemCell itemCell = activityItemCells[i]; |
| | | ServerItem serverItem = actiivityItems[i]; |
| | |
| | | ,"",PackType.rptDeleted,false,ConfigParse.Analysis(serverItem.UserData)); |
| | | itemCell.Init(cellModel); |
| | | itemCell.cellBtn.RemoveAllListeners(); |
| | | itemCell.cellBtn.AddListener(() => { |
| | | itemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | ShowItemDetails(serverItem); |
| | | }); |
| | | }
|
| | | } |
| | | } |
| | | |
| | |
| | | hasReward = achieveItems != null && achieveItems.Length > 0; |
| | | container_AchieveReward.gameObject.SetActive(hasReward); |
| | | achieveNullReawrd.SetActive(!hasReward); |
| | | if (hasReward) { |
| | | for (int i = 0; i < achieveItems.Length; i++) { |
| | | if (hasReward)
|
| | | {
|
| | | for (int i = 0; i < achieveItems.Length; i++)
|
| | | {
|
| | | if (i < achieveItemCells.Count)
|
| | | {
|
| | | achieveItemCells[i].gameObject.SetActive(true); |
| | | ItemCell itemCell = achieveItemCells[i]; |
| | | ServerItem serverItem = achieveItems[i]; |
| | |
| | | ,"" ,PackType.rptDeleted,false,ConfigParse.Analysis(serverItem.UserData)); |
| | | itemCell.Init(cellModel); |
| | | itemCell.cellBtn.RemoveAllListeners(); |
| | | itemCell.cellBtn.AddListener(() => { |
| | | itemCell.cellBtn.AddListener(() =>
|
| | | {
|
| | | ShowItemDetails(serverItem); |
| | | }); |
| | | }
|
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | private void ShowItemDetails(ServerItem serverItem) |
| | | { |
| | | //ItemWinModel itemWinModel = ItemCommonCtrl.Instance.OnSingleClickItemCell(serverItem.ItemID); |
| | | //itemWinModel.itemCount = serverItem.ItemCount; |
| | | //itemWinModel.isSuite = serverItem.IsSuite; |
| | | //itemWinModel.isBind = serverItem.IsBind; |
| | | //itemWinModel.userDataDict = serverItem.UserData == null ? null : ConfigParse.Analysis(serverItem.UserData); |
| | | //ItemPopModel.Instance.SetDefaultShowUIDict(itemWinModel, false); |
| | | //itemWinModel.SetShowWin(itemWinModel); |
| | | ItemAttrData attrData = new ItemAttrData(serverItem.ItemID,false, (ulong)serverItem.Count,-1,serverItem.IsBind |
| | | ,false,PackType.rptDeleted,"", ConfigParse.Analysis(serverItem.UserData)); |
| | | itemTipsModel.SetItemTipsModel(attrData); |
| | |
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | | WindowCenter.Instance.jumpWindowCloseEvent += CloseJumpWindow;
|
| | | |
| | | }
|
| | |
|
| | | protected override void AddListeners()
|
| | |
| | | protected override void OnPreOpen()
|
| | | {
|
| | | ComposeModel.ResetModel();
|
| | | if(WindowJumpMgr.Instance.IsJumpState)
|
| | |
|
| | | if (WindowJumpMgr.Instance.IsJumpState && ComposeModel.secondType == 0)
|
| | | {
|
| | | if(ComposeModel.CurComposeModel != null)
|
| | | {
|
| | |
| | | {
|
| | | if (!WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | private void CloseJumpWindow(Window win)
|
| | | {
|
| | | if(win as ComposeWin)
|
| | | {
|
| | | if (WindowJumpMgr.Instance.jumpPhase <= 1)
|
| | | {
|
| | | ComposeModel.SetCurComposeModel(null);
|
| | | }
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | public bool CheckIsPutOn(int id)
|
| | | {
|
| | | ItemConfig config = Config.Instance.Get<ItemConfig>(id);
|
| | | if (config == null) return false;
|
| | |
|
| | | int index = config.EquipPlace % 100 - 1;
|
| | | int color = GetDogzEquipLimitByIndex(presentSelectDogz, index);
|
| | | if (config.ItemColor >= color)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | SysNotifyMgr.Instance.ShowTip("DogzQualityAsk", GetDogzPartNameByIndex(index), GetItemColorName(color));
|
| | | return false;
|
| | | }
|
| | |
|
| | | #region 协议
|
| | |
|
| | | public int addAssistCnt { get; private set; } //额外购买的助战数
|
| | |
| | |
|
| | | private void SendPutOffEquip(int equipPlace)
|
| | | {
|
| | | if(playerPack.GetReaminGridCount(PackType.rptDogzItem) < 1)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("DogzBagFull");
|
| | | return;
|
| | | }
|
| | | GetDogzEquipPlaceStates(presentSelectDogz);
|
| | | CA5C1_tagCMDogzUnEquipItem dogzPutOff = new CA5C1_tagCMDogzUnEquipItem();
|
| | | dogzPutOff.DogzID = (byte)presentSelectDogz;
|
| | |
| | | }
|
| | | dogzItemList.Sort(CompareByDogzItemPack);
|
| | | return dogzItemList;
|
| | | }
|
| | |
|
| | | public int GetDogzPackMatNum()
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptDogzItem);
|
| | | if (singlePack == null) return 0;
|
| | |
|
| | | int num = 0;
|
| | | Dictionary<int, ItemModel> pairs = singlePack.GetPackModelIndexDict();
|
| | | foreach (var value in pairs.Values)
|
| | | {
|
| | | if(value.chinItemModel.EquipPlace == 0)
|
| | | {
|
| | | num += 1;
|
| | | }
|
| | | }
|
| | | return num;
|
| | | }
|
| | |
|
| | | public bool IsReachSelectCondi(int itemId)
|
| | |
| | | y = end.equipScore;
|
| | | if (x.CompareTo(y) != 0) return -x.CompareTo(y);
|
| | |
|
| | | List<int> strenglist = start.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
|
| | | x = strenglist != null ? strenglist[0] : 0;
|
| | | strenglist = end.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
|
| | | y = strenglist != null ? strenglist[0] : 0;
|
| | | if (x.CompareTo(y) != 0) return -x.CompareTo(y);
|
| | |
|
| | | return 0;
|
| | | }
|
| | | #endregion
|
| | |
| | | public class DogzPackCell : ScrollerUI |
| | | { |
| | | [SerializeField] List<DogzItemCell> dogzItemlist; |
| | | DogzPackModel m_Model; |
| | | DogzPackModel model |
| | | DogzModel m_Model;
|
| | | DogzModel model
|
| | | { |
| | | get |
| | | { |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DogzPackModel>()); |
| | | return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DogzModel>());
|
| | | } |
| | | } |
| | | public override void Refresh(CellView cell) |
| | |
| | | for (int i = 0; i < 4; i++) |
| | | { |
| | | var _index = _line * 4 + i; |
| | | dogzItemlist[i].gameObject.SetActive(true);
|
| | | if (model.SelectDogzItemQuality == 0
|
| | | && model.SelectDogzItemStart == 0)
|
| | | {
|
| | | int hideIndex = model.DogzPackGridCnt - model.GetDogzPackMatNum();
|
| | | if (_index >= hideIndex)
|
| | | {
|
| | | dogzItemlist[i].gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | |
| | | dogzItemlist[i].Display(_index); |
| | | } |
| | | } |
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzFunc101"), (bool isOk)=>
|
| | | {
|
| | | if(isOk)
|
| | | {
|
| | |
|
| | | }
|
| | | return;
|
| | | });
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzFunc101"));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | int putStrenLv = 0;
|
| | | if (itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
|
| | | {
|
| | | putStrenLv = itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
|
| | | }
|
| | |
|
| | | int selectStrenLv = 0;
|
| | | if (selectModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
|
| | | {
|
| | | selectStrenLv = selectModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
|
| | | }
|
| | |
|
| | | if (itemModel.chinItemModel.ItemColor < selectModel.chinItemModel.ItemColor
|
| | | || (itemModel.chinItemModel.StarLevel < selectModel.chinItemModel.StarLevel
|
| | | && itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor)
|
| | | || (itemModel.equipScore < selectModel.equipScore
|
| | | && itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor
|
| | | && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel))
|
| | | && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel)
|
| | | ||(itemModel.equipScore == selectModel.equipScore
|
| | | && itemModel.chinItemModel.ItemColor == selectModel.chinItemModel.ItemColor
|
| | | && itemModel.chinItemModel.StarLevel == selectModel.chinItemModel.StarLevel
|
| | | && putStrenLv < selectStrenLv))
|
| | | {
|
| | | indexlist.Add(dogzModel.selectEquipPlacelist[0].itemInfo.ItemPlace);
|
| | | }
|
| | |
| | | {
|
| | | dogzModel.SendPutOnEquip(indexlist);
|
| | | }
|
| | | else
|
| | | {
|
| | | if(dogzModel.GetDogzEquips(dogzModel.presentSelectDogz) != null |
| | | && dogzModel.GetDogzEquips(dogzModel.presentSelectDogz).Count == 5)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("DogzOneKeyBest");
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("DogzOneKeyNone");
|
| | | }
|
| | | |
| | | }
|
| | | }
|
| | |
|
| | | private void ClickStarSelect()
|
| | |
| | | {
|
| | | public class DungeonAncientTargetWin : Window
|
| | | {
|
| | | [SerializeField] Text m_DungeonName;
|
| | | [SerializeField] List<Text> m_DungeonTargets; |
| | | [SerializeField] DungeonTargetBehaviour m_DungeonTargetBehaviour;
|
| | |
|
| | | DungeonModel m_Model;
|
| | |
| | |
|
| | | protected override void OnPreClose()
|
| | | {
|
| | | //model.updateMissionEvent -= UpdateTargets;
|
| | | model.updateMissionEvent -= UpdateTargets; |
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | //model.updateMissionEvent += UpdateTargets;
|
| | | var line = PlayerDatas.Instance.baseData.FBID + 1;
|
| | | m_DungeonName.text = StringUtility.Contact(Language.Get("AncientBattle"), "(", Language.Get("FBLine", line), ")");
|
| | | model.updateMissionEvent += UpdateTargets; |
| | | m_DungeonTargetBehaviour.Init(31160);
|
| | | //UpdateTargets();
|
| | | UpdateTargets(); |
| | | }
|
| | |
|
| | | private void UpdateTargets()
|
| | | {
|
| | | //var _help = model.mission;
|
| | | //m_DungeonTargets[0].text = _help.topName;
|
| | | //m_DungeonTargets[1].text = UIHelper.ReplaceLargeNum(_help.topScore);
|
| | | var _help = model.mission; |
| | | m_DungeonTargets[0].text = _help.topName; |
| | | m_DungeonTargets[1].text = UIHelper.ReplaceLargeNum(_help.topScore); |
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] RectTransform m_ContainerResPoint;
|
| | | [SerializeField] RectTransform m_ContainerAncient;
|
| | | [SerializeField] Button m_AncientBtn;
|
| | | [SerializeField] Button m_AncientKing;
|
| | | [SerializeField] DungeonItemCollect m_ItemCollect;
|
| | | [SerializeField] DungeonGuardSkyBehaviour m_GuardSky;
|
| | | [SerializeField] DungeonBossBriefInfoContainer m_BossInfosContainer;
|
| | |
| | | {
|
| | | m_ExitDungeon.AddListener(ExitDungeon);
|
| | | m_AncientBtn.onClick.AddListener(OnAncientBtn);
|
| | | m_AncientKing.onClick.AddListener(AncientKing);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonAncientAchieveWin>();
|
| | | }
|
| | | }
|
| | |
|
| | | private void AncientKing()
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<DungeonAncientKingWin>())
|
| | | {
|
| | | WindowCenter.Instance.CloseImmediately<DungeonAncientKingWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<DungeonAncientKingWin>();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | var dict = singlepack.GetPackModelIndexDict();
|
| | | if (dict != null)
|
| | | {
|
| | | var badCompare = 1;
|
| | | foreach (var itemModel in dict.Values)
|
| | | {
|
| | | if (itemModel.chinItemModel.EquipPlace == config.EquipPlace
|
| | |
| | | && !ModelCenter.Instance.GetModel<PackModelInterface>().IsOverdue(itemModel.itemInfo.ItemGUID, itemModel.itemId, itemModel.useDataDict))
|
| | | {
|
| | | var compare = EquipCompare(itemModel, config);
|
| | | if (compare == -1 || compare == 0)
|
| | | if (compare == 0)
|
| | | {
|
| | | badCompare = compare;
|
| | | }
|
| | | if (compare == -1)
|
| | | {
|
| | | return compare;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (badCompare == 0)
|
| | | {
|
| | | return badCompare;
|
| | | }
|
| | | }
|
| | | }
|
| | | singlepack = packModel.GetSinglePackModel(PackType.rptEquip);
|
| | |
| | | m_BossIntroduce.Display(_bossId, false);
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId);
|
| | |
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(_bossId);
|
| | | m_RewardDescription.text = Language.Get(npcConfig.NPCLV >= GeneralConfig.Instance.demonJarLevelLimit ? "FindPrecious_13" : "FindPrecious_18");
|
| | |
|
| | | DemonJarBossData bossData;
|
| | | model.TryGetBossData(_bossId, out bossData);
|
| | | var npcDropConfig = Config.Instance.Get<NPCDropItemConfig>(bossData.id);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | |
|
| | | var demonJarConfig = Config.Instance.Get<DemonJarConfig>(model.selectedBoss);
|
| | | m_RewardDescription.text = Language.Get(demonJarConfig.RewardDescription);
|
| | |
|
| | | var doubleShowable = demonJarConfig.CanEnterTimes == 0;
|
| | | m_ContainerDouble.gameObject.SetActive(doubleShowable);
|
| | | if (doubleShowable)
|
| | |
| | |
|
| | | private void SetBottomUI()
|
| | | {
|
| | | if(itemAttrData.packType != PackType.rptDogzItem && itemAttrData.packType != PackType.rptDogzEquip)
|
| | | switch (itemAttrData.itemConfig.EquipPlace)
|
| | | {
|
| | | case 1:
|
| | | case 2:
|
| | | case 3:
|
| | | case 4:
|
| | | case 5:
|
| | | case 6:
|
| | | case 7:
|
| | | case 8:
|
| | | case 9:
|
| | | case 10:
|
| | | case 12:
|
| | | if (dogzEquipDesText != null)
|
| | | {
|
| | | dogzEquipDesText.gameObject.SetActive(false);
|
| | |
| | | SetBottomText(equipSourceDes);
|
| | | equipSourceText.text = itemAttrData.itemConfig.Description;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | break;
|
| | | case 101:
|
| | | case 102:
|
| | | case 103:
|
| | | case 104:
|
| | | case 105:
|
| | | equipSourceNormal.gameObject.SetActive(false);
|
| | | equipSourceDes.gameObject.SetActive(false);
|
| | | equipSourceText.gameObject.SetActive(false);
|
| | |
| | | dogzEquipDesText.gameObject.SetActive(true);
|
| | | dogzEquipDesText.text = itemAttrData.itemConfig.Description;
|
| | | }
|
| | | break;
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | | private void SetBottomText(EquipSource source)
|
| | |
| | | {
|
| | | case ItemWinType.equipWin:
|
| | | attrData.SetTipsFuncBtn(ItemWinBtnType.putOn, (ItemWinBtnType, ItemAttrData) => {
|
| | | if(dogzModel.CheckIsPutOn(attrData.itemId))
|
| | | {
|
| | | List<int> indexlist = new List<int>();
|
| | | indexlist.Add(attrData.index);
|
| | | dogzModel.SendPutOnEquip(indexlist);
|
| | | }
|
| | | |
| | | });
|
| | | break;
|
| | | }
|
| | |
| | | base.OnActived();
|
| | | this.transform.SetAsLastSibling();
|
| | | _ornamentTitle.state = TitleBtnState.Locked;
|
| | | if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0)
|
| | | if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0
|
| | | && playerPack.lookLineIndex == -1)
|
| | | {
|
| | | if(playerPack.redpointEquipDecom.state == RedPointState.Simple)
|
| | | {
|
| | |
| | | [SerializeField] Button PrayerButton;//祈愿
|
| | | [SerializeField] Button BountyTaskButton;//赏金
|
| | | [SerializeField] Button HangUpButton;//挂机
|
| | | [SerializeField] Button FairyTaskButton;//仙盟任务
|
| | | private int number = 0;
|
| | | DungeonModel m_DungeonModel;
|
| | | DungeonModel dungeonModel { get { return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); } }
|
| | |
| | | WorldBossButton.AddListener(() => {
|
| | | Close();
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>();
|
| | | });
|
| | | FairyTaskButton.AddListener(()=> |
| | | {
|
| | | Close();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.UnionTask);
|
| | | });
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | HangUpButton.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | if (FuncOpen.Instance.IsFuncOpen(16) && TaskAllocation.Instance.FairyAuAllNumber()<70)//仙盟任务
|
| | | {
|
| | | FairyTaskButton.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | FairyTaskButton.gameObject.SetActive(false);
|
| | | }
|
| | | for (int i = 0; i < Content.childCount; i++)
|
| | | {
|
| | |
|
| | |
| | | gridCtrl.Refresh();
|
| | | foreach (var key in taskmodel.SideQuestsDic.Keys)
|
| | | {
|
| | | if (taskmodel.SideQuestsDic[key].MissionState != 0)
|
| | | {
|
| | | if (TaskIdNow == 0)
|
| | | {
|
| | | TaskIdNow = key;
|
| | | }
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, key);
|
| | | }
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | var _position = (_list.Count - type) * m_SizeHeight + (_list.Count - type - 1) * 2;
|
| | | float _position = 0f;
|
| | | if (_list.Count >= 12)
|
| | | {
|
| | | _position = (12 - type) * m_SizeHeight + (12 - type - 1) * 2;
|
| | | }
|
| | | else
|
| | | {
|
| | | _position = (_list.Count - type) * m_SizeHeight + (_list.Count - type - 1) * 2;
|
| | | }
|
| | | _position -= 196;
|
| | | m_ScrollRect.verticalNormalizedPosition = Mathf.Clamp01(_position / ((Content as RectTransform).sizeDelta.y - 196));
|
| | | }
|
| | |
| | | {
|
| | | public class BattleHint : Singleton<BattleHint>
|
| | | {
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
|
| | | public BattleHint()
|
| | | {
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | SysNotifyMgr.Instance.OnSystemNotifyEvent += OnSystemNotifyEvent;
|
| | | }
|
| | |
|
| | | private void OnStageLoadFinish()
|
| | | public void OnStageLoadFinish()
|
| | | {
|
| | | Clear();
|
| | | //var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | //if (cacheMapId != 0 && cacheMapId != 31160
|
| | | // && mapId == 31160)
|
| | | //{
|
| | | // SnxxzGame.Instance.StartCoroutine(Co_LoadFinish());
|
| | | //}
|
| | | //var help = dungeonModel.mission;
|
| | | //ancientKing = mapId != 31160 ? 0 : help.topPlayerID;
|
| | | //cacheMapId = PlayerDatas.Instance.baseData.MapID;
|
| | | }
|
| | |
|
| | | public event Action battleHintUpdate;
|
| | | public event Action evenKillUpdate;
|
| | |
|
| | | Queue<string> battleHints = new Queue<string>();
|
| | | Queue<int> battleHints = new Queue<int>();
|
| | | Queue<string> evenKills = new Queue<string>();
|
| | |
|
| | | public void Receive(string msg)
|
| | | int ancientKing = 0;
|
| | | int cacheMapId = 0;
|
| | |
|
| | | IEnumerator Co_LoadFinish()
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage))
|
| | | yield return WaitingForSecondConst.WaitMS300;
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | if (mapId == 31160)
|
| | | {
|
| | | Receive(3);
|
| | | }
|
| | | }
|
| | |
|
| | | public void UpdateDungeonHelp()
|
| | | {
|
| | | var help = dungeonModel.mission;
|
| | | if (DTC0403_tagPlayerLoginLoadOK.finishedLogin)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.MapID == 31160
|
| | | && help.topPlayerID == PlayerDatas.Instance.baseData.PlayerID
|
| | | && ancientKing != help.topPlayerID)
|
| | | {
|
| | | ancientKing = help.topPlayerID;
|
| | | //Receive(1);
|
| | | }
|
| | | }
|
| | | ancientKing = help.topPlayerID;
|
| | | }
|
| | |
|
| | | private void OnSystemNotifyEvent(string msg)
|
| | | {
|
| | | if (!(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | || StageManager.Instance.isLoading)
|
| | | {
|
| | | return;
|
| | | }
|
| | | battleHints.Enqueue(msg);
|
| | | if (StageManager.Instance.isLoading)
|
| | | if (msg.Equals("AncientBattlefield_8"))
|
| | | {
|
| | | //Receive(2);
|
| | | }
|
| | | }
|
| | |
|
| | | public void Receive(int ancientType)
|
| | | {
|
| | | //battleHints.Enqueue(ancientType);
|
| | | //if (!WindowCenter.Instance.IsOpen<BattleHintWin>())
|
| | | //{
|
| | | // WindowCenter.Instance.Open<BattleHintWin>();
|
| | | //}
|
| | | //else
|
| | | //{
|
| | | // if (battleHintUpdate != null)
|
| | | // {
|
| | | // battleHintUpdate();
|
| | | // }
|
| | | //}
|
| | | }
|
| | |
|
| | | public void ReceiveEvenKill(string message, ArrayList list)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.MapID != 31160
|
| | | || !(StageManager.Instance.CurrentStage is DungeonStage)
|
| | | || StageManager.Instance.isLoading)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var evenKillCount = 0;
|
| | | if (list != null && list.Count > 0)
|
| | | {
|
| | | int.TryParse(list[0].ToString(), out evenKillCount);
|
| | | }
|
| | | if (evenKillCount == 0)
|
| | | {
|
| | | return;
|
| | | }
|
| | | message = message.Replace("%s0", evenKillCount.ToString());
|
| | | evenKills.Enqueue(message);
|
| | | if (!WindowCenter.Instance.IsOpen<BattleHintWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<BattleHintWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | if (battleHintUpdate != null)
|
| | | if (evenKillUpdate != null)
|
| | | {
|
| | | battleHintUpdate();
|
| | | evenKillUpdate();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public bool TryGetBattleHint(out string msg)
|
| | | public bool TryGetBattleHint(out int ancientType)
|
| | | {
|
| | | msg = string.Empty;
|
| | | ancientType = 0;
|
| | | if (battleHints.Count > 0)
|
| | | {
|
| | | msg = battleHints.Dequeue();
|
| | | ancientType = battleHints.Dequeue();
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool TryGetEvenKill(out string message)
|
| | | {
|
| | | message = string.Empty;
|
| | | if (evenKills.Count > 0)
|
| | | {
|
| | | message = evenKills.Dequeue();
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | |
| | | public void Clear()
|
| | | {
|
| | | battleHints.Clear();
|
| | | evenKills.Clear();
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | using System;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic;
|
| | | using TableConfig;
|
| | | using UnityEngine;
|
| | | using UnityEngine.UI;
|
| | |
|
| | |
| | |
|
| | | public class BattleHintWin : Window
|
| | | {
|
| | | [SerializeField] Image m_BattleHint;
|
| | | [SerializeField] RectTransform m_ContainerBattleHint;
|
| | | [SerializeField] RectTransform m_ContainerKing;
|
| | | [SerializeField] RectTransform m_ContainerEnemy;
|
| | | [SerializeField] RectTransform m_ContainerAncientRemind;
|
| | | [SerializeField] ScaleTween m_BattleHintTween;
|
| | | [SerializeField, Header("保留时间")] float m_KeepTime = 2f;
|
| | |
|
| | | bool inBattleHint = false;
|
| | | [SerializeField] RectTransform m_ContainerEvenKill;
|
| | | [SerializeField] ScaleTween m_EvenKillTween;
|
| | | [SerializeField] Text m_EvenKill;
|
| | | [SerializeField, Header("保留时间")] float m_EvenKillTime = 2f;
|
| | |
|
| | | bool isBattleHint = false;
|
| | | bool isEvenKill = false;
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | inBattleHint = false;
|
| | | m_BattleHintTween.gameObject.SetActive(false);
|
| | | m_ContainerBattleHint.gameObject.SetActive(false);
|
| | | m_ContainerEvenKill.gameObject.SetActive(false);
|
| | | isBattleHint = false;
|
| | | isEvenKill = false;
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | base.OnActived();
|
| | | DisplayBattleHint();
|
| | | DisplayEvenKill();
|
| | | BattleHint.Instance.battleHintUpdate += BattleHintUpdate;
|
| | | BattleHint.Instance.evenKillUpdate += EvenKillUpdate;
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | protected override void OnPreClose()
|
| | | {
|
| | | BattleHint.Instance.battleHintUpdate -= BattleHintUpdate;
|
| | | BattleHint.Instance.evenKillUpdate -= EvenKillUpdate;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | |
|
| | | private void BattleHintUpdate()
|
| | | {
|
| | | if (!inBattleHint)
|
| | | if (!isBattleHint)
|
| | | {
|
| | | DisplayBattleHint();
|
| | | }
|
| | |
| | |
|
| | | void DisplayBattleHint()
|
| | | {
|
| | | string iconKey = string.Empty;
|
| | | if (BattleHint.Instance.TryGetBattleHint(out iconKey))
|
| | | var ancientType = 0;
|
| | | if (BattleHint.Instance.TryGetBattleHint(out ancientType))
|
| | | {
|
| | | inBattleHint = true;
|
| | | m_BattleHint.SetSprite(iconKey);
|
| | | m_BattleHint.SetNativeSize();
|
| | | m_BattleHintTween.gameObject.SetActive(true);
|
| | | isBattleHint = true;
|
| | | m_ContainerKing.gameObject.SetActive(false);
|
| | | m_ContainerEnemy.gameObject.SetActive(false);
|
| | | m_ContainerAncientRemind.gameObject.SetActive(false);
|
| | | switch (ancientType)
|
| | | {
|
| | | case 1:
|
| | | m_ContainerKing.gameObject.SetActive(true);
|
| | | break;
|
| | | case 2:
|
| | | m_ContainerEnemy.gameObject.SetActive(true);
|
| | | break;
|
| | | case 3:
|
| | | m_ContainerAncientRemind.gameObject.SetActive(true);
|
| | | break;
|
| | | }
|
| | | m_ContainerBattleHint.gameObject.SetActive(true);
|
| | | m_BattleHintTween.SetStartState();
|
| | | m_BattleHintTween.Play(OnBattleHintTweenComplete);
|
| | | }
|
| | |
| | | StartCoroutine(Co_Complete());
|
| | | }
|
| | |
|
| | | private void EvenKillUpdate()
|
| | | {
|
| | | if (!isEvenKill)
|
| | | {
|
| | | DisplayEvenKill();
|
| | | }
|
| | | }
|
| | |
|
| | | void DisplayEvenKill()
|
| | | {
|
| | | string evenKill = string.Empty;
|
| | | if (BattleHint.Instance.TryGetEvenKill(out evenKill))
|
| | | {
|
| | | isEvenKill = true;
|
| | | m_EvenKill.text= evenKill;
|
| | | m_ContainerEvenKill.gameObject.SetActive(true);
|
| | | m_EvenKillTween.SetStartState();
|
| | | m_EvenKillTween.Play(OnEvenKillComplete);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnEvenKillComplete()
|
| | | {
|
| | | StartCoroutine(Co_EvenKill());
|
| | | }
|
| | |
|
| | | IEnumerator Co_Complete()
|
| | | {
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_KeepTime);
|
| | | inBattleHint = false;
|
| | | m_BattleHintTween.gameObject.SetActive(false);
|
| | | isBattleHint = false;
|
| | | m_ContainerBattleHint.gameObject.SetActive(false);
|
| | | DisplayBattleHint();
|
| | | }
|
| | |
|
| | | IEnumerator Co_EvenKill()
|
| | | {
|
| | | yield return WaitingForSecondConst.GetWaitForSeconds(m_EvenKillTime);
|
| | | isEvenKill = false;
|
| | | m_ContainerEvenKill.gameObject.SetActive(false);
|
| | | DisplayEvenKill();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitializeEvent;
|
| | | StageManager.Instance.onStageLoadFinish += OnStageLoadFinish;
|
| | | StartCoroutine(Co_Instance());
|
| | | }
|
| | |
|
| | | IEnumerator Co_Instance()
|
| | | {
|
| | | yield return null;
|
| | | var instance = BattleHint.Instance;
|
| | | }
|
| | |
|
| | | protected override void OnDestroy()
|
| | |
| | | private void OnStageLoadFinish()
|
| | | {
|
| | | ServerTipDetails.OnStageLoadFinish();
|
| | | BattleHint.Instance.OnStageLoadFinish();
|
| | | }
|
| | |
|
| | | private void BeforePlayerDataInitializeEvent()
|
| | |
| | | OnSysTipEvent(type[i], msg, tipInfoList);
|
| | | }
|
| | | break;
|
| | | case SysNotifyType.SysBattleHint:
|
| | | BattleHint.Instance.Receive(msg);
|
| | | case SysNotifyType.SysEvenKill:
|
| | | //BattleHint.Instance.ReceiveEvenKill(msg, tipInfoList);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | SysTeamTip = 41,//队伍频道提示
|
| | | SysRealmTip = 100,//境界提示
|
| | | SysFixedTip1 = 11,//固定提示2
|
| | | SysBattleHint = 6,//上古战场提示
|
| | | SysEvenKill = 7,//上古战场连杀提示
|
| | | }
|
| | |
|
| | | public int Compare(SystemHintData x, SystemHintData y)
|
| | |
| | | [SerializeField] Text m_IconName;//名字 |
| | | [SerializeField] Image m_Icon;
|
| | | [SerializeField] Button m_Button; |
| | | |
| | | [SerializeField] UIEffect m_UIeffect;
|
| | | InSevenDayModel m_InSevenDayModel; |
| | | InSevenDayModel inSevenDay { get { return m_InSevenDayModel ?? (m_InSevenDayModel = ModelCenter.Instance.GetModel<InSevenDayModel>()); } } |
| | | public GameObject ImageSelected
|
| | | {
|
| | | get { return m_ImageSelected; }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (inSevenDay.RewardForDic.ContainsKey(day) && inSevenDay.RewardForDic[day] == 0)
|
| | | {
|
| | | m_UIeffect.Play();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_UIeffect.Stop();
|
| | | }
|
| | | DayText(day);
|
| | | m_Icon.SetSprite(InsevenConfig.ICON);
|
| | | m_IconName.text = InsevenConfig.RewardName;
|
| | |
| | | [SerializeField] Text m_TextName; |
| | | [SerializeField] Image m_ImageShow;
|
| | | [SerializeField] Image m_ImageShowCH;
|
| | | [SerializeField] UIEffect m_UIEffect1;
|
| | | [SerializeField] UIEffect m_UIEffect2;
|
| | | [SerializeField] UIEffect m_UIEffect3;
|
| | | [SerializeField] Image m_ImageDay;
|
| | | [SerializeField] Image m_ImageTex1;
|
| | | [SerializeField] Image m_ImageTex2; |
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | SetUIEffect();
|
| | | m_rewardInformation.GetIsDays(SelectedDay);
|
| | | m_TextName.text = InsevenConfig.RewardName;
|
| | | if (InsevenConfig.IsTitle == 1)
|
| | |
| | | m_ImageTex2.SetSprite(InsevenConfig.ImgTxt2);
|
| | | m_ImageTex2.SetNativeSize();
|
| | | } |
| | | |
| | | private void SetUIEffect()
|
| | | {
|
| | | switch (SelectedDay)
|
| | | {
|
| | | case 1:
|
| | | case 4:
|
| | | case 6:
|
| | | m_UIEffect1.gameObject.SetActive(true);
|
| | | m_UIEffect2.gameObject.SetActive(false);
|
| | | m_UIEffect3.gameObject.SetActive(false);
|
| | | break;
|
| | | case 2:
|
| | | case 3:
|
| | | m_UIEffect1.gameObject.SetActive(false);
|
| | | m_UIEffect2.gameObject.SetActive(true);
|
| | | m_UIEffect3.gameObject.SetActive(false);
|
| | | break;
|
| | | case 5:
|
| | | case 7:
|
| | | m_UIEffect1.gameObject.SetActive(false);
|
| | | m_UIEffect2.gameObject.SetActive(false);
|
| | | m_UIEffect3.gameObject.SetActive(true);
|
| | | break;
|
| | | }
|
| | | } |
| | | #endregion |
| | | |
| | | } |
| | |
| | | }
|
| | | private void OnRenameClick()
|
| | | {
|
| | | MessageWin.Inst.ShowFixedTip(Language.Get("Z1025"));
|
| | | //SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit1");
|
| | | WindowCenter.Instance.Open<RoleRenameWin>();
|
| | | }
|
| | |
|
| | | private void OnElixirClick()
|
| | |
| | | if (itemConfig == null) return;
|
| | | ItemCellModel cellModel = new ItemCellModel(renameToolId, false,(ulong)GetRenameToolNum());
|
| | | itemCell.Init(cellModel);
|
| | | itemCell.countText.gameObject.SetActive(true);
|
| | | if(GetRenameToolNum() > 0)
|
| | | {
|
| | | itemCell.countText.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Green,GetRenameToolNum().ToString()),
|
| | |
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | LanguageVerify.Instance.VerifyPlayerName(renameInput.text, 0,
|
| | | LanguageVerify.Instance.VerifyPlayerName(renameInput.text, (int)PlayerDatas.Instance.baseData.PlayerID,
|
| | | UIHelper.ServerStringTrim(PlayerDatas.Instance.baseData.PlayerName), PlayerDatas.Instance.baseData.LV,
|
| | | PlayerDatas.Instance.baseData.VIPLv, (bool ok, string name) =>
|
| | | {
|
| | |
| | | case PlayerDataRefresh.LV:
|
| | | case PlayerDataRefresh.LV2:
|
| | | case PlayerDataRefresh.LVEx:
|
| | | UpdateGrade();
|
| | | break;
|
| | | case PlayerDataRefresh.FightPower:
|
| | | UpdateGrade();
|
| | | DisplayFightPower();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | scrollerController.Restart();
|
| | | m_FightPowerTxt.text = Language.Get("RolePromoteFightPower", PlayerDatas.Instance.baseData.FightPoint);
|
| | | DisplayFightPower();
|
| | | }
|
| | |
|
| | | void InitResourceData()
|
| | |
| | | scrollerController.Restart();
|
| | | }
|
| | |
|
| | | private void DisplayFightPower()
|
| | | {
|
| | | m_FightPowerTxt.text = Language.Get("RolePromoteFightPower", PlayerDatas.Instance.baseData.FightPoint);
|
| | | }
|
| | |
|
| | | private void UpdateGrade()
|
| | | {
|
| | | var _playerLvCfg = Config.Instance.Get<PlayerLVConfig>(PlayerDatas.Instance.baseData.LV);
|
| | |
| | | [SerializeField] Button m_StrengthenDoubleBtn;//双倍强化按钮
|
| | | [SerializeField] Text m_NeedFairy;//所需的仙玉
|
| | | [SerializeField] GameObject m_BottomBox;
|
| | |
|
| | | [SerializeField] Text m_Text_Attributes3;
|
| | | [SerializeField] Text m_Text_Attributes4;
|
| | | DogzModel Dogz_model;
|
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
|
| | | PlayerPackModel _playerPack;
|
| | |
| | | }
|
| | | GodBeastReinforcementWin.ChooseToModify += ChooseToModify;
|
| | | godBeastModel.AbsorbEvent += AbsorbEvent;
|
| | | m_Text_Attributes3.gameObject.SetActive(false);
|
| | | m_Text_Attributes4.gameObject.SetActive(false);
|
| | | }
|
| | | private void OnDisable()
|
| | | {
|
| | |
| | | m_FullLevel.SetActive(false);
|
| | | m_UIAlphaTween.gameObject.SetActive(false);
|
| | | m_BottomBox.SetActive(false);
|
| | | m_Text_Attributes3.gameObject.SetActive(false);
|
| | | m_Text_Attributes4.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | |
|
| | | m_Text_Attributes3.gameObject.SetActive(false);
|
| | | m_Text_Attributes4.gameObject.SetActive(false);
|
| | | m_StrengthenDoubleBtn.interactable = true;
|
| | | m_StrengthenBtn.interactable = true;
|
| | | m_Text_two.SetActive(true);
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | m_Text_Attributes3.gameObject.SetActive(false);
|
| | | m_Text_Attributes4.gameObject.SetActive(false);
|
| | | if (m_DoubleToggle.isOn)
|
| | | {
|
| | | m_StrengthenBtn.gameObject.SetActive(false);
|
| | |
| | | }
|
| | | private void FullLevelAttributes()//设置满级属性
|
| | | {
|
| | | m_TextAttributes1.gameObject.SetActive(false);
|
| | | m_TextAttributesAdd1.gameObject.SetActive(false);
|
| | | m_TextAttributes2.gameObject.SetActive(false);
|
| | | m_TextAttributesAdd2.gameObject.SetActive(false);
|
| | | var DogzEquipConfig = DogzEquipPlusConfig.GetEquipplaceAndLevel(GodBeastPart, DogZLv);
|
| | | int[] AttType = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attType);
|
| | | int[] AttValue = ConfigParse.GetMultipleStr<int>(DogzEquipConfig.attValue);
|
| | | m_TextAttributesAdd1.gameObject.SetActive(false);
|
| | | m_TextAttributesAdd2.gameObject.SetActive(false);
|
| | | if (AttType.Length > 1)
|
| | | {
|
| | | m_TextAttributes1.gameObject.SetActive(true);
|
| | | m_TextAttributes2.gameObject.SetActive(true);
|
| | | m_Text_Attributes3.gameObject.SetActive(true);
|
| | | m_Text_Attributes4.gameObject.SetActive(true);
|
| | | string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
|
| | | string StrName2 = Config.Instance.Get<PlayerPropertyConfig>(AttType[1]).Name;
|
| | | m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
|
| | | m_TextAttributes2.text = StrName2 + ":" + AttValue[1];
|
| | | m_Text_Attributes3.text = StrName1 + ":" + AttValue[0];
|
| | | m_Text_Attributes4.text = StrName2 + ":" + AttValue[1];
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TextAttributes2.gameObject.SetActive(false);
|
| | | m_Text_Attributes3.gameObject.SetActive(true);
|
| | | m_Text_Attributes4.gameObject.SetActive(false);
|
| | | string StrName1 = Config.Instance.Get<PlayerPropertyConfig>(AttType[0]).Name;
|
| | | m_TextAttributes1.text = StrName1 + ":" + AttValue[0];
|
| | | m_Text_Attributes3.text = StrName1 + ":" + AttValue[0];
|
| | | }
|
| | | }
|
| | | } |
| | |
| | | [SerializeField] GameObject m_Selectedbar_Image; |
| | | [SerializeField] Text m_Item_Text; |
| | | [SerializeField] Button m_GodBeastButton; |
| | | |
| | | [SerializeField] RedpointBehaviour m_RedPoint; |
| | | public Button GodBeastButton
|
| | | {
|
| | | get { return m_GodBeastButton; }
|
| | |
| | | |
| | | DogzModel Dogz_model;
|
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } } |
| | | GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | | public void GetGodBeastLocationMarker(int locationMarker, int currentlySelected)
|
| | | {
|
| | | int godBeastNumber = locationMarker % 100;//神兽编号
|
| | |
| | | if (itemModel[i].EquipPlace == godBeastPart)
|
| | | {
|
| | | ItemCellModel ItemModel = new ItemCellModel(itemModel[i].itemId, true, 0, 0);//不显示绑定
|
| | | if (godBeastModel.GodBeastRedPointDic.ContainsKey(itemModel[i].itemInfo.ItemPlace))
|
| | | {
|
| | | m_RedPoint.redpointId = godBeastModel.GodBeastRedPointDic[(itemModel[i].itemInfo.ItemPlace)].id;
|
| | | }
|
| | | m_itemCell.Init(ItemModel);
|
| | | var itemConfig = Config.Instance.Get<ItemConfig>(itemModel[i].itemId);
|
| | | var IudetDogzEquipPlus = itemModel[i].GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);// 神兽装备强化信息列表 [强化等级, 强化熟练度]
|
| | |
| | | DogzModel dogz_model { get { return Dogz_model ?? (Dogz_model = ModelCenter.Instance.GetModel<DogzModel>()); } }
|
| | | PlayerPackModel _playerPack;
|
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | public Dictionary<int, Redpoint> GodBeastRedPointDic = new Dictionary<int, Redpoint>();//key装备位置下标(红点)
|
| | | private List<int> RedPointLIst = new List<int>();
|
| | | private const int Redpoint_key1 = 11202;//神兽强化红点
|
| | | public Redpoint redPointStre1 = new Redpoint(112, Redpoint_key1);
|
| | | public override void Init()
|
| | |
| | | playerPack.ItemCntReduceAct -= ItemCntReduceAct;
|
| | | dogz_model.UpdateAssistDogzEvent -= UpdateAssistDogzEvent;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent;
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent += MakeItemAnswerEvent;
|
| | | playerPack.ItemCntAddAct += ItemCntAddAct;//物品数量增加
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;//物品数量减少
|
| | | dogz_model.UpdateAssistDogzEvent += UpdateAssistDogzEvent;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
|
| | | SetRedPointID();
|
| | | GodBeastRedPoint();
|
| | | }
|
| | |
|
| | | private void MakeItemAnswerEvent(H0721_tagMakeItemAnswer obj)
|
| | | {
|
| | | if ((int)obj.MakeType == (int)MakeType.Def_mitDogzEquipPlus)
|
| | | {
|
| | | GodBeastRedPoint();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnFuncStateChangeEvent(int obj)
|
| | |
| | |
|
| | | private void UpdateAssistDogzEvent()
|
| | | {
|
| | | foreach (var key in GodBeastRedPointDic.Keys)
|
| | | {
|
| | | GodBeastRedPointDic[key].state = RedPointState.None;
|
| | | }
|
| | | SetRedPointID();
|
| | | GodBeastRedPoint();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void SetRedPointID()//设置红点ID
|
| | | {
|
| | | GodBeastRedPointDic.Clear();
|
| | | RedPointLIst.Clear();
|
| | | var DogzEquipDict = dogz_model.dogzAssistStateDict;
|
| | | foreach (var key in DogzEquipDict.Keys)
|
| | | {
|
| | | if (DogzEquipDict[key] == 1)
|
| | | {
|
| | | List<ItemModel> itemModel = dogz_model.GetDogzEquips(key);
|
| | | for (int i = 0; i < itemModel.Count; i++)
|
| | | {
|
| | | int IndexId = itemModel[i].itemInfo.ItemPlace;
|
| | | int RedPoint = Redpoint_key1 * 1000 + IndexId;
|
| | | Redpoint redPointStare = new Redpoint(Redpoint_key1, RedPoint);
|
| | | if (!GodBeastRedPointDic.ContainsKey(IndexId))
|
| | | {
|
| | | GodBeastRedPointDic.Add(IndexId, redPointStare);
|
| | | RedPointLIst.Add(IndexId);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | RedPointLIst.Sort(Compare);
|
| | | }
|
| | | int Compare(int x, int y)
|
| | | {
|
| | | ItemModel IindexitemModelx = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, x);
|
| | | ItemModel IindexitemModely = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, y);
|
| | | if (IindexitemModelx.chinItemModel.ItemColor.CompareTo(IindexitemModely.chinItemModel.ItemColor) != 0)//品质
|
| | | {
|
| | | return -IindexitemModelx.chinItemModel.ItemColor.CompareTo(IindexitemModely.chinItemModel.ItemColor);
|
| | | }
|
| | | if (IindexitemModelx.chinItemModel.StarLevel.CompareTo(IindexitemModely.chinItemModel.StarLevel) != 0)//星级
|
| | | {
|
| | | return -IindexitemModelx.chinItemModel.StarLevel.CompareTo(IindexitemModely.chinItemModel.StarLevel);
|
| | | }
|
| | | if (IindexitemModelx.chinItemModel.EquipPlace.CompareTo(IindexitemModely.chinItemModel.EquipPlace) != 0)//装备位
|
| | | {
|
| | | return IindexitemModelx.chinItemModel.EquipPlace.CompareTo(IindexitemModely.chinItemModel.EquipPlace);
|
| | | }
|
| | | if (GetLV(IindexitemModelx).CompareTo(GetLV(IindexitemModely)) != 0)//强化等级
|
| | | {
|
| | | return -GetLV(IindexitemModelx).CompareTo(GetLV(IindexitemModely));
|
| | | }
|
| | | if (GetProficiency(IindexitemModelx).CompareTo(GetProficiency(IindexitemModely)) != 0)//熟练度
|
| | | {
|
| | | return -GetProficiency(IindexitemModelx).CompareTo(GetProficiency(IindexitemModely));
|
| | | }
|
| | | if (IindexitemModelx.equipScore.CompareTo(IindexitemModely.equipScore) != 0)//装备评分
|
| | | {
|
| | | return -IindexitemModelx.equipScore.CompareTo(IindexitemModely.equipScore);
|
| | | }
|
| | | return 1;
|
| | | }
|
| | |
|
| | | private int GetLV(ItemModel _ItemModel)
|
| | | {
|
| | | var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | | return IudetDogzEquipPlus[0];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | private int GetProficiency(ItemModel _ItemModel)
|
| | | {
|
| | | var IudetDogzEquipPlus = _ItemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
|
| | | if (IudetDogzEquipPlus != null)
|
| | | {
|
| | | return IudetDogzEquipPlus[1];
|
| | | }
|
| | | return 0;
|
| | | }
|
| | | public int IndexId = 0;
|
| | | private void GodBeastRedPoint()//神兽强化红点
|
| | | {
|
| | | bool Istrue = false;
|
| | | bool IsRedPoint = false;
|
| | | int ItemColor = 10;
|
| | | var DogzEquipDict = dogz_model.dogzAssistStateDict;
|
| | | redPointStre1.state = RedPointState.None;
|
| | | IndexId = 0;
|
| | | foreach (var key in GodBeastRedPointDic.Keys)
|
| | | {
|
| | | GodBeastRedPointDic[key].state = RedPointState.None;
|
| | | }
|
| | | int Type = 0;
|
| | | foreach (var key in DogzEquipDict.Keys)
|
| | | {
|
| | |
| | | var itemModelBack = BackpackDic[keyBack];
|
| | | if (itemModelBack.chinItemModel.Type == 70)//有神兽水晶时的红点
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | return;
|
| | | IsRedPoint = true;
|
| | | }
|
| | | if (itemModelBack.chinItemModel.ItemColor < _ItemColor)
|
| | | {
|
| | |
| | | }
|
| | | if (Type >= dogz_model.curSumAssistNum && ItemColor> _ItemColor)//出战神兽已满,且神兽背包有品质低于已助战神兽品质颜色时
|
| | | {
|
| | | redPointStre1.state = RedPointState.Simple;
|
| | | return;
|
| | | IsRedPoint = true;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (IsRedPoint)
|
| | | {
|
| | | int Lv = 100;
|
| | | for (int i = 0; i < RedPointLIst.Count; i++)
|
| | | {
|
| | | ItemModel _itemModel = playerPack.GetItemModelByIndex(PackType.rptDogzEquip, RedPointLIst[i]);
|
| | | int MaxLv= QualityLimit[_itemModel.chinItemModel.ItemColor];//获取最大强化等级
|
| | | var _IudetDogzEquipPlus = _itemModel.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus);
|
| | | if (_IudetDogzEquipPlus != null)
|
| | | {
|
| | | if (_IudetDogzEquipPlus[0]<MaxLv && _IudetDogzEquipPlus[0] < Lv)
|
| | | {
|
| | | Lv = _IudetDogzEquipPlus[0];
|
| | | IndexId = RedPointLIst[i];
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (0 < Lv)
|
| | | {
|
| | | Lv = 0;
|
| | | IndexId = RedPointLIst[i];
|
| | | }
|
| | | }
|
| | | }
|
| | | if (GodBeastRedPointDic.ContainsKey(IndexId))
|
| | | {
|
| | | GodBeastRedPointDic[IndexId].state = RedPointState.Simple;
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public bool IsNeedEquipment()//是否有极品装备需要弹框
|
| | |
| | | // [ Date ]: Thursday, August 16, 2018 |
| | | //-------------------------------------------------------- |
| | | |
| | | using EnhancedUI.EnhancedScroller;
|
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | |
| | | private List<GodBeastClass> GodBeastList = new List<GodBeastClass>(); |
| | | private int CurrentlySelected = 0; |
| | | private int JumpIndex = 0; |
| | | public int Offset = 0;//偏移量 |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | |
| | | {
|
| | | CurrentlySelected = 0;
|
| | | GetGodBeast();//获取神兽强化装备信息
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | if (godBeastModel.ItemPlace != -1)
|
| | | |
| | | if (godBeastModel.ItemPlace != -1)//装备强化跳转选中
|
| | | {
|
| | | for (int i = 0; i < GodBeastList.Count; i++)
|
| | | {
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if (GodBeastList.Count > 0)
|
| | |
|
| | | if (godBeastModel.redPointStre1.state == RedPointState.Simple)//强化红点选中
|
| | | {
|
| | | for (int i = 0; i < GodBeastList.Count; i++)
|
| | | {
|
| | | if (GodBeastList[i].ItemPlace == godBeastModel.IndexId)
|
| | | {
|
| | | JumpIndex = i;
|
| | | CurrentlySelected = GodBeastList[i].LocationMarker;
|
| | | GetDogZBagIndex();
|
| | | }
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if (GodBeastList.Count > 0)//默认选中个
|
| | | {
|
| | | CurrentlySelected = GodBeastList[0].LocationMarker;
|
| | | GetDogZBagIndex();
|
| | | JumpIndex = 0;
|
| | | }
|
| | | } |
| | | } |
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | m_GodBeastSlidingList.Init(); |
| | | m_GodBeastAttributes.Init(); |
| | | m_GodBeastAttributes.GetGodBeastLocationMarker(CurrentlySelected);
|
| | | m_ScrollerController.JumpIndex(JumpIndex);
|
| | | |
| | |
|
| | |
|
| | |
|
| | | } |
| | | |
| | | protected override void OnActived()
|
| | | {
|
| | | var offset = 0f;
|
| | | m_ScrollerController.JumpIndex(JumpIndex,ref offset);
|
| | | m_ScrollerController.JumpIndex(Offset + offset, 0, EnhancedScroller.TweenType.immediate);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | { |
| | | playerPack.RefreshItemCountAct += RefreshItemCountAct;
|
| | |
| | | JumpIndex = 0;
|
| | | godBeastModel.ItemPlace = -1;
|
| | | playerPack.RefreshItemCountAct -= RefreshItemCountAct;
|
| | | m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
|
| | | DTC0721_tagMakeItemAnswer.MakeItemAnswerEvent -= MakeItemAnswerEvent; |
| | | }
|
| | |
|
| | |
| | | PlayerPackModel _playerPack; |
| | | PlayerPackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>()); } }
|
| | | GodBeastModel godBeastModel { get { return ModelCenter.Instance.GetModel<GodBeastModel>(); } }
|
| | | private void Awake()
|
| | | {
|
| | |
|
| | | }
|
| | | private void Start()
|
| | | {
|
| | | m_Arrow.AddListener(OnClickArrow);
|
| | |
| | | public void Init()
|
| | | {
|
| | | Quality = 10;
|
| | | LINE = Mathf.CeilToInt((float)100 / 3);
|
| | | ContentSelect(Quality);
|
| | | if (m_ScrollViewFirst.activeSelf)
|
| | | {
|
| | |
| | | int childCode = 0;
|
| | | for (childCode = 0; childCode < cell.transform.childCount; childCode++)
|
| | | {
|
| | |
|
| | | GodBeastChildNodes GodBeastChildNodes = cell.transform.GetChild(childCode).GetComponent<GodBeastChildNodes>();
|
| | | int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
|
| | | if (cellCount > 100)
|
| | | {
|
| | | GodBeastChildNodes.gameObject.SetActive(false);
|
| | | continue;
|
| | | }
|
| | | GodBeastChildNodes.ItemCell.gameObject.SetActive(false);
|
| | | GodBeastChildNodes.ChoosenImg.SetActive(false);
|
| | | GodBeastChildNodes.TextNumber.gameObject.SetActive(false);
|
| | | GodBeastChildNodes.NumberNow.gameObject.SetActive(false);
|
| | | int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
|
| | | GodBeastChildNodes.ButtonDown.RemoveAllListeners();
|
| | | if (cellCount - 1 < GodBeastBagList.Count)
|
| | | {
|
| | |
| | | public void RequestHighestEffect()
|
| | | {
|
| | | RecycleHighestEffect();
|
| | | Treasure _treasure;
|
| | | if (category == TreasureCategory.Human &&
|
| | | model.TryGetTreasure(treasureId, out _treasure) && _treasure.IsHighestStage
|
| | | && !model.GetTreasureFinishAnim(treasureId))
|
| | | {
|
| | | highestSfx = SFXPlayUtility.Instance.Play(5198, root);
|
| | | if (highestSfx != null)
|
| | | {
|
| | | highestSfx.duration = 0;
|
| | | LayerUtility.SetLayer(highestSfx.gameObject, LayerUtility.UILayer, true);
|
| | | highestSfx.transform.localPosition = Vector3.zero;
|
| | | highestSfx.transform.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | }
|
| | | }
|
| | | //Treasure _treasure;
|
| | | //if (category == TreasureCategory.Human &&
|
| | | // model.TryGetTreasure(treasureId, out _treasure) && _treasure.IsHighestStage
|
| | | // && !model.GetTreasureFinishAnim(treasureId))
|
| | | //{
|
| | | // highestSfx = SFXPlayUtility.Instance.Play(5198, root);
|
| | | // if (highestSfx != null)
|
| | | // {
|
| | | // highestSfx.duration = 0;
|
| | | // LayerUtility.SetLayer(highestSfx.gameObject, LayerUtility.UILayer, true);
|
| | | // highestSfx.transform.localPosition = Vector3.zero;
|
| | | // highestSfx.transform.LookAt(UI3DTreasureSelectStage.Instance.center);
|
| | | // }
|
| | | //}
|
| | | }
|
| | |
|
| | | public void RecycleHighestEffect()
|
| | |
| | |
|
| | | public bool GetTreasureFinishAnim(int _treasureId)
|
| | | {
|
| | | if (_treasureId == 101)
|
| | | {
|
| | | //if (_treasureId == 101)
|
| | | //{
|
| | | return false;
|
| | | }
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | var index = list.IndexOf(_treasureId);
|
| | | if (index == -1)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | uint value = 0;
|
| | | uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
|
| | | return MathUtility.GetBitValue(value, (ushort)index);
|
| | | //}
|
| | | //var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | //var index = list.IndexOf(_treasureId);
|
| | | //if (index == -1)
|
| | | //{
|
| | | // return false;
|
| | | //}
|
| | | //uint value = 0;
|
| | | //uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
|
| | | //return MathUtility.GetBitValue(value, (ushort)index);
|
| | | }
|
| | |
|
| | | public void SetTreasureFinishAnim(int _treasureId, bool anim = true)
|
| | | {
|
| | | var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | var index = list.IndexOf(_treasureId);
|
| | | if (index == -1)
|
| | | {
|
| | | return;
|
| | | }
|
| | | uint value = 0;
|
| | | uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
|
| | | int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
|
| | | QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, bitValue);
|
| | | QuickSetting.Instance.SendPackage();
|
| | | //var list = GetTreasureCategory(TreasureCategory.Human);
|
| | | //var index = list.IndexOf(_treasureId);
|
| | | //if (index == -1)
|
| | | //{
|
| | | // return;
|
| | | //}
|
| | | //uint value = 0;
|
| | | //uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, 0), out value);
|
| | | //int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
|
| | | //QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.TreasureHighestAnim, bitValue);
|
| | | //QuickSetting.Instance.SendPackage();
|
| | | }
|
| | |
|
| | | public bool TryGetUnlockShowTreasure(out int _id)
|
| | |
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip,condi[3]);
|
| | | if(itemModel != null)
|
| | | {
|
| | | if(specEquipIds != null && specEquipIds.Contains(condi[3]))
|
| | | if(specEquipIds != null && specEquipIds.Contains(itemModel.itemId))
|
| | | {
|
| | | progress += 1;
|
| | | return true;
|
| | |
| | | {
|
| | | OperationTimeHepler.Instance.operationStartEvent -= operationStartEvent;
|
| | | OperationTimeHepler.Instance.operationStartEvent += operationStartEvent;
|
| | | OperationTimeHepler.Instance.operationAdvanceEvent -= operationAdvanceEvent;
|
| | | OperationTimeHepler.Instance.operationAdvanceEvent += operationAdvanceEvent;
|
| | | IsShowTip();
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | private void operationStartEvent(Operation arg1, int arg2)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void operationAdvanceEvent(Operation obj)
|
| | | {
|
| | | if (obj == Operation.GiftPackage)
|
| | | {
|
| | | // IsShowTip();
|
| | | if (onStateUpate != null)
|
| | | {
|
| | | onStateUpate(7);
|
| | | }
|
| | | }
|
| | | }
|
| | | private void OperationEndEvent(Operation arg1, int arg2)
|
| | | {
|
| | | if (arg1 == Operation.GiftPackage && arg2 == 0)
|
| | |
| | |
|
| | | public void IsShowTip()
|
| | | {
|
| | | if (OperationTimeHepler.Instance.SatisfyAdvanceCondition(Operation.GiftPackage))
|
| | | {
|
| | | return;
|
| | | }
|
| | | int GetDayOfYear = DateTime.Now.DayOfYear;
|
| | | int day = LocalSave.GetInt("IsOpenLimitedTime");
|
| | | bool Isbool = IsExpired();
|
| | |
| | | {
|
| | | return time.Hour < DayResetHour;
|
| | | }
|
| | | if (indexOfDays < totalDays)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | break;
|
| | | }
|
| | | return false;
|
| | |
| | | private WindowSearchConfig _tagWinSearchModel;
|
| | | private FuncOpenLVConfig _tagOpenLvModel;
|
| | | private Dictionary<int, List<string>> openWindows = new Dictionary<int, List<string>>();
|
| | | private Dictionary<int, string> jumpWinNameDict = new Dictionary<int, string>();
|
| | | public Dictionary<int, string> jumpWinNameDict = new Dictionary<int, string>();
|
| | | PlayerPetDatas m_petModel;
|
| | | PlayerPetDatas petmodel
|
| | | {
|
| | |
| | | private void SetJumpLogic<T>(int _functionalOrder = 0, bool _forceSync = true) where T : Window
|
| | | {
|
| | | string curOpenWin = typeof(T).Name;
|
| | | if(jumpWinNameDict.ContainsKey(jumpPhase - 1))
|
| | | {
|
| | | if(jumpWinNameDict[jumpPhase - 1] != curOpenWin)
|
| | | {
|
| | | jumpWinNameDict.Add(jumpPhase, curOpenWin);
|
| | | }
|
| | | else
|
| | | {
|
| | | openWindows[jumpPhase].Clear();
|
| | | jumpPhase -= 1;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | jumpWinNameDict.Add(jumpPhase, curOpenWin);
|
| | | }
|
| | | |
| | | jumpType = _tagWinSearchModel.Type;
|
| | | switch (_tagWinSearchModel.Type)
|
| | | {
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | m_AncientKing.gameObject.SetActive(isAncientKing);
|
| | | if (isAncientKing)
|
| | | {
|
| | | m_AncientKing.SetSprite("IntegralKing");
|
| | | m_AncientKing.SetNativeSize();
|
| | | }
|
| | | //m_AncientKing.gameObject.SetActive(isAncientKing);
|
| | | //if (isAncientKing)
|
| | | //{
|
| | | // m_AncientKing.SetSprite("IntegralKing");
|
| | | // m_AncientKing.SetNativeSize();
|
| | | //}
|
| | | }
|
| | |
|
| | | public void SetAncientEnemy(bool isAncientEnemy)
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | m_AncientEnemy.gameObject.SetActive(isAncientEnemy);
|
| | | if (isAncientEnemy)
|
| | | {
|
| | | m_AncientEnemy.SetSprite("Enemy");
|
| | | m_AncientEnemy.SetNativeSize();
|
| | | }
|
| | | //m_AncientEnemy.gameObject.SetActive(isAncientEnemy);
|
| | | //if (isAncientEnemy)
|
| | | //{
|
| | | // m_AncientEnemy.SetSprite("Enemy");
|
| | | // m_AncientEnemy.SetNativeSize();
|
| | | //}
|
| | | }
|
| | |
|
| | | public void SetAlliance(string _alliance)
|