public static matt getatt_name(this List <matt> thismatt, byte[] name, int state) { matt result; for (int i = 0; i < thismatt.Count; i++) { if (Kuozhan.makebytes(thismatt[i].name, name)) { if (state > 0) { if (thismatt[i].att.attlei != (byte)state) { goto IL_62; } result = thismatt[i]; } else { result = thismatt[i]; } return(result); } IL_62 :; } result = null; return(result); }
public static int getattid_name(this List <matt> thismatt, byte[] name, int state) { int result; for (int i = 0; i < thismatt.Count; i++) { if (Kuozhan.makebytes(thismatt[i].name, name)) { if (state > 0) { if (thismatt[i].att.attlei != (byte)state) { goto IL_56; } result = i; } else { result = i; } return(result); } IL_56 :; } result = -1; return(result); }