Example #1
0
    // Token: 0x0600118C RID: 4492 RVA: 0x001EBF7C File Offset: 0x001EA17C
    public void ShowManorGuild(ushort ManorID)
    {
        if (this.GuideManorID == ManorID && this.GuideBuildID == GUIManager.Instance.BuildingData.AllBuildsData[(int)ManorID].BuildID)
        {
            this.GuildPoint.enabled = true;
            return;
        }
        this.GuideManorID = ManorID;
        this.GuideBuildID = GUIManager.Instance.BuildingData.AllBuildsData[(int)ManorID].BuildID;
        BuildManorData recordByKey = DataManager.Instance.BuildManorData.GetRecordByKey(ManorID);
        float          x;
        float          num;
        float          z;

        if (GUIManager.Instance.BuildingData.AllBuildsData[(int)ManorID].BuildID == 0)
        {
            x   = ((recordByKey.mPosionX <= 30000) ? ((float)recordByKey.mPosionX) : ((float)recordByKey.mPosionX - 65535f)) * 0.01f;
            num = ((recordByKey.mPosionY <= 32768) ? ((float)recordByKey.mPosionY) : ((float)recordByKey.mPosionY - 65535f)) * 0.01f;
            z   = ((recordByKey.mPosionZ <= 32768) ? ((float)recordByKey.mPosionZ) : ((float)recordByKey.mPosionZ - 65535f)) * 0.01f;
        }
        else
        {
            x   = ((recordByKey.bPosionX <= 30000) ? ((float)recordByKey.bPosionX) : ((float)recordByKey.bPosionX - 65535f)) * 0.01f;
            num = ((recordByKey.bPosionY <= 32768) ? ((float)recordByKey.bPosionY) : ((float)recordByKey.bPosionY - 65535f)) * 0.01f;
            z   = ((recordByKey.bPosionZ <= 32768) ? ((float)recordByKey.bPosionZ) : ((float)recordByKey.bPosionZ - 65535f)) * 0.01f;
        }
        if (GUIManager.Instance.BuildingData.AllBuildsData[(int)ManorID].BuildID == 8)
        {
            this.GuildPosY = 35f;
            num            = 18f;
        }
        else if (GUIManager.Instance.BuildingData.AllBuildsData[(int)ManorID].BuildID == 0)
        {
            num = (this.GuildPosY = num + 6f);
        }
        else
        {
            num = (this.GuildPosY = num + (GUIManager.Instance.BuildingData.GetBuildSprite(this.GuideBuildID, GUIManager.Instance.BuildingData.AllBuildsData[(int)ManorID].Level).rect.height - 32f) / 8f);
        }
        this.GuildPoint.transform.position = new Vector3(x, num, z);
        this.GuildPoint.enabled            = true;
    }
Example #2
0
    // Token: 0x06001186 RID: 4486 RVA: 0x001EB4E4 File Offset: 0x001E96E4
    public void Initial()
    {
        bool flag = DataManager.StageDataController._stageMode == StageMode.Dare;

        if (flag && this.Type == WorldMode.OpenUp)
        {
            this.mapspriteManager.LoadChallegeFrame();
        }
        byte b = 0;

        while ((ushort)b < this.BuildSpritesMax)
        {
            if (this.Type == WorldMode.Wild)
            {
                if (this.Builds[(int)b] == null)
                {
                    this.Builds[(int)b] = new Build();
                }
                BuildManorData recordByIndex = DataManager.Instance.BuildManorData.GetRecordByIndex((int)GUIManager.Instance.BuildingData.GetMonorIndex((int)b));
                this.Builds[(int)b].Index     = recordByIndex.ID;
                this.SpriteGameObject[(int)b] = this.Builds[(int)b].InitialSprite(this.mapspriteManager);
                this.SpriteGameObject[(int)b].transform.parent.SetParent(this.MapSpriteRoot.transform);
                BuildsData buildingData = GUIManager.Instance.BuildingData;
                if (buildingData.AllBuildsData[(int)recordByIndex.ID].BuildID == 18)
                {
                    Build build = this.Builds[(int)b] as Build;
                    this.JailNoticeIcon = build.spriteRender.gameObject.GetComponent <JailBuildNotice>();
                    if (this.JailNoticeIcon == null)
                    {
                        this.JailNoticeIcon = build.spriteRender.gameObject.AddComponent <JailBuildNotice>();
                        this.JailNoticeIcon.Init(this.mapspriteManager);
                    }
                }
            }
            else
            {
                if (this.Builds[(int)b] == null)
                {
                    if (flag)
                    {
                        this.Builds[(int)b] = new ChallengeCampaign();
                    }
                    else
                    {
                        this.Builds[(int)b] = new Campaign();
                    }
                }
                this.Builds[(int)b].Index     = (ushort)((b + 1) * 3);
                this.SpriteGameObject[(int)b] = this.Builds[(int)b].InitialSprite(this.mapspriteManager);
                this.SpriteGameObject[(int)b].transform.SetParent(this.MapSpriteRoot.transform);
            }
            b += 1;
        }
        if (this.Type == WorldMode.Wild)
        {
            this.HeroBuild.Index   = 100;
            this.ArenaBuild.Index  = 101;
            this.DugoutBuild.Index = 102;
            this.Fortress.Index    = 103;
            this.BlackMarket.Index = 104;
            this.Laboratory.Index  = 105;
            this.Carsino.Index     = 106;
            this.SpriteGameObject[this.SpriteGameObject.Length - 7] = this.Carsino.InitialSprite(this.mapspriteManager);
            this.SpriteGameObject[this.SpriteGameObject.Length - 6] = this.Laboratory.InitialSprite(this.mapspriteManager);
            this.SpriteGameObject[this.SpriteGameObject.Length - 5] = this.BlackMarket.InitialSprite(this.mapspriteManager);
            this.SpriteGameObject[this.SpriteGameObject.Length - 4] = this.Fortress.InitialSprite(this.mapspriteManager);
            this.SpriteGameObject[this.SpriteGameObject.Length - 3] = this.DugoutBuild.InitialSprite(this.mapspriteManager);
            this.SpriteGameObject[this.SpriteGameObject.Length - 2] = this.HeroBuild.InitialSprite(this.mapspriteManager);
            this.SpriteGameObject[this.SpriteGameObject.Length - 1] = this.ArenaBuild.InitialSprite(this.mapspriteManager);
            if (GUIManager.Instance.BuildingData.BuildingManorID > 0)
            {
                this.UpdateMapSprite(GUIManager.Instance.BuildingData.BuildingManorID, 2);
            }
            this.InitLock();
            this.UpdateDiamon();
        }
        this.GuideManorID = 0;
        this.GuideBuildID = 0;
    }
Example #3
0
    // Token: 0x060009CD RID: 2509 RVA: 0x000CDCA8 File Offset: 0x000CBEA8
    public override void OnOpen(int arg1, int arg2)
    {
        this.m_transform = base.transform;
        Font ttffont = this.GM.GetTTFFont();

        if (this.GM.bOpenOnIPhoneX)
        {
            ((RectTransform)this.m_transform).offsetMin = new Vector2(-this.GM.IPhoneX_DeltaX, 0f);
            ((RectTransform)this.m_transform).offsetMax = new Vector2(this.GM.IPhoneX_DeltaX, 0f);
        }
        int index = -1;
        int num   = -1;

        this.GM.BuildingData.GetManorGroup((ushort)arg1, ref index, ref num);
        BuildManorData recordByIndex = this.DM.BuildManorData.GetRecordByIndex(index);

        if (recordByIndex.Kind < 1 || recordByIndex.Kind > 6)
        {
            return;
        }
        uint id;

        if (recordByIndex.MapGroup == 8)
        {
            this.ShowKind[0] = 3;
            this.ShowKind[1] = 6;
            id = 12105u;
        }
        else
        {
            this.ShowKind[0] = (ushort)recordByIndex.Kind;
            if (this.ShowKind[0] == 1)
            {
                id = 4065u;
            }
            else if (this.ShowKind[0] == 2)
            {
                id = 4066u;
            }
            else
            {
                id = 4067u;
            }
        }
        this.Back01T   = this.m_transform.GetChild(0);
        this.TitleImgT = this.m_transform.GetChild(1);
        this.Back02T   = this.m_transform.GetChild(2);
        this.Back03T   = this.m_transform.GetChild(3);
        this.Back04T   = this.m_transform.GetChild(4);
        for (int i = 0; i < 10; i++)
        {
            if (i < 5)
            {
                this.BuildingT[i] = this.Back03T.GetChild(i);
            }
            else
            {
                this.BuildingT[i] = this.Back04T.GetChild(i - 5);
            }
            this.BuildingImage[i]                          = this.BuildingT[i].GetChild(0).GetComponent <Image>();
            this.BuildingImage[i].material                 = this.GM.BuildingData.mapspriteManager.SpriteUIMaterial;
            this.BuildingImage[i].preserveAspect           = true;
            this.BuildingImage[i].rectTransform.localScale = new Vector3(0.9f, 0.9f, 0.9f);
            this.BuildingText[i]      = this.BuildingT[i].GetChild(1).GetComponent <UIText>();
            this.BuildingText[i].font = ttffont;
        }
        this.TitleText01T   = this.m_transform.GetChild(5);
        this.RBText[0]      = this.TitleText01T.GetComponent <UIText>();
        this.RBText[0].text = this.DM.mStringTable.GetStringByID(3810u);
        this.RBText[0].font = ttffont;
        this.TitleText02T   = this.m_transform.GetChild(6);
        this.RBText[1]      = this.TitleText02T.GetComponent <UIText>();
        this.RBText[1].text = this.DM.mStringTable.GetStringByID((uint)recordByIndex.ChapterID);
        this.RBText[1].font = ttffont;
        this.TitleText03T   = this.m_transform.GetChild(7);
        this.RBText[2]      = this.TitleText03T.GetComponent <UIText>();
        this.RBText[2].text = this.DM.mStringTable.GetStringByID(id);
        this.RBText[2].font = ttffont;
        this.CloseBtnT      = this.m_transform.GetChild(8);
        this.CloseBtnT.GetComponent <UIButton>().m_Handler = this;
        int num2 = 0;

        for (int j = 0; j < this.ShowKind.Length; j++)
        {
            if (this.ShowKind[j] != 0)
            {
                ushort[] array = this.BuildID[(int)(this.ShowKind[j] - 1)];
                int      num3  = 0;
                while (num3 < array.Length && num2 < 10)
                {
                    BuildTypeData recordByKey = this.DM.BuildsTypeData.GetRecordByKey(array[num3]);
                    if (recordByKey.BuildID == array[num3])
                    {
                        if (this.ShowKind[j] < 3 || this.ShowKind[j] > 6 || (this.GM.BuildingData.GetBuildNumByID(array[num3]) <= 0 && this.GM.BuildingData.AllBuildsData[(int)this.GM.BuildingData.BuildingManorID].BuildID != array[num3]))
                        {
                            this.BuildingText[num2].text    = this.DM.mStringTable.GetStringByID((uint)recordByKey.NameID);
                            this.BuildingImage[num2].sprite = this.GM.BuildingData.GetBuildSprite(array[num3], 1);
                            UIButtonHint uibuttonHint = this.BuildingImage[num2].gameObject.AddComponent <UIButtonHint>();
                            uibuttonHint.m_eHint   = EUIButtonHint.DownUpHandler;
                            uibuttonHint.m_Handler = this;
                            uibuttonHint.Parm1     = recordByKey.StringID;
                            this.BuildingImage[num2].gameObject.AddComponent <ArabicItemTextureRot>();
                            this.BuildingT[num2].gameObject.SetActive(true);
                            num2++;
                        }
                    }
                    num3++;
                }
            }
        }
        if (num2 > 5)
        {
            this.Back04T.gameObject.SetActive(true);
            Vector2 b = new Vector2(0f, 72f);
            ((RectTransform)this.TitleImgT).anchoredPosition    += b;
            ((RectTransform)this.Back02T).anchoredPosition      += b;
            ((RectTransform)this.Back03T).anchoredPosition      += b;
            ((RectTransform)this.Back04T).anchoredPosition      += b;
            ((RectTransform)this.TitleText01T).anchoredPosition += b;
            ((RectTransform)this.TitleText02T).anchoredPosition += b;
            ((RectTransform)this.TitleText03T).anchoredPosition += b;
            ((RectTransform)this.CloseBtnT).anchoredPosition    += b;
            b.Set(0f, 144f);
            ((RectTransform)this.Back01T).sizeDelta += b;
        }
        else if (num2 > 0 && num2 < 5)
        {
            int     num4 = 640 / num2;
            Vector2 zero = Vector2.zero;
            for (int k = 0; k < num2; k++)
            {
                zero.Set((float)(-320 + num4 * (k + 1)) - (float)num4 * 0.5f, 0f);
                ((RectTransform)this.BuildingT[k]).anchoredPosition = zero;
            }
        }
        Door door = this.GM.FindMenu(EGUIWindow.Door) as Door;

        if (door != null)
        {
            door.HideFightButton();
        }
    }
Example #4
0
 // Token: 0x060012B9 RID: 4793 RVA: 0x0020CA2C File Offset: 0x0020AC2C
 public void PlayEffect(bool isFireWork)
 {
     if (isFireWork)
     {
         BuildManorData recordByKey = DataManager.Instance.BuildManorData.GetRecordByKey(0);
         float          x           = ((recordByKey.bPosionX <= 30000) ? ((float)recordByKey.bPosionX) : ((float)recordByKey.bPosionX - 65535f)) * 0.01f;
         float          num         = ((recordByKey.bPosionY <= 32768) ? ((float)recordByKey.bPosionY) : ((float)recordByKey.bPosionY - 65535f)) * 0.01f;
         float          num2        = ((recordByKey.bPosionZ <= 32768) ? ((float)recordByKey.bPosionZ) : ((float)recordByKey.bPosionZ - 65535f)) * 0.01f;
         if (this.EffectGameObject != null)
         {
             ParticleManager.Instance.DeSpawn(this.EffectGameObject);
         }
         this.EffectGameObject = ParticleManager.Instance.Spawn(358, null, new Vector3(x, num + 40f, num2 + 20f), 2f, true, false, true);
         Quaternion localRotation = this.EffectGameObject.transform.localRotation;
         localRotation.eulerAngles = new Vector3(0f, 180f, 0f);
         this.EffectGameObject.transform.localRotation = localRotation;
     }
     else
     {
         float[,] array = new float[, ]
         {
             {
                 -48f,
                 19f,
                 0f,
                 3f
             },
             {
                 -75f,
                 13f,
                 13f,
                 2f
             },
             {
                 16f,
                 16f,
                 10.5f,
                 2f
             },
             {
                 -15.8f,
                 16f,
                 21.5f,
                 2f
             },
             {
                 -64f,
                 12.7f,
                 41.3f,
                 1f
             },
             {
                 31f,
                 11f,
                 33.3f,
                 1f
             },
             {
                 22f,
                 10.2f,
                 53.5f,
                 2f
             }
         };
         for (int i = 0; i < 7; i++)
         {
             if (this.FireEffectGameObject[i] != null)
             {
                 ParticleManager.Instance.DeSpawn(this.FireEffectGameObject[i]);
             }
             this.FireEffectGameObject[i] = ParticleManager.Instance.Spawn(370, null, new Vector3(array[i, 0], array[i, 1], array[i, 2]), array[i, 3], true, false, true);
             Quaternion localRotation2 = this.FireEffectGameObject[i].transform.localRotation;
             localRotation2.eulerAngles = new Vector3(0f, 180f, 0f);
             this.FireEffectGameObject[i].transform.localRotation = localRotation2;
         }
     }
 }
Example #5
0
    // Token: 0x06002194 RID: 8596 RVA: 0x004003B4 File Offset: 0x003FE5B4
    public void Renew(byte[] Subject, byte[] meg)
    {
        GAME_PLAYER_NEWS game_PLAYER_NEWS = (GAME_PLAYER_NEWS)Subject[0];

        switch (game_PLAYER_NEWS)
        {
        case GAME_PLAYER_NEWS.Network_Update:
        {
            NetworkNews networkNews = (NetworkNews)Subject[1];
            if (networkNews != NetworkNews.Login)
            {
                if (networkNews == NetworkNews.Refresh_Hospital || networkNews == NetworkNews.Refresh_Trap)
                {
                    DataManager.msgBuffer[0] = 9;
                    this.notifyNews(DataManager.msgBuffer);
                }
            }
            else if (this.WorldInputLockCount > 0)
            {
                for (int i = 0; i < this.WorldInputLockCount; i++)
                {
                    GUIManager.Instance.ShowUILock(EUILock.Normal);
                }
            }
            break;
        }

        default:
            if (game_PLAYER_NEWS == GAME_PLAYER_NEWS.ORIGIN_CameraReSetPressPosition)
            {
                this.cameraController.ReSetPressPosition();
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_DoorOpenUp:
        case GAME_PLAYER_NEWS.ORIGIN_WildOpenUp:
        {
            DataManager.msgBuffer[0] = 12;
            this.notifyNews(DataManager.msgBuffer);
            DataManager.Instance.WorldCameraPos   = Camera.main.transform.position;
            DataManager.Instance.WorldCameraLimit = this.cameraController.Limit;
            DataManager.Instance.bWorldF          = false;
            byte leveL = (DataManager.StageDataController._stageMode == StageMode.Corps) ? ((byte)(DataManager.StageDataController.StageRecord[2] + 1)) : DataManager.StageDataController.currentChapterID;
            this.cameraController.SetCameraState(CameraState.Area, leveL, true);
            AudioManager.Instance.PlayUISFX(UIKind.ArmyExpewdition);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_DoorWild:
            if (this.nextWorldMode == WorldMode.OpenUp)
            {
                DataManager.Instance.bWorldF = true;
                if (DataManager.StageDataController._stageMode == StageMode.Corps)
                {
                    DataManager.msgBuffer[0] = 2;
                    this.notifyNews(DataManager.msgBuffer);
                }
                else
                {
                    GUIManager.Instance.pDVMgr.NextTransitions(eTrans.BEGIN, eTransFunc.DoorWild);
                }
                GUIManager.Instance.m_HUDMessage.MapHud.ThisTransform.gameObject.SetActive(false);
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_DoorNext:
            if (this.nextWorldMode == WorldMode.OpenUp)
            {
                StageManager stageDataController = DataManager.StageDataController;
                stageDataController.currentChapterID          += 1;
                DataManager.StageDataController.currentPointID = (ushort)(DataManager.StageDataController.currentChapterID - 1) * GameConstants.StagePointNum[(int)DataManager.StageDataController._stageMode] + 1;
                DataManager.StageDataController.SaveUserStage(DataManager.StageDataController._stageMode);
                DataManager.Instance.lastBattleResult = -1;
                this.cameraController.SetCameraPos((int)DataManager.StageDataController.currentChapterID);
                DataManager.msgBuffer[0] = 6;
                this.notifyNews(DataManager.msgBuffer);
                GUIManager.Instance.m_HUDMessage.MapHud.AddChapterMsg();
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_DoorLast:
            if (this.nextWorldMode == WorldMode.OpenUp)
            {
                StageManager stageDataController2 = DataManager.StageDataController;
                stageDataController2.currentChapterID         -= 1;
                DataManager.StageDataController.currentPointID = (ushort)DataManager.StageDataController.currentChapterID * GameConstants.StagePointNum[(int)DataManager.StageDataController._stageMode];
                DataManager.StageDataController.SaveUserStage(DataManager.StageDataController._stageMode);
                DataManager.Instance.lastBattleResult = -1;
                this.cameraController.SetCameraPos((int)DataManager.StageDataController.currentChapterID);
                DataManager.msgBuffer[0] = 6;
                this.notifyNews(DataManager.msgBuffer);
                GUIManager.Instance.m_HUDMessage.MapHud.AddChapterMsg();
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CameraOpenUp:
            if (DataManager.StageDataController._stageMode != StageMode.Corps || DataManager.StageDataController.isNotFirstInChapter[2] == 1)
            {
                this.SwitchWorldMode(WorldMode.OpenUp);
                DataManager.msgBuffer[0] = 14;
                GameManager.notifyObservers(1, 0, DataManager.msgBuffer);
                GUIManager.Instance.m_HUDMessage.MapHud.AddChapterMsg();
                GUIManager.Instance.m_HUDMessage.MapHud.ShowMsg();
                GUIManager.Instance.m_HUDMessage.MapHud.ShowTime = 0.8f;
                GUIManager.Instance.m_HUDMessage.MapHud.StartCountdown();
                this.WorldUIQueueLockRelease();
            }
            else
            {
                DataManager.msgBuffer[0] = 47;
                GameManager.notifyObservers(1, 0, DataManager.msgBuffer);
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CameraWild:
            if (DataManager.StageDataController._stageMode == StageMode.Corps)
            {
                this.cameraController.Limit    = DataManager.Instance.WorldCameraLimit;
                this.cameraController.TmpV3Pos = DataManager.Instance.WorldCameraPos;
                this.cameraController.SetCameraState(CameraState.World, 0, false);
            }
            else if (DataManager.StageDataController._stageMode == StageMode.Count)
            {
                this.cameraController.SetCameraState(CameraState.World, 0, false);
                GUIManager.Instance.pDVMgr.NextTransitions(eTrans.END, eTransFunc.Max);
            }
            else
            {
                DataManager.Instance.WorldCameraLimit = 0f;
                this.cameraController.SetCamerPos_Out();
                GUIManager.Instance.pDVMgr.NextTransitions(eTrans.END, eTransFunc.Max);
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CameraForce:
            if (DataManager.StageDataController._stageMode == StageMode.Corps && DataManager.StageDataController.isNotFirstInChapter[2] == 0)
            {
                this.cloudController.MapClick();
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CloudOpenUp:
            this.SwitchWorldMode(WorldMode.OpenUp);
            DataManager.msgBuffer[0] = 14;
            GameManager.notifyObservers(1, 0, DataManager.msgBuffer);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_LockInput:
            this.worldflag |= 1;
            break;

        case GAME_PLAYER_NEWS.ORIGIN_UnLockInput:
            this.worldflag &= -2;
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CloseStageStory:
        case GAME_PLAYER_NEWS.ORIGIN_CloseTreasureInfo:
            if (DataManager.StageDataController.isNotFirstInChapter[(int)DataManager.StageDataController._stageMode] == 0)
            {
                if (DataManager.StageDataController._stageMode == StageMode.Corps)
                {
                    this.worldflag |= 4;
                    if (DataManager.StageDataController.StageRecord[2] == 2 && DataManager.StageDataController.StageRecord[1] == 0 && DataManager.StageDataController.StageRecord[0] == 18)
                    {
                        this.worldflag |= 2;
                    }
                }
                else if ((ushort)(DataManager.StageDataController.currentChapterID + 1) * GameConstants.LinePointNum[(int)DataManager.StageDataController._stageMode] < DataManager.StageDataController.limitRecord[(int)DataManager.StageDataController._stageMode])
                {
                    StageManager stageDataController3 = DataManager.StageDataController;
                    stageDataController3.currentChapterID += 1;
                }
                DataManager.DataBuffer[0] = 4;
                this.Renew(DataManager.DataBuffer, null);
                if (Subject[0] == 39)
                {
                    this.WorldUIQueueLockRelease();
                }
            }
            else if (DataManager.StageDataController.StageRecord[(int)DataManager.StageDataController._stageMode] == DataManager.StageDataController.limitRecord[(int)DataManager.StageDataController._stageMode])
            {
                if (DataManager.StageDataController._stageMode == StageMode.Corps)
                {
                    this.worldflag |= 4;
                }
                DataManager.DataBuffer[0] = 4;
                this.Renew(DataManager.DataBuffer, null);
                if (Subject[0] == 39)
                {
                    this.WorldUIQueueLockRelease();
                }
            }
            else
            {
                if (DataManager.StageDataController._stageMode == StageMode.Full && DataManager.StageDataController.StageRecord[0] == 18)
                {
                    this.worldflag |= 2;
                }
                DataManager.DataBuffer[0] = 0;
                DataManager.DataBuffer[1] = 1;
                this.notifyObservers(DataManager.DataBuffer, null);
                DataManager.msgBuffer[0] = 13;
                this.notifyNews(DataManager.msgBuffer);
                this.worldState = TickSubject.Ready;
                if (DataManager.StageDataController._stageMode == StageMode.Full || DataManager.StageDataController._stageMode == StageMode.Lean)
                {
                    this.WorldUIQueueLockRelease();
                }
            }
            GUIManager.Instance.m_HUDMessage.MapHud.AddChapterMsg();
            if (DataManager.StageDataController._stageMode != StageMode.Corps || this.nextWorldMode == WorldMode.OpenUp)
            {
                GUIManager.Instance.m_HUDMessage.MapHud.ShowMsg();
            }
            GUIManager.Instance.m_HUDMessage.MapHud.ShowTime = 0.8f;
            GUIManager.Instance.m_HUDMessage.MapHud.StartCountdown();
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CameraStateWild:
            if ((this.worldflag & 4) != 0)
            {
                this.worldflag &= -5;
                GUIManager.Instance.OpenMenu(EGUIWindow.UI_NewTerritory, (int)DataManager.StageDataController.StageRecord[2], 0, false, true, false);
            }
            else
            {
                this.WorldUIQueueLockRelease();
            }
            NewbieManager.EntryTest();
            Indemnify.CheckShowIndemnify();
            ActivityGiftManager.Instance.CheckShowActivityGiftEffect();
            DataManager.msgBuffer[0] = 47;
            GameManager.notifyObservers(1, 0, DataManager.msgBuffer);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_OpenUpWild:
            this.SwitchWorldMode(WorldMode.Wild);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_OpenUpContinue:
            DataManager.msgBuffer[0] = 4;
            this.notifyNews(DataManager.msgBuffer);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_ManorGuildCameraMove:
        {
            BuildManorData recordByKey    = DataManager.Instance.BuildManorData.GetRecordByKey(GameConstants.ConvertBytesToUShort(DataManager.msgBuffer, 3));
            float          num            = ((recordByKey.bPosionX <= 30000) ? ((float)recordByKey.bPosionX) : ((float)recordByKey.bPosionX - 65535f)) * 0.01f;
            float          y              = ((recordByKey.bPosionY <= 32768) ? ((float)recordByKey.bPosionY) : ((float)recordByKey.bPosionY - 65535f)) * 0.01f;
            float          num2           = ((recordByKey.bPosionZ <= 32768) ? ((float)recordByKey.bPosionZ) : ((float)recordByKey.bPosionZ - 65535f)) * 0.01f;
            Vector3        targetPosition = new Vector3(num + 4f, y, num2 - 23.5f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition);
            DataManager.msgBuffer[0] = 11;
            this.notifyNews(DataManager.msgBuffer);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_ArneaGuildCameraMove:
        {
            Vector3 targetPosition2 = new Vector3(119.07f, 30.8f, 78.78f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition2);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_DugoutGuildCameraMove:
        {
            Vector3 targetPosition3 = new Vector3(-22.22f, 13.39f, -22.2f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition3);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_BlackMarketGuildCameraMove:
        {
            Vector3 targetPosition4 = new Vector3(51.5f, -0.5f, 87.44f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition4);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_WarlobbyGuildCameraMove:
            if (GUIManager.Instance.BuildingData.ManorGride[6] != null)
            {
                this.cameraController.CameraMoveTarget(CameraState.Build, GUIManager.Instance.BuildingData.ManorGride[6].position);
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_CasinoGuildCameraMove:
        {
            Vector3 targetPosition5 = new Vector3(131.5f, 9.1f, -7.7f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition5);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_LaboratoryGuildCameraMove:
        {
            Vector3 targetPosition6 = new Vector3(-5.2f, 0.6f, 130.1f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition6);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_PetListGuildCameraMove:
        {
            Vector3 targetPosition7 = new Vector3(193.63f, 16.2f, -14.29f);
            this.cameraController.CameraMoveTarget(CameraState.Build, targetPosition7);
            break;
        }

        case GAME_PLAYER_NEWS.ORIGIN_UpdateBuild:
            DataManager.msgBuffer[0] = 5;
            this.notifyNews(DataManager.msgBuffer);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_UpdateOpenUp:
            if (this.nextWorldMode == WorldMode.OpenUp)
            {
                this.UpdateWorldState();
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_ChangeStageMode:
            if (this.nextWorldMode == WorldMode.OpenUp)
            {
                if (Subject[1] == 1)
                {
                    DataManager.StageDataController.resetStageMode(StageMode.Full);
                }
                else if (Subject[1] == 2)
                {
                    DataManager.StageDataController.resetStageMode(StageMode.Lean);
                }
                else if (Subject[1] == 3)
                {
                    DataManager.StageDataController.resetStageMode(StageMode.Dare);
                    if (DataManager.StageDataController.StageRecord[3] >= GameConstants.StagePointNum[3] && !NewbieManager.IsLeadNewbiePass)
                    {
                        DataManager.StageDataController.currentChapterID = 1;
                        DataManager.StageDataController.currentPointID   = (ushort)(DataManager.StageDataController.currentChapterID - 1) * GameConstants.StagePointNum[(int)DataManager.StageDataController._stageMode] + 1;
                        DataManager.StageDataController.SaveUserStage(DataManager.StageDataController._stageMode);
                    }
                }
                DataManager.StageDataController.SaveUserStageMode(DataManager.StageDataController._stageMode);
                DataManager.Instance.lastBattleResult = -1;
                this.cameraController.SetCameraPos((int)DataManager.StageDataController.currentChapterID);
                this.UpdateWorldState();
                GUIManager.Instance.m_HUDMessage.MapHud.AddChapterMsg();
                GUIManager.Instance.m_HUDMessage.MapHud.ShowMsg();
                GUIManager.Instance.m_HUDMessage.MapHud.ShowTime = 0.8f;
                GUIManager.Instance.m_HUDMessage.MapHud.StartCountdown();
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_HideCampain:
            DataManager.msgBuffer[0] = 8;
            this.notifyNews(DataManager.msgBuffer);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_OpenUpFirstRun:
            if (DataManager.StageDataController._stageMode == StageMode.Full)
            {
                if ((this.worldflag & 2) != 0)
                {
                    NewbieManager.CheckTeach(ETeachKind.ELITE_STAGE, null, true);
                    this.worldflag &= -3;
                }
                if ((DataManager.StageDataController.StageRecord[0] != 0 || !NewbieManager.CheckTeach(ETeachKind.BATTLE_BEFORE, null, true)) && NewbieManager.CheckPutOnEquipTeach())
                {
                    NewbieManager.CheckTeach(ETeachKind.PUTON_EQUIP, null, false);
                }
            }
            else if (DataManager.StageDataController._stageMode == StageMode.Corps)
            {
                NewbieManager.CheckTeach(ETeachKind.WAR_SCOUT, this, true);
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_BuildOpenUp:
            if (DataManager.StageDataController._stageMode != StageMode.Corps || DataManager.StageDataController.isNotFirstInChapter[2] == 1)
            {
                if (DataManager.StageDataController._stageMode == StageMode.Dare && DataManager.StageDataController.StageRecord[3] >= GameConstants.StagePointNum[3] && !NewbieManager.IsLeadNewbiePass)
                {
                    DataManager.StageDataController.currentChapterID = 1;
                    DataManager.StageDataController.currentPointID   = (ushort)(DataManager.StageDataController.currentChapterID - 1) * GameConstants.StagePointNum[(int)DataManager.StageDataController._stageMode] + 1;
                    DataManager.StageDataController.SaveUserStage(DataManager.StageDataController._stageMode);
                }
                DataManager.Instance.WorldCameraPos   = GameConstants.GoldGuy;
                DataManager.Instance.WorldCameraLimit = 0f;
                DataManager.Instance.bWorldF          = false;
                this.cameraController.SetCameraPos((int)DataManager.StageDataController.currentChapterID);
                this.SwitchWorldMode(WorldMode.OpenUp);
                DataManager.msgBuffer[0] = 14;
                GameManager.notifyObservers(1, 0, DataManager.msgBuffer);
            }
            break;

        case GAME_PLAYER_NEWS.ORIGIN_UIQueueLock:
            this.WorldUIQueueLock();
            break;

        case GAME_PLAYER_NEWS.ORIGIN_UIQueueLockRelease:
            this.WorldUIQueueLockRelease();
            break;

        case GAME_PLAYER_NEWS.ORIGIN_UIInputLock:
            this.WorldInputLockCount++;
            GUIManager.Instance.ShowUILock(EUILock.Normal);
            break;

        case GAME_PLAYER_NEWS.ORIGIN_UIInputLockRelease:
            this.WorldInputLockCount--;
            GUIManager.Instance.HideUILock(EUILock.Normal);
            break;
        }
    }