|
@@ -28,7 +28,7 @@ public class CombatHeroInfo
|
|
|
|
|
|
public HeroModelConfig modelConfig;
|
|
|
|
|
|
- public HeroPowerConfig powerConfig;
|
|
|
+ public HeroPowerUpConfig powerUpConfig;
|
|
|
public HeroPromoteConfig promoteConfig;
|
|
|
public HeroBasicEquipConfig basicEquipConfig;
|
|
|
|
|
@@ -60,6 +60,8 @@ public class CombatHeroInfo
|
|
|
|
|
|
private float rarityFactor;
|
|
|
private float starFactor;
|
|
|
+
|
|
|
+ private float factor;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 计算影响基础属性的参数
|
|
@@ -70,14 +72,17 @@ public class CombatHeroInfo
|
|
|
rarityFactor = PlayerManager.Instance.gameConstantConfig.monsterRarityAttributeFactor[modelConfig.rarity-1]
|
|
|
/ 100f;
|
|
|
starFactor = promoteConfig.star_Power / 100f;
|
|
|
+
|
|
|
+ factor = rarityFactor * starFactor;
|
|
|
}
|
|
|
|
|
|
protected void CalAttribute()
|
|
|
{
|
|
|
- hp = (EncryptionLong)(modelConfig.hp * rarityFactor * starFactor);
|
|
|
- defense = (EncryptionLong)(modelConfig.def * rarityFactor * starFactor);
|
|
|
- attack = (EncryptionLong)(modelConfig.attack * rarityFactor * starFactor);
|
|
|
- shanbi = (EncryptionInt)powerConfig.SHANBI;
|
|
|
+ hp = (EncryptionLong)(modelConfig.hp * powerUpConfig.HPFactor * factor);
|
|
|
+ defense = (EncryptionLong)(modelConfig.def * powerUpConfig.DEFFactor * factor);
|
|
|
+ attack = (EncryptionLong)(modelConfig.attack * powerUpConfig.ATKFactor * factor);
|
|
|
+
|
|
|
+ shanbi = (EncryptionInt)(modelConfig.shanbi * powerUpConfig.SHANBIFactor);
|
|
|
|
|
|
attSpeed = (EncryptionFloat)modelConfig.speed_atk;
|
|
|
crit = (EncryptionFloat)modelConfig.crit;
|
|
@@ -91,7 +96,7 @@ public class CombatHeroInfo
|
|
|
protected void SetDataConfig(int id,int level, int star)
|
|
|
{
|
|
|
modelConfig = ConfigComponent.Instance.Get<HeroModelConfig>(id);
|
|
|
- powerConfig = ConfigComponent.Instance.Get<HeroPowerConfig>(level);
|
|
|
+ powerUpConfig = ConfigComponent.Instance.Get<HeroPowerUpConfig>(level);
|
|
|
promoteConfig = ConfigComponent.Instance.Get<HeroPromoteConfig>(star);
|
|
|
}
|
|
|
|