private void AddDataToOpenBrf(string meshName, int boneIndex, int skeletonId, int carryPosition) { if (OpenBrfManager.AddMeshToTroop3DPreview(meshName, boneIndex, skeletonId, carryPosition))//error with file path and mod path { Console.WriteLine("ADDED '" + meshName + "' to Troop3DPreview:" + Environment.NewLine + " --> openBrfManager.AddMeshToTroop3DPreview(" + meshName + ", " + boneIndex + ", " + skeletonId + ", " + carryPosition /* + ", " + isAtOrigin*/ + ")"); } else { Console.WriteLine("ADDING '" + meshName + "' to Troop3DPreview FAILED!"); } }
private void Troop3DPreview(ListBox lb) { int selectedIndex = lb.SelectedIndex; if (selectedIndex >= 0) { try { string itemID = lb.SelectedItem.ToString().Split('-')[1].TrimStart(); itemID = itemID.Substring(itemID.IndexOf('_') + 1); for (int i = 0; i < itemsRList.Count; i++) { if (itemID.Equals(itemsRList[i].ID)) { Item itemX = (Item)itemsRList[i]; for (int j = 0; j < itemX.Meshes.Count; j++) { string sss = itemX.Meshes[j].Name.Trim(); Console.WriteLine("|" + sss + "|"); Console.WriteLine("void Troop3DPreview(ListBox lb) : " + OpenBrfManager.AddMeshToTroop3DPreview(sss, 18));//item.R --> highest bone index (-1 to 18)); } i = itemsRList.Count; } } } catch (Exception ex) { Console.WriteLine(ex.ToString()); } } }