public int GetSkillProInitActPoint()
    {
        int num = 0;
        List <KeyValuePair <int, int> > skillProDataID = this.GetSkillProDataID();
        int num2 = 106;

        for (int i = 0; i < skillProDataID.get_Count(); i++)
        {
            if (DataReader <skillExtend> .Contains(skillProDataID.get_Item(i).get_Key()))
            {
                skillExtend skillExtend = DataReader <skillExtend> .Get(skillProDataID.get_Item(i).get_Key());

                if (skillExtend.type == 1)
                {
                    int key = int.Parse(GameDataUtils.SplitString4Dot0(skillExtend.ruleDetail));
                    if (DataReader <Attrs> .Contains(key))
                    {
                        Attrs attrs = DataReader <Attrs> .Get(key);

                        for (int j = 0; j < attrs.attrs.get_Count(); j++)
                        {
                            if (attrs.attrs.get_Item(j) == num2)
                            {
                                if (j < attrs.values.get_Count())
                                {
                                    num += attrs.values.get_Item(j);
                                }
                            }
                        }
                    }
                }
            }
        }
        return(num);
    }
Exemple #2
0
    private bool RefreshInitActPoint(talent_template dataTT)
    {
        if (dataTT.type == 1)
        {
            int   key   = int.Parse(GameDataUtils.SplitString4Dot0(dataTT.ruleDetail));
            Attrs attrs = DataReader <Attrs> .Get(key);

            if (attrs == null)
            {
                return(true);
            }
            for (int i = 0; i < attrs.attrs.get_Count(); i++)
            {
                if (attrs.attrs.get_Item(i) == 106)
                {
                    if (i < attrs.values.get_Count())
                    {
                        this.InitActPoint += attrs.values.get_Item(i);
                    }
                    return(true);
                }
            }
        }
        return(false);
    }
Exemple #3
0
    public static Transform FindWidgetOnUI(int widgetId, bool activeSelf = true)
    {
        Transform result = null;
        string    text   = WidgetSystem.FindNameOfUIByWidget(widgetId);

        string[] array = WidgetSystem.FindNameOfWidgetById(widgetId);
        if (!string.IsNullOrEmpty(text) && array != null && array.Length >= 1)
        {
            UIBase uIIfExist = UIManagerControl.Instance.GetUIIfExist(text);
            if (uIIfExist != null)
            {
                if (activeSelf && !uIIfExist.get_gameObject().get_activeSelf())
                {
                    return(null);
                }
                if (array.Length == 1)
                {
                    result = WidgetSystem.FindTransformOfuibase(uIIfExist, GameDataUtils.SplitString4Dot0(array[0]));
                }
                else if (array.Length == 2)
                {
                    Transform transform = WidgetSystem.FindTransformOfuibase(uIIfExist, GameDataUtils.SplitString4Dot0(array[0]));
                    if (transform != null)
                    {
                        result = XUtility.RecursiveFindTransform(transform, GameDataUtils.SplitString4Dot0(array[1]));
                    }
                }
            }
        }
        return(result);
    }
Exemple #4
0
    private void ShowAsChannelAsk()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> asks = FriendManager.Instance.GetAsks();
        string           text = DataReader <GlobalParams> .Get("friend_invite_limit_i").value;

        text = GameDataUtils.SplitString4Dot0(text);
        if (asks.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(asks.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "申请数量:" + color + "/" + text;
            for (int i = 0; i < asks.get_Count(); i++)
            {
                BuddyInfo        sdata = asks.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Ask, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502083, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "申请数量:" + color2 + "/" + text;
        }
    }
Exemple #5
0
    private void ShowAsChannelFriend()
    {
        this.FriendInfosUIVisibility = true;
        this.FriendFindsUIVisibility = false;
        this.UpdateRecommendsPanelActive();
        this.FriendInfoUnits.Clear();
        List <BuddyInfo> friends = FriendManager.Instance.GetFriends();

        friends.Sort(new Comparison <BuddyInfo>(FriendUIViewModel.FriendSortCompare));
        string text = DataReader <GlobalParams> .Get("friend_limit_i").value;

        text = GameDataUtils.SplitString4Dot0(text);
        if (friends.get_Count() > 0)
        {
            this.FriendTip = string.Empty;
            string color = TextColorMgr.GetColor(friends.get_Count().ToString(), "A45A41", string.Empty);
            this.FriendNum = "好友数量:" + color + "/" + text;
            for (int i = 0; i < friends.get_Count(); i++)
            {
                BuddyInfo        sdata = friends.get_Item(i);
                OOFriendInfoUnit o     = this.CreateFriendInfoUnit(OOFriendInfoUnit.UnitType.Friend, sdata, false);
                this.FriendInfoUnits.Add(o);
            }
        }
        else
        {
            this.FriendTip = GameDataUtils.GetChineseContent(502082, false);
            string color2 = TextColorMgr.GetColor("0", "A45A41", string.Empty);
            this.FriendNum = "好友数量:" + color2 + "/" + text;
        }
    }
    private void ShowPetTaskResultUI(GetPetTaskRewardRes down)
    {
        ChongWuRenWuPeiZhi chongWuRenWuPeiZhi = DataReader <ChongWuRenWuPeiZhi> .Get("monster");

        ChongWuRenWuPeiZhi chongWuRenWuPeiZhi2 = DataReader <ChongWuRenWuPeiZhi> .Get("model");

        if (chongWuRenWuPeiZhi == null || chongWuRenWuPeiZhi.value.get_Count() == 0)
        {
            Debug.LogError("data_monster is null");
            return;
        }
        if (chongWuRenWuPeiZhi2 == null || chongWuRenWuPeiZhi2.value.get_Count() == 0)
        {
            Debug.LogError("data_model is null");
            return;
        }
        int num  = down.task.monsterId.get_Item(0);
        int num2 = -1;

        for (int i = 0; i < chongWuRenWuPeiZhi.value.get_Count(); i++)
        {
            if (int.Parse(GameDataUtils.SplitString4Dot0(chongWuRenWuPeiZhi.value.get_Item(i))) == num)
            {
                num2 = i;
                break;
            }
        }
        if (num2 < 0)
        {
            this.ShowRewards(down);
            Debug.LogError(string.Concat(new object[]
            {
                "find_index < 0, taskId = ",
                down.task.taskId,
                ", monster_id = ",
                num
            }));
            return;
        }
        if (down.task.choosePets.get_Count() == 0)
        {
            this.ShowRewards(down);
            Debug.LogError("find_index < 0, taskId = " + down.task.taskId + ", down.task.choosePets.Count == 0");
            return;
        }
        int monster_modelId = int.Parse(chongWuRenWuPeiZhi2.value.get_Item(num2));
        int petId           = down.task.choosePets.get_Item(0);

        UIManagerControl.Instance.OpenUI("PetTaskResultUI", UINodesManager.MiddleUIRoot, false, UIType.NonPush);
        if (down.success)
        {
            this.ShowAsSuccess(down, monster_modelId, petId);
        }
        else
        {
            this.ShowAsFail(down, monster_modelId, petId);
        }
    }
Exemple #7
0
 private static Texture GetTexture(string name)
 {
     if (!SystemConfig.IsReadUIImageOn)
     {
         return(ResourceManagerBase.GetNullTexture());
     }
     name = GameDataUtils.SplitString4Dot0(name);
     return(AssetManager.GetTexture(name));
 }
Exemple #8
0
 public static SpriteRenderer GetIconSprite(string spriteName)
 {
     if (!SystemConfig.IsReadUIImageOn)
     {
         return(ResourceManagerBase.GetNullSprite());
     }
     spriteName = GameDataUtils.SplitString4Dot0(spriteName);
     return(AssetManager.AssetOfTPManager.GetSpriteRenderer(spriteName));
 }
    private int GetInt(string key)
    {
        ChongWuRenWuPeiZhi chongWuRenWuPeiZhi = DataReader <ChongWuRenWuPeiZhi> .Get(key);

        if (chongWuRenWuPeiZhi != null && chongWuRenWuPeiZhi.value.get_Count() > 0)
        {
            return(int.Parse(GameDataUtils.SplitString4Dot0(chongWuRenWuPeiZhi.value.get_Item(0))));
        }
        return(0);
    }
Exemple #10
0
    public static SpriteRenderer GetIcon(int _id)
    {
        Icon icon = DataReader <Icon> .Get(_id);

        if (icon != null && !string.IsNullOrEmpty(icon.icon))
        {
            return(ResourceManager.GetIconSprite(GameDataUtils.SplitString4Dot0(icon.icon)));
        }
        return(ResourceManager.GetIconSprite("99999"));
    }
    private bool IsTriggerSuccess(int type, JuQingZhiYinBuZou dataBZ, string arg)
    {
        bool result = false;

        switch (type)
        {
        case 1:
            result = GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(1)).Equals(arg);
            break;

        case 2:
            result = GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(1)).Equals(arg);
            break;

        case 3:
            result = GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(1)).Equals(arg);
            break;

        case 4:
            result = GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(1)).Equals(arg);
            break;

        case 5:
            result = true;
            break;

        case 6:
            result = true;
            break;

        case 7:
            result = true;
            break;

        case 8:
            result = (float.Parse(arg) <= float.Parse(GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(1))) * 0.0001f);
            break;

        case 9:
            result = ((float)int.Parse(arg) > float.Parse(GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(0))));
            break;

        case 10:
            result = arg.Equals(GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(0)));
            break;

        case 11:
            result = arg.Equals(GameDataUtils.SplitString4Dot0(dataBZ.args.get_Item(0)));
            break;
        }
        return(result);
    }
Exemple #12
0
 private ChatManager()
 {
     this.ChannelTipOnList.set_Item(4, PlayerPrefsExt.GetBool("CHANNEL_TIP_TAG" + 4, true));
     this.ChannelMaskOnList.set_Item(1, PlayerPrefsExt.GetBool("CHANNEL_TIP_TAG" + 1, false));
     this.ChannelMaskOnList.set_Item(2, PlayerPrefsExt.GetBool("CHANNEL_TIP_TAG" + 2, false));
     this.ChannelMaskOnList.set_Item(32, PlayerPrefsExt.GetBool("CHANNEL_TIP_TAG" + 32, false));
     this.ChannelMaskOnList.set_Item(128, PlayerPrefsExt.GetBool("CHANNEL_TIP_TAG" + 128, false));
     BulletCurtainManager.Instance.Init();
     ChatManager.CreatePools();
     this.InitChatQueues();
     this.m_talkTime      = int.Parse(GameDataUtils.SplitString4Dot0(DataReader <GlobalParams> .Get("talkTime").value));
     this.m_talkRepeatNum = int.Parse(GameDataUtils.SplitString4Dot0(DataReader <GlobalParams> .Get("talkRepeatNum").value));
 }
Exemple #13
0
    public static bool IsStaticWidget(int widgetId)
    {
        string text = WidgetSystem.FindNameOfUIByWidget(widgetId);

        string[] array = WidgetSystem.FindNameOfWidgetById(widgetId);
        if (!string.IsNullOrEmpty(text) && array != null && array.Length >= 1)
        {
            UIBase uIIfExist = UIManagerControl.Instance.GetUIIfExist(text);
            if (uIIfExist != null && array.Length == 1)
            {
                return(WidgetSystem.IsStatic(uIIfExist, GameDataUtils.SplitString4Dot0(array[0])));
            }
        }
        return(false);
    }
Exemple #14
0
 protected void UpdateFightTimes(bool isVip)
 {
     if (isVip)
     {
         this.m_TextFightTimes1.set_text(GameDataUtils.GetChineseContent(517524, false));
     }
     else if (this.curPage == 1)
     {
         int num = int.Parse(GameDataUtils.SplitString4Dot0(DataReader <YeWaiBOSS> .Get("limitA").value));
         int id  = 517522;
         this.m_TextFightTimes1.set_text(string.Format(GameDataUtils.GetChineseContent(id, false), WildBossManager.Instance.BossRemainRewardTimes, num));
     }
     else if (this.curPage == 2)
     {
         int num = int.Parse(GameDataUtils.SplitString4Dot0(DataReader <YeWaiBOSS> .Get("limitB").value));
         int id  = 517523;
         this.m_TextFightTimes1.set_text(string.Format(GameDataUtils.GetChineseContent(id, false), WildBossManager.Instance.MultiBossRemainRewardTimes, num));
     }
 }
Exemple #15
0
    public int GetRefreshPrices()
    {
        int useRefresh          = this.mGuildMarketInformation.shopInfo.useRefresh;
        GongHuiShangDian lVShop = this.GetLVShop();

        string[] array = GameDataUtils.SplitString4Dot0(lVShop.RefreshPrice).Split(new char[]
        {
            ';'
        });
        if (array.Length <= 0)
        {
            return(0);
        }
        if (useRefresh < array.Length)
        {
            return(int.Parse(array[useRefresh]));
        }
        return(int.Parse(array[array.Length - 1]));
    }
Exemple #16
0
        public static SpriteRenderer GetSpriteRenderer(string sprite_name)
        {
            if (string.IsNullOrEmpty(sprite_name))
            {
                return(null);
            }
            sprite_name = GameDataUtils.SplitString4Dot0(sprite_name);
            SpriteRenderer spriteRendererIfExist = AssetManager.AssetOfTPManager.GetSpriteRendererIfExist(sprite_name);

            if (spriteRendererIfExist != null)
            {
                return(spriteRendererIfExist);
            }
            if (FileSystem.HasKey(sprite_name))
            {
                string path = FileSystem.GetPath(sprite_name, string.Empty);
                AssetManager.AssetOfTPManager.LoadAtlasNow(path);
                spriteRendererIfExist = AssetManager.AssetOfTPManager.GetSpriteRendererIfExist(sprite_name);
                if (spriteRendererIfExist != null)
                {
                    return(spriteRendererIfExist);
                }
                spriteRendererIfExist = AssetManager.AssetOfTPManager.GetSpriteRendererIfExist("Empty");
                if (spriteRendererIfExist != null)
                {
                    return(spriteRendererIfExist);
                }
                return(null);
            }
            else
            {
                spriteRendererIfExist = AssetManager.AssetOfTPManager.GetSpriteRendererIfExist("Empty");
                if (spriteRendererIfExist != null)
                {
                    return(spriteRendererIfExist);
                }
                return(null);
            }
        }
Exemple #17
0
    public static void Init()
    {
        if (ResourceRegulation.IsInit)
        {
            return;
        }
        ResourceRegulation.IsInit = true;
        List <ReleaseResWhiteLists> dataList = DataReader <ReleaseResWhiteLists> .DataList;

        for (int i = 0; i < dataList.get_Count(); i++)
        {
            int id = dataList.get_Item(i).id;
            if (id >= 0 && id <= 1000)
            {
                string name = dataList.get_Item(i).name;
                if (!string.IsNullOrEmpty(name))
                {
                    ResourceRegulation.whitelist2uiatlas.Add(name.ToLower());
                }
            }
            else if (id >= 1001 && id <= 2000)
            {
                string name2 = dataList.get_Item(i).name;
                if (!string.IsNullOrEmpty(name2))
                {
                    int     key     = int.Parse(GameDataUtils.SplitString4Dot0(name2));
                    FXSpine fXSpine = DataReader <FXSpine> .Get(key);

                    if (fXSpine != null)
                    {
                        ResourceRegulation.whitelist2spine.Add("UGUI/PrefabSpine2d/" + fXSpine.name);
                    }
                }
            }
            else if (id >= 2001 && id <= 3000)
            {
                string name3 = dataList.get_Item(i).name;
                if (!string.IsNullOrEmpty(name3))
                {
                    int key2 = int.Parse(GameDataUtils.SplitString4Dot0(name3));
                    Fx  fx   = DataReader <Fx> .Get(key2);

                    if (fx != null && string.IsNullOrEmpty(fx.path))
                    {
                        ResourceRegulation.whitelist2common.Add(fx.path);
                    }
                }
            }
            else if (id >= 3001 && id <= 4000)
            {
                string name4 = dataList.get_Item(i).name;
                if (!string.IsNullOrEmpty(name4))
                {
                    ResourceRegulation.whitelist2common.Add(FileSystem.GetPath(name4, string.Empty));
                }
            }
            else if (id >= 4001 && id < 5000)
            {
                string name5 = dataList.get_Item(i).name;
                if (!string.IsNullOrEmpty(name5))
                {
                    int         key3        = int.Parse(GameDataUtils.SplitString4Dot0(name5));
                    UINameTable uINameTable = DataReader <UINameTable> .Get(key3);

                    if (uINameTable != null)
                    {
                        string path = FileSystem.GetPath(uINameTable.name, string.Empty);
                        ResourceRegulation.whitelist2common.Add(path);
                        ResourceRegulation.temp_uilist.Add(path);
                    }
                }
            }
        }
        ResourceRegulation.Preload();
    }
Exemple #18
0
    private int GetMaxFund()
    {
        string value = DataReader <GongHuiXinXi> .Get("MaxFund").value;

        return(int.Parse(GameDataUtils.SplitString4Dot0(value)));
    }