Exemplo n.º 1
0
    protected PerformVo(string perform_id, Units casterUnit)
    {
        this.perform_id = perform_id;
        this.data       = Singleton <PerformDataManager> .Instance.GetVo(perform_id);

        this.casterUnit = casterUnit;
        this.effect_id  = this.data.config.effect_id;
        if (StringUtils.CheckValid(this.data.endPerformId))
        {
            this.endPerform = PerformVo.Create(this.data.endPerformId, casterUnit);
        }
    }
Exemplo n.º 2
0
    private void InitEffects()
    {
        SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(this.heroId);

        if (heroMainData == null)
        {
            return;
        }
        string effect_id = heroMainData.effect_id;

        if (effect_id == null)
        {
            return;
        }
        if (StringUtils.CheckValid(effect_id))
        {
            this.character_effects.Clear();
            string[] stringValue = StringUtils.GetStringValue(effect_id, ',');
            for (int i = 0; i < stringValue.Length; i++)
            {
                if (StringUtils.CheckValid(stringValue[i]))
                {
                    string[] stringValue2 = StringUtils.GetStringValue(stringValue[i], '|');
                    if (stringValue2 != null)
                    {
                        int    key  = int.Parse(stringValue2[0]);
                        string text = stringValue2[1];
                        if (StringUtils.CheckValid(text))
                        {
                            if (!this.character_effects.ContainsKey(key))
                            {
                                this.character_effects.Add(key, new List <PerformVo>());
                            }
                            this.character_effects[key].Add(PerformVo.Create(text, null));
                        }
                    }
                }
            }
        }
    }