Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public static ItemCompoundConfig GetItemCompoundByType(int firstType,int secondType, int thirdType)
|
| | | {
|
| | | if(allComposeModelDict.ContainsKey(firstType))
|
| | | {
|
| | | if(allComposeModelDict[firstType].ContainsKey(secondType))
|
| | | {
|
| | | if(allComposeModelDict[firstType][secondType].ContainsKey(thirdType))
|
| | | {
|
| | | return allComposeModelDict[firstType][secondType][thirdType][0];
|
| | | }
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | |
|
| | | public static bool TryGetTicketCompose(int _ticketId, out List<ItemCompoundConfig> list)
|
| | | {
|
| | | return ticketComposeDict.TryGetValue(_ticketId, out list);
|
| | |
| | | public class BlastFurnaceModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public BlastFurnaceFuncTitle funcTitle = BlastFurnaceFuncTitle.MakeDan;
|
| | |
|
| | | private int makeDrugRedLv;
|
| | | public Action<AlchemySpecConfig> RefreshAddSpecMatEvent;
|
| | |
|
| | | private TreasureModel _model;
|
| | |
| | | }
|
| | |
|
| | | alchemyModellist = Config.Instance.GetAllValues<AlchemyConfig>();
|
| | | FuncConfigConfig alchemyRedPoint = Config.Instance.Get<FuncConfigConfig>("AlchemyRedPoint");
|
| | | int.TryParse(alchemyRedPoint.Numerical1,out makeDrugRedLv);
|
| | | SetDandrugRedPointlist();
|
| | | GlobalTimeEvent.Instance.secondEvent += SecondUpdate;
|
| | | }
|
| | |
| | | bool isCheckRed = false;
|
| | | if(!isClick)
|
| | | {
|
| | | if(PlayerDatas.Instance.baseData.LV <= 151)
|
| | | if(PlayerDatas.Instance.baseData.LV <= makeDrugRedLv)
|
| | | {
|
| | | isCheckRed = true;
|
| | | }
|
| | | else if(PlayerDatas.Instance.baseData.LV > 151 && !isLogin && !IsMakeDrugWin)
|
| | | else if(PlayerDatas.Instance.baseData.LV > makeDrugRedLv && !isLogin && !IsMakeDrugWin)
|
| | | {
|
| | | isCheckRed = true;
|
| | | }
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | if(PlayerDatas.Instance.baseData.LV > 151)
|
| | | if(PlayerDatas.Instance.baseData.LV > makeDrugRedLv)
|
| | | {
|
| | | MakeDrugRedpoint.state = RedPointState.None;
|
| | | }
|
| | |
| | | {
|
| | | MakeDan, //炼丹
|
| | | AttrDan, //丹药属性
|
| | | DrugStore, //回收商店
|
| | | }
|
| | |
|
| | |
|
| | |
| | | case BlastFurnaceFuncTitle.AttrDan:
|
| | | _treasureRefineTitle.state = TitleBtnState.Click;
|
| | | break;
|
| | | case BlastFurnaceFuncTitle.DrugStore:
|
| | | _storeTitle.state = TitleBtnState.Click;
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | |
|
| | | private void OnClickStoreTitle()
|
| | | {
|
| | | FurnaceModel.funcTitle = BlastFurnaceFuncTitle.DrugStore;
|
| | | _lingDanTips.SetActive(false);
|
| | | attrDanTips.SetActive(false);
|
| | | storeTips.SetActive(true);
|
| | |
| | | chatChannels.Add(ChatInfoType.System);
|
| | | chatChannels.Add(ChatInfoType.World);
|
| | | chatChannels.Add(ChatInfoType.Area);
|
| | | chatChannels.Add(ChatInfoType.Team);
|
| | | chatChannels.Add(ChatInfoType.Invite);
|
| | | chatChannels.Add(ChatInfoType.Trumpet);
|
| | | chatChannels.Add(ChatInfoType.Fairy);
|
| | | chatChannels.Add(ChatInfoType.Friend);
|
| | | }
|
| | |
|
| | |
| | | CheckChatFloatOpen();
|
| | | if (win is MainInterfaceWin)
|
| | | {
|
| | | CheckOpenChatAfterCollect();
|
| | | SnxxzGame.Instance.StartCoroutine(Co_CheckAfterCollect());
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | CheckOpenChatAfterCollect();
|
| | | }
|
| | |
|
| | | IEnumerator Co_CheckAfterCollect()
|
| | | {
|
| | | yield return null;
|
| | | CheckOpenChatAfterCollect();
|
| | | }
|
| | |
|
| | | void CheckOpenChatAfterCollect()
|
| | | {
|
| | | if (!openChatAfterCollect)
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | | if (!WindowCenter.Instance.Open<MainInterfaceWin>()
|
| | | if (!WindowCenter.Instance.CheckOpen<MainInterfaceWin>()
|
| | | || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin()
|
| | | || StageManager.Instance.isLoading
|
| | | || NewBieCenter.Instance.inGuiding)
|
| | |
| | | return;
|
| | | }
|
| | | openChatAfterCollect = false;
|
| | | if (!WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | if (!WindowCenter.Instance.CheckOpen<ChatWin>())
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>();
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
| | | switch (type)
|
| | | {
|
| | | case ChatInfoType.Team:
|
| | | if (!WindowCenter.Instance.CheckOpen<TeamChatWin>())
|
| | | if (!WindowCenter.Instance.CheckOpen<TeamChatWin>()
|
| | | && (!WindowCenter.Instance.CheckOpen<ChatWin>() || presentChatType != ChatInfoType.Team))
|
| | | {
|
| | | unReadChatCounts[ChatInfoType.Team] = Mathf.Min(unReadChatCounts[ChatInfoType.Team] + 1, 99);
|
| | | }
|
| | | break;
|
| | | case ChatInfoType.Fairy:
|
| | | if (!WindowCenter.Instance.CheckOpen<FairyChatWin>())
|
| | | if (!WindowCenter.Instance.CheckOpen<FairyChatWin>()
|
| | | && (!WindowCenter.Instance.CheckOpen<ChatWin>() || presentChatType != ChatInfoType.Fairy))
|
| | | {
|
| | | unReadChatCounts[ChatInfoType.Fairy] = Mathf.Min(unReadChatCounts[ChatInfoType.Fairy] + 1, 99);
|
| | | }
|
| | |
| | |
|
| | | private void OnChatClick()
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | if (mapId == 31230)
|
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>();
|
| | | return;
|
| | | }
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | }
|
| | |
| | |
|
| | | void OnChatDataClick(ChatData data)
|
| | | {
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
|
| | | if (WindowCenter.Instance.CheckOpen<ChatWin>())
|
| | | {
|
| | | return;
|
| | | }
|
| | |
| | | {
|
| | | ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
|
| | | }
|
| | | switch (ChatCtrl.Inst.presentChatType)
|
| | | {
|
| | | case ChatInfoType.Team:
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>(false, 2);
|
| | | break;
|
| | | case ChatInfoType.Fairy:
|
| | | WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<SocialWin>();
|
| | | break;
|
| | | default:
|
| | | WindowCenter.Instance.Open<ChatWin>();
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | void OnRefreshChatTip(ChatInfoType type)
|
| | |
| | | break;
|
| | | }
|
| | | m_ChatContent.chatType = ChatCtrl.Inst.presentChatType;
|
| | | ChatCtrl.Inst.ViewChat(ChatCtrl.Inst.presentChatType);
|
| | | }
|
| | |
|
| | | private void OnChannelSelect(CellView _cell)
|
| | |
| | | public class VersionUpdateWin : Window
|
| | | {
|
| | | [SerializeField] RectTransform m_ContainerHint;
|
| | | [SerializeField] RichText m_Content;
|
| | | [SerializeField] RichText m_HintDescription;
|
| | | [SerializeField] RectTransform m_UpdateContentContainer;
|
| | | [SerializeField] RichText m_UpdateCotent;
|
| | | [SerializeField] Button m_Confirm;
|
| | |
|
| | | [SerializeField] Transform m_ContainerProgress;
|
| | |
| | | private void DisplayHintContent()
|
| | | {
|
| | | var step = VersionUtility.Instance.step;
|
| | |
|
| | | switch (step)
|
| | | {
|
| | | case VersionUtility.Step.None:
|
| | | m_Content.text = Language.GetFromLocal(4);
|
| | | m_HintDescription.text = Language.GetFromLocal(4);
|
| | | break;
|
| | | case VersionUtility.Step.ApkExist:
|
| | | m_Content.text = Language.GetFromLocal(5);
|
| | | m_HintDescription.text = Language.GetFromLocal(5);
|
| | | break;
|
| | | case VersionUtility.Step.DownLoadPrepared:
|
| | | if (Application.platform == RuntimePlatform.Android)
|
| | |
| | | switch (Application.internetReachability)
|
| | | {
|
| | | case NetworkReachability.NotReachable:
|
| | | m_Content.text = Language.GetFromLocal(6, sizeDescription);
|
| | | m_HintDescription.text = Language.GetFromLocal(6, sizeDescription);
|
| | | break;
|
| | | case NetworkReachability.ReachableViaCarrierDataNetwork:
|
| | | m_Content.text = Language.GetFromLocal(7, sizeDescription);
|
| | | m_HintDescription.text = Language.GetFromLocal(7, sizeDescription);
|
| | | break;
|
| | | case NetworkReachability.ReachableViaLocalAreaNetwork:
|
| | | m_Content.text = Language.GetFromLocal(8, sizeDescription);
|
| | | m_HintDescription.text = Language.GetFromLocal(8, sizeDescription);
|
| | | break;
|
| | | }
|
| | | }
|
| | | else if (Application.platform == RuntimePlatform.IPhonePlayer)
|
| | | {
|
| | | m_Content.text = Language.GetFromLocal(9);
|
| | | m_HintDescription.text = Language.GetFromLocal(9);
|
| | | }
|
| | | break;
|
| | | case VersionUtility.Step.DownLoad:
|
| | | m_Content.text = Language.GetFromLocal(3);
|
| | | m_HintDescription.text = Language.GetFromLocal(3);
|
| | | break;
|
| | | case VersionUtility.Step.DownLoadFailed:
|
| | | m_Content.text = Language.GetFromLocal(10);
|
| | | m_HintDescription.text = Language.GetFromLocal(10);
|
| | | break;
|
| | | }
|
| | |
|
| | | switch (step)
|
| | | {
|
| | | case VersionUtility.Step.ApkExist:
|
| | | case VersionUtility.Step.DownLoadPrepared:
|
| | | var updateContent = VersionUtility.Instance.GetUpdateContent();
|
| | | if (string.IsNullOrEmpty(updateContent))
|
| | | {
|
| | | m_UpdateContentContainer.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_UpdateContentContainer.gameObject.SetActive(true);
|
| | | m_UpdateCotent.text = updateContent;
|
| | | }
|
| | | break;
|
| | | default:
|
| | | m_UpdateContentContainer.gameObject.SetActive(false);
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void Confirm()
|
| | |
| | | VersionUtility.Instance.RequestVersionCheck();
|
| | | break;
|
| | | case VersionUtility.Step.ApkExist:
|
| | | var version = VersionUtility.Instance.versionInfo.GetLatestVersion();
|
| | | var remoteURL = version.download_url;
|
| | | var fileName = Path.GetFileName(remoteURL);
|
| | | var apkLocalURL = StringUtility.Contact(VersionUtility.Instance.androidRoot, "/", fileName);
|
| | | SDKUtility.Instance.InstallAPK(apkLocalURL);
|
| | | SDKUtility.Instance.InstallAPK(VersionUtility.Instance.GetApkLocalUrl());
|
| | | break;
|
| | | case VersionUtility.Step.DownLoadPrepared:
|
| | | if (Application.platform == RuntimePlatform.Android)
|
| | |
| | | }
|
| | | else if (Application.platform == RuntimePlatform.IPhonePlayer)
|
| | | {
|
| | | Application.OpenURL(VersionUtility.Instance.versionInfo.GetLatestVersion().download_url);
|
| | | Application.OpenURL(VersionUtility.Instance.GetApkRemoteUrl());
|
| | | //打开应用商店链接
|
| | | }
|
| | | break;
|
| | |
| | |
|
| | | public string androidRoot { get { return StringUtility.Contact(SDKUtility.Instance.DeviceRootPath, "/", VersionConfig.Get().bundleIdentifier); } }
|
| | |
|
| | | public float progress
|
| | | {
|
| | | public float progress {
|
| | | get { return RemoteFile.TotalDownloadedSize / ((float)versionInfo.GetLatestVersion().file_size * 1024); }
|
| | | }
|
| | |
|
| | | public string apkLocalURL = string.Empty;
|
| | | public VersionInfo versionInfo { get; private set; }
|
| | | public MaoErVersion maoerVersion;
|
| | | public bool completed { get { return step == Step.Completed; } }
|
| | |
|
| | | Step m_Step = Step.None;
|
| | | public Step step
|
| | | {
|
| | | public Step step {
|
| | | get { return m_Step; }
|
| | | private set
|
| | | {
|
| | | private set {
|
| | | if (m_Step != value)
|
| | | {
|
| | | m_Step = value;
|
| | |
| | | if (_ok)
|
| | | {
|
| | | versionInfo = JsonMapper.ToObject<VersionInfo>(_result);
|
| | | if (versionInfo.VersionCount > 0)
|
| | | if (NeedUpdate())
|
| | | {
|
| | | var version = versionInfo.GetLatestVersion();
|
| | | var remoteURL = version.download_url;
|
| | |
|
| | | switch (Application.platform)
|
| | | {
|
| | | case RuntimePlatform.Android:
|
| | | var fileName = Path.GetFileName(remoteURL);
|
| | | apkLocalURL = StringUtility.Contact(androidRoot, "/", fileName);
|
| | | if (File.Exists(apkLocalURL))
|
| | | if (File.Exists(GetApkLocalUrl()))
|
| | | {
|
| | | step = Step.ApkExist;
|
| | | WindowCenter.Instance.OpenFromLocal<VersionUpdateWin>();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public bool NeedUpdate()
|
| | | {
|
| | | if (IsMaoErGame())
|
| | | {
|
| | | return versionInfo.downAsset == 0 && versionInfo.VersionCount > 0;
|
| | | }
|
| | | else
|
| | | {
|
| | | return versionInfo.downAsset == 1 && versionInfo.VersionCount > 0;
|
| | | }
|
| | | }
|
| | |
|
| | | public string GetApkLocalUrl()
|
| | | {
|
| | | if (IsMaoErGame())
|
| | | {
|
| | | return StringUtility.Contact(androidRoot, "/", "maoErGame.apk");
|
| | | }
|
| | | else
|
| | | {
|
| | | var remoteURL = GetApkRemoteUrl();
|
| | | var fileName = Path.GetFileName(remoteURL);
|
| | | return StringUtility.Contact(androidRoot, "/", fileName);
|
| | | }
|
| | | }
|
| | |
|
| | | public string GetApkRemoteUrl()
|
| | | {
|
| | | if (IsMaoErGame())
|
| | | {
|
| | | return maoerVersion.url;
|
| | | }
|
| | | else
|
| | | {
|
| | | var version = versionInfo.GetLatestVersion();
|
| | | return version.download_url;
|
| | | }
|
| | | }
|
| | |
|
| | | public string GetUpdateContent()
|
| | | {
|
| | | if (IsMaoErGame())
|
| | | {
|
| | | if (string.IsNullOrEmpty(maoerVersion.content))
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | else
|
| | | {
|
| | | return StringUtility.Contact(Language.GetFromLocal(30), "\r\n", maoerVersion.content);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | return string.Empty;
|
| | | }
|
| | | }
|
| | |
|
| | | public void StartDownLoad()
|
| | | {
|
| | | step = Step.DownLoad;
|
| | | var version = versionInfo.GetLatestVersion();
|
| | | var remoteURL = version.download_url;
|
| | | var fileName = Path.GetFileName(remoteURL);
|
| | | apkLocalURL = StringUtility.Contact(androidRoot, "/", fileName);
|
| | | var remoteURL = GetApkRemoteUrl();
|
| | | var apkLocalUrl = GetApkLocalUrl();
|
| | |
|
| | | RemoteFile.Prepare();
|
| | |
|
| | | var remoteFile = new RemoteFile();
|
| | | remoteFile.Init(remoteURL, apkLocalURL, null);
|
| | | remoteFile.Init(remoteURL, apkLocalUrl, null);
|
| | | remoteFile.Begin(OnDownLoadApkCompleted);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | SDKUtility.Instance.InstallAPK(apkLocalURL);
|
| | | SDKUtility.Instance.InstallAPK(GetApkLocalUrl());
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | step = Step.Completed;
|
| | | }
|
| | |
|
| | | const string maoerGameAppId = "mrgame";
|
| | | static List<string> maoerGameAppId = new List<string> { "mrgame", "mrgameios" };
|
| | | public bool IsMaoErGame()
|
| | | {
|
| | | return VersionConfig.Get().appId == maoerGameAppId;
|
| | | return maoerGameAppId.Contains(VersionConfig.Get().appId);
|
| | | }
|
| | |
|
| | | public void RequestMaoErVersionCheck()
|
| | | {
|
| | | if (IsMaoErGame() && versionInfo.VersionCount > 0)
|
| | | {
|
| | | step = Step.None;
|
| | | var tables = new Dictionary<string, string>();
|
| | | tables["uid"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
|
| | | var url = "https://api.maoergame.com/update/download/url";
|
| | |
|
| | | HttpRequest.Instance.RequestHttpPost(url, tables, HttpRequest.defaultHttpContentType, 1, OnMaoErVersionCheckResult);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnMaoErVersionCheckResult(bool ok, string result)
|
| | | {
|
| | | if (ok)
|
| | | {
|
| | | try
|
| | | {
|
| | | maoerVersion = JsonMapper.ToObject<MaoErVersion>(result);
|
| | | if (maoerVersion.code == 0)
|
| | | {
|
| | | step = Step.DownLoadPrepared;
|
| | | WindowCenter.Instance.OpenFromLocal<VersionUpdateWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | step = Step.None;
|
| | | Clock.Create(DateTime.Now + new TimeSpan(TimeSpan.TicksPerSecond), RequestMaoErVersionCheck);
|
| | | }
|
| | | }
|
| | | catch (System.Exception ex)
|
| | | {
|
| | | step = Step.None;
|
| | | Clock.Create(DateTime.Now + new TimeSpan(TimeSpan.TicksPerSecond), RequestMaoErVersionCheck);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | step = Step.None;
|
| | | Clock.Create(DateTime.Now + new TimeSpan(TimeSpan.TicksPerSecond), RequestMaoErVersionCheck);
|
| | | }
|
| | | }
|
| | |
|
| | | public class VersionInfo
|
| | |
| | | public string version_name;
|
| | | }
|
| | |
|
| | | public struct MaoErVersion
|
| | | {
|
| | | public string msg;
|
| | | public int code;
|
| | | public string content;
|
| | | public string url;
|
| | | }
|
| | |
|
| | | public enum Step
|
| | | {
|
| | | None,
|
| | |
| | | #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 && WindowJumpMgr.Instance.jumpType == 1)
|
| | | if(WindowJumpMgr.Instance.IsJumpState)
|
| | | {
|
| | | if(ComposeModel.CurComposeModel != null)
|
| | | {
|
| | |
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | |
|
| | | }
|
| | | if(WindowJumpMgr.Instance.jumpType != 1)
|
| | | }
|
| | |
|
| | | private void CloseJumpWindow(Window win)
|
| | | {
|
| | | if(win as ComposeWin)
|
| | | {
|
| | | if (WindowJumpMgr.Instance.jumpPhase <= 1)
|
| | | {
|
| | | ComposeModel.SetCurComposeModel(null);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | private void OnClickRightBtn()
|
| | |
| | |
|
| | | int[] composeCondi = itemConfig.JumpComposeCondi;
|
| | | if (composeCondi.Length < 3) return false;
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(composeCondi[0],composeCondi[1],composeCondi[2])[0];
|
| | | ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(composeCondi[0], composeCondi[1], composeCondi[2]);
|
| | | if(itemCompound != null)
|
| | | {
|
| | | if(itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | switch (itemCompound.firstType)
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | return false;
|
| | | }
|
| | |
|
| | | public bool CheckIsComposeByType(int firstType,int secondType,int thirdType)
|
| | | {
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(firstType,secondType,thirdType)[0];
|
| | |
| | | {
|
| | | [SerializeField] Text m_Title;
|
| | | [SerializeField] RectTransform m_ContainerTimes;
|
| | | [SerializeField] Text m_TimesUnit;
|
| | | [SerializeField] TextEx m_Times;
|
| | | [SerializeField] Text m_PracticePoint;
|
| | | [SerializeField] Text m_UnLockCondition;
|
| | |
| | | else
|
| | | {
|
| | | m_ContainerTimes.gameObject.SetActive(true);
|
| | |
|
| | | switch ((DailyQuestType)this.data.id)
|
| | | {
|
| | | case DailyQuestType.KillMonster:
|
| | | m_TimesUnit.text = Language.Get("DailyQuestMonster");
|
| | | break;
|
| | | default:
|
| | | m_TimesUnit.text = Language.Get("DailyQuestTimes");
|
| | | break;
|
| | | }
|
| | |
|
| | | m_Times.text = StringUtility.Contact(completedTimes, "/", totalTimes);
|
| | | m_Times.colorType = completedTimes >= totalTimes ? TextColType.DarkGreen : TextColType.NavyBrown;
|
| | | }
|
| | |
| | |
|
| | | switch ((DailyQuestType)data.id)
|
| | | {
|
| | | case DailyQuestType.KillMonster:
|
| | | m_PracticePoint.text = Language.Get("DailyQuestPerPoint2", config.OnceActivity, config.OnceActivityTime);
|
| | | break;
|
| | | case DailyQuestType.BlastStove:
|
| | | m_PracticePoint.text = Language.Get("DailyQuestLiandan", config.OnceActivity);
|
| | | break;
|
| | |
| | | [SerializeField] ScrollerController m_PackController;
|
| | | [SerializeField] Button qualitySelectBtn;
|
| | | [SerializeField] Button starSelectBtn;
|
| | | [SerializeField] Transform qualityArrow;
|
| | | [SerializeField] Transform starArrow;
|
| | | [SerializeField] SortTable qualitySort;
|
| | | [SerializeField] SortTable starSort;
|
| | |
|
| | |
| | | playerPack.RefreshItemCountAct += RefreshDogzItemEvent;
|
| | | qualitySort.onSelectSortEvent += RefreshDogzSelectEvent;
|
| | | starSort.onSelectSortEvent += RefreshDogzSelectEvent;
|
| | | qualitySort.onSortCloseEvent += CloseQualitySort;
|
| | | starSort.onSortCloseEvent += CloseStarSort;
|
| | | dogzModel.SelectDogzItemQuality = 0;
|
| | | dogzModel.SelectDogzItemStart = 0;
|
| | |
|
| | | starSort.SetDefault();
|
| | | qualitySort.SetDefault();
|
| | | UpdateDogzEquip();
|
| | | UpdateDogzPack();
|
| | | starSort.gameObject.SetActive(false);
|
| | | qualitySort.gameObject.SetActive(false);
|
| | | starArrow.localRotation = Quaternion.Euler(0, 0, 180);
|
| | | qualityArrow.localRotation = Quaternion.Euler(0, 0, 180);
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | playerPack.RefreshItemCountAct -= RefreshDogzItemEvent;
|
| | | qualitySort.onSelectSortEvent -= RefreshDogzSelectEvent;
|
| | | starSort.onSelectSortEvent -= RefreshDogzSelectEvent;
|
| | | qualitySort.onSortCloseEvent -= CloseQualitySort;
|
| | | starSort.onSortCloseEvent -= CloseStarSort;
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | |
|
| | | private void ClickStarSelect()
|
| | | {
|
| | | starSort.gameObject.SetActive(!starSort.gameObject.activeInHierarchy);
|
| | | starArrow.localRotation = Quaternion.Euler(0, 0, 0);
|
| | | if (!starSort.gameObject.activeInHierarchy)
|
| | | {
|
| | | starSort.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void ClickQualitySelect()
|
| | | {
|
| | | qualitySort.gameObject.SetActive(!qualitySort.gameObject.activeInHierarchy);
|
| | | qualityArrow.localRotation = Quaternion.Euler(0, 0, 0);
|
| | | if (!qualitySort.gameObject.activeInHierarchy)
|
| | | {
|
| | | qualitySort.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | private void CloseQualitySort()
|
| | | {
|
| | | qualityArrow.localRotation = Quaternion.Euler(0, 0, 180);
|
| | | }
|
| | |
|
| | | private void CloseStarSort()
|
| | | {
|
| | | starArrow.localRotation = Quaternion.Euler(0, 0, 180);
|
| | | }
|
| | |
|
| | | [Serializable]
|
| | |
| | | } |
| | | } |
| | | |
| | | if (WindowCenter.Instance.CheckOpen("DogzDungeonWin")) |
| | | { |
| | | if (containBox) |
| | | { |
| | | dogzDungeonBox.UpdateBoxRefreshTime(boxRefreshSecond); |
| | | RequestBoxSurplusInfo(); |
| | | } |
| | | |
| | | if (containElite) |
| | | { |
| | | dogzDungeonElite.UpdateEliteRefreshTime(eliteRefreshSecond); |
| | | } |
| | | |
| | | if (WindowCenter.Instance.CheckOpen("DogzDungeonWin")) |
| | | { |
| | | if (containBox) |
| | | { |
| | | RequestBoxSurplusInfo(); |
| | | } |
| | | |
| | | if (containElite) |
| | | { |
| | | RequestEliteSurplusInfo(); |
| | | } |
| | | } |
| | |
| | | }
|
| | | else
|
| | | {
|
| | | CancelGroupEnter(_dungeon.mapId);
|
| | | CancelGroupEnter(_dungeon);
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void CancelGroupEnter(int _mapId)
|
| | | private void CancelGroupEnter(Dungeon _dungeon)
|
| | | {
|
| | | switch (_mapId)
|
| | | switch (_dungeon.mapId)
|
| | | {
|
| | | case RealmModel.REALM_DUNGEON_ID:
|
| | | if (!WindowCenter.Instance.CheckOpen<TeamFrameWin>())
|
| | |
| | | WindowCenter.Instance.Open<TeamFrameWin>(false, teamModel.myTeam.inTeam ? 1 : 0);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | if (!WindowCenter.Instance.CheckOpen<TeamFrameWin>())
|
| | | {
|
| | | var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
|
| | | teamModel.missionBuf = teamModel.currentMission = new TeamMission(_dungeon.mapId, _dungeon.lineId);
|
| | | WindowCenter.Instance.Open<TeamFrameWin>(false, teamModel.myTeam.inTeam ? 1 : 0);
|
| | | }
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | RewardsToOpen();
|
| | | ContentAssignment();
|
| | | int GetCylinderNumber = TaskAllocation.Instance.FairyAuNumber();//获取仙盟总环数
|
| | | if (coinTaskTip.IsFairy && GetCylinderNumber == 10)
|
| | | if (coinTaskTip.IsFairy && GetCylinderNumber == 10 && vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.AutoFairyMisstion) >= 1)
|
| | | {
|
| | | _ReceiveImageText.text = string.Format(Language.Get("TaskContinueCount_1"), Second);
|
| | | }
|
| | |
| | | item.name = StringUtility.Contact("CommonItemCell", index);
|
| | | item.gameObject.SetActive(true);
|
| | | BoxGetItemInfo itemInfo = BoxModel.getItems[index];
|
| | | PackType type = PackType.rptDeleted;
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(itemInfo.ItemID);
|
| | | if(itemConfig != null)
|
| | | {
|
| | | if(itemConfig.Type == 70 || (itemConfig.EquipPlace >= 101 && itemConfig.EquipPlace <= 105))
|
| | | {
|
| | | type = PackType.rptDogzItem;
|
| | | }
|
| | | }
|
| | | CommonItemBaisc itemBasic = item.transform.Find("CommonItemCell").GetComponent<CommonItemBaisc>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemInfo.ItemID, false, (ulong)itemInfo.Count, itemInfo.IsBind,
|
| | | "", PackType.rptDeleted, false, ConfigParse.Analysis(itemInfo.UserData));
|
| | | "", type, false, ConfigParse.Analysis(itemInfo.UserData));
|
| | | itemBasic.Init(cellModel);
|
| | | itemBasic.cellBtn.RemoveAllListeners();
|
| | | itemBasic.cellBtn.AddListener(()=>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemInfo.ItemID,false, (ulong)itemInfo.Count,-1, itemInfo.IsBind,
|
| | | false, PackType.rptDeleted,"", ConfigParse.Analysis(itemInfo.UserData));
|
| | | false,type,"", ConfigParse.Analysis(itemInfo.UserData));
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | |
|
| | | });
|
| | |
| | | {
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.EquipDecompose)) return;
|
| | |
|
| | | if(GetCanDevourModellist() != null && GetCanDevourModellist().Count > 0)
|
| | | if(GetCanDevourModellist() != null && GetCanDevourModellist().Count >= minDevourEquipNum)
|
| | | {
|
| | | redpointEquipDecom.state = RedPointState.Simple;
|
| | | }
|
| | |
| | |
|
| | | public List<int> devourPlacelist { get; private set; }
|
| | | public int MaxDevourEquipNum { get; private set; }
|
| | | public int minDevourEquipNum { get; private set;}
|
| | | public void SetDevourEquipPlace()
|
| | | {
|
| | | devourPlacelist = new List<int>();
|
| | |
| | | devourPlacelist.Add(placeArray[i]);
|
| | | }
|
| | | MaxDevourEquipNum = int.Parse(funcConfig.Numerical2);
|
| | | minDevourEquipNum = int.Parse(funcConfig.Numerical3);
|
| | | }
|
| | |
|
| | | List<ItemModel> devourModellist = new List<ItemModel>();
|
| | |
| | | [SerializeField]
|
| | | private FunctionButton _depotTitle; //仓库
|
| | | [SerializeField]
|
| | | private FunctionButton _devourTitle; //仓库
|
| | | private FunctionButton _devourTitle; //装备分解
|
| | | [SerializeField]
|
| | | private FunctionButtonGroup _funcBtnGroup;
|
| | |
|
| | |
| | | base.OnActived();
|
| | | this.transform.SetAsLastSibling();
|
| | | _ornamentTitle.state = TitleBtnState.Locked;
|
| | | if(!WindowJumpMgr.Instance.IsJumpState && functionOrder == 0)
|
| | | {
|
| | | if(playerPack.redpointEquipDecom.state == RedPointState.Simple)
|
| | | {
|
| | | functionOrder = _devourTitle.order;
|
| | | }
|
| | | }
|
| | | _funcBtnGroup.TriggerByOrder(functionOrder);
|
| | | }
|
| | |
|
| | |
| | | public SDKUtility.FP_LoginOk sdkLoginResult;
|
| | | public SDKUtility.FP_CheckIDAuthentication sdkIDCheckIDAuthentication;
|
| | |
|
| | | public string localSaveAccountName
|
| | | {
|
| | | public string localSaveAccountName {
|
| | | get { return LocalSave.GetString(USER_ACCOUNT); }
|
| | | set { LocalSave.SetString(USER_ACCOUNT, value); }
|
| | | }
|
| | |
| | | public event Action accountBindOkEvent;
|
| | |
|
| | | bool m_ReconnecBackGround = false;
|
| | | public bool reconnectBackGround
|
| | | {
|
| | | public bool reconnectBackGround {
|
| | | get { return m_ReconnecBackGround; }
|
| | | set { m_ReconnecBackGround = value; }
|
| | | }
|
| | |
|
| | | bool m_OnCreateRole = false;
|
| | | public bool onCreateRole
|
| | | {
|
| | | public bool onCreateRole {
|
| | | get { return m_OnCreateRole; }
|
| | | set { m_OnCreateRole = value; }
|
| | | }
|
| | |
|
| | | bool m_Busy = false;
|
| | | public bool busy
|
| | | {
|
| | | public bool busy {
|
| | | get { return m_Busy; }
|
| | | set { m_Busy = value; }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | SDKUtility.Instance.FreePlatformCheckIDAuthentication(sdkLoginResult.account);
|
| | |
|
| | | ServerListCenter.Instance.RequestServerListPlayer(sdkLoginResult.account);
|
| | | GameNotice.OpenGameNotice();
|
| | | SDKUtility.Instance.MakeKeyAndVisible();
|
| | | OperationLogCollect.Instance.RecordLauchEvent(5);
|
| | |
|
| | | if (VersionUtility.Instance.IsMaoErGame() && VersionUtility.Instance.NeedUpdate())
|
| | | {
|
| | | VersionUtility.Instance.RequestMaoErVersionCheck();
|
| | | }
|
| | | else
|
| | | {
|
| | | GameNotice.OpenGameNotice();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnSDKAccountLoginOutOk()
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (VersionUtility.Instance.IsMaoErGame())
|
| | | {
|
| | | if (VersionUtility.Instance.step != VersionUtility.Step.Completed)
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | |
|
| | | Login();
|
| | | }
|
| | |
|
| | |
| | | var IsOpenMaininterface = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
|
| | | var IsOpenOffLineOnHook = WindowCenter.Instance.CheckOpen<OffLineOnHookWin>();
|
| | | var treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
|
| | | var IsLoading = StageManager.Instance.isLoading;
|
| | | if (NewBieCenter.Instance.inGuiding || treasureModel.newGotShowing || inDungeon || !IsOpenMaininterface
|
| | | || treasureModel.treasureStageUpShow || WindowCenter.Instance.ExitAnyFullScreenOrMaskWin() ||
|
| | | IsOpenOffLineOnHook)
|
| | | IsOpenOffLineOnHook || IsLoading)
|
| | | {
|
| | | yield break;
|
| | | }
|
| | |
| | | Pet = 6,//灵宠
|
| | | Horse = 8,//坐骑
|
| | | Wing = 97,//翅膀
|
| | | GossipFurnace = 87,//八卦炉
|
| | | GossipFurnace = 143,//八卦炉
|
| | | } |
| | | |
| | | public class FeatureNoticeWin : Window |
| | |
| | | {
|
| | | _model.currentCategory = TreasureCategory.Human;
|
| | | }
|
| | | else if (_model.GetTreasureUnlockShow(TreasureCategory.Demon) != 0)
|
| | | {
|
| | | _model.currentCategory = TreasureCategory.Demon;
|
| | | }
|
| | | else if (RedpointCenter.Instance.GetRedpointState(TreasureModel.CATEGORY_REDPOINTIDS[(int)TreasureCategory.Human - 1])
|
| | | == RedPointState.Simple)
|
| | | {
|
| | | _model.currentCategory = TreasureCategory.Human;
|
| | | }
|
| | | WindowCenter.Instance.Open<TreasureSelectWin>();
|
| | | }
|
| | |
|
| | |
| | | if (_AllMissionDict.ContainsKey(_TaskId))
|
| | | {
|
| | |
|
| | | if (_AllMissionDict[_TaskId].Type == 7 || (_AllMissionDict[_TaskId].Type == 12 && vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.AutoFairyMisstion) >= 1))
|
| | | if (_AllMissionDict[_TaskId].Type == 7 || (_AllMissionDict[_TaskId].Type == 12 /*&& vipmodel.GetVipPrivilegeCnt(VipPrivilegeType.AutoFairyMisstion) >= 1*/))
|
| | | {
|
| | | taskmodel.RequestGetTaskAward("OK");
|
| | | WindowCenter.Instance.CloseImmediately<TaskBoxBGMWin>();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void CardLevelChangeEvent(int taskID)
|
| | | private void CardLevelChangeEvent(int taskID)//卡级状态改变
|
| | | {
|
| | | if (taskmodel.allMissionDict.ContainsKey(taskID) && taskmodel.allMissionDict[taskID].Type == 3)
|
| | | {
|
| | | TaskScheduling();
|
| | | TheTaskToGenerate();
|
| | | ChangeSort();
|
| | | TaskJump(taskID);
|
| | | }
|
| | | }
|
| | | private void MainCardLevelChange(int _id)
|
| | | private void MainCardLevelChange(int _id)//主线任务卡级状态改变
|
| | | {
|
| | | TaskScheduling();
|
| | | TheTaskToGenerate();
|
| | | ChangeSort();
|
| | | TaskJump(_id);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | private void ChangeSort()//关于任务变更排序
|
| | | {
|
| | | for (int i = 0; i < Content.childCount; i++)
|
| | | {
|
| | | GameObject obj = Content.GetChild(i).gameObject;
|
| | | TaskType taskType = obj.GetComponent<TaskType>();
|
| | | if (taskType.TaskID != 0 && _list.Contains(taskType.TaskID))
|
| | | {
|
| | | int Inedx = _list.IndexOf(taskType.TaskID);
|
| | | obj.transform.SetSiblingIndex(Inedx);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | void TaskInformation(int _Taskid, Dictionary<int, Dictionary<string, string>> _Dic)//任务字典信息
|
| | | {
|
| | |
| | | {
|
| | | MissionDetailDates xPack = taskmodel.allMissionDict[x];
|
| | | MissionDetailDates yPack = taskmodel.allMissionDict[y];
|
| | | bool IsMainTaskx = xPack.Type == 0;
|
| | | bool IsMainTasky = yPack.Type == 0;
|
| | | if (IsMainTaskx.CompareTo(IsMainTasky) != 0)//优先主线
|
| | | {
|
| | | return -IsMainTaskx.CompareTo(IsMainTasky);
|
| | | }
|
| | | bool IsStateTaskx = xPack.MissionState == 2;
|
| | | bool IsStateTasky = yPack.MissionState == 2;
|
| | | if (IsStateTaskx.CompareTo(IsStateTasky) != 0)//优先可领取
|
| | | {
|
| | | return -IsStateTaskx.CompareTo(IsStateTasky);
|
| | | }
|
| | |
|
| | | var _index0 = ListSort.IndexOf(xPack.Type);
|
| | | var _index1 = ListSort.IndexOf(yPack.Type);
|
| | | if (_index0.CompareTo(_index1) != 0)
|
| | |
| | | {
|
| | | MissionDetailDates xPack = taskmodel.allMissionDict[x];
|
| | | MissionDetailDates yPack = taskmodel.allMissionDict[y];
|
| | | bool IsMainTaskx = xPack.Type == 0;
|
| | | bool IsMainTasky = yPack.Type == 0;
|
| | | if (IsMainTaskx.CompareTo(IsMainTasky) != 0)//优先主线
|
| | | {
|
| | | return -IsMainTaskx.CompareTo(IsMainTasky);
|
| | | }
|
| | | bool IsStateTaskx = xPack.MissionState == 2;
|
| | | bool IsStateTasky = yPack.MissionState == 2;
|
| | | if (IsStateTaskx.CompareTo(IsStateTasky) != 0)//优先可领取
|
| | | {
|
| | | return -IsStateTaskx.CompareTo(IsStateTasky);
|
| | | }
|
| | | var _index0 = ListSort1.IndexOf(xPack.Type);
|
| | | var _index1 = ListSort1.IndexOf(yPack.Type);
|
| | | if (_index0.CompareTo(_index1) != 0)
|
| | |
| | | if (PutawayData.Instance.itemModel == null) return; |
| | | if (PlayerDatas.Instance.market.putawayCnt >= model.totalPutawayCnt) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("MarketNoPutaway4", model.totalPutawayCnt); |
| | | return; |
| | | } |
| | | if (PutawayData.Instance.priceCnt == 0) |
| | |
| | | public bool Wait = true;//等待回包(使用坐骑丹)
|
| | | public static Action<int, bool> MultipleEvent;
|
| | | public static event Action PlayerLoginOKData;
|
| | | private Dictionary<int, int> DicDefaultMount = new Dictionary<int, int>();
|
| | | public override void Init()
|
| | | {
|
| | | ToAddSorting();
|
| | |
| | | {
|
| | | ListEffectSkill.Add(listeffect[i]);
|
| | | }
|
| | | string MountRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical1;
|
| | | DicDefaultMount = ConfigParse.GetDic<int, int>(MountRedDotstr);
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | |
|
| | | int GetMountID = 0;
|
| | | int GetMountLv = 0;
|
| | |
|
| | | for (int i = 0; i < SortMount.Count; i++)
|
| | | {
|
| | | int horseID = SortMount[i].HorseID;
|
| | |
| | | ItemConfig _tagchine = Config.Instance.Get<ItemConfig>(int.Parse(_tagfun.Numerical1));
|
| | | HorseConfig horsecon = Config.Instance.Get<HorseConfig>(GetMountID);
|
| | | int number = playerPack.GetItemCountByID(PackType.rptItem, _tagchine.ID);
|
| | | foreach (var key in _DicHorse.Keys)//因为有成就任务限制所有 第一只坐骑红点逻辑特殊写
|
| | | {
|
| | | if (DicDefaultMount.ContainsKey(key) && DicDefaultMount[key] > _DicHorse[key].Lv
|
| | | && number > 0 && ASingleFeedRedPoint.ContainsKey(key))
|
| | | {
|
| | | ASingleFeedRedPoint[key].state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | |
|
| | | }
|
| | | if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number > 0 && GetMountLv < horsecon.MaxLV)
|
| | | {
|
| | | if (PlayerDatas.Instance.baseData.LV >= 1500)
|
| | |
| | | ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
|
| | | return;
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | private void OnServerOpenDayRefresh()
|
| | | {
|
| | | UpdateRanks();
|
| | | m_RankAwardCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
|
| | | private void OnRefreshRankList(int type)
|
| | |
| | | public int petUpgradeToolId { get; set; }
|
| | |
|
| | | public event Action PlayerLoginOkData;
|
| | | private Dictionary<int, int> DicDefaultPet = new Dictionary<int, int>();
|
| | |
|
| | | public override void Init()
|
| | | {
|
| | |
| | | {
|
| | | ListEffectSkill.Add(listeffect[i]);
|
| | | }
|
| | | string PetRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical2;
|
| | | DicDefaultPet = ConfigParse.GetDic<int, int>(PetRedDotstr);
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | |
| | | }
|
| | | }
|
| | | int itemCount = playerPack.GetItemCountByID(PackType.rptItem, 4151);
|
| | | foreach (var key in _DicPetBack.Keys)//因为有成就任务限制所有 第一只坐骑红点逻辑特殊写
|
| | | {
|
| | | if (DicDefaultPet.ContainsKey(key) && DicDefaultPet[key] > _DicPetBack[key].PetClass
|
| | | && itemCount > 0 && CultivateRedPoint.ContainsKey(key))
|
| | | {
|
| | | CultivateRedPoint[key].state = RedPointState.Simple;
|
| | | CanEssence = true;
|
| | | return;
|
| | | }
|
| | | }
|
| | | PetInfoConfig petinfo = Config.Instance.Get<PetInfoConfig>(GetPetId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= 1500)
|
| | | {
|
| | |
| | | IsCanReborn = false;
|
| | | isOpenPrompting = true;
|
| | | this.deadCD = 0;
|
| | | localBossState = 0;
|
| | | localBossState = false;
|
| | | playerIsDie = false;
|
| | | }
|
| | |
|
| | |
| | | private DungeonOpenTimeConfig _dungeonOpenTimeModel;
|
| | |
|
| | | public bool IsCanReborn { get; private set; }
|
| | | public int localBossState { get; private set;}
|
| | | public bool localBossState { get; private set;}
|
| | | public string killerName { get; private set; }
|
| | | public bool isKillByPlayer { get; private set; }
|
| | | public int npcRealmLv { get; private set; }
|
| | | private void RefreshPlayerDieInfo(string key, ArrayList infolist)
|
| | | {
|
| | | npcRealmLv = 0;
|
| | | localBossState = false;
|
| | | switch (key)
|
| | | {
|
| | | case "PK_lhs_318691":
|
| | |
| | | case "GeRen_chenxin_279029":
|
| | | if(infolist.Count > 0)
|
| | | {
|
| | | WorldBossConfig bossConfig = Config.Instance.Get<WorldBossConfig>(int.Parse(infolist[0].ToString()));
|
| | | NPCConfig nPCConfig = Config.Instance.Get<NPCConfig>(int.Parse(infolist[0].ToString()));
|
| | | if(nPCConfig != null)
|
| | | {
|
| | | killerName = nPCConfig.charName;
|
| | | npcRealmLv = nPCConfig.Realm;
|
| | | }
|
| | | if(bossConfig != null)
|
| | | {
|
| | | localBossState = true;
|
| | | }
|
| | | isKillByPlayer = false;
|
| | | }
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | localBossState = PlayerDatas.Instance.extersion.bossState;
|
| | | playerIsDie = true;
|
| | | _tagMapModel = Config.Instance.Get<MapConfig>(PlayerDatas.Instance.baseData.MapID);
|
| | | if (_tagMapModel.MapFBType == 0)
|
| | |
| | | rebornTiredNum = RebornConditions[0];
|
| | | rebornPrice = RebornConditions[2];
|
| | | //isBossKill = StatusManager.Instance.IsExist((int)playerId,20022);
|
| | | if (!isKillByPlayer && localBossState == 1)
|
| | | if (!isKillByPlayer && localBossState)
|
| | | {
|
| | | autoRebornTime = RebornConditions[3];
|
| | | }
|
| | |
| | | if (PlayerDatas.Instance.baseData.PlayerID != data.PlayerID)
|
| | | return;
|
| | |
|
| | | localBossState = 0;
|
| | | localBossState = false;
|
| | | this.deadCD = 0;
|
| | | isKillByPlayer = false;
|
| | | playerIsDie = false;
|
| | |
| | | {
|
| | | questTimes = 0;
|
| | | _rebornPriceText.text = 1.ToString();
|
| | | if(DeadModel.isKillByPlayer || DeadModel.localBossState != 1)
|
| | | if(DeadModel.isKillByPlayer || !DeadModel.localBossState)
|
| | | {
|
| | | OnShowBtnlist();
|
| | | }
|
| | |
| | |
|
| | | [SerializeField] UIEffect m_RealmDungeonSfx;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerGroup;
|
| | | [SerializeField] Button m_Group;
|
| | | [SerializeField] Button m_AutoGroup;
|
| | | [SerializeField] Button m_GroupDungeon;
|
| | | [SerializeField] Button m_SingleDungeon;
|
| | | [SerializeField] Button m_FuncButton;
|
| | | [SerializeField] Text m_FuncButtonTxt;
|
| | | [SerializeField] Text m_RealmStageTip;
|
| | | [SerializeField] RedpointBehaviour m_SingleRedpoint;
|
| | |
|
| | | [SerializeField] RectTransform m_ContainerFightPower;
|
| | | [SerializeField] Text m_FightPower;
|
| | |
| | | m_SingleDungeon.onClick.AddListener(SingleDungeon);
|
| | | m_FuncButton.onClick.AddListener(OnFunctionClick);
|
| | | m_RealmPreview.onClick.AddListener(OnRealmPreview);
|
| | | m_Group.onClick.AddListener(OpenGroup);
|
| | | m_AutoGroup.onClick.AddListener(AutoGroup);
|
| | | m_GroupDungeon.onClick.AddListener(GroupDungeon);
|
| | | }
|
| | |
|
| | | protected override void OnPreOpen()
|
| | |
| | | cacheRealmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | m_RawBoss.gameObject.SetActive(false);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | m_ContainerGroup.gameObject.SetActive(false);
|
| | | overdueTime = DateTime.Now;
|
| | | Display();
|
| | | }
|
| | |
| | | {
|
| | | var _realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | m_FuncButton.gameObject.SetActive(!realmModel.IsRealmHighest);
|
| | | m_SingleDungeon.gameObject.SetActive(false);
|
| | | if (_realmPoint >= config.NeedPoint)
|
| | | {
|
| | | m_FuncButtonTxt.text = Language.Get(config.IsBigRealm == 1 ? "RealmWin_Bewrite_13" : "RealmWin_Bewrite_12");
|
| | | m_SingleDungeon.gameObject.SetActive(config.IsBigRealm == 1 && !realmModel.IsRealmHighest);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_FuncButtonTxt.text = Language.Get("RealmWin_Bewrite_1");
|
| | | }
|
| | | bool satisfyChallenge = _realmPoint >= config.NeedPoint;
|
| | | m_Group.gameObject.SetActive(!realmModel.IsRealmHighest && config.IsBigRealm == 1 && satisfyChallenge);
|
| | | m_SingleDungeon.gameObject.SetActive(!realmModel.IsRealmHighest && satisfyChallenge);
|
| | | m_FuncButton.gameObject.SetActive(!realmModel.IsRealmHighest && !satisfyChallenge);
|
| | | m_SingleRedpoint.gameObject.SetActive(!m_Group.gameObject.activeSelf);
|
| | | }
|
| | |
|
| | | private void OnFunctionClick()
|
| | | {
|
| | | var _realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (_realmPoint >= config.NeedPoint)
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DailyQuestFunc1);
|
| | | }
|
| | |
|
| | | private void GroupDungeon()
|
| | | {
|
| | | if (DateTime.Now < overdueTime)
|
| | | {
|
| | | return;
|
| | | }
|
| | | PlayerDatas.Instance.realm.realmHelpList.Clear();
|
| | | if (config.IsBigRealm == 1)
|
| | | if (PlayerDatas.Instance.baseData.MapID == RealmModel.REALM_DUNGEON_ID)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
|
| | | if (teamModel.myTeam.inTeam && teamModel.myTeam.iamCaptainer)
|
| | | {
|
| | |
| | | WindowCenter.Instance.Open<TeamFrameWin>(false, teamModel.myTeam.inTeam ? 1 : 0);
|
| | | }
|
| | | }
|
| | | else
|
| | |
|
| | | private void AutoGroup()
|
| | | {
|
| | | ModelCenter.Instance.GetModel<DungeonModel>().SingleChallenge(RealmModel.REALM_DUNGEON_ID);
|
| | | }
|
| | | }
|
| | | else
|
| | | if (DateTime.Now < overdueTime)
|
| | | {
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DailyQuestFunc1);
|
| | | return;
|
| | | }
|
| | | var teamModel = ModelCenter.Instance.GetModel<TeamModel>();
|
| | | teamModel.RequestAutoMatchTeam(new TeamMission(RealmModel.REALM_DUNGEON_ID, 1));
|
| | | WindowCenter.Instance.Open<TeamFrameWin>(false, 1);
|
| | | }
|
| | |
|
| | | private void OpenGroup()
|
| | | {
|
| | | var opened = m_ContainerGroup.gameObject.activeSelf;
|
| | | if (!opened)
|
| | | {
|
| | | m_ContainerGroup.gameObject.SetActive(true);
|
| | | }
|
| | | }
|
| | |
|
| | | private void SingleDungeon()
|
| | | {
|
| | | if (DateTime.Now < overdueTime)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (PlayerDatas.Instance.baseData.MapID == RealmModel.REALM_DUNGEON_ID)
|
| | | {
|
| | | return;
|
| | | }
|
| | | PlayerDatas.Instance.realm.realmHelpList.Clear();
|
| | | var _realmPoint = PlayerDatas.Instance.extersion.realmPoint;
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | if (_realmPoint >= config.NeedPoint)
|
| | |
| | | taskHoleCondition = result;
|
| | | }
|
| | | }
|
| | | UpdateTaskHoleRedpoint();
|
| | | //UpdateTaskHoleRedpoint();
|
| | | }
|
| | |
|
| | | RolePromoteModel m_PromoteModel;
|
| | |
| | | }
|
| | | playerLoginOk = true;
|
| | | UpdateRedpoint();
|
| | | UpdateTaskHoleRedpoint();
|
| | | //UpdateTaskHoleRedpoint();
|
| | | }
|
| | |
|
| | | public void CheckEquipPassSkill(PlayerSkillData _skill)
|
| | |
| | | UpdateRedpoint();
|
| | | }
|
| | |
|
| | | public Redpoint taskHoleRedpoint = new Redpoint(10302, 1030299);
|
| | | void UpdateTaskHoleRedpoint()
|
| | | {
|
| | | taskHoleRedpoint.state = RedPointState.None;
|
| | | if (DayRemind.Instance.GetDayRemind(DayRemind.TASK_SKILL_HOLE))
|
| | | {
|
| | | return;
|
| | | }
|
| | | foreach (var hole in taskHoleDict.Keys)
|
| | | {
|
| | | var taskId = taskHoleDict[hole];
|
| | | if (IsImmediatelyUnlock(hole))
|
| | | {
|
| | | var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | | && !IsTaskHoleUnlock(hole))
|
| | | {
|
| | | taskHoleRedpoint.state = RedPointState.Simple;
|
| | | }
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | //public Redpoint taskHoleRedpoint = new Redpoint(10302, 1030299);
|
| | | //void UpdateTaskHoleRedpoint()
|
| | | //{
|
| | | // taskHoleRedpoint.state = RedPointState.None;
|
| | | // if (DayRemind.Instance.GetDayRemind(DayRemind.TASK_SKILL_HOLE))
|
| | | // {
|
| | | // return;
|
| | | // }
|
| | | // foreach (var hole in taskHoleDict.Keys)
|
| | | // {
|
| | | // var taskId = taskHoleDict[hole];
|
| | | // if (IsImmediatelyUnlock(hole))
|
| | | // {
|
| | | // var config = Config.Instance.Get<PyTaskConfig>(taskId);
|
| | | // if (PlayerDatas.Instance.baseData.LV >= config.lv
|
| | | // && !IsTaskHoleUnlock(hole))
|
| | | // {
|
| | | // taskHoleRedpoint.state = RedPointState.Simple;
|
| | | // }
|
| | | // return;
|
| | | // }
|
| | | // }
|
| | | //}
|
| | |
|
| | | public bool IsImmediatelyUnlock(int hole)
|
| | | {
|
| | |
| | | public void SetTaskHoleRemind()
|
| | | {
|
| | | DayRemind.Instance.SetDayRemind(DayRemind.TASK_SKILL_HOLE, true);
|
| | | UpdateTaskHoleRedpoint();
|
| | | //UpdateTaskHoleRedpoint();
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | if (_id == 109)
|
| | | {
|
| | | UpdateRedpoint();
|
| | | UpdateTaskHoleRedpoint();
|
| | | //UpdateTaskHoleRedpoint();
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | OnClickEquipHole(hole, false);
|
| | | }
|
| | | }
|
| | | else if (model.taskHoleRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | model.SetTaskHoleRemind();
|
| | | for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | {
|
| | | PassSkillLimit limit;
|
| | | if (model.TryGetPassSkillLimit(i, out limit))
|
| | | {
|
| | | if (limit.OpenSkillSlots > 0 && model.IsImmediatelyUnlock(i))
|
| | | {
|
| | | OnClickEquipHole(i, false);
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | //else if (model.taskHoleRedpoint.state == RedPointState.Simple)
|
| | | //{
|
| | | // model.SetTaskHoleRemind();
|
| | | // for (int i = 0; i < equipPassSkills.Count; i++)
|
| | | // {
|
| | | // PassSkillLimit limit;
|
| | | // if (model.TryGetPassSkillLimit(i, out limit))
|
| | | // {
|
| | | // if (limit.OpenSkillSlots > 0 && model.IsImmediatelyUnlock(i))
|
| | | // {
|
| | | // OnClickEquipHole(i, false);
|
| | | // return;
|
| | | // }
|
| | | // }
|
| | | // }
|
| | | //}
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | |
| | | private void ClickGoTo()
|
| | | {
|
| | | CloseImmediately();
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StoreFunc3);
|
| | | storeModel.SetJumpModel(StoreFunc.BindStore, storeModel.currentPushId);
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.StoreFunc4);
|
| | | }
|
| | | private void ClickCloseBtn()
|
| | | {
|
| | |
| | | {
|
| | | IsMustBuyDay = false;
|
| | | isLogin = true;
|
| | | ClearJumpModel();
|
| | | StageManager.Instance.onStageLoadFinish -= OnStageLoadFinish;
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= FuncStateChange;
|
| | | WindowCenter.Instance.windowAfterCloseEvent -= windowAfterOpen;
|
| | |
| | | List<StoreConfig> storelist = StoreConfig.GetAllShoplist();
|
| | | for(int i = 0; i < storelist.Count; i++)
|
| | | {
|
| | | if (storelist[i].ShopType != (int)StoreFunc.GrowStrongerStore) continue;
|
| | | if (storelist[i].ShopType != (int)StoreFunc.BindStore) continue;
|
| | |
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(storelist[i].ItemID);
|
| | | string key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,"ShopId",storelist[i].ID);
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region 处理跳转数据
|
| | | public int funcOrder { get; private set; }
|
| | | public int jumpShopId { get; private set; }
|
| | | public void SetJumpModel(StoreFunc storeFunc,int shopId)
|
| | | {
|
| | | if (shopId == 0) return;
|
| | |
|
| | | funcOrder = (int)storeFunc - 1;
|
| | | jumpShopId = shopId;
|
| | | }
|
| | |
|
| | | public void ClearJumpModel()
|
| | | {
|
| | | funcOrder = -1;
|
| | | jumpShopId = 0;
|
| | | }
|
| | | #endregion
|
| | | }
|
| | |
|
| | | public enum StoreFunc
|
| | |
| | | functionOrder = _integralStoreTitle.order;
|
| | | }
|
| | | }
|
| | |
|
| | | if(!WindowJumpMgr.Instance.IsJumpState && m_storeModel.funcOrder != -1)
|
| | | {
|
| | | functionOrder = m_storeModel.funcOrder;
|
| | | }
|
| | | _funcBtnGroup.TriggerByOrder(functionOrder);
|
| | | GlobalTimeEvent.Instance.secondEvent += RefreshResetTime;
|
| | | }
|
| | |
| | | AchievementGoto.guideAchievementId = 0;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | if(m_storeModel.jumpShopId != 0)
|
| | | {
|
| | | _tagStoreModellist = StoreConfig.GetTypeStoreModel((int)m_storeModel.storeFuncType);
|
| | | for (int i = 0; i < _tagStoreModellist.Count; i++)
|
| | | {
|
| | | if (_tagStoreModellist[i].ID == m_storeModel.jumpShopId)
|
| | | {
|
| | | int index = i / 2 ;
|
| | | _shopCtrl.JumpIndex(index > 2 ? index - 1 : index);
|
| | | _shopCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | break;
|
| | | }
|
| | |
|
| | | }
|
| | | m_storeModel.ClearJumpModel();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshResetTime()
|
| | | {
|
| | |
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | |
|
| | | playerPack.ItemCntAddAct += ItemCntAddAct;
|
| | | playerPack.RefreshItemCountAct += OnItemRefreshEvent;
|
| | | playerPack.ItemCntAddAct += ItemCntAddAct;//物品数量增加
|
| | | playerPack.ItemCntReduceAct += ItemCntReduceAct;//物品数量减少
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChange;
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | if (IsOnePutOn)
|
| | |
| | | }
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | playerPack.ItemCntAddAct -= ItemCntAddAct;//物品数量刷新
|
| | | playerPack.RefreshItemCountAct -= OnItemRefreshEvent;//背包刷新
|
| | | playerPack.ItemCntAddAct -= ItemCntAddAct;//物品数量增加
|
| | | FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChange;
|
| | | playerPack.ItemCntReduceAct -= ItemCntReduceAct;//物品数量减少
|
| | | }
|
| | | private void OnItemRefreshEvent(PackType type, int index, int id)
|
| | | {
|
| | | if (type == PackType.rptItem && ItemConfig.tag_Wings.ContainsKey(id)&& IsOnePutOn)
|
| | | {
|
| | | WingsDot();
|
| | | IsOnePutOn = false;
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
| | | Marking = WingNumber;
|
| | | }
|
| | | }
|
| | | private void ItemCntAddAct(PackType arg1, int WingsItemIndex, int ItemCount)
|
| | | private void ItemCntAddAct(PackType arg1, int ItemIndex, int ItemID)//物品数量增加
|
| | | {
|
| | | if (arg1 == PackType.rptItem)
|
| | |
|
| | | if (arg1 == PackType.rptItem)//物品背包物品增加
|
| | | {
|
| | | if (IsBoolOpenWingeWin)
|
| | | ItemBagAdd(ItemIndex, ItemID);
|
| | | }
|
| | | if (arg1 == PackType.rptEquip)//装备背包物品增加
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | if (IsOnePutOn)
|
| | | {
|
| | | WingsDot();
|
| | | }
|
| | | if (itemModel != null)
|
| | | {
|
| | | IsOnePutOn = false;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void ItemBagAdd(int ItemIndex, int ItemID)//物品背包数量添加
|
| | | {
|
| | | ItemModel ItemModel = playerPack.GetItemModelByIndex(PackType.rptItem, ItemIndex);
|
| | | int ItemCount = ItemModel.preItemCount;
|
| | | var WingItem = Config.Instance.Get<WingRefineExpConfig>(ItemModel.itemId);
|
| | | if (IsBoolOpenWingeWin || WingItem == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | if (_dicWings.ContainsKey(WingsItemIndex))
|
| | | if (_dicWings.ContainsKey(ItemIndex))
|
| | | {
|
| | | if (ItemCount > _dicWings[WingsItemIndex].WingsCount)
|
| | | if (ItemCount > _dicWings[ItemIndex].WingsCount)
|
| | | {
|
| | | _dicWings[WingsItemIndex].WingsCount = ItemCount;
|
| | | _dicWings[ItemIndex].WingsCount = ItemCount;
|
| | | redPointStre.state = RedPointState.Simple;
|
| | | }
|
| | | else
|
| | | {
|
| | | _dicWings[WingsItemIndex].WingsCount = ItemCount;
|
| | | _dicWings[ItemIndex].WingsCount = ItemCount;
|
| | | }
|
| | | }
|
| | | }
|
| | | private void ItemCntReduceAct(PackType arg1, int Index, int ItemID)
|
| | | {
|
| | | if (arg1 == PackType.rptItem)//物品背包物品减少
|
| | | {
|
| | | var WingItem = Config.Instance.Get<WingRefineExpConfig>(ItemID);
|
| | | if (WingItem != null && _dicWings.ContainsKey(Index))
|
| | | {
|
| | | _dicWings.Remove(Index);
|
| | | if (_dicWings.Count <= 0 && redPointStre.state == RedPointState.Simple)
|
| | | {
|
| | | redPointStre.state = RedPointState.None;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | if (arg1 == PackType.rptEquip)//装备脱下
|
| | | {
|
| | | ItemModel itemModel = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | if (itemModel == null && redPointStre.state == RedPointState.Simple)
|
| | | {
|
| | | redPointStre.state = RedPointState.None;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | public const int TREASURE_GUIDE_ID = 102;
|
| | |
|
| | | const int TREASURE_REDPOINTID = 7000;
|
| | | readonly static int[] CATEGORY_REDPOINTIDS = { 7001, 7002, 7003, 7004, 7005 };
|
| | | public readonly static int[] CATEGORY_REDPOINTIDS = { 7001, 7002, 7003, 7004, 7005 };
|
| | | const int TREASURE_REDPOINTBASE = 7100;
|
| | |
|
| | | public static int redpointIndex = 1;
|
| | |
| | | {
|
| | | var levelUpConfig = GetPotentialLevelUpConfig();
|
| | | m_SuccessRatio.text = StringUtility.Contact((levelUpConfig.rate * 0.01f).ToString("f0"), "%");
|
| | | m_RatioUp.gameObject.SetActive(model.selectedPotentialBook != 0 && levelUpConfig.rate > 0);
|
| | | m_RatioUp.gameObject.SetActive(model.selectedPotentialBook != 0 && levelUpConfig.rate > 0 && levelUpConfig.materilaKind > 1);
|
| | | m_SuccessRatio.color = UIHelper.GetUIColor(model.selectedPotentialBook != 0 && levelUpConfig.rate > 0
|
| | | ? TextColType.DarkGreen : TextColType.LightYellow);
|
| | | m_UpgradeImage.gray = levelUpConfig.rate == 0 && model.selectedPotentialBook == 0;
|
| | |
| | | private void OnSpNeedItem()
|
| | | {
|
| | | var levelUpConfig = GetPotentialLevelUpConfig();
|
| | | if (levelUpConfig.rate < 10000 || model.selectedPotentialBook != 0)
|
| | | if (levelUpConfig.rate >= 10000)
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("SPSuccessHint");
|
| | | return;
|
| | | }
|
| | | if (model.selectedPotentialBook == 0)
|
| | | {
|
| | | WindowCenter.Instance.Open<PotentialItemUseWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | SysNotifyMgr.Instance.ShowTip("SPSuccessHint");
|
| | | //DesignDebug.Log("成功率已经够高了,不需要再增加概率了!");
|
| | | if (levelUpConfig.materilaKind > 1)
|
| | | {
|
| | | WindowCenter.Instance.Open<PotentialItemUseWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(model.selectedPotentialBook);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | m_PotentialBook.gameObject.SetActive(_potentialBookId != 0);
|
| | | m_PotentialCount.gameObject.SetActive(_potentialBookId != 0);
|
| | | m_RemoveBook.gameObject.SetActive(_potentialBookId != 0);
|
| | | m_RemoveBook.gameObject.SetActive(false);
|
| | | m_AddBookSign.gameObject.SetActive(_potentialBookId == 0);
|
| | | if (_potentialBookId != 0)
|
| | | {
|
| | |
| | | bool satisfy = levelUpConfig.own >= levelUpConfig.need;
|
| | | m_PotentialCount.text = StringUtility.Contact(UIHelper.GetTextColorByItemColor(satisfy ?
|
| | | TextColType.LightYellow : TextColType.Red, levelUpConfig.own.ToString()), "/", levelUpConfig.need);
|
| | | m_RemoveBook.gameObject.SetActive(levelUpConfig.materilaKind > 1);
|
| | | }
|
| | |
|
| | | DisplaySuccessRatio();
|
| | |
| | | var config = Config.Instance.Get<TreasureSkillConfig>(levelupId);
|
| | | if (config == null)
|
| | | {
|
| | | return new PotentialLevelUpConfig(0, 0, 0, 0);
|
| | | return new PotentialLevelUpConfig(0, 0, 0, 0, 0);
|
| | | }
|
| | | if (model.selectedPotentialBook == 0)
|
| | | {
|
| | | return new PotentialLevelUpConfig(config.InitialRate, 0, 0, 0);
|
| | | return new PotentialLevelUpConfig(config.InitialRate, 0, 0, 0, 0);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | var need = config.MeterialNum2[index];
|
| | | var ratio = own >= need ? config.Rate[index] : config.InitialRate;
|
| | |
|
| | | return new PotentialLevelUpConfig(ratio, index + 1, own, need);
|
| | | return new PotentialLevelUpConfig(ratio, index + 1, own, need, config.Meterial2ID.Length);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | public int rate;
|
| | | public int need;
|
| | | public int own;
|
| | | public int materilaKind;
|
| | |
|
| | | public PotentialLevelUpConfig(int _rate, int _materilaIndex, int _own, int _need)
|
| | | public PotentialLevelUpConfig(int _rate, int _materilaIndex, int _own, int _need,int materilaKind)
|
| | | {
|
| | | this.rate = _rate;
|
| | | this.materilaIndex = _materilaIndex;
|
| | | this.need = _need;
|
| | | this.own = _own;
|
| | | this.materilaKind = materilaKind;
|
| | | }
|
| | | }
|
| | | [Serializable]
|
| | |
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
|
| | | public bool IsJumpState { get; private set; }
|
| | | private int jumpPhase = 0;
|
| | | public int jumpPhase { get; private set;}
|
| | | public int jumpType { get; private set; }
|
| | | public void GetPreAllOpenWin()
|
| | | {
|