Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | //--------------------------------------------------------
|
| | | // [Author]: Fish
|
| | | // [ Date ]: Thursday, February 14, 2019
|
| | | // [ Date ]: Friday, April 12, 2019
|
| | | //--------------------------------------------------------
|
| | |
|
| | | using System.Collections.Generic;
|
| | |
| | | public readonly int MapID;
|
| | | public readonly string Name;
|
| | | public readonly int LV;
|
| | | public readonly int realmLevel;
|
| | | public readonly int MapFBType;
|
| | | public readonly int LocalReborn;
|
| | | public readonly int SkillReborn;
|
| | |
| | |
|
| | | int.TryParse(tables[2],out LV);
|
| | |
|
| | | int.TryParse(tables[3],out MapFBType); |
| | | int.TryParse(tables[3],out realmLevel); |
| | |
|
| | | int.TryParse(tables[4],out LocalReborn); |
| | | int.TryParse(tables[4],out MapFBType); |
| | |
|
| | | int.TryParse(tables[5],out SkillReborn); |
| | | int.TryParse(tables[5],out LocalReborn); |
| | |
|
| | | int.TryParse(tables[6],out CanRide); |
| | | int.TryParse(tables[6],out SkillReborn); |
| | |
|
| | | int.TryParse(tables[7],out CanOutPet); |
| | | int.TryParse(tables[7],out CanRide); |
| | |
|
| | | int.TryParse(tables[8],out TeamLimit); |
| | | int.TryParse(tables[8],out CanOutPet); |
| | |
|
| | | string[] BornPointsStringArray = tables[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | int.TryParse(tables[9],out TeamLimit); |
| | |
|
| | | string[] BornPointsStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | BornPoints = new Vector3[BornPointsStringArray.Length]; |
| | | for (int i=0;i<BornPointsStringArray.Length;i++) |
| | | { |
| | | BornPoints[i]=BornPointsStringArray[i].Vector3Parse(); |
| | | }
|
| | |
|
| | | int.TryParse(tables[10],out MainTaskID); |
| | | int.TryParse(tables[11],out MainTaskID); |
| | |
|
| | | MapTaskText = tables[11];
|
| | | MapTaskText = tables[12];
|
| | |
|
| | | int.TryParse(tables[12],out Camp); |
| | | int.TryParse(tables[13],out Camp); |
| | |
|
| | | int.TryParse(tables[13],out AtkType); |
| | | int.TryParse(tables[14],out AtkType); |
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: db9da28a811a0af4db68188db3a20863 |
| | | timeCreated: 1550121374 |
| | | timeCreated: 1555048178 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "currentActiveValue", _g_get_currentActiveValue); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "everyDayRedpoint", _g_get_everyDayRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "timeLimitRedpoint", _g_get_timeLimitRedpoint); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "trialExchangeRedpoint", _g_get_trialExchangeRedpoint); |
| | | |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "currentDailyQuest", _s_set_currentDailyQuest); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "everyDayRedpoint", _s_set_everyDayRedpoint); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "timeLimitRedpoint", _s_set_timeLimitRedpoint); |
| | | Utils.RegisterFunc(L, Utils.SETTER_IDX, "trialExchangeRedpoint", _s_set_trialExchangeRedpoint); |
| | | |
| | | |
| | | Utils.EndObjectRegister(type, L, translator, null, null, |
| | |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_trialExchangeRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.DailyQuestModel gen_to_be_invoked = (Snxxz.UI.DailyQuestModel)translator.FastGetCSObj(L, 1); |
| | | translator.Push(L, gen_to_be_invoked.trialExchangeRedpoint); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_currentDailyQuest(RealStatePtr L) |
| | |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _s_set_trialExchangeRedpoint(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.DailyQuestModel gen_to_be_invoked = (Snxxz.UI.DailyQuestModel)translator.FastGetCSObj(L, 1); |
| | | gen_to_be_invoked.trialExchangeRedpoint = (Snxxz.UI.Redpoint)translator.GetObject(L, 2, typeof(Snxxz.UI.Redpoint)); |
| | | |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _e_activeValueRewardGotEvent(RealStatePtr L) |
| | |
| | | |
| | | { |
| | | |
| | | int gen_ret = gen_to_be_invoked.GetLatestUnLockBoss( ); |
| | | int gen_ret = gen_to_be_invoked.GetRecommendBoss( ); |
| | | LuaAPI.xlua_pushinteger(L, gen_ret); |
| | | |
| | | |
| | |
| | | [SerializeField] ImageEx m_ImageGoto; |
| | | [SerializeField] Button m_KillRecord; |
| | | [SerializeField] Transform m_SurpassLevel; |
| | | [SerializeField] RectTransform m_NoDamageTip; |
| | | [SerializeField] ToggleButton m_Subscribe; |
| | | |
| | | [SerializeField] RectTransform m_ContainerBoxCollectWeary; |
| | |
| | | |
| | | 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() |
| | |
| | | |
| | | DisplayItemDropTip(model.selectedBoss); |
| | | DisplayBossBaseInfo(model.selectedBoss); |
| | | DisplayWearyValue(model.selectedBoss); |
| | | DisplayTimes(model.selectedBoss); |
| | | } |
| | | |
| | | private void ShowKillRecords() |
| | |
| | | { |
| | | DisplayItemDropTip(_bossId); |
| | | DisplayBossBaseInfo(_bossId); |
| | | DisplayWearyValue(_bossId); |
| | | DisplayTimes(_bossId); |
| | | } |
| | | |
| | | private void DisplayBossBaseInfo(int _bossId) |
| | |
| | | } |
| | | } |
| | | |
| | | private void DisplayItemDropTip(int _bossId) |
| | | private void DisplayItemDropTip(int bossId) |
| | | { |
| | | var config = CrossServerBossConfig.Get(model.selectedBoss); |
| | | var config = CrossServerBossConfig.Get(bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | m_NoDamageTip.gameObject.SetActive(true); |
| | | m_SurpassLevel.gameObject.SetActive(false); |
| | | break; |
| | | case 4: |
| | | var npcDropConfig = NPCDropItemConfig.Get(_bossId); |
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV); |
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel; |
| | | var npcConfig = NPCConfig.Get(bossId); |
| | | |
| | | if (npcConfig.Realm > realmLevel) |
| | | { |
| | | m_NoDamageTip.gameObject.SetActive(true); |
| | | m_SurpassLevel.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | m_NoDamageTip.gameObject.SetActive(false); |
| | | var dropConfig = NPCDropItemConfig.Get(bossId); |
| | | var noDrop = dropConfig == null || (dropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > dropConfig.MaxLV); |
| | | m_SurpassLevel.gameObject.SetActive(noDrop); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayWearyValue(int _bossId) |
| | | private void DisplayTimes(int bossId) |
| | | { |
| | | var config = CrossServerBossConfig.Get(model.selectedBoss); |
| | | var config = CrossServerBossConfig.Get(bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | |
| | |
|
| | | switch ((DailyQuestType)data.id)
|
| | | {
|
| | | case DailyQuestType.Trial:
|
| | | m_FuncRedpointBehaviour.redpointId = model.trialExchangeRedpoint.id;
|
| | | break;
|
| | | default:
|
| | | m_FuncRedpointBehaviour.redpointId = 0;
|
| | | break;
|
| | |
| | |
|
| | | switch ((DailyQuestType)data.id)
|
| | | {
|
| | | case DailyQuestType.Trial:
|
| | | m_Func.gameObject.SetActive(state != DailyQuestModel.DailyQuestState.Locked);
|
| | | m_FuncDisplay.text = Language.Get("ItemHandle_exchange");
|
| | | break;
|
| | | case DailyQuestType.DungeonAssist:
|
| | | m_Func.gameObject.SetActive(false);
|
| | | m_Complete.gameObject.SetActive(false);
|
| | |
| | | public Redpoint timeLimitRedpoint = new Redpoint(DAILYQUEST_REDPOINTID, TIMELIMIT_REDPOINTID);
|
| | | Redpoint activeValueRedpoint = new Redpoint(EVERYDAY_REDPOINTID, ACTIVEVALUE_REDPOINT);
|
| | | Redpoint realmPointRedpoint = new Redpoint(EVERYDAY_REDPOINTID, REALMPOINT_REPOINT);
|
| | | public Redpoint trialExchangeRedpoint = new Redpoint(EVERYDAY_REDPOINTID, TRIALEXCHANGE_REDPOINTID);
|
| | |
|
| | | int m_DailyQuestTotalActiveValue = 150;
|
| | | public int dailyQuestTotalActiveValue {
|
| | |
| | | break;
|
| | | case DailyQuestType.ElderGodArea:
|
| | | WindowCenter.Instance.Close<DailyQuestWin>();
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 3);
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 4);
|
| | | break;
|
| | | case DailyQuestType.RuneTower:
|
| | | WindowCenter.Instance.Close<DailyQuestWin>();
|
| | |
| | | [SerializeField] ImageEx m_ImageGoto; |
| | | [SerializeField] Button m_KillRecord; |
| | | [SerializeField] Transform m_SurpassLevel; |
| | | [SerializeField] RectTransform m_NoDamageTip; |
| | | [SerializeField] ToggleButton m_Subscribe; |
| | | |
| | | [SerializeField] RectTransform m_ContainerBoxCollectWeary; |
| | |
| | | |
| | | DisplayItemDropTip(model.selectedBoss); |
| | | DisplayBossBaseInfo(model.selectedBoss); |
| | | DisplayWearyValue(model.selectedBoss); |
| | | DisplaySkillTimes(model.selectedBoss); |
| | | } |
| | | |
| | | private void ShowKillRecords() |
| | |
| | | { |
| | | DisplayItemDropTip(_bossId); |
| | | DisplayBossBaseInfo(_bossId); |
| | | DisplayWearyValue(_bossId); |
| | | DisplaySkillTimes(_bossId); |
| | | } |
| | | |
| | | private void DisplayBossBaseInfo(int _bossId) |
| | |
| | | } |
| | | } |
| | | |
| | | private void DisplayItemDropTip(int _bossId) |
| | | private void DisplayItemDropTip(int bossId) |
| | | { |
| | | var config = DogzDungeonConfig.Get(model.selectedBoss); |
| | | var config = DogzDungeonConfig.Get(bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | case 2: |
| | | case 3: |
| | | m_NoDamageTip.gameObject.SetActive(true); |
| | | m_SurpassLevel.gameObject.SetActive(false); |
| | | break; |
| | | case 4: |
| | | var npcDropConfig = NPCDropItemConfig.Get(_bossId); |
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV); |
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel; |
| | | var npcConfig = NPCConfig.Get(bossId); |
| | | |
| | | if (npcConfig.Realm > realmLevel) |
| | | { |
| | | m_NoDamageTip.gameObject.SetActive(true); |
| | | m_SurpassLevel.gameObject.SetActive(false); |
| | | } |
| | | else |
| | | { |
| | | m_NoDamageTip.gameObject.SetActive(false); |
| | | var dropConfig = NPCDropItemConfig.Get(bossId); |
| | | var noDrop = dropConfig == null || (dropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > dropConfig.MaxLV); |
| | | m_SurpassLevel.gameObject.SetActive(noDrop); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void DisplayWearyValue(int _bossId) |
| | | private void DisplaySkillTimes(int _bossId) |
| | | { |
| | | var config = DogzDungeonConfig.Get(model.selectedBoss); |
| | | switch (config.MonsterType) |
| | |
| | | error = 1;
|
| | | return false;
|
| | | }
|
| | | if (!NewBieCenter.Instance.completeGuidesBuf.Contains(TRIALEXCHANGE_GUIDE))
|
| | | {
|
| | | NewBieCenter.Instance.RemoveNewBieGuide(TRIALEXCHANGE_GUIDE);
|
| | | }
|
| | | //if (!NewBieCenter.Instance.completeGuidesBuf.Contains(TRIALEXCHANGE_GUIDE))
|
| | | //{
|
| | | // NewBieCenter.Instance.RemoveNewBieGuide(TRIALEXCHANGE_GUIDE);
|
| | | //}
|
| | | //var tokenConfig = ItemConfig.Get(config.tokenId);
|
| | | //ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),
|
| | | // Language.Get("TokenUseConfirm", config.tokenCount, tokenConfig.ItemName, config.description), (bool isOk) =>
|
| | |
| | | #region 红点
|
| | | void UpdateRedpoint()
|
| | | {
|
| | | dailyQuestModel.trialExchangeRedpoint.state = RedPointState.None;
|
| | | if (!FuncOpen.Instance.IsFuncOpen(88) ||
|
| | | PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var maxClass = 0;
|
| | | if (TryGetSatisfyExchange(out maxClass))
|
| | | {
|
| | | dailyQuestModel.trialExchangeRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | //dailyQuestModel.trialExchangeRedpoint.state = RedPointState.None;
|
| | | //if (!FuncOpen.Instance.IsFuncOpen(88) ||
|
| | | // PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
|
| | | //{
|
| | | // return;
|
| | | //}
|
| | | //var maxClass = 0;
|
| | | //if (TryGetSatisfyExchange(out maxClass))
|
| | | //{
|
| | | // dailyQuestModel.trialExchangeRedpoint.state = RedPointState.Simple;
|
| | | //}
|
| | | }
|
| | |
|
| | | public bool TryGetSatisfyExchange(out int maxClass)
|
| | |
| | |
|
| | | public bool IsAnySatisfyExchangeBetter(int _itemId)
|
| | | {
|
| | | return false;
|
| | | if (PlayerDatas.Instance.baseData.LV >= trialExchangeRemindLevel)
|
| | | {
|
| | | return false;
|
| | |
| | | Button m_Close;
|
| | | [SerializeField]
|
| | | Text trialChallengeCntTxt;
|
| | | [SerializeField] Button m_Exchange;
|
| | |
|
| | | public event Action<Dungeon> dungeonSelectEvent;
|
| | | Dungeon m_CurrentSelectDungeon;
|
| | |
| | | {
|
| | | //m_Confirm.AddListener(ChallengeDungeon);
|
| | | m_Close.AddListener(CloseClick);
|
| | | m_Exchange.AddListener(Exchange);
|
| | | //m_Exchange.AddListener(Exchange);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | TextColType.Red : TextColType.NavyBrown, completedTimes.ToString(), true), totalTimes);
|
| | | }
|
| | |
|
| | | private void Exchange()
|
| | | {
|
| | | if (!trialDungeonModel.CompleteTrialFloor(0))
|
| | | {
|
| | | trialDungeonModel.ProcessOpenTrialExchangeError();
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<TrialExchangeWin>();
|
| | | }
|
| | | //private void Exchange()
|
| | | //{
|
| | | // if (!trialDungeonModel.CompleteTrialFloor(0))
|
| | | // {
|
| | | // trialDungeonModel.ProcessOpenTrialExchangeError();
|
| | | // return;
|
| | | // }
|
| | | // WindowCenter.Instance.Open<TrialExchangeWin>();
|
| | | //}
|
| | |
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Button m_KillRecord;
|
| | | [SerializeField] Transform m_SurpassLevel;
|
| | | [SerializeField] RectTransform m_NoDamageTip;
|
| | | [SerializeField] ToggleButton m_Subscribe;
|
| | |
|
| | | BossHomeModel model { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | |
| | | break;
|
| | | }
|
| | |
|
| | | var npcDropConfig = NPCDropItemConfig.Get(model.selectedBoss);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | | DisplayTip(model.selectedBoss);
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | yield return WaitingForSecondConst.WaitMS300;
|
| | | var bossId = model.selectedBoss;
|
| | | var config = BossHomeConfig.Get(bossId);
|
| | | var npcDropConfig = NPCDropItemConfig.Get(bossId);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | |
|
| | | DisplayTip(model.selectedBoss);
|
| | |
|
| | | switch (config.MonsterType)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayTip(int bossId)
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var config = NPCConfig.Get(bossId);
|
| | |
|
| | | if (config.Realm > realmLevel)
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(true);
|
| | | m_SurpassLevel.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(false);
|
| | | var dropConfig = NPCDropItemConfig.Get(bossId);
|
| | | var noDrop = dropConfig == null || (dropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > dropConfig.MaxLV);
|
| | | m_SurpassLevel.gameObject.SetActive(noDrop);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
| | | [SerializeField] TimerBehaviour m_CountRemainTime;
|
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Transform m_SurpassLevel;
|
| | | [SerializeField] RectTransform m_NoDamageTip;
|
| | | [SerializeField] ToggleButton m_Subscribe;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerDouble;
|
| | |
| | |
|
| | | DemonJarBossData bossData;
|
| | | model.TryGetBossData(model.selectedBoss, out bossData);
|
| | | var npcDropConfig = NPCDropItemConfig.Get(bossData.id);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss);
|
| | |
|
| | | m_BossIntroduce.Display(model.selectedBoss, true);
|
| | | m_Bosses.Init(bosses);
|
| | | m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss));
|
| | |
|
| | | DisplayTip(model.selectedBoss);
|
| | | }
|
| | |
|
| | | private void ShowSkillRecord()
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | private void OnBossSelected(int _bossId)
|
| | | private void OnBossSelected(int bossId)
|
| | | {
|
| | | m_BossIntroduce.Display(_bossId, false);
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId);
|
| | | m_BossIntroduce.Display(bossId, false);
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(bossId);
|
| | |
|
| | | DemonJarBossData bossData;
|
| | | model.TryGetBossData(_bossId, out bossData);
|
| | | var npcDropConfig = NPCDropItemConfig.Get(bossData.id);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | | model.TryGetBossData(bossId, out bossData);
|
| | |
|
| | | var demonJarConfig = DemonJarConfig.Get(model.selectedBoss);
|
| | | m_RewardDescription.text = Language.Get(demonJarConfig.RewardDescription);
|
| | | var config = DemonJarConfig.Get(model.selectedBoss);
|
| | | m_RewardDescription.text = Language.Get(config.RewardDescription);
|
| | |
|
| | | DisplayTip(bossId);
|
| | | DisplayAutoAndDoubleTitle();
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayTip(int bossId)
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var config = NPCConfig.Get(bossId);
|
| | |
|
| | | if (config.Realm > realmLevel)
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(true);
|
| | | m_SurpassLevel.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(false);
|
| | | var dropConfig = NPCDropItemConfig.Get(bossId);
|
| | | var noDrop = dropConfig == null || (dropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > dropConfig.MaxLV);
|
| | | m_SurpassLevel.gameObject.SetActive(noDrop);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Button m_KillRecord;
|
| | | [SerializeField] ToggleButton m_Subscribe;
|
| | | [SerializeField] RectTransform m_NoDamageTip;
|
| | |
|
| | | ElderGodAreaModel model { get { return ModelCenter.Instance.GetModel<ElderGodAreaModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss);
|
| | | m_Bosses.Init(bosses);
|
| | | m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss));
|
| | |
|
| | | DisplayTip(model.selectedBoss);
|
| | | }
|
| | |
|
| | | private void ShowKillRecords()
|
| | |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss);
|
| | | }
|
| | |
|
| | | private void OnBossSelected(int _bossId)
|
| | | private void OnBossSelected(int bossId)
|
| | | {
|
| | | StopCoroutine("Co_DelayDisplayNpcBaseInfo");
|
| | | StartCoroutine("Co_DelayDisplayNpcBaseInfo");
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId);
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(bossId);
|
| | |
|
| | | DisplayTip(bossId);
|
| | | }
|
| | |
|
| | | private void DisplayNpcBaseInfo(bool immediately)
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayTip(int bossId)
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var config = NPCConfig.Get(bossId);
|
| | |
|
| | | if (config.Realm > realmLevel)
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | [SerializeField] Button m_Close;
|
| | |
|
| | | float timer = 0f;
|
| | | MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | | FindPreciousModel model { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | 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()
|
| | |
| | | if (model.currentBossNotify != default(FindPreciousModel.BossNotify))
|
| | | {
|
| | | var bossId = model.currentBossNotify.bossId;
|
| | | var type = model.GetBossFindPreciousType(bossId);
|
| | |
|
| | | m_ContainerBossReborn.gameObject.SetActive(true);
|
| | | var config = NPCConfig.Get(bossId);
|
| | |
| | |
|
| | | private void GotoKillBoss()
|
| | | {
|
| | | var mapId = PlayerDatas.Instance.baseData.MapID;
|
| | | var bossId = model.currentBossNotify.bossId;
|
| | | var type = model.GetBossFindPreciousType(bossId);
|
| | |
|
| | |
| | | if (mapConfig.MapFBType == (int)MapType.OpenCountry)
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | var demonJarModel = ModelCenter.Instance.GetModel<DemonJarModel>();
|
| | | demonJarModel.selectedBoss = _bossId;
|
| | | demonJarModel.lockSelectedBoss = true;
|
| | | WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 0);
|
| | | WindowCenter.Instance.Open<FindPreciousFrameWin>(false, 3);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | public class FindPreciousFrameWin : Window
|
| | | {
|
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup;
|
| | | [SerializeField] FunctionButton m_DemonJar;
|
| | | [SerializeField] FunctionButton m_WorldBoss;
|
| | | [SerializeField] FunctionButton m_BossHome;
|
| | | [SerializeField] FunctionButton m_PersonalBoss;
|
| | |
| | |
|
| | | protected override void AddListeners()
|
| | | {
|
| | | m_DemonJar.AddListener(ShowDemonJar);
|
| | | m_WorldBoss.AddListener(ShowWorldBoss);
|
| | | m_BossHome.AddListener(ShowBossHome);
|
| | | m_PersonalBoss.AddListener(ShowPersonalBoss);
|
| | |
| | | m_Right.gameObject.SetActive(m_FunctionGroup.unLockedCount > 1);
|
| | |
|
| | | m_FunctionGroup.TriggerByOrder(functionOrder);
|
| | | m_FunctionGroup.GotoOrder(functionOrder);
|
| | | }
|
| | | #endregion
|
| | |
|
| | | private void ShowDemonJar() |
| | | { |
| | | CloseSubWindows();
|
| | | WindowCenter.Instance.Open<DemonJarWin>(); |
| | | functionOrder = m_DemonJar.order; |
| | | }
|
| | |
|
| | | private void ShowWorldBoss()
|
| | | {
|
| | |
| | |
|
| | | private void CloseSubWindows()
|
| | | {
|
| | | WindowCenter.Instance.Close<WorldBossWin>();
|
| | | WindowCenter.Instance.Close<BossHomeWin>();
|
| | | WindowCenter.Instance.Close<PersonalBossWin>();
|
| | | WindowCenter.Instance.Close<ElderGodAreaWin>();
|
| | | WindowCenter.Instance.Close<PreciousDropRecordWin>();
|
| | | var subWindows = WindowConfig.Get().FindChildWindows("FindPreciousFrameWin");
|
| | | foreach ( var window in subWindows )
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | }
|
| | | }
|
| | |
|
| | | private void ShowLastFunction()
|
| | |
| | | Redpoint lootPreciousRedpoint = new Redpoint(LOOTPRECIOUs_REDPOINTID);
|
| | |
|
| | | int m_ViewKillRecordsBoss = 0;
|
| | | public int ViewKillRecordsBoss
|
| | | {
|
| | | public int ViewKillRecordsBoss {
|
| | | get { return this.m_ViewKillRecordsBoss; }
|
| | | set { this.m_ViewKillRecordsBoss = value; }
|
| | | }
|
| | |
| | | public List<BossNotify> bossNotifies = new List<BossNotify>();
|
| | |
|
| | | BossNotify m_CurrentBossNotify = default(BossNotify);
|
| | | public BossNotify currentBossNotify
|
| | | {
|
| | | public BossNotify currentBossNotify {
|
| | | get { return m_CurrentBossNotify; }
|
| | | private set
|
| | | {
|
| | | private set {
|
| | | if (m_CurrentBossNotify != value)
|
| | | {
|
| | | m_CurrentBossNotify = value;
|
| | |
| | | private void UpdateRedpoint(int _redpointId)
|
| | | {
|
| | | if (_redpointId == WorldBossModel.WORLDBOSS_REDPOINT ||
|
| | | _redpointId == PersonalBossModel.PERSONAL_REDPOINTID)
|
| | | _redpointId == PersonalBossModel.PERSONAL_REDPOINTID ||
|
| | | _redpointId == DemonJarModel.DEMONJAR_REDPOINTID
|
| | | )
|
| | | {
|
| | | var worldBossRedpointCount = worldBossModel.worldBossRedPoint.count;
|
| | | var personalBossRedpointCount = personalBossModel.personalRedpoint.count;
|
| | | var totalCount = worldBossRedpointCount + personalBossRedpointCount;
|
| | | var demonJarRedpointCount = demonJarModel.redpoint.count;
|
| | |
|
| | | var totalCount = worldBossRedpointCount + personalBossRedpointCount + demonJarRedpointCount;
|
| | | findPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
|
| | | findPreciousRedpoint.count = totalCount;
|
| | | }
|
| | |
|
| | | if (_redpointId == DemonJarModel.DEMONJAR_REDPOINTID ||
|
| | | _redpointId == DogzDungeonModel.DOGZDUNGEON_REDPOINT ||
|
| | | if (_redpointId == DogzDungeonModel.DOGZDUNGEON_REDPOINT ||
|
| | | _redpointId == JadeDynastyBossModel.JADEDYNASTY_REDPOINTID)
|
| | | {
|
| | | var demonJarRedpointCount = demonJarModel.redpoint.count;
|
| | | var dogzDungeonRedpointCount = dogzDungeonModel.redpoint.count;
|
| | | var jadeDynastyBossRedpointCount = jadeDynastyBossModel.redpoint.count;
|
| | | var totalCount = demonJarRedpointCount + dogzDungeonRedpointCount + jadeDynastyBossRedpointCount;
|
| | | var totalCount = dogzDungeonRedpointCount + jadeDynastyBossRedpointCount;
|
| | |
|
| | | lootPreciousRedpoint.count = totalCount;
|
| | | lootPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
|
| | |
| | | { |
| | | |
| | | [SerializeField] FunctionButtonGroup m_FunctionGroup; |
| | | [SerializeField] FunctionButton m_DemonJar; |
| | | [SerializeField] FunctionButton m_FairyGrabBoss; |
| | | [SerializeField] FunctionButton m_DogzDungeon; |
| | | [SerializeField] FunctionButton m_JadeDynastyBoss; |
| | |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_DemonJar.AddListener(ShowDemonJar); |
| | | m_DogzDungeon.AddListener(ShowDogzDungeon); |
| | | m_RidingPetContention.AddListener(ShowRidingPetContention); |
| | | m_FairyGrabBoss.AddListener(FairyGrabBoss); |
| | |
| | | m_FunctionGroup.TriggerByOrder(functionOrder); |
| | | } |
| | | #endregion |
| | | |
| | | private void ShowDemonJar() |
| | | { |
| | | CloseSubWindows();
|
| | |
|
| | | m_NormalBottom.gameObject.SetActive(true); |
| | | |
| | | WindowCenter.Instance.Open<DemonJarWin>(); |
| | | functionOrder = m_DemonJar.order; |
| | | } |
| | | |
| | | private void FairyGrabBoss() |
| | | { |
| | |
| | | [SerializeField] BossIntroduceBehaviour m_BossIntroduce;
|
| | | [SerializeField] Text m_Times;
|
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] RectTransform m_NoDamageTip;
|
| | |
|
| | | PersonalBossModel model { get { return ModelCenter.Instance.GetModel<PersonalBossModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | |
| | | m_BossIntroduce.Display(model.selectedBoss, true);
|
| | | m_Bosses.Init(bosses);
|
| | | m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss));
|
| | |
|
| | | DisplayTip(model.selectedBoss);
|
| | | }
|
| | |
|
| | | private void GotoKillBoss()
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | private void OnBossSelected(int _bossId)
|
| | | private void OnBossSelected(int bossId)
|
| | | {
|
| | | m_BossIntroduce.Display(_bossId, false);
|
| | | m_BossIntroduce.Display(bossId, false);
|
| | | DisplayTip(bossId);
|
| | | }
|
| | |
|
| | | private void DisplayTip(int bossId)
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var config = NPCConfig.Get(bossId);
|
| | |
|
| | | if (config.Realm > realmLevel)
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | public class WorldBossBreifInfoBehaviour : FindPreciousBossBriefInfoBehaviour
|
| | | {
|
| | | [SerializeField] Image m_Attention;
|
| | | [SerializeField] RectTransform m_UnLockCondition;
|
| | | [SerializeField] Image m_UnLockRealm;
|
| | |
|
| | | protected override int selectedBossId {
|
| | | get {
|
| | |
| | | m_Attention.gameObject.SetActive(findPreciousModel.IsBossSubscribed(bossId));
|
| | | }
|
| | |
|
| | | protected override void DrawBossBaseInfo(string icon, string name, int level, int realm)
|
| | | {
|
| | | m_Portrait.SetSprite(icon);
|
| | | m_Portrait.SetNativeSize();
|
| | | m_BossName.text = name;
|
| | | m_BossLevel.text = Language.Get("Z1024", level);
|
| | |
|
| | | m_RealmContainer.gameObject.SetActive(isUnLocked);
|
| | | m_UnLockCondition.gameObject.SetActive(!isUnLocked);
|
| | | if (!isUnLocked)
|
| | | {
|
| | | var unLockRealm = model.GetBossUnLockRealm(bossId);
|
| | | var config = RealmConfig.Get(unLockRealm);
|
| | | m_UnLockRealm.SetSprite(config.Img);
|
| | | }
|
| | | else
|
| | | {
|
| | | if (m_Realm != null && m_RealmContainer != null)
|
| | | {
|
| | | if (RealmConfig.Has(realm))
|
| | | {
|
| | | m_RealmContainer.gameObject.SetActive(true);
|
| | | var realmConfig = RealmConfig.Get(realm);
|
| | | if (realmConfig != null)
|
| | | {
|
| | | m_Realm.SetSprite(realmConfig.Img);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RealmContainer.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | using UnityEngine;
|
| | | using System;
|
| | |
|
| | |
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp]
|
| | | public class WorldBossModel : Model
|
| | | {
|
| | |
|
| | | public const int WORLDBOSS_REDPOINT = 76001;
|
| | |
|
| | | int m_SelectedBoss = 0;
|
| | |
| | |
|
| | | public Redpoint worldBossRedPoint = new Redpoint(FindPreciousModel.FINDPRECIOUS_REDPOINTID, WORLDBOSS_REDPOINT);
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | public List<int> GetWorldBosses()
|
| | | {
|
| | | var activedBossIds = new List<int>();
|
| | | var mapModel = ModelCenter.Instance.GetModel<MapModel>();
|
| | | for (int i = 0; i < sortedBossIds.Count; i++)
|
| | | {
|
| | | var bossId = sortedBossIds[i];
|
| | | var config = WorldBossConfig.Get(bossId);
|
| | | var mapId = config.MapID;
|
| | | if (mapModel.IsMapUnlocked(mapId))
|
| | | if (IsBossUnLockedOrUnlockSoon(bossId))
|
| | | {
|
| | | activedBossIds.Add(bossId);
|
| | | }
|
| | |
| | | public List<int> GetWorldBosses(int _mapId)
|
| | | {
|
| | | var bosses = new List<int>();
|
| | | var mapModel = ModelCenter.Instance.GetModel<MapModel>();
|
| | | for (int i = 0; i < sortedBossIds.Count; i++)
|
| | | {
|
| | | var bossId = sortedBossIds[i];
|
| | |
| | | return worldBosses.ContainsKey(_bossId) && worldBosses[_bossId].isUnLocked;
|
| | | }
|
| | |
|
| | | public int GetLatestUnLockBoss()
|
| | | public int GetRecommendBoss()
|
| | | {
|
| | | var playerLevel = PlayerDatas.Instance.baseData.LV;
|
| | | for (int i = sortedBossIds.Count - 1; i >= 0; i--)
|
| | |
| | | return sortedBossIds[0];
|
| | | }
|
| | |
|
| | | public int GetBossUnLockRealm(int bossId)
|
| | | {
|
| | | if (!worldBosses.ContainsKey(bossId))
|
| | | {
|
| | | return 0;
|
| | | }
|
| | |
|
| | | var config = NPCConfig.Get(bossId);
|
| | | var realmStage = realmModel.GetRealmStage(config.Realm);
|
| | | var realms = new List<int>();
|
| | | if (realmModel.TryGetRealmStages(realmStage, out realms))
|
| | | {
|
| | | return realms[0];
|
| | | }
|
| | | else
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | }
|
| | |
|
| | | private bool IsBossUnLockedOrUnlockSoon(int bossId)
|
| | | {
|
| | | var myRealmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var myRealmStage = realmModel.GetRealmStage(myRealmLevel);
|
| | |
|
| | | var config = NPCConfig.Get(bossId);
|
| | | var bossRealmStage = realmModel.GetRealmStage(config.Realm);
|
| | |
|
| | | if (myRealmStage >= bossRealmStage)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | if (myRealmStage + 1 >= bossRealmStage)
|
| | | {
|
| | | return true;
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | private void ParseConfig()
|
| | | {
|
| | | var worldBossConfigs = WorldBossConfig.GetValues();
|
| | |
| | | sortedBossIds.AddRange(worldBosses.Keys);
|
| | | sortedBossIds.Sort(WorldBossData.LevelCompare);
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public class WorldBossData
|
| | | {
|
| | | MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | | RealmModel realmModel { get { return ModelCenter.Instance.GetModel<RealmModel>(); } }
|
| | |
|
| | | public int id { get; private set; }
|
| | | public bool isUnLocked {
|
| | | get {
|
| | | var config = WorldBossConfig.Get(id);
|
| | | var mapUnLocked = mapModel.IsMapUnlocked(config.MapID);
|
| | | return mapUnLocked;
|
| | | var myRealmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var myRealmStage = realmModel.GetRealmStage(myRealmLevel);
|
| | |
|
| | | var config = NPCConfig.Get(id);
|
| | | var bossRealmStage = realmModel.GetRealmStage(config.Realm);
|
| | |
|
| | | return myRealmStage >= bossRealmStage;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Button m_Goto;
|
| | | [SerializeField] Button m_KillRecord;
|
| | | [SerializeField] Transform m_SurpassLevel;
|
| | | [SerializeField] RectTransform m_NoDamageTip;
|
| | | [SerializeField] ToggleButton m_Subscribe;
|
| | |
|
| | | WorldBossModel model { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } }
|
| | | MapModel mapModel { get { return ModelCenter.Instance.GetModel<MapModel>(); } }
|
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | | DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
|
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | |
| | | var bosses = new List<int>();
|
| | | bosses.AddRange(model.GetWorldBosses());
|
| | |
|
| | | model.selectedBoss = model.GetLatestUnLockBoss();
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss);
|
| | | model.selectedBoss = model.GetRecommendBoss();
|
| | |
|
| | | m_BossIntroduce.Display(model.selectedBoss, true);
|
| | | m_Bosses.Init(bosses);
|
| | | m_Bosses.MoveToCenter(bosses.IndexOf(model.selectedBoss));
|
| | |
|
| | | var config = NPCConfig.Get(model.selectedBoss);
|
| | | var npcDropConfig = NPCDropItemConfig.Get(model.selectedBoss);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | | DisplayGotoKillButton(model.selectedBoss);
|
| | | DisplaySubscribe(model.selectedBoss);
|
| | | DisplayTip(model.selectedBoss);
|
| | | }
|
| | |
|
| | | private void ShowKillRecords()
|
| | |
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(model.selectedBoss);
|
| | | }
|
| | |
|
| | | private void OnBossSelected(int _bossId)
|
| | | private void OnBossSelected(int bossId)
|
| | | {
|
| | | m_BossIntroduce.Display(_bossId, false);
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(_bossId);
|
| | | var npcDropConfig = NPCDropItemConfig.Get(model.selectedBoss);
|
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV);
|
| | | m_BossIntroduce.Display(bossId, false);
|
| | | DisplayGotoKillButton(bossId);
|
| | | DisplaySubscribe(bossId);
|
| | | DisplayTip(bossId);
|
| | | }
|
| | |
|
| | | private void OnBossWearyValue()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayGotoKillButton(int bossId)
|
| | | {
|
| | | var isUnLocked = model.IsBossUnLocked(bossId);
|
| | | m_Goto.gameObject.SetActive(isUnLocked);
|
| | | }
|
| | |
|
| | | private void DisplaySubscribe(int bossId)
|
| | | {
|
| | | var isUnLocked = model.IsBossUnLocked(bossId);
|
| | | m_Subscribe.gameObject.SetActive(isUnLocked);
|
| | | if (isUnLocked)
|
| | | {
|
| | | m_Subscribe.isOn = findPreciousModel.IsBossSubscribed(bossId);
|
| | | }
|
| | | }
|
| | |
|
| | | private void DisplayTip(int bossId)
|
| | | {
|
| | | var realmLevel = PlayerDatas.Instance.baseData.realmLevel;
|
| | | var config = NPCConfig.Get(bossId);
|
| | |
|
| | | if (config.Realm > realmLevel)
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(true);
|
| | | m_SurpassLevel.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_NoDamageTip.gameObject.SetActive(false);
|
| | | var dropConfig = NPCDropItemConfig.Get(bossId);
|
| | | var noDrop = dropConfig == null || (dropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > dropConfig.MaxLV);
|
| | | m_SurpassLevel.gameObject.SetActive(noDrop);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | } |
| | | } |
| | | |
| | | if (trialModel.trialTokens.Contains(item.itemId)) |
| | | { |
| | | if (!trialModel.IsAnySatisfyExchangeBetter(item.itemId)) |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | //if (trialModel.trialTokens.Contains(item.itemId)) |
| | | //{ |
| | | // if (!trialModel.IsAnySatisfyExchangeBetter(item.itemId)) |
| | | // { |
| | | // return false; |
| | | // } |
| | | //} |
| | | |
| | | if (packModel.CheckIsDrugById(item.itemId)) |
| | | { |
| | |
| | | [SerializeField] ScrollerController ctrl;
|
| | | [SerializeField] CanvasGroup canvas;
|
| | | [SerializeField] SortMakeDrugTable drugTable;
|
| | | [SerializeField] SortMakeDrugTable drugTypeTable;
|
| | | [SerializeField] Transform tableArrow;
|
| | | [SerializeField] Button selectBtn;
|
| | | [SerializeField] Transform typeTableArrow;
|
| | | [SerializeField] Button selectQualityBtn;
|
| | | [SerializeField] Button selectTypeBtn;
|
| | | PackModel _playerPack;
|
| | | PackModel playerPack
|
| | | {
|
| | |
| | | int presentIndex = 0;
|
| | | private void Awake()
|
| | | {
|
| | | selectBtn.AddListener(ClickDrugSelect);
|
| | | selectQualityBtn.AddListener(ClickQualitySelect);
|
| | | selectTypeBtn.AddListener(ClickTypeSelect);
|
| | | }
|
| | |
|
| | | private void OnEnable()
|
| | |
| | | blastModel.sortDruglist.Clear();
|
| | | ctrl.OnRefreshCell += RefreshMakeDrugCell;
|
| | | drugTable.onSortCloseEvent += CloseDrugSort;
|
| | | drugTypeTable.onSortCloseEvent += CloseDrugTypeSort;
|
| | | drugTable.onSelectSortEvent += CreateCell;
|
| | | ctrl.lockType = EnhanceLockType.KeepVertical;
|
| | | canvas.alpha = 0;
|
| | | presentIndex = 0;
|
| | | drugTable.gameObject.SetActive(false);
|
| | | drugTable.SetDefault();
|
| | | drugTypeTable.gameObject.SetActive(false);
|
| | | drugTypeTable.SetDefault();
|
| | | CreateCell();
|
| | | CheckJumpToModel();
|
| | | ModelCenter.Instance.GetModel<BlastFurnaceModel>().IsMakeDrugWin = true;
|
| | | CloseDrugSort();
|
| | | CloseDrugTypeSort();
|
| | | }
|
| | |
|
| | | private void OnDisable()
|
| | | {
|
| | | drugTable.onSortCloseEvent -= CloseDrugSort;
|
| | | drugTypeTable.onSortCloseEvent -= CloseDrugTypeSort;
|
| | | ctrl.OnRefreshCell -= RefreshMakeDrugCell;
|
| | | drugTable.onSelectSortEvent -= CreateCell;
|
| | | ModelCenter.Instance.GetModel<BlastFurnaceModel>().IsMakeDrugWin = false;
|
| | | }
|
| | |
|
| | | private void ClickDrugSelect()
|
| | | private void ClickQualitySelect()
|
| | | {
|
| | | tableArrow.localRotation = Quaternion.Euler(0, 0, 0);
|
| | | if (!drugTable.gameObject.activeInHierarchy)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void ClickTypeSelect()
|
| | | {
|
| | | typeTableArrow.localRotation = Quaternion.Euler(0, 0, 0);
|
| | | if (!drugTypeTable.gameObject.activeInHierarchy)
|
| | | {
|
| | | drugTypeTable.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void CloseDrugSort()
|
| | | {
|
| | | tableArrow.localRotation = Quaternion.Euler(0, 0, 180);
|
| | | }
|
| | |
|
| | | private void CloseDrugTypeSort()
|
| | | {
|
| | | typeTableArrow.localRotation = Quaternion.Euler(0, 0, 180);
|
| | | }
|
| | |
|
| | | private void CheckJumpToModel()
|
| | | {
|
| | | if(AchievementGoto.guideAchievementId != 0)
|
| | |
| | |
|
| | | [SerializeField] Image m_Description;
|
| | | [SerializeField] Image m_JobName;
|
| | | [SerializeField] Image m_JobSign;
|
| | |
|
| | | [SerializeField] PositionTween m_LeftPostionTween;
|
| | | [SerializeField] PositionTween m_RightPositionTween;
|
| | |
| | | var config = CreateRoleConfig.Get(job);
|
| | | m_Description.SetSprite(config.description);
|
| | | m_JobName.SetSprite(config.jobName);
|
| | | m_JobSign.SetSprite(config.jobSign);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | [SerializeField] Image m_Description;
|
| | | [SerializeField] Image m_JobName;
|
| | | [SerializeField] Image m_JobSign;
|
| | |
|
| | | SelectRoleProcessor m_SelectRoleProcessor;
|
| | | SelectRoleProcessor selectRoleProcessor {
|
| | |
| | | var config = CreateRoleConfig.Get(PlayerDatas.Instance.loginInfo.Job);
|
| | | m_Description.SetSprite(config.description);
|
| | | m_JobName.SetSprite(config.jobName);
|
| | | m_JobSign.SetSprite(config.jobSign);
|
| | |
|
| | | selectRoleProcessor.Show(PlayerDatas.Instance.loginInfo.Job);
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<LootPreciousFrameWin>();
|
| | | WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | case JumpUIType.FindPreciousFrameFunc3:
|
| | | case JumpUIType.FindPreciousFrameFunc4:
|
| | | case JumpUIType.FindPreciousFrameFunc5:
|
| | | case JumpUIType.FindPreciousFrameFunc6:
|
| | | case JumpUIType.FindPreciousFrameFunc2Type2:
|
| | | case JumpUIType.FindPreciousFrameFunc4Type2:
|
| | | SetJumpLogic<FindPreciousFrameWin>(_tagWinSearchModel.TABID);
|
| | | break;
|
| | | case JumpUIType.LootPreciousFrameFunc1:
|
| | | case JumpUIType.DogzDungeon:
|
| | | case JumpUIType.FairyGrabBoss:
|
| | | case JumpUIType.JadeDynastyBoss290:
|
| | |
| | | FindPreciousFrameFunc3 = 84,
|
| | | FindPreciousFrameFunc4 = 85,
|
| | | FindPreciousFrameFunc5 = 86,
|
| | | FindPreciousFrameFunc6 = 104,//封魔坛
|
| | |
|
| | | MarketFunc1 = 87,
|
| | | MarketFunc2 = 88,
|
| | | MarketFunc3 = 89,
|
| | |
| | | RuneTower = 99,//符印塔
|
| | | WelfareFunc1 = 102, //签到
|
| | | WelfareFunc2 = 103, //祈愿
|
| | | LootPreciousFrameFunc1 = 104, //封魔坛
|
| | | DogzDungeon = 242, //异兽之地
|
| | | SystemSettingFunc1 = 109,//挂机设置
|
| | |
|
| | |
| | |
|
| | | public class WorldMapUnLockTip : MonoBehaviour
|
| | | {
|
| | | [SerializeField] Image m_LevelConditionSign;
|
| | | [SerializeField] Image m_TreasureConditionSign;
|
| | | [SerializeField] Text m_LevelCondtion;
|
| | | [SerializeField] Text m_TreasureCondition;
|
| | |
|
| | | TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
|
| | | [SerializeField] Image m_ConditionSign1;
|
| | | [SerializeField] Image m_ConditionSign2;
|
| | | [SerializeField] Text m_Condtion1;
|
| | | [SerializeField] Text m_Condition2;
|
| | |
|
| | | public void Display(int _mapId)
|
| | | {
|
| | | var config = MapConfig.Get(_mapId);
|
| | | m_LevelCondtion.text = Language.Get("WorldMap_LV", config.LV);
|
| | | m_LevelCondtion.color = PlayerDatas.Instance.baseData.LV >= config.LV ? UIHelper.GetUIColor(TextColType.Green) : UIHelper.GetUIColor(TextColType.Red);
|
| | |
|
| | | if (string.IsNullOrEmpty(config.MapTaskText))
|
| | | if (config.realmLevel > 0)
|
| | | {
|
| | | m_TreasureConditionSign.gameObject.SetActive(false);
|
| | | m_TreasureCondition.text = "";
|
| | | var realmConfig = RealmConfig.Get(config.realmLevel);
|
| | | m_Condtion1.text = Language.Get("WorldMap_Realm", realmConfig.Name);
|
| | | m_Condtion1.color = UIHelper.GetUIColor(PlayerDatas.Instance.baseData.realmLevel >= config.realmLevel ? TextColType.Green : TextColType.Red);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TreasureConditionSign.gameObject.SetActive(true);
|
| | | m_TreasureCondition.text = config.MapTaskText;
|
| | | m_Condtion1.text = Language.Get("WorldMap_LV", config.LV);
|
| | | m_Condtion1.color = UIHelper.GetUIColor(PlayerDatas.Instance.baseData.LV >= config.LV ? TextColType.Green : TextColType.Red);
|
| | | }
|
| | |
|
| | | if (string.IsNullOrEmpty(config.MapTaskText))
|
| | | {
|
| | | m_ConditionSign2.gameObject.SetActive(false);
|
| | | m_Condition2.text = "";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_ConditionSign2.gameObject.SetActive(true);
|
| | | m_Condition2.text = config.MapTaskText;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | |
| | | public class FunctionButtonGroup : MonoBehaviour |
| | | { |
| | | [SerializeField] ScrollRect m_ScrollRect; |
| | | |
| | | public int unLockedCount { |
| | | get { |
| | | var count = 0; |
| | | foreach (var button in toggleButtons.Values) |
| | | foreach (var button in functionButtons.Values) |
| | | { |
| | | if (button.state != TitleBtnState.Locked) |
| | | { |
| | |
| | | |
| | | int currentOrder = 0; |
| | | List<int> orders = new List<int>(); |
| | | Dictionary<int, FunctionButton> toggleButtons = new Dictionary<int, FunctionButton>(); |
| | | Dictionary<int, FunctionButton> functionButtons = new Dictionary<int, FunctionButton>(); |
| | | |
| | | public void Register(FunctionButton _toggleButton) |
| | | public void Register(FunctionButton button) |
| | | { |
| | | toggleButtons[_toggleButton.order] = _toggleButton; |
| | | if (!orders.Contains(_toggleButton.order)) |
| | | functionButtons[button.order] = button; |
| | | if (!orders.Contains(button.order)) |
| | | { |
| | | orders.Add(_toggleButton.order); |
| | | orders.Add(button.order); |
| | | orders.Sort(OrderCompare); |
| | | } |
| | | } |
| | | |
| | | public void UnRegister(FunctionButton _toggleButton) |
| | | public void UnRegister(FunctionButton button) |
| | | { |
| | | if (toggleButtons.ContainsKey(_toggleButton.order)) |
| | | if (functionButtons.ContainsKey(button.order)) |
| | | { |
| | | toggleButtons.Remove(_toggleButton.order); |
| | | functionButtons.Remove(button.order); |
| | | } |
| | | |
| | | if (orders.Contains(_toggleButton.order)) |
| | | if (orders.Contains(button.order)) |
| | | { |
| | | orders.Remove(_toggleButton.order); |
| | | orders.Remove(button.order); |
| | | orders.Sort(OrderCompare); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void NotifyToggleOn(FunctionButton _toggleButton) |
| | | public void NotifyToggleOn(FunctionButton button) |
| | | { |
| | | if (_toggleButton.state == TitleBtnState.Click) |
| | | if (button.state == TitleBtnState.Click) |
| | | { |
| | | currentOrder = _toggleButton.order; |
| | | currentOrder = button.order; |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | var toggleButton = toggleButtons[orders[i]]; |
| | | if (toggleButton != _toggleButton && toggleButton.state != TitleBtnState.Locked) |
| | | var functionButton = functionButtons[orders[i]]; |
| | | if (functionButton != button && functionButton.state != TitleBtnState.Locked) |
| | | { |
| | | toggleButton.state = TitleBtnState.Normal; |
| | | functionButton.state = TitleBtnState.Normal; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void TriggerByOrder(int _order) |
| | | public void TriggerByOrder(int targetOrder) |
| | | { |
| | | for (int i = 0; i < orders.Count; i++) |
| | | { |
| | | var order = orders[i]; |
| | | if (order == _order) |
| | | if (order == targetOrder) |
| | | { |
| | | toggleButtons[order].Invoke(true); |
| | | functionButtons[order].Invoke(true); |
| | | break; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | var next = orders[index]; |
| | | if (toggleButtons[next].state != TitleBtnState.Locked) |
| | | if (functionButtons[next].state != TitleBtnState.Locked) |
| | | { |
| | | toggleButtons[next].Invoke(false); |
| | | functionButtons[next].Invoke(false); |
| | | break; |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | var next = orders[index]; |
| | | if (toggleButtons[next].state != TitleBtnState.Locked) |
| | | if (functionButtons[next].state != TitleBtnState.Locked) |
| | | { |
| | | toggleButtons[next].Invoke(false); |
| | | functionButtons[next].Invoke(false); |
| | | break; |
| | | } |
| | | } |
| | |
| | | return orders.Count > 0 && currentOrder == orders[orders.Count - 1]; |
| | | } |
| | | |
| | | public void GotoOrder(int order) |
| | | { |
| | | if (m_ScrollRect != null) |
| | | { |
| | | var index = orders.IndexOf(order); |
| | | if (m_ScrollRect.horizontal) |
| | | { |
| | | m_ScrollRect.horizontalNormalizedPosition = (float)index / orders.Count; |
| | | } |
| | | else |
| | | { |
| | | m_ScrollRect.verticalNormalizedPosition = (float)index / orders.Count; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private int OrderCompare(int a, int b) |
| | | { |
| | | return a < b ? -1 : 1; |