Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client/Database/DbOpFilterDrops.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class DbOpFilterDrops : IDbRequest
private SelectMultiParam<SchemaConstants.ItemType, uint> mItemTypes;
private SelectMultiParam<SchemaConstants.Rarity, uint> mRarities;
private SelectMultiParam<RealmSynergy.SynergyValue, uint> mSynergies;
private SelectMultiParam<uint, uint> mWorlds;
private SelectMultiParam<uint, uint> mDungeons;
private SelectMultiParam<uint, uint> mBattles;
private SelectSingleParam<string> mName;
Expand All @@ -32,6 +33,7 @@ public DbOpFilterDrops(FFRKMySqlInstance Database)
mItemTypes = new SelectMultiParam<SchemaConstants.ItemType, uint>("item_type");
mRarities = new SelectMultiParam<SchemaConstants.Rarity, uint>("item_rarity");
mSynergies = new SelectMultiParam<RealmSynergy.SynergyValue, uint>("item_series", (x) => x.GameSeries);
mWorlds = new SelectMultiParam<uint, uint>("world_id");
mDungeons = new SelectMultiParam<uint, uint>("dungeon_id");
mBattles = new SelectMultiParam<uint, uint>("battleid");
mName = new SelectSingleParam<string>("item_name", SelectSingleParam<string>.ParamOperator.Like);
Expand All @@ -49,6 +51,7 @@ public bool RequiresTransaction
public SelectMultiParam<SchemaConstants.ItemType, uint> ItemTypes { get { return mItemTypes; } }
public SelectMultiParam<SchemaConstants.Rarity, uint> Rarities { get { return mRarities; } }
public SelectMultiParam<RealmSynergy.SynergyValue, uint> Synergies { get { return mSynergies; } }
public SelectMultiParam<uint, uint> Worlds { get { return mWorlds; } }
public SelectMultiParam<uint, uint> Dungeons { get { return mDungeons; } }
public SelectMultiParam<uint, uint> Battles { get { return mBattles; } }
public SelectSingleParam<string> Name { get { return mName; } }
Expand All @@ -66,6 +69,7 @@ public void Execute(MySqlConnection connection, MySqlTransaction transaction)
builder.Parameters.Add(mItemTypes);
builder.Parameters.Add(mRarities);
builder.Parameters.Add(mSynergies);
builder.Parameters.Add(mWorlds);
builder.Parameters.Add(mDungeons);
builder.Parameters.Add(mBattles);
builder.Parameters.Add(mName);
Expand Down
13 changes: 13 additions & 0 deletions client/FFRKInspector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,15 @@
<Compile Include="GameData\AppInit\AppInitData.cs" />
<Compile Include="GameData\AppInit\DataUser.cs" />
<Compile Include="GameData\AppInit\EventData.cs" />
<Compile Include="GameData\DataDefAttributes.cs" />
<Compile Include="GameData\DataDungeonCaptures.cs" />
<Compile Include="GameData\DataDungeonSpScore.cs" />
<Compile Include="GameData\DataPotion.cs" />
<Compile Include="GameData\DataMateria.cs" />
<Compile Include="GameData\Converters\EpochToDateTime.cs" />
<Compile Include="GameData\Converters\EquipUsageListConverter.cs" />
<Compile Include="GameData\DataBuddyEquipUsage.cs" />
<Compile Include="GameData\DataUserDungeon.cs" />
<Compile Include="GameData\EquipmentUsage.cs" />
<Compile Include="GameData\EquipStats.cs" />
<Compile Include="GameData\StatCalculator.cs" />
Expand Down Expand Up @@ -168,6 +172,12 @@
<Compile Include="UI\FFRKViewAbout.Designer.cs">
<DependentUpon>FFRKViewAbout.cs</DependentUpon>
</Compile>
<Compile Include="UI\FFRKViewActiveBattle.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UI\FFRKViewActiveBattle.Designer.cs">
<DependentUpon>FFRKViewActiveBattle.cs</DependentUpon>
</Compile>
<Compile Include="UI\FFRKViewBrowse.cs">
<SubType>UserControl</SubType>
</Compile>
Expand Down Expand Up @@ -274,6 +284,9 @@
<EmbeddedResource Include="UI\FFRKViewAbout.resx">
<DependentUpon>FFRKViewAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FFRKViewActiveBattle.resx">
<DependentUpon>FFRKViewActiveBattle.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UI\FFRKViewBrowse.resx">
<DependentUpon>FFRKViewBrowse.cs</DependentUpon>
</EmbeddedResource>
Expand Down
7 changes: 7 additions & 0 deletions client/GameData/BasicEnemyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ class BasicEnemyInfo
{
public uint EnemyId;
public string EnemyName;
public uint EnemyMaxHp;
//public string EnemyElemWeakness;
public List<string> EnemyElemWeakness;
public List<string> EnemyElemResist;
public List<string> EnemyElemAbsorb;
public List<string> EnemyElemNull;
public List<string> EnemyStatusImmunity;

public override bool Equals(object obj)
{
Expand Down
2 changes: 2 additions & 0 deletions client/GameData/BasicItemDropStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ public BasicItemDropStats()
public uint TimesRunWithHistogram;
public ushort BattleStamina;

public float DropsPerRunF; //This is only used in the filter to select the drops/run column.

public Utility.Histogram Histogram;

public double DropsAverage
Expand Down
63 changes: 59 additions & 4 deletions client/GameData/DataActiveBattle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,65 @@ public IEnumerable<BasicEnemyInfo> Enemies
// Not sure what the deal is with child and params, or why an enemy can theoretically
// have more than one name. I assume it has something to do with enemies that have
// different body parts, but haven't figured it out yet.
if (child.Params.Count == 0)
continue;
infos.Add(new BasicEnemyInfo { EnemyId = child.EnemyId, EnemyName = child.Params[0].Name });
break;
if (child.Params.Count == 0) { continue; }
else
{
foreach (DataEnemyParam param in child.Params)
{
List<string> elemweakness = new List<string>();
List<string> elemresist = new List<string>();
List<string> elemnull = new List<string>();
List<string> elemabsorb = new List<string>();
List<string> statusimmune = new List<string>();
foreach (DataDefAttributes defattributes in param.DefAttributes)
{
if (defattributes.Id < 200) //If it's an elemental weakness.
{
if (defattributes.Factor == (int)SchemaConstants.ElementVulnerability.Vulnerable)
{
//elemweakness.Add(((SchemaConstants.ElementID)defattributes.Id).ToString());
elemweakness.Add(Enum.GetName(typeof(SchemaConstants.ElementID), defattributes.Id));
}
else if (defattributes.Factor == (int)SchemaConstants.ElementVulnerability.Absorb)
{
elemabsorb.Add(Enum.GetName(typeof(SchemaConstants.ElementID), defattributes.Id));
}
else if (defattributes.Factor == (int)SchemaConstants.ElementVulnerability.Null)
{
elemnull.Add(Enum.GetName(typeof(SchemaConstants.ElementID), defattributes.Id));
}
else if (defattributes.Factor == (int)SchemaConstants.ElementVulnerability.Resist)
{
elemresist.Add(Enum.GetName(typeof(SchemaConstants.ElementID), defattributes.Id));
}
}
else if ((defattributes.Id >= 200) && (defattributes.Id < 216)) //If >=200 then it must be a status effect.
{
if (defattributes.Factor == (int)SchemaConstants.StatusVulnerability.Immune)
{
statusimmune.Add(Enum.GetName(typeof(SchemaConstants.StatusID), defattributes.Id));
}

}
}
//List<string> elemweakness = new List<string>();
//elemweakness.Add(Enum.GetName(typeof(SchemaConstants.StatusID), param.DefAttributes[0].Id));
//elemweakness.Add(Enum.GetName(typeof(SchemaConstants.StatusID), param.DefAttributes[1].Id));
infos.Add(new BasicEnemyInfo
{
EnemyId = param.Id,
EnemyName = param.Name,
EnemyMaxHp = param.MaxHp,
//EnemyElemWeakness = elemweakness
EnemyElemResist = elemresist,
EnemyElemWeakness = elemweakness,
EnemyElemAbsorb = elemabsorb,
EnemyElemNull = elemnull,
EnemyStatusImmunity = statusimmune
});
//break;
}
}
}
}
}
Expand Down
22 changes: 22 additions & 0 deletions client/GameData/DataDefAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FFRKInspector.GameData
{
class DataDefAttributes
{
[JsonProperty("attribute_id")]
public uint Id;

[JsonProperty("factor")]
public uint Factor;

[JsonExtensionData]
public Dictionary<string, JToken> UnknownValues;
}
}
20 changes: 20 additions & 0 deletions client/GameData/DataDungeonCaptures.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace FFRKInspector.GameData
{
class DataDungeonCaptures
{
[JsonProperty("sp_scores")]
public List<DataDungeonSpScore> SpScore;

[JsonExtensionData]
public Dictionary<string, JToken> UnknownValues;
}
}
24 changes: 24 additions & 0 deletions client/GameData/DataDungeonSpScore.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;


namespace FFRKInspector.GameData
{
class DataDungeonSpScore
{
[JsonProperty("title")]
public string Title;

[JsonProperty("battle_id")]
public uint BattleID;

[JsonExtensionData]
public Dictionary<string, JToken> UnknownValues;
}
}
7 changes: 7 additions & 0 deletions client/GameData/DataEnemyParam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ class DataEnemyParam
[JsonProperty("id")]
public uint Id;

[JsonProperty("max_hp")]
public uint MaxHp;

[JsonProperty("def_attributes")]
public List<DataDefAttributes> DefAttributes;

[JsonExtensionData]
public Dictionary<string, JToken> UnknownValues;

}
}
20 changes: 20 additions & 0 deletions client/GameData/DataUserDungeon.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace FFRKInspector.GameData
{
class DataUserDungeon
{
[JsonProperty("captures")]
public List<DataDungeonCaptures> Captures;

[JsonExtensionData]
public Dictionary<string, JToken> UnknownValues;
}
}
3 changes: 3 additions & 0 deletions client/GameData/EventListBattles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class EventListBattles
[JsonProperty("user")]
public DataUser User;

[JsonProperty("user_dungeon")]
public DataUserDungeon UserDungeon;

[JsonExtensionData]
public Dictionary<string, JToken> UnknownValues;
}
Expand Down
2 changes: 2 additions & 0 deletions client/GameData/RealmSynergy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum Value
FF11 = 11,
FF12 = 12,
FF13 = 13,
FF14 = 14,
}

public class SynergyValue
Expand Down Expand Up @@ -79,6 +80,7 @@ static RealmSynergy()
new SynergyValue("XI", 111001, Value.FF11),
new SynergyValue("XII", 112001, Value.FF12),
new SynergyValue("XIII", 113001, Value.FF13),
new SynergyValue("XIV", 114001, Value.FF14),
};

foreach (SynergyValue value in values)
Expand Down
59 changes: 59 additions & 0 deletions client/GameData/SchemaConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public enum EquipmentCategory : byte
Whip = 12,
Thrown = 13,
Book = 14,
Gun = 15,
Ball = 30,
Hairpin = 31,
Shield = 50,
Hat = 51,
Helm = 52,
Expand Down Expand Up @@ -112,5 +114,62 @@ public enum DungeonType : byte
Normal = 1,
Elite = 2
}

public enum ElementID : ushort
{
Fire = 100,
Ice = 101,
Lightning = 102,
Earth = 103,
Wind = 104,
Water = 105,
Holy = 106,
Dark = 107,
Poison = 108
}

public enum ElementVulnerability : ushort
{
Vulnerable = 1,
Resist = 6,
Null = 11,
Absorb = 21
}

public enum StatusID : ushort
{
Poison = 200,
Silence = 201,
Paralyze = 202,
Confuse = 203,
Haste = 204,
Slow = 205,
Stop = 206,
Protect = 207,
Shell = 208,
Reflect = 209,
Blind = 210,
Sleep = 211,
Petrify = 212,
Doom = 213,
Instant_KO = 214,
Beserk = 215,
Regen = 216,
Reraise = 217,
Float = 218,
Weak = 219,
Zombie = 220,
Mini = 221,
Toad = 222,
Curse = 223,
Slownumb = 224,
Blink = 225
}

public enum StatusVulnerability : ushort
{
Immune = 1
}

}
}
Loading