Jelajahi Sumber

fix:修复数值组件计算公式错误的问题 (#311)

zzj 3 tahun lalu
induk
melakukan
ed1ab0a0c9
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      Unity/Codes/Model/Module/Numeric/NumericComponent.cs

+ 1 - 1
Unity/Codes/Model/Module/Numeric/NumericComponent.cs

@@ -107,7 +107,7 @@ namespace ET
 			// 一个数值可能会多种情况影响,比如速度,加个buff可能增加速度绝对值100,也有些buff增加10%速度,所以一个值可以由5个值进行控制其最终结果
 			// final = (((base + add) * (100 + pct) / 100) + finalAdd) * (100 + finalPct) / 100;
 			long old = this.NumericDic[final];
-			long result = (long)(((this.GetByKey(bas) + this.GetByKey(add)) * (100 + this.GetAsFloat(pct)) / 100f + this.GetByKey(finalAdd)) * (100 + this.GetAsFloat(finalPct)) / 100f * 10000);
+			long result = (long)(((this.GetByKey(bas) + this.GetByKey(add)) * (100 + this.GetAsFloat(pct)) / 100f + this.GetByKey(finalAdd)) * (100 + this.GetAsFloat(finalPct)) / 100f);
 			this.NumericDic[final] = result;
 			Game.EventSystem.Publish(new EventType.NumbericChange()
 			{