Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| New file |
| | |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | |
| | | // A9 04 查询boss信息 #tagCGQueryBossInfo |
| | | |
| | | public class CA904_tagCGQueryBossInfo : GameNetPackBasic |
| | | { |
| | | public byte Count; //数量 |
| | | public uint[] BossIDList; //boosid |
| | | |
| | | public CA904_tagCGQueryBossInfo() |
| | | { |
| | | combineCmd = (ushort)0x1801; |
| | | _cmd = (ushort)0xA904; |
| | | } |
| | | |
| | | public override void WriteToBytes() |
| | | { |
| | | WriteBytes(Count, NetDataType.BYTE); |
| | | WriteBytes(BossIDList, NetDataType.DWORD, Count); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e8252f9152b018e4596b3d11fc2e9e12 |
| | | timeCreated: 1544085662 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 722e5e3d30096674e811f5bd191246a0 |
| | | folderAsset: yes |
| | | timeCreated: 1539228128 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a545fb3dcf719304fa74180c10219375 |
| | | folderAsset: yes |
| | | timeCreated: 1542357825 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | [SerializeField] TimerBehaviour m_RebornTime;
|
| | | [SerializeField] Text m_Alive;
|
| | | [SerializeField] Text m_RebornAtOnce;
|
| | | [SerializeField] RebornRightNowBossInfoQuery m_BossInfoQuery;
|
| | |
|
| | | int bossId = 0;
|
| | | FindPreciousModel model { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
|
| | |
| | | var config = Config.Instance.Get<NPCConfig>(bossId);
|
| | | m_Level.text = Language.Get("Z1024", config.NPCLV);
|
| | |
|
| | | m_BossInfoQuery.bossId = bossId;
|
| | | OnBossInfoUpdate(bossId);
|
| | | model.bossInfoUpdateEvent -= OnBossInfoUpdate;
|
| | | model.bossInfoUpdateEvent += OnBossInfoUpdate;
|
| | |
|
| | | m_MoveTo.RemoveAllListeners();
|
| | |
| | | var behaviour = behaviours[i];
|
| | | if (i < bosses.Count)
|
| | | {
|
| | | behaviour.Dispose();
|
| | | behaviour.Display(bosses[i], OnMoveToBoss);
|
| | | behaviour.gameObject.SetActive(true);
|
| | | }
|
| | |
| | | base.Display(_data);
|
| | | bossId = (int)_data;
|
| | |
|
| | | var bossInfoQuery = this.AddMissingComponent<RebornRightNowBossInfoQuery>();
|
| | | bossInfoQuery.bossId = bossId;
|
| | | findPreciousModel.bossSubscribeChangeEvent -= OnSubscribe;
|
| | | findPreciousModel.bossSubscribeChangeEvent += OnSubscribe;
|
| | | findPreciousModel.bossInfoUpdateEvent -= OnBossInfoUpdate;
|
| | |
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | }
|
| | |
|
| | | public void RequestQueryBossInfo(int bossId)
|
| | | {
|
| | | var sendInfo = new CA904_tagCGQueryBossInfo();
|
| | | sendInfo.Count = 1;
|
| | | sendInfo.BossIDList = new uint[] { (uint)bossId };
|
| | | GameNetSystem.Instance.SendInfo(sendInfo);
|
| | | }
|
| | |
|
| | | public void OnPreciousDropRecordUpdate(HA003_tagUniversalGameRecInfo _serverInfo)
|
| | | {
|
| | | if (_serverInfo.Type != 25)
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, December 06, 2018 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI |
| | | { |
| | | |
| | | public class RebornRightNowBossInfoQuery : MonoBehaviour |
| | | { |
| | | public int bossId { get; set; } |
| | | |
| | | FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } } |
| | | bool isRebornRightNow { |
| | | get { |
| | | FindPreciousModel.BossInfo bossInfo = null; |
| | | if (findPreciousModel.TryGetBossInfo(bossId, out bossInfo)) |
| | | { |
| | | return !findPreciousModel.IsBossAlive(bossId) && TimeUtility.ServerNow > bossInfo.refreshTime; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | | |
| | | float rebornRightNowBossQueryTime = 0f; |
| | | private void OnEnable() |
| | | { |
| | | rebornRightNowBossQueryTime = 0f; |
| | | } |
| | | |
| | | private void LateUpdate() |
| | | { |
| | | if (Time.realtimeSinceStartup > rebornRightNowBossQueryTime) |
| | | { |
| | | if (isRebornRightNow) |
| | | { |
| | | rebornRightNowBossQueryTime = Time.realtimeSinceStartup + 5f; |
| | | findPreciousModel.RequestQueryBossInfo(bossId); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: f4bfabd35e5383641b417cc69d91d52f |
| | | timeCreated: 1544086386 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | |
|
| | | IEnumerator WaitAddTask(int MissionID, int MissionState)
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS800;//缓冲一秒再进行
|
| | | yield return WaitingForSecondConst.WaitMS300;//缓冲0.3秒再进行
|
| | | var inDungeon = IsDungeon();
|
| | | TaskScheduling();
|
| | | if (WindowCenter.Instance.IsOpen<MainInterfaceWin>() && !inDungeon)
|
| | |
| | | case PromoteDetailType.GodWeapon:
|
| | | return magicianModel.magicianRedpoint.state == RedPointState.Simple;
|
| | | case PromoteDetailType.TreasurePotential:
|
| | | for (int k = 1; k < (int)TreasureCategory.Zerg; k++)
|
| | | var list = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | | for (int j = 0; j < list.Count; j++)
|
| | | {
|
| | | var list = treasureModel.GetTreasureCategory((TreasureCategory)k);
|
| | | if (list != null)
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(list[j], out treasure) && treasure.state == TreasureState.Collected
|
| | | && treasure.skillLevelUpRedpoint != null && treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | for (int j = 0; j < list.Count; j++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(list[j], out treasure) && treasure.state == TreasureState.Collected
|
| | | && treasure.skillLevelUpRedpoint != null && treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | return true;
|
| | | }
|
| | | }
|
| | | return true;
|
| | | }
|
| | | }
|
| | | break;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | TreasureModel treasureModel
|
| | | {
|
| | | get { return ModelCenter.Instance.GetModel<TreasureModel>(); }
|
| | | }
|
| | |
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | | WindowCenter.Instance.Open<RolePanel>(false, 3);
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.TreasurePotential:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.Treasure);
|
| | | treasureModel.currentCategory = TreasureCategory.Human;
|
| | | var list = treasureModel.GetTreasureCategory(TreasureCategory.Human);
|
| | | var gotoId = list[0];
|
| | | for (int i = 0; i < list.Count; i++)
|
| | | {
|
| | | Treasure treasure;
|
| | | if (treasureModel.TryGetTreasure(list[i], out treasure))
|
| | | {
|
| | | if (treasure.state == TreasureState.Collected && treasure.skillLevelUpRedpoint != null &&
|
| | | treasure.skillLevelUpRedpoint.state == RedPointState.Simple)
|
| | | {
|
| | | gotoId = list[i];
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | treasureModel.selectedTreasure = gotoId;
|
| | | WindowCenter.Instance.Open<TreasureBaseWin>();
|
| | | break;
|
| | | case RolePromoteModel.PromoteDetailType.RolePromote:
|
| | | WindowCenter.Instance.Open<RolePromoteWin>();
|
| | |
| | | [SerializeField] TimerBehaviour m_TimeBehaviour;
|
| | | [SerializeField] Text m_RebornTime;
|
| | | [SerializeField] Text m_NpcAppearTxt;
|
| | | [SerializeField] RebornRightNowBossInfoQuery m_BossInfoQuery;
|
| | | [SerializeField] Text m_FuncTxt;
|
| | |
|
| | | bool secondTextInited = false;
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | m_BossInfoQuery.bossId = npcId;
|
| | | FindPreciousModel.BossInfo _bossInfo;
|
| | | if (findPreciousModel.TryGetBossInfo(npcId, out _bossInfo))
|
| | | {
|
| | | m_RebornTime.gameObject.SetActive(true);
|
| | | (m_TimeBehaviour as TimerToChsBehaviour).addtionInfo = Language.Get("BossReborn_RefreshTime");
|
| | | m_TimeBehaviour.Begin( (int)(_bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds, () =>
|
| | | {
|
| | | m_NpcAppearTxt.gameObject.SetActive(true);
|
| | | });
|
| | | m_TimeBehaviour.Begin((int)(_bossInfo.refreshTime - TimeUtility.ServerNow).TotalSeconds, () =>
|
| | | {
|
| | | m_NpcAppearTxt.gameObject.SetActive(true);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | m_RebornTime.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | m_NpcAppearTxt.gameObject.SetActive(!m_RebornTime.gameObject.activeSelf);
|
| | | }
|
| | |
|