public static T smethod_9 <T>(T gparam_0, PawnStat.MPType mptype_0, PawnStat.MPType mptype_1, bool bool_0) where T : PawnStat.IElementaryStat, new() { if (gparam_0 != null) { T t = (T)((object)null); if (!PawnStat.smethod_7(mptype_0, mptype_1)) { for (int i = 0; i < PawnStat.intFlag_0.Length; i++) { PawnStat.IntFlag intFlag = PawnStat.intFlag_0[i]; if (gparam_0.HasValue(intFlag)) { if (t == null) { if (bool_0) { t = Activator.CreateInstance <T>(); t.CopyFromES(gparam_0); } else { t = gparam_0; } } t.SetValue(intFlag, PawnStat.smethod_1(intFlag)); } } if (t != null) { return(t); } } } return(gparam_0); }
public override void ClearES() { for (int i = 0; i < 42; i++) { this.IntValue[i] = PawnStat.smethod_1((PawnStat.IntFlag)i); } }
protected override void ReadES(string totalPath, XmlNode topNode) { if (topNode != null) { for (int i = 0; i < 42; i++) { PawnStat.IntFlag intFlag = (PawnStat.IntFlag)i; if (!base.ReadValue(topNode, totalPath, intFlag)) { this.SetValue(intFlag, PawnStat.smethod_1(intFlag)); } } } }
public static void smethod_6(PawnStat.IElementaryStat ielementaryStat_0, List <string> list_0) { if (ielementaryStat_0 != null && list_0 != null) { for (int i = 0; i < 42; i++) { PawnStat.IntFlag intFlag = (PawnStat.IntFlag)i; if (ielementaryStat_0.HasValue(intFlag)) { int value = ielementaryStat_0.GetValue(intFlag); if (value != PawnStat.smethod_1(intFlag)) { //string str = (!GameConstInfo.GameConstInfo_0.statInfo_0.lineParseHashSet_0.Contains((PawnStat.IntFlag)i)) ? string.Empty : GameConstInfo.GameConstInfo_0.statInfo_0.string_0; //string item = GameTextManager.GameText("#" + PawnStat.string_0[i]) + " +" + value.ToString() + str; //list_0.Add(item); } } } } }
public override int GetValue(PawnStat.IntFlag flag) { int num = 0; return((!this.IntValue.TryGetValue(flag, out num)) ? PawnStat.smethod_1(flag) : num); }
public override bool NeedEncode(PawnStat.IntFlag flag) { return(this.GetValue(flag) != PawnStat.smethod_1(flag)); }