// 英雄最大属性值 [6/4/2015 Zmy] public float GetHeroMaxAttributeValue(EM_ATTRIBUTE _type) { float[] _attriValue = new float[GlobalMembers.MAX_TEAM_CELL_COUNT]; for (int i = 0; i < GlobalMembers.MAX_TEAM_CELL_COUNT; i++) { ObjectCard pHero = ObjectSelf.GetInstance().HeroContainerBag.FindHero(m_HeroInfo[i]); if (pHero != null) { switch (_type) { case EM_ATTRIBUTE.EM_ATTRIBUTE_MAXHP: _attriValue[i] = pHero.GetMaxHP(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICALATTACK: _attriValue[i] = pHero.GetPhysicalAttack(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGICATTACK: _attriValue[i] = pHero.GetMagicAttack(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICALDEFENCE: _attriValue[i] = pHero.GetPhysicalDefence(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGICDEFENCE: _attriValue[i] = pHero.GetMagicDefence(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_HIT: _attriValue[i] = pHero.GetHit(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_DODGE: _attriValue[i] = pHero.GetDodge(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL: _attriValue[i] = pHero.GetCritical(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_TENACITY: _attriValue[i] = pHero.GetTenacity(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MOVESPEED: break; case EM_ATTRIBUTE.EM_ATTRIBUTE_SPEED: _attriValue[i] = pHero.GetSpeed(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_HIT_RATE: _attriValue[i] = pHero.GetHitRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_DODGE_RATE: _attriValue[i] = pHero.GetDodgeRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL_RATE: _attriValue[i] = pHero.GetCriticalRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_TENACITY_RATE: _attriValue[i] = pHero.GetTenacityRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICAL_HURT_ADD_PERMIL: _attriValue[i] = pHero.GetPhysicalHurtAddPermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_PHYSICAL_HRUT_REDUCE_PERMIL: _attriValue[i] = pHero.GetPhysicalHurtReducePermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGIC_HURT_ADD_PERMIL: _attriValue[i] = pHero.GetMagicHurtAddPermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_MAGIC_HURT_REDUCE_PERMIL: _attriValue[i] = pHero.GetMagicHurtReducePermil(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL_HURT_ADD_RATE: _attriValue[i] = pHero.GetCriticalHurtAddRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_CRITICAL_HURT_REDUCE_RATE: _attriValue[i] = pHero.GetCriticalHurtReduceRate(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_EXTRA_HURT: _attriValue[i] = pHero.GetExtraHurt(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_REDUCE_HURT_POINT: _attriValue[i] = pHero.GetReduceHurtPoint(); break; case EM_ATTRIBUTE.EM_ATTRIBUTE_HPRECOVER: _attriValue[i] = pHero.GetHpRecover(); break; default: break; } } } return(GameUtils.MaxValue(_attriValue)); }