Ejemplo n.º 1
0
        // Token: 0x06014DE7 RID: 85479 RVA: 0x00549ABC File Offset: 0x00547CBC
        public void SetEvent(ConfigDataEventInfo eventInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetEventConfigDataEventInfo_hotfix != null)
            {
                this.m_SetEventConfigDataEventInfo_hotfix.call(new object[]
                {
                    this,
                    eventInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (eventInfo == null)
            {
                return;
            }
            this.m_nameText.text         = eventInfo.Name;
            this.m_descText.text         = eventInfo.Desc;
            this.m_monsterLevelText.text = eventInfo.MonsterLevel.ToString();
            this.m_energyText.text       = eventInfo.EnergySuccess.ToString();
            this.m_dangerUIStateController.SetToUIState((!eventInfo.IsDanger) ? "Normal" : "Danger", false, true);
            this.m_missionUIStateController.SetToUIState((!eventInfo.IsDanger) ? "Normal" : "Danger", false, true);
            IConfigDataLoader       configDataLoader        = GameManager.Instance.ConfigDataLoader as IConfigDataLoader;
            ConfigDataCharImageInfo configDataCharImageInfo = configDataLoader.GetConfigDataCharImageInfo(eventInfo.CharImage_ID);

            this.CreateCharImage(configDataCharImageInfo);
        }
Ejemplo n.º 2
0
        // Token: 0x06008B97 RID: 35735 RVA: 0x0028B9B4 File Offset: 0x00289BB4
        public void Initialize(ClientWorld world, ConfigDataEventInfo eventInfo, RandomEvent randomEvent)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_InitializeClientWorldConfigDataEventInfoRandomEvent_hotfix != null)
            {
                this.m_InitializeClientWorldConfigDataEventInfoRandomEvent_hotfix.call(new object[]
                {
                    this,
                    world,
                    eventInfo,
                    randomEvent
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            this.m_clientWorld             = world;
            this.m_eventInfo        = eventInfo;
            this.m_randomEvent      = randomEvent;
            this.m_id               = world.GetNextEntityId();
            this.m_graphicInitScale = (float)eventInfo.ModelScale * 0.01f;
            this.m_graphic          = world.CreateGraphic(eventInfo.Model, this.m_graphicInitScale);
            if (this.m_graphic != null)
            {
                this.m_graphic.SetName("Event_" + eventInfo.ID);
                this.m_graphic.SetRotation(ClientWorldConst.FaceCameraRotation);
                this.m_graphic.SetSortingOrder(2);
            }
            GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(world.EventUIPrefab, world.EventUIRoot.transform, false);

            if (gameObject != null)
            {
                gameObject.name     = "Event_" + eventInfo.ID;
                this.m_uiInitScale  = gameObject.transform.localScale;
                this.m_uiController = GameObjectUtility.AddControllerToGameObject <WorldEventActorUIController>(gameObject);
                this.m_uiController.SetEvent(eventInfo);
                this.m_uiController.EventOnPointerDown += this.OnUIPointerDown;
                this.m_uiController.EventOnPointerUp   += this.OnUIPointerUp;
                this.m_uiController.EventOnClick       += this.OnUIClick;
                gameObject.transform.localRotation      = ClientWorldConst.FaceCameraRotation;
                Canvas canvas = gameObject.AddComponent <Canvas>();
                canvas.overrideSorting = true;
                canvas.sortingOrder    = 2;
                gameObject.AddComponent <GraphicRaycaster>();
            }
            this.PlayAnimation("idle", true);
        }
Ejemplo n.º 3
0
 // Token: 0x060151D5 RID: 86485 RVA: 0x005571AC File Offset: 0x005553AC
 public void SetEventInfo(ConfigDataWaypointInfo waypointInfo, ConfigDataEventInfo eventInfo)
 {
     if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetEventInfoConfigDataWaypointInfoConfigDataEventInfo_hotfix != null)
     {
         this.m_SetEventInfoConfigDataWaypointInfoConfigDataEventInfo_hotfix.call(new object[]
         {
             this,
             waypointInfo,
             eventInfo
         });
         return;
     }
     BJLuaObjHelper.IsSkipLuaHotfix = false;
     this.m_wayPointInfo            = waypointInfo;
     this.m_eventInfo        = eventInfo;
     this.m_titleText.text   = eventInfo.Name;
     this.m_energyText.text  = eventInfo.EnergySuccess.ToString();
     this.m_levelText.text   = eventInfo.MonsterLevel.ToString();
     this.m_iconImage.sprite = AssetUtility.Instance.GetSprite(eventInfo.Icon);
 }
        // Token: 0x06014D99 RID: 85401 RVA: 0x00548A24 File Offset: 0x00546C24
        public void SetEvent(ConfigDataEventInfo eventInfo)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_SetEventConfigDataEventInfo_hotfix != null)
            {
                this.m_SetEventConfigDataEventInfo_hotfix.call(new object[]
                {
                    this,
                    eventInfo
                });
                return;
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            if (eventInfo == null)
            {
                return;
            }
            this.m_eventInfo = eventInfo;
            Vector2    v     = new Vector2(0f, (float)eventInfo.MapIconY);
            GameObject asset = AssetUtility.Instance.GetAsset <GameObject>(eventInfo.MapIcon);

            if (asset != null)
            {
                GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(asset);
                gameObject.transform.localPosition = v;
                gameObject.transform.SetParent(this.m_iconGameObject.transform, false);
                CommonUIStateController component = gameObject.GetComponent <CommonUIStateController>();
                if (component != null)
                {
                    component.SetToUIState("Standby", false, true);
                }
            }
            RectTransform rectTransform = this.m_hitGameObject.transform as RectTransform;

            rectTransform.sizeDelta = new Vector2(rectTransform.sizeDelta.x, v.y + 100f);
            this.SetEnergy(eventInfo.EnergySuccess);
            this.m_testText.gameObject.SetActive(LocalConfig.Instance.Data.IsDeveloper);
            this.m_testText.text = eventInfo.ID.ToString();
        }
Ejemplo n.º 5
0
        // Token: 0x0600403F RID: 16447 RVA: 0x0012AAF0 File Offset: 0x00128CF0
        public int CanPostLevelDanmaku(int gameFunctionTypeId, int locationId, List <PostDanmakuEntry> entries)
        {
            if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_CanPostLevelDanmakuInt32Int32List ` 1_hotfix != null)
            {
                return(Convert.ToInt32(this.m_CanPostLevelDanmakuInt32Int32List ` 1_hotfix.call(new object[]
                {
                    this,
                    gameFunctionTypeId,
                    locationId,
                    entries
                })));
            }
            BJLuaObjHelper.IsSkipLuaHotfix = false;
            int battle_ID;

            switch (gameFunctionTypeId)
            {
            case 9:
            {
                ConfigDataRiftLevelInfo configDataRiftLevelInfo = this.m_configDataLoader.GetConfigDataRiftLevelInfo(locationId);
                if (configDataRiftLevelInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataRiftLevelInfo.Battle_ID;
                break;
            }

            case 10:
            {
                ConfigDataScenarioInfo configDataScenarioInfo = this.m_configDataLoader.GetConfigDataScenarioInfo(locationId);
                if (configDataScenarioInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataScenarioInfo.Battle_ID;
                break;
            }

            case 11:
            {
                ConfigDataEventInfo configDataEventInfo = this.m_configDataLoader.GetConfigDataEventInfo(locationId);
                if (configDataEventInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataEventInfo.Battle_ID;
                break;
            }

            case 12:
            {
                ConfigDataAnikiLevelInfo configDataAnikiLevelInfo = this.m_configDataLoader.GetConfigDataAnikiLevelInfo(locationId);
                if (configDataAnikiLevelInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataAnikiLevelInfo.Battle_ID;
                break;
            }

            case 13:
            {
                ConfigDataThearchyTrialLevelInfo configDataThearchyTrialLevelInfo = this.m_configDataLoader.GetConfigDataThearchyTrialLevelInfo(locationId);
                if (configDataThearchyTrialLevelInfo == null)
                {
                    return(-2701);
                }
                battle_ID = configDataThearchyTrialLevelInfo.Battle_ID;
                break;
            }

            default:
                if (gameFunctionTypeId != 41)
                {
                    if (gameFunctionTypeId != 42)
                    {
                        if (gameFunctionTypeId != 56)
                        {
                            if (gameFunctionTypeId != 57)
                            {
                                if (gameFunctionTypeId != 79)
                                {
                                    if (gameFunctionTypeId != 80)
                                    {
                                        if (gameFunctionTypeId != 28)
                                        {
                                            if (gameFunctionTypeId != 51)
                                            {
                                                return(-2700);
                                            }
                                            ConfigDataHeroTrainningLevelInfo configDataHeroTrainningLevelInfo = this.m_configDataLoader.GetConfigDataHeroTrainningLevelInfo(locationId);
                                            if (configDataHeroTrainningLevelInfo == null)
                                            {
                                                return(-2701);
                                            }
                                            battle_ID = configDataHeroTrainningLevelInfo.Battle_ID;
                                        }
                                        else
                                        {
                                            ConfigDataHeroDungeonLevelInfo configDataHeroDungeonLevelInfo = this.m_configDataLoader.GetConfigDataHeroDungeonLevelInfo(locationId);
                                            if (configDataHeroDungeonLevelInfo == null)
                                            {
                                                return(-2701);
                                            }
                                            battle_ID = configDataHeroDungeonLevelInfo.Battle_ID;
                                        }
                                    }
                                    else
                                    {
                                        ConfigDataScoreLevelInfo configDataScoreLevelInfo = this.m_configDataLoader.GetConfigDataScoreLevelInfo(locationId);
                                        if (configDataScoreLevelInfo == null)
                                        {
                                            return(-2701);
                                        }
                                        battle_ID = configDataScoreLevelInfo.Battle_ID;
                                    }
                                }
                                else
                                {
                                    ConfigDataChallengeLevelInfo configDataChallengeLevelInfo = this.m_configDataLoader.GetConfigDataChallengeLevelInfo(locationId);
                                    if (configDataChallengeLevelInfo == null)
                                    {
                                        return(-2701);
                                    }
                                    battle_ID = configDataChallengeLevelInfo.Battle_ID;
                                }
                            }
                            else
                            {
                                ConfigDataCooperateBattleLevelInfo configDataCooperateBattleLevelInfo = this.m_configDataLoader.GetConfigDataCooperateBattleLevelInfo(locationId);
                                if (configDataCooperateBattleLevelInfo == null)
                                {
                                    return(-2701);
                                }
                                battle_ID = configDataCooperateBattleLevelInfo.Battle_ID;
                            }
                        }
                        else
                        {
                            ConfigDataHeroPhantomLevelInfo configDataHeroPhantomLevelInfo = this.m_configDataLoader.GetConfigDataHeroPhantomLevelInfo(locationId);
                            if (configDataHeroPhantomLevelInfo == null)
                            {
                                return(-2701);
                            }
                            battle_ID = configDataHeroPhantomLevelInfo.Battle_ID;
                        }
                    }
                    else
                    {
                        ConfigDataMemoryCorridorLevelInfo configDataMemoryCorridorLevelInfo = this.m_configDataLoader.GetConfigDataMemoryCorridorLevelInfo(locationId);
                        if (configDataMemoryCorridorLevelInfo == null)
                        {
                            return(-2701);
                        }
                        battle_ID = configDataMemoryCorridorLevelInfo.Battle_ID;
                    }
                }
                else
                {
                    ConfigDataTreasureLevelInfo configDataTreasureLevelInfo = this.m_configDataLoader.GetConfigDataTreasureLevelInfo(locationId);
                    if (configDataTreasureLevelInfo == null)
                    {
                        return(-2701);
                    }
                    battle_ID = configDataTreasureLevelInfo.Battle_ID;
                }
                break;
            }
            ConfigDataBattleInfo configDataBattleInfo = this.m_configDataLoader.GetConfigDataBattleInfo(battle_ID);
            int num = 0;

            foreach (PostDanmakuEntry postDanmakuEntry in entries)
            {
                if (postDanmakuEntry.Turn > configDataBattleInfo.TurnMax)
                {
                    return(-2702);
                }
                if (postDanmakuEntry.Turn <= num)
                {
                    return(-2703);
                }
                num = postDanmakuEntry.Turn;
            }
            return(0);
        }