Skip to content

Commit

Permalink
Some truly hacky code to get around the T3D Traits issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AJArkley committed Dec 3, 2016
1 parent 92f8a24 commit c009f71
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/EVEMon.Common/Resources/MD5Sums.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
8d9de77fb1705dd1e739ba10c583eb03 *eve-blueprints-en-US.xml.gzip
e30974b3980b6bd80f21b71ffa1d0ebd *eve-certificates-en-US.xml.gzip
c60dd6b987340ff7d848f7eedc5a39c4 *eve-geography-en-US.xml.gzip
b534807e3fbd97ff8955a024fd8bc93b *eve-items-en-US.xml.gzip
7b07e6d5609b7277c3cbf4e486430240 *eve-masteries-en-US.xml.gzip
6c5771edd993e540d77679daf91e2c35 *eve-properties-en-US.xml.gzip
0274d4572164cf2ecdebc36b887886fd *eve-reprocessing-en-US.xml.gzip
72e19887522d7cf27e077406618e3872 *eve-skills-en-US.xml.gzip
219eb76e35e9c1df32d2b7f21268582c *eve-blueprints-en-US.xml.gzip
540000f7c111354769a54fa31e57d411 *eve-certificates-en-US.xml.gzip
c9f5f87b8d330a9807d8a29211547791 *eve-geography-en-US.xml.gzip
4d7be11780cc5865d858cbbf5d3ed2c5 *eve-items-en-US.xml.gzip
3668b50996fc40a0c0853fec427b5712 *eve-masteries-en-US.xml.gzip
1e561036689c116fd39755ed30c20bda *eve-properties-en-US.xml.gzip
7ef72dae81f0dd200ef8f31c90fcb762 *eve-reprocessing-en-US.xml.gzip
5c6f3a9ea32a6f135b12f82ac6d8d2ce *eve-skills-en-US.xml.gzip
Binary file modified src/EVEMon.Common/Resources/eve-blueprints-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-certificates-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-geography-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-items-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-masteries-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-properties-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-reprocessing-en-US.xml.gzip
Binary file not shown.
Binary file modified src/EVEMon.Common/Resources/eve-skills-en-US.xml.gzip
Binary file not shown.
2 changes: 1 addition & 1 deletion src/EVEMon.Common/Serialization/Flags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<row flagID="156" flagName="HiddenModifiers" flagText="Hidden Modifiers" />
<row flagID="157" flagName="StructureOffline" flagText="Structure Offline" />
<row flagID="158" flagName="FighterBay" flagText="Fighter Bay" />
<row flagID="159" flagName="Fighte Tube0" flagText="Fighter Tube 0" />
<row flagID="159" flagName="FighterTube0" flagText="Fighter Tube 0" />
<row flagID="160" flagName="FighterTube1" flagText="Fighter Tube 1" />
<row flagID="161" flagName="FighterTube2" flagText="Fighter Tube 2" />
<row flagID="162" flagName="FighterTube3" flagText="Fighter Tube 3" />
Expand Down
2 changes: 1 addition & 1 deletion tools/XmlGenerator/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</startup>
<connectionStrings>
<clear />
<add name="EveStaticData" connectionString="data source=.\SQLEXPRESS;initial catalog=EveStaticData;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
<add name="EveStaticData" connectionString="data source=(localdb)\EVESDE;initial catalog=EveStaticData;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
Expand Down
48 changes: 48 additions & 0 deletions tools/XmlGenerator/Datafiles/Items.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,54 @@ private static void AddTraits(InvTypes srcItem, SerializableItem item)
}
}

// For any T3 destoyer, we need to deal with CCP being horrific cheats. The 'ship traits' are actually derived through some epic hacking from some hidden items:
// Hard coding some things in the short term, but need to make this MOAR BETTER.
List<int> T3DIDs = new List<int> { 34562, 35683, 34317, 34828 };
if (T3DIDs.Contains(item.ID))
{
Dictionary<string, int> T3DModeInfo = new Dictionary<string, int>();
T3DModeInfo.Add("Sharpshooter", 0);
T3DModeInfo.Add("Defense", 0);
T3DModeInfo.Add("Propulsion", 0);

// Determine which T3D we have, and get the relevant sub-item IDs
switch (item.ID)
{
case 34562:
// Svipul
T3DModeInfo["Sharpshooter"] = 34570;
T3DModeInfo["Propulsion"] = 34566;
T3DModeInfo["Defense"] = 34564;
break;
case 35683:
// Hecate
T3DModeInfo["Sharpshooter"] = 35688;
T3DModeInfo["Propulsion"] = 35687;
T3DModeInfo["Defense"] = 35686;
break;
case 34317:
// Confessor
T3DModeInfo["Sharpshooter"] = 34321;
T3DModeInfo["Propulsion"] = 34323;
T3DModeInfo["Defense"] = 34319;
break;
case 34828:
// Jackdaw
T3DModeInfo["Sharpshooter"] = 35678;
T3DModeInfo["Propulsion"] = 35677;
T3DModeInfo["Defense"] = 35676;
break;
default:
break;
}

foreach (var T3DMode in T3DModeInfo)
{
var DBRecord = Database.InvTypesTable[T3DMode.Value];
miscBonusesText += $"{T3DMode.Key}{@" Mode:"}{Environment.NewLine}{DBRecord.Description}{Environment.NewLine + Environment.NewLine}";
}
}

// Skip if no bonuses
if (String.IsNullOrWhiteSpace(skillBonusesText) && String.IsNullOrWhiteSpace(roleBonusesText) &&
String.IsNullOrWhiteSpace(miscBonusesText))
Expand Down

0 comments on commit c009f71

Please sign in to comment.