/// <summary> /// Gets the type of an array /// </summary> /// <param name="game">What game we are looking info for</param> /// <param name="propName">Name of the array property</param> /// <param name="className">Name of the class that should contain the information. If contained in a struct, this will be the name of the struct type</param> /// <param name="parsingEntry">Entry that is being parsed. Used for dynamic lookup if it's not in the DB</param> /// <returns></returns> public static ArrayType GetArrayType(Mod.MEGame game, string propName, string className, IEntry parsingEntry = null) { switch (game) { case Mod.MEGame.ME1: return(ME1UnrealObjectInfo.getArrayType(className, propName, export: parsingEntry as ExportEntry)); case Mod.MEGame.ME2: var res2 = ME2UnrealObjectInfo.getArrayType(className, propName, export: parsingEntry as ExportEntry); #if DEBUG //For debugging only! if (res2 == ArrayType.Int && ME2UnrealObjectInfo.ArrayTypeLookupJustFailed) { ME2UnrealObjectInfo.ArrayTypeLookupJustFailed = false; Debug.WriteLine("[ME2] Array type lookup failed for " + propName + " in class " + className + " in export " + parsingEntry.FileRef.GetEntryString(parsingEntry.UIndex)); } #endif return(res2); case Mod.MEGame.ME3: var res = ME3UnrealObjectInfo.getArrayType(className, propName, export: parsingEntry as ExportEntry); #if DEBUG //For debugging only! if (res == ArrayType.Int && ME3UnrealObjectInfo.ArrayTypeLookupJustFailed) { Debug.WriteLine("[ME3] Array type lookup failed for " + propName + " in class " + className + " in export " + parsingEntry.FileRef.GetEntryString(parsingEntry.UIndex)); ME3UnrealObjectInfo.ArrayTypeLookupJustFailed = false; } #endif return(res); } return(ArrayType.Int); }
public static ArrayType GetArrayType(MEGame game, string propName, string typeName) { switch (game) { case MEGame.ME1: return(ME1UnrealObjectInfo.getArrayType(typeName, propName)); case MEGame.ME2: return(ME2UnrealObjectInfo.getArrayType(typeName, propName)); case MEGame.ME3: return(ME3UnrealObjectInfo.getArrayType(typeName, propName)); } return(ArrayType.Int); }