Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0408_tagPlayerSummonNPCAppear.cs
@@ -26,13 +26,13 @@ return; } if (vNetData.PlayerID == PlayerDatas.Instance.PlayerId) if (_npcConfig.NPCType == (int)E_NpcType.PersonalEnemy) { if (_npcConfig.NPCType == (int)E_NpcType.PersonalEnemy) if (vNetData.PlayerID == PlayerDatas.Instance.PlayerId) { PersonalEnemy.Bind(vNetData); return; } return; } if (_npcConfig.NPCType == (int)E_NpcType.Collect) Fight/Actor/HeroBehaviour.cs
@@ -921,6 +921,7 @@ //} _hurtObject.HurtHP = _hurtValue; _hurtObject.CurHP = _target.ActorInfo.RealHp - _hurtValue; _hurtObject.AttackType = _attackType; var _clientNpc = _target as GA_NpcClientFightNorm; if (_clientNpc != null) Fight/Stage/Dungeon/ClientDungeonStageUtility.cs
@@ -1,30 +1,30 @@ using Snxxz.UI; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ClientDungeonStageUtility { public static bool isClientDungeon { get; private set; } using System.Collections; using System.Collections.Generic; using UnityEngine; public class ClientDungeonStageUtility { public static bool isClientDungeon { get; private set; } public static ushort clientMapId { get; private set; } public static Dungeon dungeonInfo { get; set; } static Action<Dungeon, bool> clientCustomDungeonResult; public static void Init() { DTC0102_tagCDBPlayer.switchAccountEvent += Reset; DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk; public static Dungeon dungeonInfo { get; set; } static Action<Dungeon, bool> clientCustomDungeonResult; public static void Init() { DTC0102_tagCDBPlayer.switchAccountEvent += Reset; DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk; } public static void SetClientDungeon(bool value, ushort mapId) { isClientDungeon = value; clientMapId = mapId; public static void SetClientDungeon(bool value, ushort mapId) { isClientDungeon = value; clientMapId = mapId; } public static void RequestStartClientDungeon(int mapId, int lineId, Action<Dungeon, bool> callBack) { clientCustomDungeonResult = callBack; @@ -39,14 +39,14 @@ pak.MapID = (uint)mapId; pak.FuncLineID = (ushort)lineId; GameNetSystem.Instance.SendInfo(pak); } } public static void RequestExitClientDungeon() { var pak = new CA233_tagCMClientExitCustomScene(); GameNetSystem.Instance.SendInfo(pak); } } public static void ReceiveStartCustomDungeonResult(HB216_tagMCStartCustomSceneResult package) { if (package.MapID == dungeonInfo.mapId @@ -88,6 +88,11 @@ isClientLoadMap = true }); var _hero = PlayerDatas.Instance.hero; if (_hero != null) { GA_Hero.recordServerPos = new Vector3((int)(_hero.Pos.x * 2), 0, (int)(_hero.Pos.z * 2)); } PlayerDatas.Instance.baseData.mainServerMapIdRecord = PlayerDatas.Instance.baseData.MapID; PlayerDatas.Instance.baseData.MapID = (ushort)clientMapId; var attackMode = new C030A_tagCChangeAttackMode(); @@ -114,7 +119,7 @@ refreshPlayerDatas = true, exitClientMap = true, }); } } public static int GetClientMapId(int mapId) { @@ -141,11 +146,11 @@ { RequestStartClientDungeon(dungeonInfo.mapId, dungeonInfo.lineId, null); } } } private static void Reset() { isClientDungeon = false; clientMapId = 0; } } private static void Reset() { isClientDungeon = false; clientMapId = 0; } } Fight/Stage/Dungeon/DungeonStage.cs
@@ -157,6 +157,7 @@ ClientSceneManager.Instance.UnInit(); ClientCollectUtility.UnInit(); StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId); GAMgr.Instance.UnInit(); DropItemManager.ReleaseAll(); ClientDropItemUtility.Instance.ReleaseAll(); System/Alchemy/AlchemyDrugProgressBehaviour.cs
New file @@ -0,0 +1,103 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class AlchemyDrugProgressBehaviour : MonoBehaviour { [SerializeField] AlchemyType m_AlchemyType; [SerializeField] Image m_Progress; [SerializeField] Button m_Goto; int alchemyId = 0; AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } } private void Awake() { m_Goto.AddListener(Goto); } public void Initialize() { model.alchemyStateRefresh -= AlchemyStateRefresh; model.alchemyStateRefresh += AlchemyStateRefresh; Display(); } private void AlchemyStateRefresh() { Display(); } void Display() { var isAlcheming = false; alchemyId = 0; Int2 position; if (model.IsStoveAlcheming(m_AlchemyType, out position)) { isAlcheming = model.GetStoveState(position.y) == 1; alchemyId = position.y; } this.gameObject.SetActive(isAlcheming); if (isAlcheming) { DisplayProgress(); } } void DisplayProgress() { uint tick = 0; if (model.TryGetAlchemyStartTime(alchemyId, out tick)) { var config = AlchemyConfig.Get(model.selectAlchemy); var startTime = TimeUtility.GetTime(tick); var seconds = (float)(TimeUtility.ServerNow - startTime).TotalSeconds; m_Progress.fillAmount = Mathf.Clamp01(seconds / config.NeedTime); } } private void LateUpdate() { if (alchemyId != 0) { if (model.GetStoveState(alchemyId) != 1) { alchemyId = 0; this.gameObject.SetActive(false); return; } DisplayProgress(); } } private void Goto() { switch (m_AlchemyType) { case AlchemyType.Normal: WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.AlchemyNormal); break; case AlchemyType.Fairy: WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.AlchemyFairy); break; } } public void UnInitialize() { model.alchemyStateRefresh -= AlchemyStateRefresh; } } } System/Alchemy/AlchemyDrugProgressBehaviour.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: a0c44a0bc68b6314ba4b8f72fda9a765 timeCreated: 1558751271 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/Alchemy/AlchemyModel.cs
@@ -67,6 +67,9 @@ public int jumpAlchemy { get; set; } public bool alchemyNormalNotifySymbol { get; set; } public bool alchemyFairyNotifySymbol { get; set; } public bool isServerPrepare { get; private set; } public event Action selectQualityRefresh; @@ -474,6 +477,28 @@ { var data = package.InfoList[i]; m_AlchemyTimes[(int)data.AlchemyID] = data.StartTime; if (isServerPrepare) { var config = AlchemyConfig.Get((int)data.AlchemyID); if (config != null) { if ((AlchemyType)config.AlchemType == AlchemyType.Normal) { alchemyNormalNotifySymbol = false; } if ((AlchemyType)config.AlchemType == AlchemyType.Fairy) { alchemyFairyNotifySymbol = false; } } } } if (package.StoveCnt == 0) { alchemyNormalNotifySymbol = false; alchemyFairyNotifySymbol = false; } var lastLevel = stoveLevel; System/Alchemy/AlchemyNotifyBehaviour.cs
New file @@ -0,0 +1,126 @@ using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; namespace Snxxz.UI { public class AlchemyNotifyBehaviour : MonoBehaviour, IInGamePush { [SerializeField] Button m_Goto; [SerializeField] Button m_Close; AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } } private void Awake() { m_Goto.AddListener(Goto); m_Close.AddListener(Close); } public void Initialize() { GlobalTimeEvent.Instance.secondEvent -= PerSecond; GlobalTimeEvent.Instance.secondEvent += PerSecond; } public void UnInitialize() { GlobalTimeEvent.Instance.secondEvent -= PerSecond; } private void PerSecond() { var isAlchemyComplete = false; Int2 position; if (model.IsStoveAlcheming(AlchemyType.Normal, out position)) { if (model.GetStoveState(position.y) == 2 && !model.alchemyNormalNotifySymbol) { isAlchemyComplete = true; } } if (model.IsStoveAlcheming(AlchemyType.Fairy, out position)) { if (model.GetStoveState(position.y) == 2 && !model.alchemyFairyNotifySymbol) { isAlchemyComplete = true; } } if (isAlchemyComplete) { if (!gameObject.activeSelf) { gameObject.SetActive(true); } } else { if (gameObject.activeSelf) { gameObject.SetActive(false); } } } private void Goto() { Int2 position; if (model.IsStoveAlcheming(AlchemyType.Normal, out position)) { if (model.GetStoveState(position.y) == 2) { model.alchemyNormalNotifySymbol = true; gameObject.SetActive(false); WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.AlchemyNormal); return; } } if (model.IsStoveAlcheming(AlchemyType.Fairy, out position)) { if (model.GetStoveState(position.y) == 2) { model.alchemyFairyNotifySymbol = true; gameObject.SetActive(false); WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.AlchemyFairy); return; } } } private void Close() { Int2 position; if (model.IsStoveAlcheming(AlchemyType.Normal, out position)) { if (model.GetStoveState(position.y) == 2) { model.alchemyNormalNotifySymbol = true; } } if (model.IsStoveAlcheming(AlchemyType.Fairy, out position)) { if (model.GetStoveState(position.y) == 2) { model.alchemyFairyNotifySymbol = true; } } gameObject.SetActive(false); } public int GetSiblingIndex() { return transform.GetSiblingIndex(); } public bool IsActive() { return gameObject.activeSelf; } } } System/Alchemy/AlchemyNotifyBehaviour.cs.meta
New file @@ -0,0 +1,12 @@ fileFormatVersion: 2 guid: c1900a6502e2b764b9d0bab93368df50 timeCreated: 1558752606 licenseType: Pro MonoImporter: serializedVersion: 2 defaultReferences: [] executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant: System/MainInterfacePanel/InGamePushContainer.cs
@@ -30,6 +30,7 @@ [SerializeField] FBHelpPointExchageNotify m_HelpPointExchangeNotify; [SerializeField] MyFocusAuctionBehaviour m_MyFocusBehavio; [SerializeField] AuctionNewGetBehaviour m_AuctionNewGetBehaviour; [SerializeField] AlchemyNotifyBehaviour m_AlchemyNotifyBehaviour; List<IInGamePush> m_InGamePushs = new List<IInGamePush>(); Dictionary<IInGamePush, Transform> m_InGamePushTrans = new Dictionary<IInGamePush, Transform>(); @@ -75,6 +76,7 @@ SetInGamePush(m_HelpPointExchangeNotify, m_HelpPointExchangeNotify.transform); SetInGamePush(m_MyFocusBehavio, m_MyFocusBehavio.transform); SetInGamePush(m_AuctionNewGetBehaviour, m_AuctionNewGetBehaviour.transform); SetInGamePush(m_AlchemyNotifyBehaviour, m_AlchemyNotifyBehaviour.transform); SetInGamePushContainerSort(); } @@ -104,6 +106,7 @@ CheckHelpPointExchange(); CheckNewAuction(); m_MyFocusBehavio.Init(); m_AlchemyNotifyBehaviour.Initialize(); exchageModel.UpdateHelpPointShopEvent += CheckHelpPointExchange; playerPack.RefreshDecomAttrAct += CheckEquipDecompose; betterEquipGetModel.showEquipRefreshEvent += CheckBetterEquip; @@ -123,6 +126,7 @@ public void UnInit() { m_MyFocusBehavio.Unit(); m_AlchemyNotifyBehaviour.UnInitialize(); fairyGrabBossModel.helpCoolDown = false; exchageModel.UpdateHelpPointShopEvent -= CheckHelpPointExchange; playerPack.RefreshDecomAttrAct -= CheckEquipDecompose; System/MainInterfacePanel/MainButtonMisc.cs
@@ -25,6 +25,8 @@ [SerializeField] Button m_FriendQuestBtn; [SerializeField] Button m_FairyRequestBtn; [SerializeField] Button m_ReikiResetRemind; [SerializeField] AlchemyDrugProgressBehaviour m_AlchemyNormal; [SerializeField] AlchemyDrugProgressBehaviour m_AlchemyFairy; FestivalRedpackModel festivalRedpackModel { get { return ModelCenter.Instance.GetModel<FestivalRedpackModel>(); } } OSRedEnvelopeModel OSEnvelopeModel { get { return ModelCenter.Instance.GetModel<OSRedEnvelopeModel>(); } } @@ -59,6 +61,9 @@ IsCrossServerOneVsOne(); DisplayReikiRemind(); m_AlchemyNormal.Initialize(); m_AlchemyFairy.Initialize(); RedPacketModel.OnRedBagGetEvent += OnRedBagGet; OSEnvelopeModel.OSRedEnvelopeUpdateEvent += OnRedBagGet; OSEnvelopeModel.OSRedEnvelopeInfoEnvent += OnRedBagGet; @@ -84,6 +89,8 @@ public void UnInit() { m_AlchemyNormal.UnInitialize(); m_AlchemyFairy.UnInitialize(); m_CollectBehaviour.Dispose(); RedPacketModel.OnRedBagGetEvent -= OnRedBagGet; OSEnvelopeModel.OSRedEnvelopeUpdateEvent -= OnRedBagGet; System/MainInterfacePanel/TaskFeedbackModel.cs
@@ -66,7 +66,6 @@ } break; case TaskFeedbackType.ItemCount: case TaskFeedbackType.AlchemyItem: { var array = LitJson.JsonMapper.ToObject<int[][]>(config.items); if (array != null) @@ -150,33 +149,6 @@ case TaskFeedbackType.ItemCount: case TaskFeedbackType.SkyTowerFightPoint: case TaskFeedbackType.DemonTreasure: { int condition = 0; if (IsSatisfyCondition(feedback, out condition)) { ExecuteSuccFeedback(taskId); } else { if (config.remind != null && config.remind.Length > 0) { var index = Mathf.Min(condition, config.remind.Length - 1); SysNotifyMgr.Instance.ShowTip(config.remind[index]); } if (feedback.failFuns != null) { var index = Mathf.Min(condition, feedback.failFuns.Count - 1); List<int> succFuncs; if (TryGetSatisfyConditionFuncs(feedback.failFuns[index], out succFuncs)) { taskFeedbackFuncs.Clear(); taskFeedbackFuncs.AddRange(succFuncs); WindowCenter.Instance.Open<TaskFeedbackFuncWin>(); } } } } break; case TaskFeedbackType.AlchemyItem: { int condition = 0; @@ -186,15 +158,6 @@ } else { Int2 position; if (alchemyModel.IsStoveAlcheming((AlchemyType)config.condition, out position)) { if (config.jump != 0) { WindowJumpMgr.Instance.WindowJumpTo((JumpUIType)config.jump); return; } } if (config.remind != null && config.remind.Length > 0) { var index = Mathf.Min(condition, config.remind.Length - 1); @@ -367,7 +330,6 @@ return true; case TaskFeedbackType.FightPowerSideTask: return PlayerDatas.Instance.baseData.FightPoint >= config.condition; case TaskFeedbackType.AlchemyItem: case TaskFeedbackType.ItemCount: { if (feedback.items != null) @@ -381,6 +343,12 @@ } } return true; } case TaskFeedbackType.AlchemyItem: { Item material; return alchemyModel.GetStoveState(config.condition) != 0 || alchemyModel.IsAlchemyEnoughMaterial(config.condition, out material); } case TaskFeedbackType.SkyTowerFightPoint: { @@ -482,6 +450,10 @@ return false; case 5: return equipStrengthModel.ExistAnySatisfyStrengh(); case 6: Item material; return alchemyModel.GetStoveState(config.condition) != 0 || alchemyModel.IsAlchemyEnoughMaterial(config.condition, out material); default: return true; } System/MainInterfacePanel/TaskType.cs
@@ -64,7 +64,8 @@ case 1://支线 case 2: case 4: case 5: case 5: case 17: this.gameObject.name = "Branch_" + TaskID; break; case 3://本源法宝 System/Vip/FirstTimeRechargeWin.cs
@@ -23,6 +23,7 @@ [SerializeField] Button m_RawImageBtn; [SerializeField] Vector3 Vec3 = new Vector3(30f, 20f, 30f); [SerializeField] Text m_GOTO; [SerializeField] RectTransform m_ContainerTime; [SerializeField] Button m_BGMTime; [SerializeField] GameObject m_Image; [SerializeField] UIEffect m_EffectImage; @@ -30,6 +31,10 @@ Dictionary<int, int> FirstGoldMobsDic = new Dictionary<int, int>();//根据职业展示不同的模型 [Header("旋转角度和选择转速度")] public Vector3 RotateVector = new Vector3(0f, 1f, 0f); [SerializeField] Vector3[] m_Positoins; FirstTimeRechargeModel firstTimeRechargeModel { get { return ModelCenter.Instance.GetModel<FirstTimeRechargeModel>(); } } PlayerMainDate m_MainModel; PlayerMainDate onMainModel { get { return m_MainModel ?? (m_MainModel = ModelCenter.Instance.GetModel<PlayerMainDate>()); } } @@ -74,6 +79,17 @@ m_GOTO.text = Language.Get("ClickToFirstCharge_Z"); } protected override void OnActived() { base.OnActived(); var isDungeon = MapUtility.IsDungeon(PlayerDatas.Instance.baseData.MapID); if (ClientDungeonStageUtility.isClientDungeon) { isDungeon = true; } m_ContainerTime.anchoredPosition = isDungeon ? m_Positoins[1] : m_Positoins[0]; } protected override void OnAfterOpen() { DisplayModel();