public static void ReloadMemoryParamsDS3() { var processArray = Process.GetProcessesByName("DarkSoulsIII"); if (processArray.Any()) { SoulsMemoryHandler memoryHandler = new SoulsMemoryHandler(processArray.First()); List <Thread> threads = new List <Thread>(); foreach (var(paramFileName, param) in ParamBank.Params) { if (SoulsMemoryHandler.paramOffsetsDS3.ContainsKey(paramFileName)) { threads.Add(new Thread(() => WriteMemoryPARAM(param, SoulsMemoryHandler.paramOffsetsDS3[paramFileName], memoryHandler))); } } foreach (var thread in threads) { thread.Start(); } foreach (var thread in threads) { thread.Join(); } memoryHandler.Terminate(); } }
public static void GiveItemDS3(List <PARAM.Row> rowsToGib, string studioParamType, int itemQuantityReceived, int upgradeLevelItemToGive = 0) { if (rowsToGib.Any()) { var processArray = Process.GetProcessesByName("DarkSoulsIII"); if (processArray.Any()) { SoulsMemoryHandler memoryHandler = new SoulsMemoryHandler(processArray.First()); memoryHandler.PlayerItemGiveDS3(rowsToGib, studioParamType, itemQuantityReceived, -1, upgradeLevelItemToGive); memoryHandler.Terminate(); } } }