コード例 #1
0
ファイル: WorldMapDlg.cs プロジェクト: parikharsh/GLOH_Source
    private void SetLocalMapMapIcon()
    {
        this.UpdateTreasure();
        MAP_INFO mapInfo = NrTSingleton <NrBaseTableManager> .Instance.GetMapInfo(this.m_pkCharMapInfo.m_nMapIndex.ToString());

        int num = 0;

        if (mapInfo != null)
        {
            num = mapInfo.MAP_INDEX;
        }
        for (int i = 0; i < 20; i++)
        {
            int      num2     = this.m_selectLocalMap.MAP_INDEX[i];
            MAP_INFO mapInfo2 = NrTSingleton <NrBaseTableManager> .Instance.GetMapInfo(num2.ToString());

            bool flag = true;
            if (num2 <= 0 || mapInfo2 == null)
            {
                flag = false;
            }
            if (!NrTSingleton <ContentsLimitManager> .Instance.IsWarpMap(num2))
            {
                flag = false;
            }
            TreasureData treasureCheck = this.GetTreasureCheck(num2);
            if (!flag)
            {
                this.m_btLocalMap_AreaIcon[i].Hide(true);
                this.m_lbLocalMap_AreaName[i].Hide(true);
                if (treasureCheck != null)
                {
                    treasureCheck.TreasureShow(false);
                }
            }
            else
            {
                this.m_btLocalMap_AreaIcon[i].Hide(false);
                this.m_lbLocalMap_AreaName[i].Hide(false);
                this.m_btLocalMap_AreaIcon[i].SetLocation(mapInfo2.MAP_X + 20f, mapInfo2.MAP_Y + 64f, -0.1f);
                string textFromMap = NrTSingleton <NrTextMgr> .Instance.GetTextFromMap(mapInfo2.TEXTKEY);

                if (textFromMap != string.Empty)
                {
                    this.m_lbLocalMap_AreaName[i].SetText(textFromMap);
                    this.m_lbLocalMap_AreaName[i].SetLocation(mapInfo2.MAP_X + 20f + -107f, mapInfo2.MAP_Y + 64f + 84f, -0.1f);
                }
                if (mapInfo2.MAP_ICON != string.Empty)
                {
                    this.m_btLocalMap_AreaIcon[i].SetButtonTextureKey(mapInfo2.MAP_ICON);
                }
                this.m_btLocalMap_AreaIcon[i].AddValueChangedDelegate(new EZValueChangedDelegate(this.OnClickLocaldMapToMapIcon));
                this.m_btLocalMap_AreaIcon[i].Data    = num2;
                this.m_btLocalMap_AreaIcon[i].Visible = true;
                if (treasureCheck != null)
                {
                    if (num != 0 && treasureCheck.GetMapIndex() == num)
                    {
                        treasureCheck.TreasureShow(true);
                        treasureCheck.SetPostion(mapInfo2.MAP_X + 40f, mapInfo2.MAP_Y - 16f);
                    }
                    else
                    {
                        treasureCheck.TreasureShow(true);
                        treasureCheck.SetPostion(mapInfo2.MAP_X + 10f, mapInfo2.MAP_Y - 16f);
                    }
                }
            }
        }
    }