コード例 #1
0
        private string BuffValueReturn(string ID)
        {
            if (string.IsNullOrEmpty(ID))
            {
                return(string.Empty);
            }
            string result = string.Empty;

            string[] array = ID.Split(new char[]
            {
                ','
            });
            if (array.Length > 1)
            {
                SysSkillBuffVo dataById = BaseDataMgr.instance.GetDataById <SysSkillBuffVo>(array[0]);
                if (array[1].CompareTo("buff_time") == 0)
                {
                    result = dataById.buff_time.ToString();
                }
                if (array[1].CompareTo("max_layers") == 0)
                {
                    result = dataById.max_layers.ToString();
                }
            }
            return(result);
        }
コード例 #2
0
ファイル: BuffData.cs プロジェクト: whztt07/mobahero_src
 public BuffData(string buff_id, SysSkillBuffVo buff_vo)
 {
     if (buff_vo == null)
     {
         Debug.LogError("Error buff_id=" + buff_id);
         return;
     }
     this.buffId = buff_id;
     this.config = buff_vo;
     this.Parse(this.config);
 }
コード例 #3
0
ファイル: BuffData.cs プロジェクト: whztt07/mobahero_src
 public BuffData(string buff_id)
 {
     this.buffId = buff_id;
     this.config = BaseDataMgr.instance.GetDataById <SysSkillBuffVo>(buff_id);
     if (this.config == null)
     {
         Debug.LogError("Error buff_id=" + buff_id);
         return;
     }
     this.Parse(this.config);
 }
コード例 #4
0
 public void ParseTables()
 {
     if (!this.isParseTable)
     {
         Dictionary <string, object> dicByType = BaseDataMgr.instance.GetDicByType <SysSkillBuffVo>();
         if (dicByType == null)
         {
             Debug.LogError("==> SysSkillPerformVo is NULL !!");
             return;
         }
         this.isParseTable = true;
         this._dataVos.Clear();
         Dictionary <string, object> .Enumerator enumerator = dicByType.GetEnumerator();
         while (enumerator.MoveNext())
         {
             KeyValuePair <string, object> current = enumerator.Current;
             string key = current.Key;
             KeyValuePair <string, object> current2 = enumerator.Current;
             SysSkillBuffVo buff_vo = current2.Value as SysSkillBuffVo;
             BuffData       value   = new BuffData(key, buff_vo);
             this._dataVos.Add(key, value);
         }
     }
 }
コード例 #5
0
ファイル: BuffData.cs プロジェクト: whztt07/mobahero_src
        public void Parse(SysSkillBuffVo buff_vo)
        {
            this.clear_flag = (buff_vo.clear_flag == 1);
            this.revert     = (buff_vo.revert == 1);
            this.isStopEffectWhenFullHpAndMp = false;
            if (StringUtils.CheckValid(buff_vo.buff_mutex_id))
            {
                this.buff_mutex_id = StringUtils.GetStringValue(buff_vo.buff_mutex_id, ',');
                for (int i = 0; i < this.buff_mutex_id.Length; i++)
                {
                    string[] stringValue = StringUtils.GetStringValue(this.buff_mutex_id[i], '|');
                    if (stringValue[0] == "1")
                    {
                        this.isStopEffectWhenFullHpAndMp = (stringValue[1] == "1");
                    }
                    if (stringValue[0] == "2")
                    {
                        this.isNotClearResetBuffAndDeletAtMax = (stringValue[1] == "0");
                    }
                    if (stringValue[0] == "3")
                    {
                        this.isClearWhenDeath = (stringValue[1] == "1");
                    }
                    if (stringValue[0] == "4")
                    {
                        this.isRemoveLayer = (stringValue[1] == "1");
                    }
                }
            }
            if (StringUtils.CheckValid(buff_vo.perform_id))
            {
                this.perform_ids = StringUtils.GetStringValue(buff_vo.perform_id, ',');
            }
            if (StringUtils.CheckValid(buff_vo.damage_id))
            {
                this.damage_ids = StringUtils.GetStringToInt(buff_vo.damage_id, ',');
            }
            if (StringUtils.CheckValid(buff_vo.buff_type))
            {
                string[] stringValue2 = StringUtils.GetStringValue(buff_vo.buff_type, '|');
                if (stringValue2.Length > 0)
                {
                    this.DataType.MagicType = (EffectMagicType)int.Parse(stringValue2[0]);
                }
                if (stringValue2.Length > 1)
                {
                    this.DataType.GainType = (EffectGainType)int.Parse(stringValue2[1]);
                }
                if (stringValue2.Length > 2)
                {
                    this.DataType.ImmuneType = (EffectImmuneType)int.Parse(stringValue2[2]);
                }
            }
            if (StringUtils.CheckValid(buff_vo.attach_higheff))
            {
                this.higheff_ids = StringUtils.GetStringValue(buff_vo.attach_higheff, ',');
            }
            if (StringUtils.CheckValid(buff_vo.attach_buff))
            {
                this.buff_ids = StringUtils.GetStringValue(buff_vo.attach_buff, ',');
            }
            if (StringUtils.CheckValid(buff_vo.end_attach_higheff))
            {
                this.end_attach_higheff_ids = StringUtils.GetStringValue(buff_vo.end_attach_higheff, ',');
            }
            if (StringUtils.CheckValid(buff_vo.end_attach_buff))
            {
                this.end_attach_buff_ids = StringUtils.GetStringValue(buff_vo.end_attach_buff, ',');
            }
            if (StringUtils.CheckValid(buff_vo.superposition))
            {
                string[] stringValue3 = StringUtils.GetStringValue(buff_vo.superposition, '|');
                if (stringValue3 != null && stringValue3.Length == 2)
                {
                    this.m_nBuffGroup      = int.Parse(stringValue3[0]);
                    this.m_OverlapPriority = int.Parse(stringValue3[1]);
                }
            }
            string attach_states = buff_vo.attach_states;

            if (StringUtils.CheckValid(attach_states))
            {
                this.attachState = StringUtils.GetSampleArrayStringToInt(attach_states);
            }
            if (this.damage_ids != null)
            {
                for (int j = 0; j < this.damage_ids.Length; j++)
                {
                    DamageData vo = Singleton <DamageDataManager> .Instance.GetVo(this.damage_ids[j]);

                    if (vo == null)
                    {
                        Debug.LogError("没有找到伤害包:错误id" + this.damage_ids[j]);
                    }
                    else if (vo.IsPropertyValue)
                    {
                        this.isProperty = true;
                    }
                    else if (vo.IsPropertyFormula)
                    {
                        this.isProperty = true;
                    }
                    else
                    {
                        this.isProperty = false;
                    }
                }
            }
        }
コード例 #6
0
    public bool IsShowBuff(string buff_Id)
    {
        SysSkillBuffVo dataById = BaseDataMgr.instance.GetDataById <SysSkillBuffVo>(buff_Id);

        return(dataById.show_icon == 1);
    }