Skip to content

Commit 075dddc

Browse files
committed
Beta 2.3.2.1
2 parents 4f5a94b + 3d7ef43 commit 075dddc

File tree

6 files changed

+63
-10
lines changed

6 files changed

+63
-10
lines changed

xivModdingFramework/Cache/XivCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static class XivCache
2929
private static GameInfo _gameInfo;
3030
private static DirectoryInfo _dbPath;
3131
private static DirectoryInfo _rootCachePath;
32-
public static readonly Version CacheVersion = new Version("1.0.2.0");
32+
public static readonly Version CacheVersion = new Version("1.0.2.1");
3333
private const string dbFileName = "mod_cache.db";
3434
private const string rootCacheFileName = "item_sets.db";
3535
private const string creationScript = "CreateCacheDB.sql";

xivModdingFramework/Items/Categories/Gear.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,19 @@ await Task.Run(() => Parallel.ForEach(itemDictionary, (item) =>
227227
secondaryItem.SecondaryCategory = XivStrings.Dual_Wield;
228228
}
229229

230+
// Rings
231+
if(slotNum == 12)
232+
{
233+
// Make this the Right ring, and create the Left Ring entry.
234+
secondaryItem = (XivGear)xivGear.Clone();
235+
236+
xivGear.Name += " - " + XivStrings.Right;
237+
secondaryItem.Name += " - " + XivStrings.Left;
238+
239+
xivGear.PairedItem = secondaryItem;
240+
secondaryItem.PairedItem = xivGear;
241+
}
242+
230243
lock (_gearLock)
231244
{
232245
xivGearList.Add(xivGear);

xivModdingFramework/Items/ItemType.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,19 @@ public static string GetItemSlotAbbreviation(this IItem item)
182182
}
183183
}
184184

185+
if(item.SecondaryCategory == XivStrings.Rings)
186+
{
187+
// Rings contain both left and right rings.
188+
if (item.Name.EndsWith(XivStrings.Left))
189+
{
190+
return "ril";
191+
}
192+
else if (item.Name.EndsWith(XivStrings.Right))
193+
{
194+
return "rir";
195+
}
196+
}
197+
185198
if(item.GetType() == typeof(XivMount))
186199
{
187200
var m = (XivMount)item;

xivModdingFramework/Mods/RootCloner.cs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -355,18 +355,21 @@ public static async Task CloneRoot(XivDependencyRoot Source, XivDependencyRoot D
355355
}
356356

357357
// Poke through the variants and adjust any that point to null Material Sets to instead use a valid one.
358-
var valid = newMetadata.ImcEntries.FirstOrDefault(x => x.MaterialSet != 0).MaterialSet;
359-
if(valid <= 0)
358+
if (newMetadata.ImcEntries.Count > 0 && originalMetadata.ImcEntries.Count > 0)
360359
{
361-
valid = originalMetadata.ImcEntries.FirstOrDefault(x => x.MaterialSet != 0).MaterialSet;
362-
}
360+
var valid = newMetadata.ImcEntries.FirstOrDefault(x => x.MaterialSet != 0).MaterialSet;
361+
if (valid <= 0)
362+
{
363+
valid = originalMetadata.ImcEntries.FirstOrDefault(x => x.MaterialSet != 0).MaterialSet;
364+
}
363365

364-
for(int i = 0; i < newMetadata.ImcEntries.Count; i++)
365-
{
366-
var entry = newMetadata.ImcEntries[i];
367-
if (entry.MaterialSet == 0)
366+
for (int i = 0; i < newMetadata.ImcEntries.Count; i++)
368367
{
369-
entry.MaterialSet = valid;
368+
var entry = newMetadata.ImcEntries[i];
369+
if (entry.MaterialSet == 0)
370+
{
371+
entry.MaterialSet = valid;
372+
}
370373
}
371374
}
372375

xivModdingFramework/Resources/XivStrings.Designer.cs

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

xivModdingFramework/Resources/XivStrings.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,4 +894,10 @@
894894
<data name="HUD" xml:space="preserve">
895895
<value>HUD</value>
896896
</data>
897+
<data name="Left" xml:space="preserve">
898+
<value>Left</value>
899+
</data>
900+
<data name="Right" xml:space="preserve">
901+
<value>Right</value>
902+
</data>
897903
</root>

0 commit comments

Comments
 (0)