protected virtual AttackInfo _FindAttackInfo(AttackInfo[] attack_infos, string name, bool fix_rate, float rate, bool isDuplicate = false) { if (string.IsNullOrEmpty(name)) { return(null); } if (attack_infos == null) { return(null); } AttackInfo attackInfo = null; int i = 0; for (int num = attack_infos.Length; i < num; i++) { AttackInfo attackInfo2 = attack_infos[i]; if (attackInfo2.name == name) { if (fix_rate && !string.IsNullOrEmpty(attackInfo2.rateInfoName) && rate != 0f) { AttackInfo rate_info = _FindAttackInfo(attack_infos, attackInfo2.rateInfoName, false, 0f, false); attackInfo = attackInfo2.GetRateAttackInfo(rate_info, rate); } else { attackInfo = attackInfo2; } break; } } if (attackInfo == null) { Log.Error(LOG.INGAME, "FindAttackInfo not found. name : " + name); attackInfo = attack_infos[0]; } if (isDuplicate) { return(attackInfo.Duplicate()); } return(attackInfo); }