Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
| | |
| | | //类型 |
| | | static Dictionary<int, ulong> lastPackUIDDict = new Dictionary<int, ulong>() |
| | | { |
| | | #if UNITY_EDITOR |
| | | // #if UNITY_EDITOR |
| | | {(int)PlayerDataType.ExAttr1, 0}, |
| | | {(int)PlayerDataType.ExAttr2, 0}, |
| | | #endif |
| | | // #endif |
| | | {(int)PlayerDataType.default26, 0}, |
| | | }; |
| | | public override void Done(GameNetPackBasic vNetPack) |
| | |
| | | } |
| | | } |
| | | |
| | | if (waitLoginMap) |
| | | { |
| | | if (protocol is not C0123_tagCClientPackVersion && protocol is not C0101_tagCPlayerLogin) |
| | | { |
| | | Debug.LogWarning("等待0403包,不允许发送其他包 " + protocol.ToString()); |
| | | return; |
| | | } |
| | | } |
| | | // 0102是从地图发送的 说明已登录,除非服务端报错异常,这里可以不屏蔽 |
| | | // if (waitLoginMap) |
| | | // { |
| | | // if (protocol is not C0123_tagCClientPackVersion && protocol is not C0101_tagCPlayerLogin) |
| | | // { |
| | | // Debug.LogError("等待0403包,不允许发送其他包 " + protocol.ToString()); |
| | | // return; |
| | | // } |
| | | // } |
| | | |
| | | if (mainSocket != null) |
| | | { |
| | |
| | | |
| | | int passRound = BattleManager.Instance.defaultPassRound; |
| | | var name = battleField.ToString(); |
| | | |
| | | |
| | | // 检查是否为永久特权卡玩家 |
| | | bool hasForeverPrivilege = InvestModel.Instance.IsInvested(InvestModel.foreverCardType); |
| | | |
| | |
| | | // 如果战场类型不在 FieldNameToIndex 中,使用默认配置 |
| | | } |
| | | |
| | | int nowRound = battleField.round; |
| | | if (nowRound < passRound) |
| | | int nowRound = battleField.round; |
| | | int realPassRound = passRound + 1; // 配置是超过x回合可以跳,意味着x+1回合可以跳 |
| | | if (nowRound < realPassRound) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("BattlePass", passRound - nowRound); |
| | | SysNotifyMgr.Instance.ShowTip("BattlePass", realPassRound - nowRound); |
| | | return; |
| | | } |
| | | battleField.ForceFinish(); |
| | |
| | | |
| | | void OpenHawker() |
| | | { |
| | | if (TimeUtility.GetToTenClockSeconds() > 0) |
| | | if (TimeUtility.GetToTheHourSeconds() > 0) |
| | | { |
| | | SysNotifyMgr.Instance.ShowTip("GuildSys17"); |
| | | return; |
| | |
| | | |
| | | void ShowHawkerTime() |
| | | { |
| | | var toTenSeconds = TimeUtility.GetToTenClockSeconds(); |
| | | var toTenSeconds = TimeUtility.GetToTheHourSeconds(); |
| | | if (toTenSeconds > 0) |
| | | { |
| | | guildHawkerTimeText.text = TimeUtility.SecondsToHMS(toTenSeconds); |
| | |
| | | get
|
| | | {
|
| | | //第十个数用于存储是否开启自动刷新,其他数用于存储物品等级
|
| | | var value = QuickSetting.Instance.GetQuickSettingValue<int>(QuickSettingType.AutoGoldRush, 10);
|
| | | var value = QuickSetting.Instance.GetQuickSettingValue<int>(QuickSettingType.AutoGoldRush, 9);
|
| | | return value == 0;
|
| | | }
|
| | | set
|
| | | {
|
| | | QuickSetting.Instance.SetQuickSetting<int>(QuickSettingType.AutoGoldRush, Convert.ToInt32(!value), 10);
|
| | | QuickSetting.Instance.SetQuickSetting<int>(QuickSettingType.AutoGoldRush, Convert.ToInt32(!value), 9);
|
| | |
|
| | | QuickSetting.Instance.SendPackage();
|
| | | }
|
| | |
| | | UIManager.Instance.OpenWindow<BuyItemWin>();
|
| | | }
|
| | | break;
|
| | | case 2:
|
| | | int index = int.Parse(way.CustomValue);
|
| | | if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Recharge, true))
|
| | | return;
|
| | | RechargeManager.Instance.selectTabIndex = index;
|
| | | if (UIManager.Instance.IsOpened<StoreBaseWin>())
|
| | | {
|
| | | UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1);
|
| | | }
|
| | | else
|
| | | {
|
| | | UIManager.Instance.OpenWindow<StoreBaseWin>(1);
|
| | | }
|
| | | break;
|
| | | case 0:
|
| | | default:
|
| | | if (WindowSearchConfig.HasKey(way.WinJumpID))
|
| | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using Cysharp.Threading.Tasks; |
| | | using DG.Tweening; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | |
| | | // var battleWin = UIManager.Instance.OpenWindow<BattleWin>(); |
| | | // battleWin.SetBattleField(BattleManager.Instance.storyBattleField); |
| | | |
| | | if (!SoundPlayer.Instance.IsPlayBackGroundMuisic()) |
| | | SoundPlayer.Instance.PlayBackGroundMusic(38); |
| | | DelayPlayMusic().Forget(); |
| | | } |
| | | |
| | | |
| | |
| | | officialTip.SetActive(OfficialRankManager.Instance.CanOfficialLVUP()); |
| | | } |
| | | |
| | | async UniTask DelayPlayMusic() |
| | | { |
| | | await UniTask.Delay(2000); |
| | | if (!SoundPlayer.Instance.IsPlayBackGroundMuisic()) |
| | | SoundPlayer.Instance.PlayBackGroundMusic(38); |
| | | } |
| | | |
| | | |
| | | |
| | | private void OnClickEnterBoss() |
| | | { |
| | | // BattleField battleField = BattleManager.Instance.GetBattleFieldByMapID(2); //BOSS战斗 |
| | |
| | | UIManager.Instance.OnOpenWindow += OnOpenWindow;
|
| | | UIManager.Instance.OnCloseWindow += OnCloseWindow;
|
| | | OfficialRankManager.Instance.OnOfficialCanLVUpEvent += OnOfficialCanLVUpEvent;
|
| | | PackManager.Instance.DeleteItemEvent += DeleteDropItem;
|
| | | }
|
| | |
|
| | | public override void Release()
|
| | |
| | | UIManager.Instance.OnOpenWindow -= OnOpenWindow;
|
| | | UIManager.Instance.OnCloseWindow -= OnCloseWindow;
|
| | | OfficialRankManager.Instance.OnOfficialCanLVUpEvent -= OnOfficialCanLVUpEvent;
|
| | | PackManager.Instance.DeleteItemEvent -= DeleteDropItem;
|
| | | }
|
| | |
|
| | | void OnOfficialCanLVUpEvent()
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | void DeleteDropItem(PackType packType, string guid, int itemID, int index, int clearType)
|
| | | {
|
| | | if (packType != PackType.DropItem)
|
| | | return;
|
| | | |
| | | if (TryStartNewBieGuides(waitGuideIDs))
|
| | | {
|
| | | Debug.Log("执行等待中的引导" + JsonMapper.ToJson(waitGuideIDs));
|
| | | }
|
| | | }
|
| | |
|
| | | void OnTaskUpdateEvent()
|
| | | {
|
| | | var guides = GuideConfig.GetGuideListByType((int)GuideTriggerType.MainLineQuestCanDo);
|
| | |
| | | m_GuideTalkRect.SetActive(false);
|
| | | DisplayGuide();
|
| | | }
|
| | | //PlayNewBieAudio 不会被ui音效打断
|
| | | SoundPlayer.Instance.PlayUIAudio(stepConfig.voice);
|
| | | //PlayNewBieAudio 不会被ui音效打断 PlayUIAudio
|
| | | SoundPlayer.Instance.PlayNewBieAudio(stepConfig.voice);
|
| | | }
|
| | |
|
| | | int tryGuideCount = 0;
|
| | |
| | | bool hasInitAttr = HasInitAttr(type, id); |
| | | bool hasStarAddAttr = HasStarAddAttr(type, id); |
| | | // 有初始属性 |
| | | if (hasInitAttr && !hasStarAddAttr) |
| | | if (hasInitAttr) |
| | | { |
| | | int[] attrIDList = GetAttrIDList(type, id); |
| | | // 不支持升星 |
| | |
| | | InitRedPoint(); |
| | | TabSetActive(); |
| | | SelectTiltleBtn(); |
| | | txtName.SetActive(false); //称号名称与美术资源一体,不需要额外单独显示 |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | |
| | | |
| | | private void RefreshAll(PhantasmPavilionType type, int tabType, bool isJump = true) |
| | | { |
| | | // 卸下称号后,自动选中第一个物品 |
| | | if (!manager.Has(type, manager.selectId)) |
| | | { |
| | | manager.SetSelectItemId(type, functionOrder + 1); |
| | | } |
| | | |
| | | scrTitle.m_Scorller.RefreshActiveCellViews(); |
| | | if (isJump) |
| | | { |
| | |
| | | |
| | | btnTakeOff2.SetActive(state == PhantasmPavilionState.Activated && isCanStarAdd && isUsing); |
| | | btnTakeOff1.SetActive(state == PhantasmPavilionState.Activated && !isCanStarAdd && isUsing && hasLimitTimeShow); |
| | | btnTakeOff3.SetActive(state == PhantasmPavilionState.Activated && isCanStarAdd && isUsing && !hasLimitTimeShow); |
| | | btnTakeOff3.SetActive(state == PhantasmPavilionState.Activated && !isCanStarAdd && isUsing && !hasLimitTimeShow); |
| | | btnUnlock.Display(id); |
| | | btnUnlock1.Display(id); |
| | | btnAddStar.Display(id); |
| | |
| | | |
| | | UpdateTimer(type, id); |
| | | } |
| | | |
| | | void RefreshScroller(PhantasmPavilionType type) |
| | | { |
| | | scrTitle.m_Scorller.RefreshActiveCellViews(); |
| | | CreateInfoScroller(); |
| | | } |
| | | |
| | | |
| | | private void CreateInfoScroller() |
| | | { |
| | |
| | | break; |
| | | } |
| | | |
| | | SoundPlayer.Instance.PlayUIAudio(57); |
| | | if (isWin) |
| | | { |
| | | SoundPlayer.Instance.PlayUIAudio(57); |
| | | } |
| | | } |
| | | |
| | | //"Msg":{"itemInfo":[{"ItemID":5,"Count":2},{"ItemID":3,"Count":40}],"winFaction":1,"statInfo":{"1":{"1":{"1":{"NPCID":0,"DefHurt":727,"CureHP":0,"AtkHurt":1891,"ObjID":1,"HeroID":530004},"3":{"NPCID":0,"DefHurt":483,"CureHP":1511,"AtkHurt":782,"ObjID":6,"HeroID":520001},"2":{"NPCID":0,"DefHurt":953,"CureHP":0,"AtkHurt":1712,"ObjID":5,"HeroID":510003}}},"2":{"1":{"1":{"NPCID":10101091,"DefHurt":638,"CureHP":0,"AtkHurt":140,"ObjID":2,"HeroID":610001},"3":{"NPCID":10101092,"DefHurt":625,"CureHP":0,"AtkHurt":126,"ObjID":3,"HeroID":610001},"5":{"NPCID":10101093,"DefHurt":3122,"CureHP":0,"AtkHurt":1897,"ObjID":4,"HeroID":510003}}}}} |
| | |
| | | |
| | | } |
| | | |
| | | // 到10点还要多少秒,如果已经过了10点,返回0 |
| | | public static int GetToTenClockSeconds() |
| | | // 今日到x点还要多少秒,如果已经过了x点,返回0 |
| | | public static int GetToTheHourSeconds(int hour=10) |
| | | { |
| | | var now = ServerNow; |
| | | if (now.Hour < 10) |
| | | if (now.Hour < hour) |
| | | { |
| | | return (int)(ServerNow - new DateTime(now.Year, now.Month, now.Day, 10, 0, 0)).TotalSeconds; |
| | | return (int)(new DateTime(now.Year, now.Month, now.Day, hour, 0, 0) - ServerNow).TotalSeconds; |
| | | } |
| | | return 0; |
| | | } |