public void CalcLevelCurveStatus(int rank, ref BaseStatus result, BaseStatus ini_status, BaseStatus max_status) { int num1 = this.GetLevelCap() - 1; int num2 = rank - 1; ini_status.CopyTo(result); if (num2 < 1 || num1 < 1) { return; } if (num2 >= num1) { max_status.CopyTo(result); } else { BaseStatus baseStatus1 = new BaseStatus(); BaseStatus baseStatus2 = new BaseStatus(); for (int index1 = 0; index1 < this.curve.Count; ++index1) { long num3 = (long)((int)this.curve[index1].lv - 1); for (int index2 = index1; index2 > 0; --index2) { num3 -= (long)(int)this.curve[index2 - 1].lv; } long num4 = (long)num2 >= num3 ? num3 : (long)num2; StatusParam statusParam1 = ini_status.param; StatusParam statusParam2 = max_status.param; StatusParam src = this.curve[index1].status.param; src.CopyTo(baseStatus1.param); baseStatus1.param.Sub(baseStatus2.param); baseStatus2.param.Add(src); for (int index2 = 0; index2 < baseStatus1.param.Length; ++index2) { long num5 = (long)(((int)statusParam2[(StatusTypes)index2] - (int)statusParam1[(StatusTypes)index2]) * (int)baseStatus1.param[(StatusTypes)index2] / 100); if (num5 != 0L) { StatusParam statusParam3; StatusTypes index3; (statusParam3 = result.param)[index3 = (StatusTypes)index2] = (OInt)((int)statusParam3[index3] + (int)(100000L * num5 / num3 * num4 / 100000L)); } } ElementParam elementAssist1 = ini_status.element_assist; ElementParam elementAssist2 = max_status.element_assist; ElementParam elementAssist3 = this.curve[index1].status.element_assist; elementAssist3.CopyTo(baseStatus1.element_assist); baseStatus1.element_assist.Sub(baseStatus2.element_assist); baseStatus2.element_assist.Add(elementAssist3); for (int index2 = 0; index2 < baseStatus1.element_assist.values.Length; ++index2) { long num5 = (long)(((int)elementAssist2.values[index2] - (int)elementAssist1.values[index2]) * (int)baseStatus1.element_assist.values[index2] / 100); if (num5 != 0L) { // ISSUE: explicit reference operation // ISSUE: variable of a reference type OShort& local = @result.element_assist.values[index2];
public void Add(ElementParam src) { if (src == null) { return; } for (int index = 0; index < this.values.Length; ++index) { // ISSUE: explicit reference operation // ISSUE: variable of a reference type OShort& local = @this.values[index];
public void CopyTo(ElementParam dsc) { if (dsc == null) { return; } for (int index = 0; index < this.values.Length; ++index) { dsc.values[index] = this.values[index]; } }
private int getRateDamageElement(Unit target) { int num = 0; if (this.mTrickParam.Elem != EElement.None) { ElementParam elementResist = target.CurrentStatus.element_resist; num += (int)elementResist[this.mTrickParam.Elem]; } return(num); }