Skip to content

Commit 6f554ea

Browse files
committed
Update v2.3.5.10
2 parents fa30ca3 + 76a0491 commit 6f554ea

File tree

5 files changed

+68
-17
lines changed

5 files changed

+68
-17
lines changed

xivModdingFramework/Exd/FileTypes/Ex.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,17 @@ public async Task<Dictionary<int, byte[]>> ReadExData(XivEx exFile)
179179

180180
var exdFolderHash = HashGenerator.GetHash("exd");
181181
var exdFileHash = HashGenerator.GetHash(exdFile);
182+
var offset = await _index.GetDataOffset(exdFolderHash, exdFileHash, XivDataFile._0A_Exd);
182183

183-
exdNameOffsetDictionary.Add(await _index.GetDataOffset(exdFolderHash, exdFileHash, XivDataFile._0A_Exd), exdFile);
184+
try
185+
{
186+
exdNameOffsetDictionary.Add(offset, exdFile);
187+
}
188+
catch (Exception ex)
189+
{
190+
var zz = "zz";
191+
throw ex;
192+
}
184193
}
185194

186195
await Task.Run(async () =>

xivModdingFramework/Items/Categories/Gear.cs

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ public async Task<List<XivGear>> GetGearList(string substring = null)
6363
return await XivCache.GetCachedGearList(substring);
6464
}
6565

66+
private static Dictionary<string, int> DataLengthByPatch = new Dictionary<string, int>()
67+
{
68+
{ "5.3", 160 },
69+
{ "5.4", 168 },
70+
{ "5.5", 160 },
71+
};
72+
73+
private static Dictionary<string, int> SlotDataOffsetByPatch = new Dictionary<string, int>()
74+
{
75+
{ "5.3", 154 },
76+
{ "5.4", 156 },
77+
{ "5.5", 154 },
78+
};
79+
80+
6681
/// <summary>
6782
/// A getter for available gear in the Item exd files
6883
/// </summary>
@@ -72,21 +87,21 @@ public async Task<List<XivGear>> GetUnCachedGearList()
7287
// These are the offsets to relevant data
7388
// These will need to be changed if data gets added or removed with a patch
7489
const int modelDataCheckOffset = 30;
75-
int dataLength = 160;
90+
int dataLength = DataLengthByPatch["5.5"];
7691
const int nameDataOffset = 14;
7792
const int modelDataOffset = 24;
7893
const int iconDataOffset = 136;
79-
int slotDataOffset = 154;
94+
int slotDataOffset = SlotDataOffsetByPatch["5.5"];
8095

8196

8297
if( _xivLanguage == XivLanguage.Korean)
8398
{
84-
dataLength = 160;
85-
slotDataOffset = 154;
99+
dataLength = DataLengthByPatch["5.4"];
100+
slotDataOffset = SlotDataOffsetByPatch["5.4"];
86101
} else if (_xivLanguage == XivLanguage.Chinese)
87102
{
88-
dataLength = 168;
89-
slotDataOffset = 156;
103+
dataLength = DataLengthByPatch["5.4"];
104+
slotDataOffset = SlotDataOffsetByPatch["5.4"];
90105
}
91106

92107
var xivGearList = new List<XivGear>();

xivModdingFramework/Items/Categories/Housing.cs

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ public async Task<List<XivFurniture>> GetUncachedFurnitureList()
7171
return furnitureList;
7272
}
7373

74+
private static Dictionary<string, int> DataLengthByPatch = new Dictionary<string, int>()
75+
{
76+
{ "5.3", 160 },
77+
{ "5.4", 168 },
78+
{ "5.5", 160 },
79+
};
80+
81+
7482
/// <summary>
7583
/// Gets the list of indoor furniture
7684
/// </summary>
@@ -91,15 +99,15 @@ private async Task<List<XivFurniture>> GetIndoorFurniture()
9199
const int itemCategoryOffset = 14;
92100

93101
const int itemNameDataOffset = 14;
94-
int itemDataLength = 160;
102+
int itemDataLength = DataLengthByPatch["5.5"];
95103
const int itemIconDataOffset = 136;
96104

97105
if(_xivLanguage == XivLanguage.Korean)
98106
{
99-
itemDataLength = 160;
107+
itemDataLength = DataLengthByPatch["5.4"];
100108
} else if (_xivLanguage == XivLanguage.Chinese)
101109
{
102-
itemDataLength = 168;
110+
itemDataLength = DataLengthByPatch["5.4"];
103111
}
104112

105113
var ex = new Ex(_gameDirectory, _xivLanguage);
@@ -183,20 +191,21 @@ private async Task<List<XivFurniture>> GetPaintings()
183191

184192
const int itemNameDataOffset = 14;
185193
const int housingIndexOffset = 112;
186-
int itemDataLength = 160;
194+
int itemDataLength = DataLengthByPatch["5.5"];
187195
const int itemIconDataOffset = 136;
188196

189197
var ex = new Ex(_gameDirectory, _xivLanguage);
190198
var pictureDictionary = await ex.ReadExData(XivEx.picture);
191199
var itemDictionary = await ex.ReadExData(XivEx.item);
192200

201+
193202
if (_xivLanguage == XivLanguage.Korean)
194203
{
195-
itemDataLength = 160;
204+
itemDataLength = DataLengthByPatch["5.4"];
196205
}
197206
else if (_xivLanguage == XivLanguage.Chinese)
198207
{
199-
itemDataLength = 168;
208+
itemDataLength = DataLengthByPatch["5.4"];
200209
}
201210

202211

@@ -265,18 +274,20 @@ private async Task<List<XivFurniture>> GetOutdoorFurniture()
265274
const int itemCategoryOffset = 13;
266275

267276
const int itemNameDataOffset = 14;
268-
int itemDataLength = 160;
277+
int itemDataLength = DataLengthByPatch["5.5"];
269278
const int itemIconDataOffset = 136;
270279

271-
if ( _xivLanguage == XivLanguage.Korean)
280+
281+
if (_xivLanguage == XivLanguage.Korean)
272282
{
273-
itemDataLength = 160;
283+
itemDataLength = DataLengthByPatch["5.4"];
274284
}
275285
else if (_xivLanguage == XivLanguage.Chinese)
276286
{
277-
itemDataLength = 168;
287+
itemDataLength = DataLengthByPatch["5.4"];
278288
}
279289

290+
280291
var ex = new Ex(_gameDirectory, _xivLanguage);
281292
var housingDictionary = await ex.ReadExData(XivEx.housingyardobject);
282293
var itemDictionary = await ex.ReadExData(XivEx.item);

xivModdingFramework/Items/DataContainers/XivUi.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ public async Task<Dictionary<string, string>> GetTexPaths(bool addLowRes = true,
159159
{
160160
resPaths.Add(Name, "ui/uld/" + Name.ToLower() + ".tex");
161161
}
162+
} else if(SecondaryCategory == XivStrings.LoadingScreen)
163+
{
164+
resPaths.Add(Name, UiPath + '/' + Name + ".tex");
162165
}
163166
else
164167
{

xivModdingFramework/Items/ItemType.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,19 @@ public static string GetItemSlotAbbreviation(this IItem item)
209209
if(match.Success)
210210
{
211211
return match.Groups[1].Value;
212+
} else
213+
{
214+
// Hackhack fallback for cases where we have mounts listed in the item list
215+
// with no actual specific equipment slot assigned, such as the Company Chocobo.
216+
if(mi.PrimaryID == 1 && mi.SecondaryID == 1)
217+
{
218+
// Company chocobo
219+
return "dwn";
220+
} else
221+
{
222+
// Other mounts
223+
return "top";
224+
}
212225
}
213226
}
214227
}

0 commit comments

Comments
 (0)