Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | progress = 0.1f;
|
| | | break;
|
| | | }
|
| | | #endif
|
| | |
|
| | | #if UNITY_IOS && !UNITY_EDITOR
|
| | | switch (VersionConfig.Get().assetAccess)
|
| | | {
|
| | | case InstalledAsset.FullAsset:
|
| | | case InstalledAsset.HalfAsset:
|
| | | case InstalledAsset.IngoreDownLoad:
|
| | | if (!SDKUtility.Instance.AssetCopyFinished)
|
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetCopy;
|
| | | progressBuf = progress;
|
| | |
|
| | | var allFiles = new List<FileInfo>();
|
| | | FileExtersion.GetAllDirectoryFileInfos(ResourcesPath.Instance.StreamingAssetPath, allFiles);
|
| | |
|
| | | var count = allFiles.Count;
|
| | | var index = 0;
|
| | | while (index < count)
|
| | | {
|
| | | try
|
| | | {
|
| | | var fileInfo = allFiles[index];
|
| | | var destPath = fileInfo.FullName.Replace(ResourcesPath.Instance.StreamingAssetPath, ResourcesPath.Instance.ExternalStorePath);
|
| | | if (File.Exists(destPath))
|
| | | {
|
| | | index++;
|
| | | continue;
|
| | | }
|
| | |
|
| | | var destDirectoryName = Path.GetDirectoryName(destPath);
|
| | | if (!Directory.Exists(destDirectoryName))
|
| | | {
|
| | | Directory.CreateDirectory(destDirectoryName);
|
| | | }
|
| | |
|
| | | DebugEx.LogFormat("拷贝文件:{0}", fileInfo.Name);
|
| | | File.Copy(fileInfo.FullName, destPath, true);
|
| | | index++;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | finally
|
| | | {
|
| | | progress = Mathf.Clamp(progressBuf + ((float)index / count) * 0.3f, progressBuf, progressBuf + 0.3f);
|
| | | }
|
| | |
|
| | | yield return null;
|
| | | }
|
| | |
|
| | | LocalSave.SetString("AssetCopyCompleted_IOS", VersionConfig.Get().version);
|
| | | }
|
| | | break;
|
| | | case InstalledAsset.NullAsset:
|
| | | progress = 0.1f;
|
| | | break;
|
| | | }
|
| | | #endif
|
| | |
|
| | | OperationLogCollect.Instance.RecordLauchEvent(2);
|
| | | OperationLogCollect.Instance.RecordEvent(2);
|
| | |
|
| | | m_CurrentStage = LaunchStage.ClientVersion;
|
| | | if (!Application.isEditor || InGameDownTestUtility.enable)
|
| | |
| | | yield return null;
|
| | | }
|
| | | }
|
| | | #endif
|
| | |
|
| | | #if UNITY_IOS && !UNITY_EDITOR
|
| | |
|
| | | m_CurrentStage = LaunchStage.ClientVersion;
|
| | | if (!Application.isEditor || InGameDownTestUtility.enable)
|
| | | {
|
| | | VersionUtility.Instance.RequestVersionCheck();
|
| | | progressBuf = progress;
|
| | | timer = 0f;
|
| | | duration = 1f;
|
| | |
|
| | | while (!VersionUtility.Instance.completed)
|
| | | {
|
| | | timer += Time.deltaTime;
|
| | | progress = Mathf.Clamp(progressBuf + timer / duration * 0.1f, progressBuf, progressBuf + 0.1f);
|
| | | yield return null;
|
| | | }
|
| | | }
|
| | |
|
| | | if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
|
| | | {
|
| | | switch (VersionConfig.Get().assetAccess)
|
| | | {
|
| | | case InstalledAsset.FullAsset:
|
| | | case InstalledAsset.HalfAsset:
|
| | | case InstalledAsset.IngoreDownLoad:
|
| | | if (!SDKUtility.Instance.AssetCopyFinished)
|
| | | {
|
| | | m_CurrentStage = LaunchStage.AssetCopy;
|
| | | progressBuf = progress;
|
| | |
|
| | | var allFiles = new List<FileInfo>();
|
| | | FileExtersion.GetAllDirectoryFileInfos(ResourcesPath.Instance.StreamingAssetPath, allFiles);
|
| | |
|
| | | var count = allFiles.Count;
|
| | | var index = 0;
|
| | | while (index < count)
|
| | | {
|
| | | try
|
| | | {
|
| | | var fileInfo = allFiles[index];
|
| | | var destPath = fileInfo.FullName.Replace(ResourcesPath.Instance.StreamingAssetPath, ResourcesPath.Instance.ExternalStorePath);
|
| | | if (File.Exists(destPath))
|
| | | {
|
| | | index++;
|
| | | continue;
|
| | | }
|
| | |
|
| | | var destDirectoryName = Path.GetDirectoryName(destPath);
|
| | | if (!Directory.Exists(destDirectoryName))
|
| | | {
|
| | | Directory.CreateDirectory(destDirectoryName);
|
| | | }
|
| | |
|
| | | DebugEx.LogFormat("拷贝文件:{0}", fileInfo.Name);
|
| | | File.Copy(fileInfo.FullName, destPath, true);
|
| | | index++;
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | | DebugEx.Log(ex);
|
| | | }
|
| | | finally
|
| | | {
|
| | | progress = Mathf.Clamp(progressBuf + ((float)index / count) * 0.3f, progressBuf, progressBuf + 0.3f);
|
| | | }
|
| | |
|
| | | yield return null;
|
| | | }
|
| | |
|
| | | LocalSave.SetString("AssetCopyCompleted_IOS", VersionConfig.Get().version);
|
| | | }
|
| | | break;
|
| | | case InstalledAsset.NullAsset:
|
| | | progress = 0.1f;
|
| | | break;
|
| | | }
|
| | | }
|
| | |
|
| | | #endif
|
| | |
|
| | | OperationLogCollect.Instance.RecordLauchEvent(2);
|
| | | OperationLogCollect.Instance.RecordEvent(2);
|
| | |
|
| | | if (VersionUtility.Instance.versionInfo != null && VersionUtility.Instance.versionInfo.downAsset == 1)
|
| | | {
|
| | |
| | | if (m_TimeCount > 0.75f)
|
| | | {
|
| | | PlayerDatas.Instance.hero.Behaviour.StopKillUntilDieAI();
|
| | |
|
| | | skillContainer.blinkSkill.GetComponent<SkillButton>().enabled = false;
|
| | | skillContainer.blinkSkill.transform.localScale = Vector3.one;
|
| | |
|
| | | Transform _temp = skillContainer.blinkSkill.transform.Find("Img_BackGround");
|
| | |
| | |
|
| | | _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
|
| | | _temp.gameObject.SetActive(false);
|
| | |
|
| | | |
| | |
|
| | | m_Step = 12;
|
| | | m_TimeCount = 0;
|
| | |
| | | if (m_TimeCount > 0.4f)
|
| | | {
|
| | | Time.timeScale = 0;
|
| | | skillContainer.blinkSkill.GetComponent<SkillButton>().enabled = true;
|
| | | GA_Hero.s_MapSwitching = true;
|
| | | NewGuideModel _model = ModelCenter.Instance.GetModel<NewGuideModel>();
|
| | | _model.showMask = true;
|
| | |
| | | _model.direction = 2;
|
| | | _model.pressedClose = false;
|
| | | _model.clickClosed = true;
|
| | | _model.onClose = null;
|
| | | // () =>
|
| | | // {
|
| | | // Time.timeScale = 1;
|
| | | // GA_Hero.s_MapSwitching = false;
|
| | | // if (PreFightMission.Instance.m_HuaShouEffect)
|
| | | // {
|
| | | // EffectMgr.Instance.RecyleUIEffect(1050, PreFightMission.Instance.m_HuaShouEffect.gameObject);
|
| | | // PreFightMission.Instance.m_HuaShouEffect = null;
|
| | | // }
|
| | | _model.onClose = () =>
|
| | | {
|
| | | Time.timeScale = 1;
|
| | | GA_Hero.s_MapSwitching = false;
|
| | | if (PreFightMission.Instance.m_HuaShouEffect)
|
| | | {
|
| | | EffectMgr.Instance.RecyleUIEffect(1050, PreFightMission.Instance.m_HuaShouEffect.gameObject);
|
| | | PreFightMission.Instance.m_HuaShouEffect = null;
|
| | | }
|
| | |
|
| | | // if (m_UIEffect)
|
| | | // {
|
| | | // EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
|
| | | // m_UIEffect = null;
|
| | | // }
|
| | | PlayerDatas.Instance.hero.CastSkill(190);
|
| | | |
| | | if (m_UIEffect)
|
| | | {
|
| | | EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
|
| | | m_UIEffect = null;
|
| | | }
|
| | |
|
| | | // Transform _temp1 = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
|
| | | // _temp1.gameObject.SetActive(true);
|
| | | // };
|
| | | Transform _temp1 = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
|
| | | _temp1.gameObject.SetActive(true);
|
| | | };
|
| | |
|
| | | WindowCenter.Instance.Open<NewGuideWin>();
|
| | |
|
| | | HeroBehaviour.OnUserClickSkill += OnCastSkill;
|
| | |
| | | }
|
| | |
|
| | | if (NextAction == GAStaticDefine.Act_Dead
|
| | | || m_BeatCurve == null)
|
| | | || m_BeatCurve == null
|
| | | || ActorInfo.serverDie)
|
| | | {
|
| | | m_Beating = false;
|
| | | return;
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | path = StringUtility.Contact(ResourcesPath.Instance.ExternalStorePath, _assetKey);
|
| | | path = StringUtility.Contact(ResourcesPath.Instance.StreamingAssetPath, _assetKey);
|
| | | }
|
| | |
|
| | | return path;
|
| | |
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | if (isOpenPrompting)
|
| | | {
|
| | | ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BlastFurnace114",sumCnt,getMoney,string.Format("<Img chat={0}/>",StringUtility.Contact("Money_Type_",27))),
|
| | | Language.Get("ConfirmCancel102"),(bool isOk, bool isToggle) =>
|
| | | {
|
| | | if (isOk)
|
| | | {
|
| | | if(unBindCnt > 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | (bool isRecycle) =>
|
| | | {
|
| | | if (isRecycle)
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | }
|
| | | isOpenPrompting = !isToggle;
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | if (unBindCnt > 0)
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | (bool isRecycle) =>
|
| | | {
|
| | | if (isRecycle)
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | }
|
| | | }
|
| | | SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | //if (isOpenPrompting)
|
| | | //{
|
| | | // ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"), Language.Get("BlastFurnace114",sumCnt,getMoney,string.Format("<Img chat={0}/>",StringUtility.Contact("Money_Type_",27))),
|
| | | // Language.Get("ConfirmCancel102"),(bool isOk, bool isToggle) =>
|
| | | // {
|
| | | // if (isOk)
|
| | | // {
|
| | | // if(unBindCnt > 0)
|
| | | // {
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | // (bool isRecycle) =>
|
| | | // {
|
| | | // if (isRecycle)
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | // });
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | // }
|
| | | // isOpenPrompting = !isToggle;
|
| | | // });
|
| | | //}
|
| | | //else
|
| | | //{
|
| | | // if (unBindCnt > 0)
|
| | | // {
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("BlastFurnace115", unBindCnt),
|
| | | // (bool isRecycle) =>
|
| | | // {
|
| | | // if (isRecycle)
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | // });
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // SendRecycleDrugQuest(recycleDanDict.Keys.ToList(), recycleDanDict.Values.ToList());
|
| | | // }
|
| | | //}
|
| | |
|
| | | }
|
| | |
|
| | |
| | | [SerializeField] Vector2 m_LogoPosition;
|
| | | public Vector2 logoPosition { get { return m_LogoPosition; } }
|
| | |
|
| | | [SerializeField] string m_BanHao;
|
| | | public string banHao { get { return m_BanHao; } }
|
| | |
|
| | | public void Read(string _data)
|
| | | {
|
| | | var dataStrings = _data.Split('\t');
|
| | |
| | | m_DebugVersion = int.Parse(dataStrings[16]) == 1;
|
| | | m_IsBanShu = int.Parse(dataStrings[17]) == 1;
|
| | | m_LogoPosition = dataStrings[18].Vector3Parse();
|
| | | m_BanHao = dataStrings[19];
|
| | | }
|
| | |
|
| | | #if UNITY_EDITOR
|
| | |
| | | _to.m_IsBanShu = _from.m_IsBanShu;
|
| | | _to.m_ClientPackageFlag = _from.m_ClientPackageFlag;
|
| | | _to.m_LogoPosition = _from.m_LogoPosition;
|
| | | _to.m_BanHao = _from.m_BanHao;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | 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);
|
| | | var url = StringUtility.Contact("https://api.maoergame.com/update/download/url?", HttpRequest.HashtablaToString(tables));
|
| | | Debug.Log("猫耳强更url:" + url);
|
| | | HttpRequest.Instance.RequestHttpPost(url, string.Empty, HttpRequest.defaultHttpContentType, 1, OnMaoErVersionCheckResult);
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnMaoErVersionCheckResult(bool ok, string result)
|
| | | {
|
| | | Debug.Log("猫耳强更 result:" + result);
|
| | | if (ok)
|
| | | {
|
| | | try
|
| | |
| | |
|
| | | public bool CheckIsComposeByType(int firstType,int secondType,int thirdType)
|
| | | {
|
| | | ItemCompoundConfig itemCompound = GetThirdTypeModellist(firstType,secondType,thirdType)[0];
|
| | | ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(firstType, secondType, thirdType);
|
| | | if (itemCompound == null) return false;
|
| | |
|
| | | if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | return true;
|
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | |
| | | public void Display() |
| | | { |
| | | timer = 0f; |
| | | UI3DModelExhibition.Instance.ShowNPC(model.bigBoxNpcId, Vector3.zero, m_RawImage); |
| | | var config = Config.Instance.Get<NPCConfig>(model.bigBoxNpcId); |
| | | UI3DModelExhibition.Instance.ShowNPC(model.bigBoxNpcId, config.UIModeLOffset, config.UIModelRotation, m_RawImage); |
| | | DisplayBoxSurplusInfo(); |
| | | model.boxSurplusChangeEvent += OnBoxInfoUpdate; |
| | | } |
| | |
| | | |
| | | [SerializeField] Image m_Attention; |
| | | |
| | | protected override int selectedBossId |
| | | { |
| | | get |
| | | { |
| | | protected override int selectedBossId { |
| | | get { |
| | | return model.selectedBoss; |
| | | } |
| | | set |
| | | { |
| | | set { |
| | | model.selectedBoss = value; |
| | | } |
| | | } |
| | | |
| | | protected override InteractorableState interactorableState |
| | | { |
| | | get |
| | | { |
| | | protected override InteractorableState interactorableState { |
| | | get { |
| | | var selected = selectedBossId == bossId; |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(bossId); |
| | | var dieOrLocked = false; |
| | |
| | | return selected ? InteractorableState.DieOrLockedSelected : InteractorableState.DieOrLockedUnSelected; |
| | | } |
| | | } |
| | | set |
| | | { |
| | | set { |
| | | base.interactorableState = value; |
| | | } |
| | | } |
| | | |
| | | protected override bool isUnLocked |
| | | { |
| | | get |
| | | { |
| | | protected override bool isUnLocked { |
| | | get { |
| | | return model.IsBossUnLocked(bossId); |
| | | } |
| | | } |
| | |
| | | UpdateBossPortrait(interactorableState); |
| | | } |
| | | |
| | | |
| | | protected override void DrawBossBaseInfo(string _icon, string _name, int _level, int _realm) |
| | | { |
| | | var config = Config.Instance.Get<DogzDungeonConfig>(bossId); |
| | | switch (config.MonsterType) |
| | | { |
| | | case 1: |
| | | m_BossName.text = _name; |
| | | m_BossLevel.text = string.Empty; |
| | | break; |
| | | case 2: |
| | | m_BossName.text = _name; |
| | | m_BossLevel.text = string.Empty; |
| | | break; |
| | | case 3: |
| | | case 4: |
| | | m_BossName.text = _name; |
| | | m_BossLevel.text = Language.Get("Z1024", _level); |
| | | break; |
| | | } |
| | | |
| | | m_Portrait.SetSprite(_icon); |
| | | m_Portrait.SetNativeSize(); |
| | | |
| | | if (m_Realm != null) |
| | | { |
| | | if (Config.Instance.ContainKey<RealmConfig>(_realm)) |
| | | { |
| | | m_Realm.gameObject.SetActive(true); |
| | | var realmConfig = Config.Instance.Get<RealmConfig>(_realm); |
| | | if (realmConfig != null) |
| | | { |
| | | m_Realm.SetSprite(realmConfig.Img); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | m_Realm.gameObject.SetActive(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void OnSelected(int _bossId) |
| | | { |
| | | UpdateBossNameLevelFont(interactorableState); |
| | |
| | | case 4: |
| | | var npcDropConfig = Config.Instance.Get<NPCDropItemConfig>(_bossId); |
| | | m_SurpassLevel.gameObject.SetActive(npcDropConfig.MaxLV != 0 && PlayerDatas.Instance.baseData.LV > npcDropConfig.MaxLV); |
| | | m_SurpassLevel.gameObject.SetActive(true); |
| | | break; |
| | | } |
| | | } |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using TableConfig; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | |
| | | public void Display() |
| | | { |
| | | timer = 0f; |
| | | UI3DModelExhibition.Instance.ShowNPC(model.eliteMonsters[0], Vector3.zero, m_RawImage); |
| | | var config = Config.Instance.Get<NPCConfig>(model.eliteMonsters[0]); |
| | | UI3DModelExhibition.Instance.ShowNPC(model.eliteMonsters[0], config.UIModeLOffset, config.UIModelRotation, m_RawImage); |
| | | DisplayGuardSurplusInfo(); |
| | | model.boxSurplusChangeEvent += OnGuardInfoUpdate; |
| | | } |
| | |
| | | PlayerStrengthengDatas strengthDatas { get { return ModelCenter.Instance.GetModel<PlayerStrengthengDatas>(); } }
|
| | | MagicianModel magicianModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } }
|
| | | TrialDungeonModel trialModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
|
| | | ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
|
| | |
|
| | | private int[] pushItemIds;
|
| | | public int[] pushBuffTypeIds;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if(playerPack.CheckIsDrugById(itemModel.itemId))
|
| | | {
|
| | | if(itemModel.chinItemModel.RealmLimit > PlayerDatas.Instance.baseData.realmLevel)
|
| | | {
|
| | | isReach = false;
|
| | | return isReach;
|
| | | }
|
| | | }
|
| | |
|
| | | switch (itemModel.chinItemModel.Type)
|
| | | {
|
| | | case 8:
|
| | |
| | | return isReach;
|
| | | }
|
| | | break;
|
| | | case 39:
|
| | | if(!CheckIsBetterWings(itemModel))
|
| | | {
|
| | | isReach = false;
|
| | | return isReach;
|
| | | }
|
| | | break;
|
| | | case 52:
|
| | | if (!strengthDatas.IsHint(itemModel.itemId))
|
| | | {
|
| | |
| | | return isReach;
|
| | | }
|
| | |
|
| | | private bool CheckIsBetterWings(ItemModel itemModel)
|
| | | {
|
| | | if (itemModel == null) return false;
|
| | |
|
| | | bool isBetter = true;
|
| | | ItemModel putModel = playerPack.GetItemModelByIndex(PackType.rptEquip,(int)RoleEquipType.retWing);
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | | List<ItemModel> itemModels = null;
|
| | | if(singlePack != null)
|
| | | {
|
| | | singlePack.GetItemCountByType((int)ItemType.Wings, out itemModels);
|
| | | }
|
| | | int[] composeTypes = itemModel.chinItemModel.JumpComposeCondi;
|
| | | bool isOpenCompose = false;
|
| | | if(composeTypes != null && composeTypes.Length >= 3)
|
| | | {
|
| | | ItemCompoundConfig itemCompound = ItemCompoundConfig.GetItemCompoundByType(composeTypes[0], composeTypes[1], composeTypes[2]);
|
| | | if (itemCompound != null)
|
| | | {
|
| | | if (itemCompound.levelNeed <= PlayerDatas.Instance.baseData.LV)
|
| | | {
|
| | | isOpenCompose = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if(!isOpenCompose)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (putModel != null && putModel.chinItemModel.LV >= itemModel.chinItemModel.LV)
|
| | | {
|
| | | return false;
|
| | | }
|
| | |
|
| | | if (itemModels != null)
|
| | | {
|
| | | for(int i = 0; i < itemModels.Count; i++)
|
| | | {
|
| | | if(itemModels[i].chinItemModel.JobLimit/100 == PlayerDatas.Instance.baseData.Job)
|
| | | {
|
| | | if(itemModels[i].chinItemModel.LV >= itemModel.chinItemModel.LV)
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | return true;
|
| | | }
|
| | |
|
| | | private bool CheckIsExtendGrid(int itemId)
|
| | | {
|
| | | SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
|
| | |
| | | return 0;
|
| | | }
|
| | |
|
| | | public List<ItemModel> canDevourModellist = new List<ItemModel>();
|
| | | public List<ItemModel> GetCanDevourModellist()
|
| | | {
|
| | | canDevourModellist.Clear();
|
| | | List<ItemModel> canDevourModellist = new List<ItemModel>();
|
| | | SinglePackModel singlePack = GetSinglePackModel(PackType.rptItem);
|
| | | if (singlePack == null
|
| | | || colorType == EquipColorType.None
|
| | |
| | | public List<ItemModel> selectDevourlist = new List<ItemModel>();
|
| | | public void GetSelectDevourList()
|
| | | {
|
| | | GetCanDevourModellist();
|
| | | selectDevourlist.Clear();
|
| | | selectDevourlist.AddRange(canDevourModellist);
|
| | | List<ItemModel> itemModels = GetCanDevourModellist();
|
| | | if (itemModels != null)
|
| | | {
|
| | | selectDevourlist.AddRange(itemModels);
|
| | | }
|
| | | }
|
| | |
|
| | | public void RefreshGetNewItem(ItemModel model)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public bool IsReachMinDecomposeNum()
|
| | | {
|
| | | List<ItemModel> itemModels = GetCanDevourModellist();
|
| | | if(itemModels != null && itemModels.Count >= minDecomposeNum)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | return false;
|
| | | }
|
| | |
|
| | | public void SendEquipdevourQuest()
|
| | | {
|
| | | if (canDevourModellist.Count < minDecomposeNum) return;
|
| | | List<ItemModel> itemModels = GetCanDevourModellist();
|
| | | if (itemModels == null || itemModels.Count < minDecomposeNum) return;
|
| | |
|
| | | isAutoDecompose = true;
|
| | | recordAutoDecomNum = canDevourModellist.Count;
|
| | | recordAutoDecomNum = itemModels.Count;
|
| | | CA32C_tagCMEquipDecompose _petEat = new CA32C_tagCMEquipDecompose();
|
| | | byte[] _petIndex = new byte[canDevourModellist.Count];
|
| | | for (int i = 0; i < canDevourModellist.Count; i++)
|
| | | byte[] _petIndex = new byte[recordAutoDecomNum];
|
| | | for (int i = 0; i < recordAutoDecomNum; i++)
|
| | | {
|
| | | _petIndex[i] = (byte)canDevourModellist[i].itemInfo.ItemPlace;
|
| | | _petIndex[i] = (byte)itemModels[i].itemInfo.ItemPlace;
|
| | | if (itemModels[i].chinItemModel.StarLevel >= 2 |
| | | || (itemModels[i].chinItemModel.EquipPlace == 0 && itemModels[i].chinItemModel.Type != 29))
|
| | | {
|
| | | return;
|
| | | }
|
| | | }
|
| | | _petEat.IndexCount = (byte)_petIndex.Length;
|
| | | _petEat.IndexList = _petIndex;
|
| | |
| | | model.ReportConfirmPreciousItem(model.currentShowItem);
|
| | | if (itemModel != null && itemModel.packType == PackType.rptItem)
|
| | | {
|
| | | PackSendQuestMgr.Instance.SendUseItemQuest(ItemWinBtnType.makeUse, itemModel.itemInfo.ItemPlace);
|
| | | switch((ItemType)itemModel.chinItemModel.Type)
|
| | | {
|
| | | case ItemType.WingsMat:
|
| | | int jumpId = 0;
|
| | | bool isUnlock = ModelCenter.Instance.GetModel<ComposeWinModel>().CheckComposeItemById(itemModel.itemId, out jumpId);
|
| | | if (isUnlock)
|
| | | {
|
| | | PackSendQuestMgr.Instance.ClickComposeBtn(ItemWinBtnType.compose, jumpId);
|
| | | }
|
| | | break;
|
| | | default:
|
| | | PackSendQuestMgr.Instance.SendUseItemQuest(ItemWinBtnType.makeUse, itemModel.itemInfo.ItemPlace);
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | [SerializeField] Button m_ServerSelect;
|
| | | [SerializeField] Button m_SwitchAccount;
|
| | | [SerializeField] Button m_Notice;
|
| | | [SerializeField] RectTransform m_BanHao;
|
| | | [SerializeField] RichText m_BanHao;
|
| | |
|
| | | LoginModel model { get { return ModelCenter.Instance.GetModel<LoginModel>(); } }
|
| | |
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | m_BanHao.gameObject.SetActive(Application.platform == RuntimePlatform.WindowsEditor || VersionUtility.Instance.IsMaoErGame());
|
| | | m_BanHao.text = VersionConfig.Get().banHao;
|
| | |
|
| | | var sprite = Resources.Load<Sprite>("UI/Sprites/TB_DL_Logo");
|
| | | m_Logo.overrideSprite = sprite;
|
| | | m_Logo.SetNativeSize();
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | SnxxzGame.Instance.StartCoroutine(Co_DeActiveFairyGrabBoss());
|
| | | }
|
| | | }
|
| | |
|
| | | IEnumerator Co_DeActiveFairyGrabBoss()
|
| | | {
|
| | | yield return null;
|
| | | if (fairyGrabBossModel.fairyGrabBossHelps.Count == 0)
|
| | | {
|
| | | m_FairyGrabBossHelpBehaviour.gameObject.SetActive(false);
|
| | | }
|
| | | }
|
| | |
| | | delayTime = 2;
|
| | | HeroBehaviour.OnStartHandupAI -= OnStartHandupAI;
|
| | | HeroBehaviour.OnStopHandupAI -= OnStopHandupAI;
|
| | | playerPack.ItemCntAddAct -= RefreshItemCnt;
|
| | | DeadModel.playerDieEvent -= OnPlayerDie;
|
| | | m_storeModel.RefreshBuyResultEvent -= RefreshBuySuccess;
|
| | | DeadModel.CloseRebornWinEvent -= PlayerRebornSuccess;
|
| | | HeroBehaviour.OnStartHandupAI += OnStartHandupAI;
|
| | | HeroBehaviour.OnStopHandupAI += OnStopHandupAI;
|
| | | playerPack.ItemCntAddAct += RefreshItemCnt;
|
| | | DeadModel.playerDieEvent += OnPlayerDie;
|
| | | m_storeModel.RefreshBuyResultEvent += RefreshBuySuccess;
|
| | | DeadModel.CloseRebornWinEvent += PlayerRebornSuccess;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | if (secondTimer > 1f)
|
| | | if (secondTimer >= 1f)
|
| | | {
|
| | | if(isGetNewItem)
|
| | | {
|
| | | secondTimer = 0f;
|
| | | delayTime -= 1;
|
| | | if (delayTime <= 0)
|
| | | {
|
| | | isGetNewItem = false;
|
| | | delayTime = 2f;
|
| | | DealBagItem();
|
| | | }
|
| | | }
|
| | | secondTimer = 0f;
|
| | | RefreshBagItem();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void RefreshItemCnt(PackType type, int index, int id)
|
| | | {
|
| | | RefreshBagItem();
|
| | | }
|
| | |
|
| | | public void RefreshBagItem()
|
| | | {
|
| | | if (!_isAutoHangUp)
|
| | |
| | | DebugEx.Log("请开启自动挂机,否则无法出售");
|
| | | return;
|
| | | }
|
| | |
|
| | | DealBagItem();
|
| | | isGetNewItem = true;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | /// </summary>
|
| | | private void DealBagItem()
|
| | | {
|
| | | if (playerPack.GetReaminGridCount(PackType.rptItem) < 5)
|
| | | if (playerPack.GetReaminGridCount(PackType.rptItem) < 5 && modelInterface.isPackResetOk)
|
| | | {
|
| | | if (HangUpSetModel.Instance.GetBool(HangUpAutoBoolType.isAutoDevour))
|
| | | {
|
| | | List<ItemModel> list = playerPack.GetCanDevourModellist();
|
| | | if (list != null && list.Count > 0)
|
| | | if(playerPack.IsReachMinDecomposeNum())
|
| | | {
|
| | | playerPack.SendEquipdevourQuest();
|
| | | return;
|
| | |
| | | WindowCenter.Instance.Open<RolePromoteWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.Wash:
|
| | | WindowCenter.Instance.Open<EquipReinforceWin>(false, 4);
|
| | | WindowCenter.Instance.Open<EquipReinforceWin>(false, 3);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.FairyHeart:
|
| | | WindowCenter.Instance.Open<MethodToWin>();
|
| | |
| | | {
|
| | | var potential = m_Treasure.potentials[_index];
|
| | | potentialBriefInfos[_index].DisplayStateSfx();
|
| | | potentialBriefInfos[_index].StartLevelTween();
|
| | | //potentialBriefInfos[_index].StartLevelTween();
|
| | | var _nextPotential = GetNextPotential(potential.id);
|
| | | if (_nextPotential != 0)
|
| | | {
|
| | |
| | | var npcRefreshIds = model.GetMapNPCRefreshIds(mapId);
|
| | | if (npcRefreshIds != null)
|
| | | {
|
| | | for (int i = 0; i < npcRefreshIds.Count; i++)
|
| | | foreach ( var item in npcRefreshIds)
|
| | | {
|
| | | DrawFunctionNPC(npcRefreshIds[i]);
|
| | | var config = Config.Instance.Get<mapnpcConfig>(item);
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(config.NPCID);
|
| | | DrawFunctionNPC(item);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | foreach (var config in mapNpcConfigs)
|
| | | {
|
| | | var mapId = config.MapID;
|
| | | if (config.NPCType == (int)E_NpcType.Func)
|
| | | if (config.NPCID != 0)
|
| | | {
|
| | | List<string> npcRefreshIs;
|
| | | if (!mapFunctionNPCsToRefreshID.ContainsKey(mapId))
|
| | | if (config.NPCType == (int)E_NpcType.Func)
|
| | | {
|
| | | mapFunctionNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
|
| | | }
|
| | | else
|
| | | {
|
| | | npcRefreshIs = mapFunctionNPCsToRefreshID[mapId];
|
| | | }
|
| | | List<string> npcRefreshIs;
|
| | | if (!mapFunctionNPCsToRefreshID.ContainsKey(mapId))
|
| | | {
|
| | | mapFunctionNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
|
| | | }
|
| | | else
|
| | | {
|
| | | npcRefreshIs = mapFunctionNPCsToRefreshID[mapId];
|
| | | }
|
| | |
|
| | | npcRefreshIs.Add(config.RefreshID.ToString());
|
| | | }
|
| | | else if (config.NPCType == (int)E_NpcType.Flag)
|
| | | {
|
| | | List<string> npcRefreshIs;
|
| | | if (!mapCollectNPCsToRefreshID.ContainsKey(mapId))
|
| | | {
|
| | | mapCollectNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
|
| | | npcRefreshIs.Add(config.RefreshID.ToString());
|
| | | }
|
| | | else
|
| | | else if (config.NPCType == (int)E_NpcType.Flag)
|
| | | {
|
| | | npcRefreshIs = mapCollectNPCsToRefreshID[mapId];
|
| | | }
|
| | | List<string> npcRefreshIs;
|
| | | if (!mapCollectNPCsToRefreshID.ContainsKey(mapId))
|
| | | {
|
| | | mapCollectNPCsToRefreshID[mapId] = npcRefreshIs = new List<string>();
|
| | | }
|
| | | else
|
| | | {
|
| | | npcRefreshIs = mapCollectNPCsToRefreshID[mapId];
|
| | | }
|
| | |
|
| | | npcRefreshIs.Add(config.RefreshID.ToString());
|
| | | npcRefreshIs.Add(config.RefreshID.ToString());
|
| | | }
|
| | | }
|
| | | }
|
| | |
|